auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void propagate_RuntimeException_when_handler_throws() { ModelTests.clearModel(); FaultyAggregate faultyAggregate = new FaultyAggregate(ID, true, false); Command command = Given.ACommand.createProject(); try { dispatchCommand(faultyAggregate, env(command.getMessage())); failNotThrows(); } catch (RuntimeException e) { @SuppressWarnings("ThrowableResultOfMethodCallIgnored") <START> Throwable cause = getRootCause(e); <END> assertTrue(cause instanceof IllegalStateException); assertEquals(FaultyAggregate.BROKEN_HANDLER, cause.getMessage()); } }</code><technical_language>above, please fix code alignment</technical_language>

Target:
public void propagate_RuntimeException_when_handler_throws() { ModelTests.clearModel(); FaultyAggregate faultyAggregate = new FaultyAggregate(ID, true, false); Command command = Given.ACommand.createProject(); try { dispatchCommand(faultyAggregate, env(command.getMessage())); failNotThrows(); } catch (RuntimeException e) { Throwable cause = getRootCause(e); assertTrue(cause instanceof IllegalStateException); assertEquals(FaultyAggregate.BROKEN_HANDLER, cause.getMessage()); } }
Source:
<code>public AccessControlInfo(AccessControl accessControl, Identity identity) { <START> this.accessControl = accessControl; <END> this.identity = identity; }</code><technical_language>Check for null</technical_language>

Target:
public AccessControlInfo(AccessControl accessControl, Identity identity) { this.accessControl = requireNonNull(accessControl, "accessControl is null"); this.identity = requireNonNull(identity, "identity is null"); }
Source:
<code>public void closesExplicitlyAllParts() throws Exception { final String body = "RqMtFakeTest.closesExplicitlyAllParts"; final RqMultipart request = new RqMtFake( new RqFake(), new RqWithHeaders( new RqFake("", "", body), new FormattedText( "Content-Length: %s", body.getBytes().length ).asString(), "Content-Disposition: form-data; name=\"foo\"" ), new RqWithHeaders( new RqFake("", "", body), "Content-Length: 0", <START> "Content-Disposition: form-data; name=\"bar\"; filename=\"a.bin\"" <END> ) ); final String foo = "foo"; final String bar = "bar"; final RqMtBase multi = new RqMtBase(request); multi.body().close(); MatcherAssert.assertThat( multi.part(foo).iterator().next(), Matchers.notNullValue() ); multi.part(foo).iterator().next().body().close(); MatcherAssert.assertThat( multi.part(bar).iterator().next(), Matchers.notNullValue() ); multi.part(bar).iterator().next().body().close(); }</code><technical_language>@Serranya here. above</technical_language>

Target:
public void closesExplicitlyAllParts() throws Exception { final String body = "RqMtFakeTest.closesExplicitlyAllParts"; final RqMultipart request = new RqMtFake( new RqFake(), new RqWithHeaders( new RqFake("", "", body), new FormattedText( RqMtFakeTest.CONTENT_LENGTH, body.getBytes().length ).asString(), new FormattedText( RqMtFakeTest.CONTENT_DISP, "name=\"foo\"" ).asString() ), new RqWithHeaders( new RqFake("", "", body), new FormattedText(RqMtFakeTest.CONTENT_LENGTH, 0).asString(), new FormattedText( RqMtFakeTest.CONTENT_DISP, "name=\"bar\"; filename=\"a.bin\"" ).asString() ) ); final String foo = "foo"; final String bar = "bar"; final RqMtBase multi = new RqMtBase(request); multi.body().close(); MatcherAssert.assertThat( multi.part(foo).iterator().next(), Matchers.notNullValue() ); multi.part(foo).iterator().next().body().close(); MatcherAssert.assertThat( multi.part(bar).iterator().next(), Matchers.notNullValue() ); multi.part(bar).iterator().next().body().close(); }
Source:
<code>public PagedSessionDataDto getAll(int start, int length) { checkArgument(start >= 0, "start is negative"); checkArgument(length >= 0, "length is negative"); long timestamp = System.currentTimeMillis(); long totalSize; List<SessionDataDto> sessionDataDtoList; totalSize = (Long) entityManager.createQuery("select count(sessionData.id) from SessionData as sessionData").getSingleResult(); try { <START> if (commonDataService.getWebClientProperties().isUserCommentStoreAvailable() || commonDataService.getWebClientProperties().isTagsAvailable()) { <END> sessionDataDtoList = getAllWithMetaData(start, length); } else { sessionDataDtoList = getAllNoMetaData(start, length); } } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } if (sessionDataDtoList.isEmpty()) { return new PagedSessionDataDto(Collections.<SessionDataDto>emptyList(), 0); } log.info("There was loaded sessions data from for ms", new Object[]{sessionDataDtoList.size(), totalSize, System.currentTimeMillis() - timestamp}); return new PagedSessionDataDto(sessionDataDtoList, (int) totalSize); }</code><technical_language>do need "|| commonDataService.getWebClientProperties().isTagsAvailable()" in if clause</technical_language>

Target:
public PagedSessionDataDto getAll(int start, int length) { checkArgument(start >= 0, "start is negative"); checkArgument(length >= 0, "length is negative"); long timestamp = System.currentTimeMillis(); long totalSize; List<SessionDataDto> sessionDataDtoList; totalSize = (Long) entityManager.createQuery("select count(sessionData.id) from SessionData as sessionData").getSingleResult(); try { sessionDataDtoList = getAllWithMetaData(start, length); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } if (sessionDataDtoList.isEmpty()) { return new PagedSessionDataDto(Collections.<SessionDataDto>emptyList(), 0); } log.info("There was loaded sessions data from for ms", new Object[]{sessionDataDtoList.size(), totalSize, System.currentTimeMillis() - timestamp}); return new PagedSessionDataDto(sessionDataDtoList, (int) totalSize); }
Source:
<code><START> public void testHead() throws DDFException { <END> HDFSDDF csvDDF = manager.newDDF("/user/jing/year.csv", null, null); List<String> rows = manager.head(csvDDF, 5); assert(rows.size() == 2); LOG.info("========== content of year.csv =========="); for (String s : rows) { System.out.println(s); } rows = manager.head(csvDDF, 20000); assert(rows.size() == 2); rows = manager.head(csvDDF, 1000); assert(rows.size() == 2); HDFSDDF folderDDF = manager.newDDF("/user/jing/testFolder", null, null); rows = manager.head(folderDDF, 5); assert (rows.size() == 4); HDFSDDF ddf1024 = manager.newDDF("/user/jing/1024.csv", null, null); rows = manager.head(ddf1024, 9999); assert (rows.size() == 1000); }</code><technical_language>test head() empty file</technical_language>

Target:
public void testHead() throws DDFException { HDFSDDF csvDDF = manager.newDDF("/test_pe/csv/small/1.csv", null, null); List<String> rows = manager.head(csvDDF, 5); assert(rows.size() == 2); rows = manager.head(csvDDF, 20000); assert(rows.size() == 2); rows = manager.head(csvDDF, 1000); assert(rows.size() == 2); HDFSDDF folderDDF = manager.newDDF("/test_pe/csv/small", null, null); rows = manager.head(folderDDF, 5); assert (rows.size() == 4); HDFSDDF ddf1024 = manager.newDDF("/test_pe/csv/fixed_len/1024.csv", null, null); rows = manager.head(ddf1024, 9999); assert (rows.size() == 1000); }
Source:
<code>private State objectToState(Object value, String itemName) { String valueStr = String.valueOf(value); if (itemRegistry != null) { try { Item item = itemRegistry.getItem(itemName); if (item instanceof ColorItem || item instanceof DimmerItem) { return item.getState(); } else if (item instanceof SwitchItem) { <START> return convertToSwitchOutput(valueStr).equals(DIGITAL_VALUE_OFF) <END> ? OnOffType.OFF : OnOffType.ON; } else if (item instanceof ContactItem) { return (convertToContactOutput(valueStr).equals(DIGITAL_VALUE_CLOSED)) ? OpenClosedType.CLOSED : OpenClosedType.OPEN; } else if (item instanceof GenericItem) { return item.getState(); } } catch (ItemNotFoundException e) { logger.warn("Could not find item '{}' in registry", itemName); } } return new StringType(valueStr); }</code><technical_language>Replacing string2DigitalValue convertToSwitchOutput convertToContactOutput is a bad idea OpenClosedType is stored 0 1. I prefer overhead of Bigdecimal approach exception handling of Integer.parseInt()</technical_language>

Target:
private State objectToState(Object value, String itemName) { String valueStr = String.valueOf(value); if (itemRegistry != null) { try { Item item = itemRegistry.getItem(itemName); if (item instanceof ColorItem || item instanceof DimmerItem) { return item.getState(); } else if (item instanceof SwitchItem) { return string2DigitalValue(valueStr).equals(DIGITAL_VALUE_OFF) ? OnOffType.OFF : OnOffType.ON; } else if (item instanceof ContactItem) { return (string2DigitalValue(valueStr).equals(DIGITAL_VALUE_OFF)) ? OpenClosedType.CLOSED : OpenClosedType.OPEN; } else if (item instanceof GenericItem) { return item.getState(); } } catch (ItemNotFoundException e) { logger.warn("Could not find item '{}' in registry", itemName); } } return new StringType(valueStr); }
Source:
<code>private static String getMavenHome() throws OwaspDiffRunnerException { String mavenHome; String mavenVersionInfo; try { mavenVersionInfo = IOUtils.toString(runTime.exec(MAVEN_VERSION_COMMAND).getInputStream()); mavenHome = Arrays.stream(mavenVersionInfo.split(System.getProperty("line.separator"))) .filter(str -> str.contains("Maven home:")) .findFirst() <START> .orElse(null); <END> if (mavenHome != null) { mavenHome = mavenHome.split("Maven home:")[1].trim(); } } catch (Exception e) { throw new OwaspDiffRunnerException(OwaspDiffRunnerException.UNABLE_TO_RETRIEVE_MAVEN_HOME, e); } return mavenHome; }</code><technical_language>I code throw OwaspDiffRunnerException a .get() null orElseThrwow() instead of setting null</technical_language>

Target:
private static String getMavenHome() throws OwaspDiffRunnerException { String mavenVersionInfo; try { mavenVersionInfo = IOUtils.toString( runTime.exec(MAVEN_VERSION_COMMAND).getInputStream(), StandardCharsets.UTF_8.name()); return Arrays.stream(mavenVersionInfo.split(System.getProperty("line.separator"))) .filter(str -> str.contains("Maven home:")) .findFirst() .map(s -> s.split("Maven home:")[1]) .map(String::trim) .orElseThrow( () -> new OwaspDiffRunnerException( OwaspDiffRunnerException.UNABLE_TO_RETRIEVE_MAVEN_HOME)); } catch (OwaspDiffRunnerException e) { throw e; } catch (Exception e) { throw new OwaspDiffRunnerException(OwaspDiffRunnerException.UNABLE_TO_RETRIEVE_MAVEN_HOME, e); } }
Source:
<code>public SimpleLocalMemoryContext(AggregatedMemoryContext parentMemoryContext) { <START> this.parentMemoryContext = requireNonNull(parentMemoryContext); <END> }</code><technical_language>requireNonNull(parentMemoryContext, "parentMemoryContext is null")</technical_language>

Target:
public SimpleLocalMemoryContext(AggregatedMemoryContext parentMemoryContext) { this.parentMemoryContext = requireNonNull(parentMemoryContext, "parentMemoryContext is null"); }
Source:
<code>public PhysicalPlan<OperatorChain> chainOperators(final PhysicalPlan<Operator> plan) { final Map<SourceGenerator, Set<OperatorChain>> sourceMap = new HashMap<>(); final Map<OperatorChain, Set<Sink>> sinkMap = new HashMap<>(); final DAG<OperatorChain> operatorChainDAG = new AdjacentListDAG<>(); final Map<Operator, OperatorChain> operatorChainMap = new HashMap<>(); for (final Map.Entry<SourceGenerator, Set<Operator>> entry : plan.getSourceMap().entrySet()) { final Set<Operator> rootOperators = entry.getValue(); final Set<OperatorChain> operatorChains = new HashSet<>(); for (final Operator rootOperator : rootOperators) { <START> final OperatorChain newOperatorChain = getNewOperatorChain(); <END> operatorChainMap.put(rootOperator, newOperatorChain); newOperatorChain.insertToTail(rootOperator); chainOperatorHelper(plan, operatorChainMap, operatorChainDAG, sinkMap, rootOperator, null, newOperatorChain); operatorChains.add(newOperatorChain); } sourceMap.put(entry.getKey(), operatorChains); } return new DefaultPhysicalPlanImpl<>(sourceMap, operatorChainDAG, sinkMap); }</code><technical_language>Naming convention. getXXX returns a singleton. newXXX returns a new object instance</technical_language>

Target:
public PhysicalPlan<OperatorChain> chainOperators(final PhysicalPlan<Operator> plan) { final Map<SourceGenerator, Set<OperatorChain>> sourceMap = new HashMap<>(); final Map<OperatorChain, Set<Sink>> sinkMap = new HashMap<>(); final DAG<OperatorChain> operatorChainDAG = new AdjacentListDAG<>(); final Map<Operator, OperatorChain> operatorChainMap = new HashMap<>(); for (final Map.Entry<SourceGenerator, Set<Operator>> entry : plan.getSourceMap().entrySet()) { final Set<Operator> rootOperators = entry.getValue(); final Set<OperatorChain> operatorChains = new HashSet<>(); for (final Operator rootOperator : rootOperators) { OperatorChain currOpChain = operatorChainMap.get(rootOperator); if (currOpChain == null) { currOpChain = new DefaultOperatorChain(); operatorChainMap.put(rootOperator, currOpChain); currOpChain.insertToTail(rootOperator); chainOperatorHelper(plan, operatorChainMap, operatorChainDAG, sinkMap, rootOperator, null, currOpChain); } operatorChains.add(currOpChain); } sourceMap.put(entry.getKey(), operatorChains); } return new DefaultPhysicalPlanImpl<>(sourceMap, operatorChainDAG, sinkMap); }
Source:
<code>private Connection getConn() throws Exception { Map<String, String> env = System.getenv(); String opts[] = {"POSTGRES_USER", "POSTGRES_PASS", "POSTGRES_JDBC_URL", "POSTGRES_DB"}; for (String opt : opts) { if (env.get(opt) == null) { throw new Exception("Environment var '" + opt + "' not set"); } } Properties props = new Properties(); props.setProperty("user", env.get("POSTGRES_USER")); props.setProperty("password", env.get("POSTGRES_PASS")); props.setProperty("database", env.get("POSTGRES_DB")); <END> props.setProperty("driver", "org.postgresql.Driver"); String url = String.format("%s/%s",env.get("POSTGRES_JDBC_URL"), env.get("POSTGRES_DB")); return DriverManager.getConnection(url, props); }</code><technical_language>If remove</technical_language>

Target:
private Connection getConn() throws Exception { Map<String, String> env = System.getenv(); String opts[] = {"POSTGRES_USER", "POSTGRES_PASS", "POSTGRES_JDBC_URL", "POSTGRES_DB"}; for (String opt : opts) { if (env.get(opt) == null) { throw new Exception("Environment var '" + opt + "' not set"); } } Properties props = new Properties(); props.setProperty("user", env.get("POSTGRES_USER")); props.setProperty("password", env.get("POSTGRES_PASS")); props.setProperty("database", env.get("POSTGRES_DB")); props.setProperty("ssl", "true"); props.setProperty("sslfactory", "org.postgresql.ssl.NonValidatingFactory"); props.setProperty("driver", "org.postgresql.Driver"); String url = String.format("%s/%s", env.get("POSTGRES_JDBC_URL"), env.get("POSTGRES_DB")); return DriverManager.getConnection(url, props); }
Source:
<code>public void testPreferences() throws Exception { ExtSed sed = new ExtSed("test"); IrisStarTableAdapter adapter = new IrisStarTableAdapter(null); SedModel model = new SedModel(sed, adapter); assertEquals(0, model.getAllSegmentModels().size()); Segment seg1 = createSampleSegment(); sed.addSegment(seg1); model.refresh(); assertEquals(1, model.getAllSegmentModels().size()); model.addSegment(seg1); assertEquals(1, model.getAllSegmentModels().size()); Segment seg2 = createSampleSegment(); sed.addSegment(seg2); model.refresh(); assertEquals(2, model.getAllSegmentModels().size()); SegmentModel layer1 = model.getSegmentModel(seg1); SegmentModel layer2 = model.getSegmentModel(seg2); assertFalse(layer1.getSuffix().equals(layer2.getSuffix())); String color2 = model.getSegmentModel(seg2).getMarkColor(); assertNotEquals( model.getSegmentModel(seg1).getMarkColor(), model.getSegmentModel(seg2).getMarkColor()); assertEquals(3, layer1.getInSource().getRowCount()); assertEquals(3, layer2.getInSource().getRowCount()); sed.remove(seg1); <START> model.refresh(); <END> assertEquals(1, model.getAllSegmentModels().size()); assertEquals(color2, model.getSegmentModel(seg2).getMarkColor()); assertNotNull(model.getSegmentModel(seg2)); assertNotNull(model.getSegmentModel(seg2).getInSource()); assertEquals(sed.getSegment(0).getFluxAxisUnits(), model.getYunits()); assertEquals(sed.getSegment(0).getSpectralAxisUnits(), model.getXunits()); }</code><technical_language>I guess automatic refreshing is tested in integration tests. I necessarily need a unit test, checking :)</technical_language>

Target:
public void testPreferences() throws Exception { ExtSed sed = new ExtSed("test"); sed.setManaged(false); IrisStarTableAdapter adapter = new IrisStarTableAdapter(null); SedModel model = new SedModel(sed, adapter); assertEquals(0, model.getAllSegmentModels().size()); Segment seg1 = createSampleSegment(); sed.addSegment(seg1); model.refresh(); assertEquals(1, model.getAllSegmentModels().size()); model.addSegment(seg1); assertEquals(1, model.getAllSegmentModels().size()); Segment seg2 = createSampleSegment(); sed.addSegment(seg2); model.refresh(); assertEquals(2, model.getAllSegmentModels().size()); SegmentModel layer1 = model.getSegmentModel(seg1); SegmentModel layer2 = model.getSegmentModel(seg2); assertFalse(layer1.getSuffix().equals(layer2.getSuffix())); String color2 = model.getSegmentModel(seg2).getMarkColor(); assertNotEquals( model.getSegmentModel(seg1).getMarkColor(), model.getSegmentModel(seg2).getMarkColor()); assertEquals(3, layer1.getInSource().getRowCount()); assertEquals(3, layer2.getInSource().getRowCount()); sed.remove(seg1); model.refresh(); assertEquals(1, model.getAllSegmentModels().size()); assertEquals(color2, model.getSegmentModel(seg2).getMarkColor()); assertNotNull(model.getSegmentModel(seg2)); assertNotNull(model.getSegmentModel(seg2).getInSource()); assertEquals(sed.getSegment(0).getFluxAxisUnits(), model.getYunits()); assertEquals(sed.getSegment(0).getSpectralAxisUnits(), model.getXunits()); }
Source:
<code>public List<Class<? extends WindupRuleProvider>> getExecuteBefore() { Rules ann = this.getClass().getAnnotation(Rules.class); <START> if(ann != null) <END> return Arrays.asList(ann.before()); else return Collections.emptyList(); }</code><technical_language>Rename "ann" "rules", "rulesAnnotation" more descriptive</technical_language>

Target:
public List<Class<? extends WindupRuleProvider>> getExecuteBefore() { Rules rulesAnnotation = this.getClass().getAnnotation(Rules.class); if(rulesAnnotation != null) return Arrays.asList(rulesAnnotation.before()); else return Collections.emptyList(); }
Source:
<code>public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getFirstTarget()); if (player != null) { <START> player.discard(player.getHand(), source, game); <END> } return false; }</code><technical_language>Missing return true</technical_language>

Target:
public boolean apply(Game game, Ability source) { Player player = game.getPlayer(source.getFirstTarget()); if (player == null) { return false; } player.discard(player.getHand(), source, game); return true; }
Source:
<code>private boolean validateBricks(List<GlusterBrickEntity> newBricks) { <START> for (GlusterBrickEntity brick : newBricks) { <END> GlusterBrickEntity existingBrick = getGlusterBrickDao().getBrickByServerIdAndDirectory(brick.getServerId(), brick.getBrickDirectory()); if (existingBrick != null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_BRICK_ALREADY_EXISTS_IN_VOLUME); addCanDoActionMessage(String.format("$brick %1$s", brick.getQualifiedName())); addCanDoActionMessage(String.format("$volumeName %1$s", getGlusterVolumeDao().getById(existingBrick.getVolumeId()).getName())); return false; } } return true; }</code><technical_language>if duplicated in newBricks list? Is possible</technical_language>

Target:
private boolean validateBricks(List<GlusterBrickEntity> newBricks) { Set<String> bricks = new HashSet<String>(); for (GlusterBrickEntity brick : newBricks) { if (bricks.contains(brick.getQualifiedName())) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_DUPLICATE_BRICKS); addCanDoActionMessage(String.format("$brick %1$s", brick.getQualifiedName())); return false; } bricks.add(brick.getQualifiedName()); GlusterBrickEntity existingBrick = getGlusterBrickDao().getBrickByServerIdAndDirectory(brick.getServerId(), brick.getBrickDirectory()); if (existingBrick != null) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_BRICK_ALREADY_EXISTS_IN_VOLUME); addCanDoActionMessage(String.format("$brick %1$s", brick.getQualifiedName())); addCanDoActionMessage(String.format("$volumeName %1$s", getGlusterVolumeDao().getById(existingBrick.getVolumeId()).getName())); return false; } } return true; }
Source:
<code>public HttpRequest filter(HttpRequest request) throws HttpException { request = this.replaceDateHeader(request); <START> request = this.replaceHostHeader(request); <END> utils.logRequest(signatureLog, request, ">>"); request = this.signer.sign(request); utils.logRequest(signatureLog, request, "<<"); return request; }</code><technical_language>below, do need create multiple HttpRequests</technical_language>

Target:
public HttpRequest filter(HttpRequest request) throws HttpException { request = request.toBuilder().removeHeader(HttpHeaders.DATE) .replaceHeader(GlacierHeaders.ALTERNATE_DATE, timeStampProvider.get()) .replaceHeader(HttpHeaders.HOST, request.getEndpoint().getHost()).build(); utils.logRequest(signatureLog, request, ">>"); request = this.signer.sign(request); utils.logRequest(signatureLog, request, "<<"); return request; }
Source:
<code>public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (savedInstanceState != null || mCalled) { return; } mCalled = true; Bundle params = getArguments().getBundle(ExtraConstants.PARAMS); String phone = null; String countryIso = null; String nationalNumber = null; if (params != null) { phone = params.getString(ExtraConstants.PHONE); countryIso = params.getString(ExtraConstants.COUNTRY_ISO); nationalNumber = params.getString(ExtraConstants.NATIONAL_NUMBER); } if (!TextUtils.isEmpty(phone)) { start(PhoneNumberUtils.getPhoneNumber(phone)); } else if (!TextUtils.isEmpty(countryIso) && !TextUtils.isEmpty(nationalNumber)) { start(PhoneNumberUtils.getPhoneNumber(countryIso, nationalNumber)); } else if (!TextUtils.isEmpty(countryIso)) { setCountryCode(new PhoneNumber( "", countryIso, String.valueOf(PhoneNumberUtils.getCountryCode(countryIso)))); } else if (getFlowParams().enableHints) { <START> FlowUtils.unhandled(this, new PendingIntentRequiredException( <END> Credentials.getClient(mHandler.getApplication()).getHintPickerIntent( new HintRequest.Builder().setPhoneNumberIdentifierSupported(true) .build()), RequestCodes.CRED_HINT)); } }</code><technical_language>This a strange patter: faking a PendingIntentRequiredException launch hint picker. instead bubble some event allow this fired ViewModel normal</technical_language>

Target:
public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mCheckPhoneHandler.getOperation().observe(this, new ResourceObserver<PhoneNumber>(this) { @Override protected void onSuccess(@NonNull PhoneNumber number) { start(number); } @Override protected void onFailure(@NonNull Exception e) { } }); if (savedInstanceState != null || mCalled) { return; } mCalled = true; Bundle params = getArguments().getBundle(ExtraConstants.PARAMS); String phone = null; String countryIso = null; String nationalNumber = null; if (params != null) { phone = params.getString(ExtraConstants.PHONE); countryIso = params.getString(ExtraConstants.COUNTRY_ISO); nationalNumber = params.getString(ExtraConstants.NATIONAL_NUMBER); } if (!TextUtils.isEmpty(phone)) { start(PhoneNumberUtils.getPhoneNumber(phone)); } else if (!TextUtils.isEmpty(countryIso) && !TextUtils.isEmpty(nationalNumber)) { start(PhoneNumberUtils.getPhoneNumber(countryIso, nationalNumber)); } else if (!TextUtils.isEmpty(countryIso)) { setCountryCode(new PhoneNumber( "", countryIso, String.valueOf(PhoneNumberUtils.getCountryCode(countryIso)))); } else if (getFlowParams().enableHints) { mCheckPhoneHandler.fetchCredential(); } }
Source:
<code>public DockerTemplateOptions configBuilder(Config.Builder configBuilder) { this.configBuilder = configBuilder != null <START> ? Config.builder().fromConfig(configBuilder.image(NO_IMAGE).build()).image(NO_IMAGE) <END> : null; return this; }</code><technical_language>setting NO_IMAGE twice</technical_language>

Target:
public DockerTemplateOptions configBuilder(Config.Builder configBuilder) { this.configBuilder = configBuilder != null ? Config.builder().fromConfig(configBuilder.image(NO_IMAGE).build()) : null; return this; }
Source:
<code>protected List<DynamicStringProperty> getReloadSettings() { List<DynamicStringProperty> list = new ArrayList<DynamicStringProperty>(); list.add(SecurityConstants.AUTH_ENABLER_SETTING); list.add(SECURITY_SETTING); list.add(AUTH_SERVICE_LOG_LEVEL); list.add(AUTH_SERVICE_CONFIG_UPDATE_TIMESTAMP); <START> list.add(AUTH_SERVICE_REDIRECT_WHITELIST_SETTING); <END> return list; }</code><technical_language>mentioned auth-service PR, need watch this setting reload auth-servers change auth-service is reading this DB everytime anyways</technical_language>

Target:
protected List<DynamicStringProperty> getReloadSettings() { List<DynamicStringProperty> list = new ArrayList<DynamicStringProperty>(); list.add(SecurityConstants.AUTH_ENABLER_SETTING); list.add(SECURITY_SETTING); list.add(AUTH_SERVICE_LOG_LEVEL); list.add(AUTH_SERVICE_CONFIG_UPDATE_TIMESTAMP); list.add(API_AUTH_SHIBBOLETH_REDIRECT_WHITELIST_SETTING); return list; }
Source:
<code>public JavaType getSuperclass() { JavaType firstBound = bounds().get(0); if (!firstBound.getSymbol().isInterface()) { return firstBound; } <START> return null; <END> }</code><technical_language>Object instead of null ? call toString hashcode a variable typed a type parameter</technical_language>

Target:
public JavaType getSuperclass() { JavaType firstBound = bounds().get(0); if (!firstBound.symbol().isInterface()) { return firstBound; } return getObjectType(firstBound); }
Source:
<code>public Map<String, Long> getTaskManagerExternalResources() { <START> return ExternalResourceUtils.getExternalResourceConfigMap(getFlinkConfiguration(), ExternalResourceConstants.EXTERNAL_RESOURCE_KUBERNETES_CONFIG_KEY_SUFFIX); <END> }</code><technical_language>this derived in constructor? avoid potential redundant computations</technical_language>

Target:
public Map<String, Long> getTaskManagerExternalResources() { return taskManagerExternalResources; }
Source:
<code>public Comparator getComparator() { <START> return new Comparator() <END> { @Override public int compare(Object o1, Object o2) { return Doubles.compare(((SerializablePair<Long, Double>) o1).rhs, ((SerializablePair<Long, Double>) o2).rhs); } }; }</code><technical_language>static comparator</technical_language>

Target:
public Comparator getComparator() { return DoubleFirstAggregatorFactory.VALUE_COMPARATOR; }
Source:
<code>public void onEvent(InstallerLogEvent event) { InstallerLogEvent.Stream stream = event.getStream(); String text = event.getText(); <START> if (stream != null && stream == InstallerLogEvent.Stream.STDERR && !isNullOrEmpty(text)) { <END> RuntimeIdentityDto identity = event.getRuntimeId(); LOG.error( "Installer error from machine={} owner={} env={} workspace={} text={} time={} ", event.getInstaller(), event.getMachineName(), identity.getOwnerId(), identity.getEnvName(), identity.getWorkspaceId(), event.getText(), event.getTime()); } }</code><technical_language>I stream != null is redundant part</technical_language>

Target:
public void onEvent(InstallerLogEvent event) { if (event.getStream() == InstallerLogEvent.Stream.STDERR && !isNullOrEmpty(event.getText())) { RuntimeIdentityDto identity = event.getRuntimeId(); LOG.error( "Installer `{}` error from machine=`{}` owner=`{}` env=`{}` workspace=`{}` text=`{}` time=`{}`", event.getInstaller(), event.getMachineName(), identity.getOwnerId(), identity.getEnvName(), identity.getWorkspaceId(), event.getText(), event.getTime()); } }
Source:
<code>public String expand(String input) { input = input.toLowerCase(); List<String> words = Arrays.asList(input.split(" ")); List<String> cleanWords = new ArrayList<>(); <START> for (String word : words) { <END> String cleanWord = clean(word); String britishWord = britisise(cleanWord); cleanWords.add(britishWord); } Iterable<String> transform = Iterables.transform(cleanWords, expander); return String.join(" ", transform); }</code><technical_language>try stream java 8 instead of for loops</technical_language>

Target:
public String expand(String input) { input = input.toLowerCase(); List<String> words = Arrays.asList(input.split(" ")); String lastWord = words.get(words.size() - 1); words.set(words.size() - 1, convertRomanNumerals(lastWord)); List<String> cleanWords = words.stream() .map(this::americanize) .map(expander::apply).collect(Collectors.toList()); return String.join(" ", cleanWords); }
Source:
<code>void selectRepresentation(PackWriter packer, ObjectToPack otp, WindowCursor curs) <START> throws IOException { <END> PackList pList = packList.get(); SEARCH: for (;;) { for (PackFile p : pList.packs) { try { LocalObjectRepresentation rep = p.representation(curs, otp); p.resetTransientErrorCount(); if (rep != null) packer.select(otp, rep); } catch (PackMismatchException e) { pList = scanPacks(pList); continue SEARCH; } catch (IOException e) { handlePackError(e, p); } } break SEARCH; } }</code><technical_language>compiler warns this exception thrown this method</technical_language>

Target:
void selectRepresentation(PackWriter packer, ObjectToPack otp, WindowCursor curs) { PackList pList = packList.get(); SEARCH: for (;;) { for (PackFile p : pList.packs) { try { LocalObjectRepresentation rep = p.representation(curs, otp); p.resetTransientErrorCount(); if (rep != null) packer.select(otp, rep); } catch (PackMismatchException e) { pList = scanPacks(pList); continue SEARCH; } catch (IOException e) { handlePackError(e, p); } } break SEARCH; } }
Source:
<code><START> public SelenideElement getSortingButton(String selector) { <END> ElementsCollection buttons = this.elt.$$(".projects-facet-sort a"); return buttons.find(new Condition("AttributeMatch") { @Override public boolean apply(WebElement webElement) { return webElement.getAttribute("href").matches(".*sort=" + selector + ".*"); } }); }</code><technical_language>private, welcome java world :)</technical_language>

Target:
private SelenideElement getSortingButton(String selector) { ElementsCollection buttons = this.elt.$$(".projects-facet-sort a"); return buttons.find(new Condition("AttributeMatch") { @Override public boolean apply(WebElement webElement) { return webElement.getAttribute("href").matches(".*sort=" + selector + ".*"); } }); }
Source:
<code>public void setFieldValue(@NonNull String name, Object value) { for (int i = 0; i < fFields.size(); i++) { if (fFields.get(i).getName().equals(name)) { fFields.get(i).fValue = value; <START> return; <END> } } TextTraceEventContent field = new TextTraceEventContent(name); field.setValue(value); fFields.add(field); }</code><technical_language>If allow duplicate field names, this match is touch other one(s). change of them. Is this purpose</technical_language>

Target:
public void setFieldValue(@NonNull String name, Object value) { TextTraceEventContent field = null; for (int i = 0; i < fFields.size(); i++) { if (fFields.get(i).getName().equals(name)) { field = fFields.get(i); field.setValue(value); } } if (field == null) { field = new TextTraceEventContent(name); field.setValue(value); fFields.add(field); } }
Source:
<code>private void openPrivacyPolicyDialog(final Context context, final String action) { new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle(R.string.privacy_policy_title) .setMessage(R.string.start_accept_privacy_policy) .setCancelable(false) .setNeutralButton(R.string.read_privacy_policy, (dialog, which) -> { <START> Intent webIntent = new Intent(Intent.ACTION_VIEW, <END> Uri.parse(context.getString(R.string.privacy_policy_url)) ); context.startActivity(webIntent); }) .setPositiveButton(R.string.accept, (dialog, which) -> { if (action.equals("EMAIL")) { final Intent i = new Intent(Intent.ACTION_SENDTO) .setData(Uri.parse("mailto:")) .putExtra(Intent.EXTRA_EMAIL, new String[]{ERROR_EMAIL_ADDRESS}) .putExtra(Intent.EXTRA_SUBJECT, ERROR_EMAIL_SUBJECT) .putExtra(Intent.EXTRA_TEXT, buildJson()); if (i.resolveActivity(getPackageManager()) != null) { startActivity(i); } } else if (action.equals("GITHUB")) { ShareUtils.openUrlInBrowser(this, ERROR_GITHUB_ISSUE_URL); } }) .setNegativeButton(R.string.decline, (dialog, which) -> { }) .show(); }</code><technical_language>final</technical_language>

Target:
private void openPrivacyPolicyDialog(final Context context, final String action) { new AlertDialog.Builder(context) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle(R.string.privacy_policy_title) .setMessage(R.string.start_accept_privacy_policy) .setCancelable(false) .setNeutralButton(R.string.read_privacy_policy, (dialog, which) -> { ShareUtils.openUrlInBrowser(context, context.getString(R.string.privacy_policy_url)); }) .setPositiveButton(R.string.accept, (dialog, which) -> { if (action.equals("EMAIL")) { final Intent i = new Intent(Intent.ACTION_SENDTO) .setData(Uri.parse("mailto:")) .putExtra(Intent.EXTRA_EMAIL, new String[]{ERROR_EMAIL_ADDRESS}) .putExtra(Intent.EXTRA_SUBJECT, ERROR_EMAIL_SUBJECT) .putExtra(Intent.EXTRA_TEXT, buildJson()); if (i.resolveActivity(getPackageManager()) != null) { startActivity(i); } } else if (action.equals("GITHUB")) { ShareUtils.openUrlInBrowser(this, ERROR_GITHUB_ISSUE_URL); } }) .setNegativeButton(R.string.decline, (dialog, which) -> { }) .show(); }
Source:
<code>public boolean exists(final String key) { <START> return get(key) != null; <END> }</code><technical_language>contains serves purpose get method</technical_language>

Target:
public boolean exists(final String key) { return this.items.containsKey(key); }
Source:
<code>protected void EndSuccessfully() { EndActionOnAllImageGroups(); <START> VM vm = getVm(); <END> VmHandler.UnLockVm(vm.getId()); endDiskRelatedActions(vm); if (getParameters().getCopyCollapse()) { this.endCopyCollapseOperations(vm); } else { this.endDefaultOps(vm); } setSucceeded(true); }</code><technical_language>I gather vm possibly null here</technical_language>

Target:
protected void EndSuccessfully() { EndActionOnAllImageGroups(); VM vm = getVm(); VmHandler.UnLockVm(vm.getId()); endDiskRelatedActions(vm); if (getParameters().getCopyCollapse()) { this.endCopyCollapseOperations(vm); } else { this.endDefaultOperations(vm); } setSucceeded(true); }
Source:
<code>public Iterator<Comparable> iterator() { final Iterator<Comparable> innerIterator = new StepIterator(this, stepSize); return new Iterator<Comparable>() { @Override <START> public synchronized boolean hasNext() { <END> return innerIterator.hasNext(); } @Override public synchronized Comparable next() { return innerIterator.next(); } @Override public synchronized void remove() { innerIterator.remove(); } }; }</code><technical_language>curious, synchronized for iterator? I ObjectRange iterator understand needed</technical_language>

Target:
public Iterator<Comparable> iterator() { return new StepIterator(this, stepSize); }
Source:
<code>public String toString() { <START> return REPR_HEADER + defaultValue + REPR_MAP_OPENING + map.toString() + REPR_MAP_CLOSING; <END> }</code><technical_language>s/.toString()//</technical_language>

Target:
public String toString() { StringBuilder sb = new StringBuilder(); sb.append(REPR_HEADER).append(defaultValue).append(REPR_MAP_OPENING).append('{'); for (Map.Entry<String, V> entry : map.entrySet()) { String hostname = entry.getKey(); if (hostname.charAt(0) == '.') { hostname = '*' + hostname; } sb.append(hostname).append('=').append(entry.getValue()).append(", "); } sb.setLength(sb.length() - 2); return sb.append('}').append(REPR_MAP_CLOSING).toString(); }
Source:
<code>public void testLength() { testingClient.server("passwordPolicy").run(session -> { RealmModel realmModel = session.getContext().getRealm(); PasswordPolicyManagerProvider policyManager = session.getProvider(PasswordPolicyManagerProvider.class); <START> realmModel.setPasswordPolicy(PasswordPolicy.parse(session, LengthPasswordPolicyProviderFactory.ID)); <END> Assert.assertEquals("invalidPasswordMinLengthMessage", policyManager.validate("jdoe", "1234567").getMessage()); Assert.assertArrayEquals(new Object[]{8}, policyManager.validate("jdoe", "1234567").getParameters()); assertNull(policyManager.validate("jdoe", "12345678")); realmModel.setPasswordPolicy(PasswordPolicy.parse(session, "length(4)")); Assert.assertEquals("invalidPasswordMinLengthMessage", policyManager.validate("jdoe", "123").getMessage()); Assert.assertArrayEquals(new Object[]{4}, policyManager.validate("jdoe", "123").getParameters()); assertNull(policyManager.validate("jdoe", "1234")); }); }</code><technical_language>Please remove this. Tests intent a string a constant here</technical_language>

Target:
public void testLength() { testingClient.server("passwordPolicy").run(session -> { RealmModel realmModel = session.getContext().getRealm(); PasswordPolicyManagerProvider policyManager = session.getProvider(PasswordPolicyManagerProvider.class); realmModel.setPasswordPolicy(PasswordPolicy.parse(session, "length")); Assert.assertEquals("invalidPasswordMinLengthMessage", policyManager.validate("jdoe", "1234567").getMessage()); Assert.assertArrayEquals(new Object[]{8}, policyManager.validate("jdoe", "1234567").getParameters()); assertNull(policyManager.validate("jdoe", "12345678")); realmModel.setPasswordPolicy(PasswordPolicy.parse(session, "length(4)")); Assert.assertEquals("invalidPasswordMinLengthMessage", policyManager.validate("jdoe", "123").getMessage()); Assert.assertArrayEquals(new Object[]{4}, policyManager.validate("jdoe", "123").getParameters()); assertNull(policyManager.validate("jdoe", "1234")); }); }
Source:
<code>public Set<Action> dragonRage(Set<Integer> connectedPlayers) { Set<Action> actionSet = new HashSet<Action>(); for (int dragonId : dragonMap.keySet()) { Dragon d = dragonMap.get(dragonId); <START> for (int playerId : playerMap.keySet()) { <END> Player p = playerMap.get(playerId); if(!isInRange(playerId, dragonId, 2)) { continue; } p.setCurHitPoints(p.getCurHitPoints() - d.getAttackPower()); if (p.getCurHitPoints() <= 0) { DeleteUnitAction dua = new DeleteUnitAction(p.getUnitId()); actionSet.add(dua); removePlayer(p.getUnitId()); } DamageAction da = new DamageAction(p.getUnitId(), d.getAttackPower()); actionSet.add(da); } } return actionSet; }</code><technical_language>I thought this solution pop up. Do realize instead of 10 squares dragon, checking 100 players dragon, increases amount of work order of magnitude. 100 is much, 100 dragons \* 100 players grow fast. Scalability is a</technical_language>

Target:
public Set<Action> dragonRage(Set<Integer> connectedPlayers) { Set<Action> actionSet = new HashSet<Action>(); for (int dragonId : dragonMap.keySet()) { Dragon d = dragonMap.get(dragonId); for (int playerId : playerMap.keySet()) { Player p = playerMap.get(playerId); if(isInRange(playerId, dragonId, 2)) { p.setCurHitPoints(p.getCurHitPoints() - d.getAttackPower()); if (p.getCurHitPoints() <= 0) { DeleteUnitAction dua = new DeleteUnitAction(p.getUnitId()); actionSet.add(dua); removePlayer(p.getUnitId()); } DamageAction da = new DamageAction(p.getUnitId(), d.getAttackPower()); actionSet.add(da); } } } return actionSet; }
Source:
<code>private static ModuleLoader setupModuleLoader(String modulePath, String... systemPackages) { assert modulePath != null : "modulePath not null"; WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_MODULES_DIR, trimPathToModulesDir(modulePath)); final String classPath = WildFlySecurityManager.getPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, null); try { WildFlySecurityManager.clearPropertyPrivileged(SYSPROP_KEY_CLASS_PATH); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_MODULE_PATH, modulePath); StringBuilder packages = new StringBuilder("org.jboss.modules,org.jboss.msc,org.jboss.dmr,org.jboss.threads,org.jboss.as.controller.client"); if (systemPackages != null) { for (String packageName : systemPackages) { packages.append(","); packages.append(packageName); } } WildFlySecurityManager.setPropertyPrivileged("jboss.modules.system.pkgs", packages.toString()); <START> URL[] urls = new URL[] {new File(modulePath).toURI().toURL(), new File(modulePath + "/../jboss-modules.jar").toURI().toURL()}; <END> ClassLoader classloader = new URLClassLoader(urls, ClassLoader.getSystemClassLoader()); Class clazz = classloader.loadClass("org.jboss.modules.Module"); return (ModuleLoader)clazz.getMethod("getBootModuleLoader").invoke(clazz); } catch (ClassNotFoundException | NoSuchMethodException | InvocationTargetException | IllegalAccessException | MalformedURLException e) { throw new RuntimeException(e); } finally { WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, classPath); } }</code><technical_language>callers of this method root is. EmbeddedServerFactory.create methods separate params for jbossHomePath modulePath, relationship modulePath jboss-modules.jar fixed this. relationship jbossHomePath jboss-modules.jar be</technical_language>

Target:
private static ModuleLoader setupModuleLoader(String modulePath, String... systemPackages) { assert modulePath != null : "modulePath not null"; File moduleDir = new File(modulePath); if (!moduleDir.exists() || !moduleDir.isDirectory()) { throw new RuntimeException("The specified module directory " + modulePath + " is invalid or does not exist."); } WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_JBOSS_MODULES_DIR, trimPathToModulesDir(modulePath)); final String classPath = WildFlySecurityManager.getPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, null); try { WildFlySecurityManager.clearPropertyPrivileged(SYSPROP_KEY_CLASS_PATH); WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_MODULE_PATH, modulePath); StringBuilder packages = new StringBuilder("org.jboss.modules,org.jboss.msc,org.jboss.dmr,org.jboss.threads,org.jboss.as.controller.client"); if (systemPackages != null) { for (String packageName : systemPackages) { packages.append(","); packages.append(packageName); } } WildFlySecurityManager.setPropertyPrivileged("jboss.modules.system.pkgs", packages.toString()); return Module.getBootModuleLoader(); } finally { WildFlySecurityManager.setPropertyPrivileged(SYSPROP_KEY_CLASS_PATH, classPath); } }
Source:
<code>public void testFetch() throws JGitInternalException, IOException, GitAPIException, URISyntaxException { Repository db2 = createWorkRepository(); Git git2 = new Git(db2); final Config config = db.getConfig(); RemoteConfig remoteConfig = new RemoteConfig(config, "test"); URIish uri = new URIish(db2.getDirectory().toURI().toURL()); remoteConfig.addURI(uri); remoteConfig.update(config); RevCommit commit = git2.commit().setMessage("initial commit").call(); git2.tag().setName("tag").call(); Git git1 = new Git(db); assertNull(db.resolve("tag")); assertNull(db.getRef(Constants.R_HEADS + "x")); RefSpec spec = new RefSpec("refs/heads/master:refs/heads/x"); git1.fetch().setRemote("test").setRefSpecs(spec) .call(); assertNotNull(db.getRef(Constants.R_TAGS + "tag")); assertNotNull(db.resolve(commit.getId().getName() + "^{commit}")); <START> assertNotNull(db.getRef(Constants.R_HEADS + "x")); <END> }</code><technical_language>assertNotNull here. proper commit tag objects (well, threw tag). Assert values read db equal values created in db2. covers not-null did-it-create copy expected tests in statement</technical_language>

Target:
public void testFetch() throws JGitInternalException, IOException, GitAPIException, URISyntaxException { Repository db2 = createWorkRepository(); Git git2 = new Git(db2); final Config config = db.getConfig(); RemoteConfig remoteConfig = new RemoteConfig(config, "test"); URIish uri = new URIish(db2.getDirectory().toURI().toURL()); remoteConfig.addURI(uri); remoteConfig.update(config); RevCommit commit = git2.commit().setMessage("initial commit").call(); RevTag tag = git2.tag().setName("tag").call(); Git git1 = new Git(db); RefSpec spec = new RefSpec("refs/heads/master:refs/heads/x"); git1.fetch().setRemote("test").setRefSpecs(spec) .call(); assertTrue(commit.getId().equals( db.resolve(commit.getId().getName() + "^{commit}"))); assertTrue(tag.getId().equals(db.resolve(tag.getId().getName()))); }
Source:
<code>public void testUnifyCCWWithHoles() { Geometry result = WindingOrder.unifyWindingOrder(clockWise2, true); assertTrue(result instanceof Polygon); assertFalse(clockWise2.equalsExact(result)); <START> assertTrue(WindingOrder.isCounterClockwise(((Polygon) result).getExteriorRing())); <END> }</code><technical_language>check winding order of holes well</technical_language>

Target:
public void testUnifyCCWWithHoles() { Geometry result = WindingOrder.unifyWindingOrder(clockWise2, true); assertTrue(result instanceof Polygon); assertFalse(clockWise2.equalsExact(result)); assertTrue(WindingOrder.isCounterClockwise(((Polygon) result).getExteriorRing())); assertFalse(WindingOrder.isCounterClockwise(((Polygon) result).getInteriorRingN(0))); assertTrue(WindingOrder.isCounterClockwise(clockWise2.getInteriorRingN(0)) != WindingOrder .isCounterClockwise(((Polygon) result).getInteriorRingN(0))); assertFalse( clockWise2.getInteriorRingN(0).equalsExact(((Polygon) result).getInteriorRingN(0))); }
Source:
<code>public Object invoke(ParametersWrapper parameters) { Message<?> message = parameters.getMessage(); if (this.canProcessMessageList) { message = new MutableMessage<>(parameters.getMessages(), parameters.getHeaders()); } try { Object result = this.invocableHandlerMethod.invoke(message); <START> if (result != null && result.getClass().getName().equals("kotlin.Unit")) { <END> result = null; } return result; } catch (RuntimeException ex) { throw ex; } catch (Exception ex) { throw new IllegalStateException("InvocableHandlerMethod invoke error", ex); } }</code><technical_language>capture this condition a final boolean checking return type in a CTOR (to avoid running this code non-null return)</technical_language>

Target:
public Object invoke(ParametersWrapper parameters) { Message<?> message = parameters.getMessage(); if (this.canProcessMessageList) { message = new MutableMessage<>(parameters.getMessages(), parameters.getHeaders()); } try { Object result = this.invocableHandlerMethod.invoke(message); if (result != null && org.springframework.integration.util.ClassUtils.isKotlinUnit(result.getClass())) { result = null; } return result; } catch (RuntimeException ex) { throw ex; } catch (Exception ex) { throw new IllegalStateException("InvocableHandlerMethod invoke error", ex); } }