auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void setDepth(N node, N parent) { if (parent == null) { depths.put(node, 0); height = Optional.of(0); } else { depths.putIfAbsent(parent, 0); <START> int nodeDepth = Math.max(depths.get(parent) + 1, height.orElse(0)); <END> depths.put(node, nodeDepth); height = Optional.of(nodeDepth); } }</code><technical_language>If convenient, please merge in changes in #202 (now committed repo) this PR, focus this change a bit</technical_language>

Target:
private void setDepth(N node, N parent) { if (parent == null) { depths.put(node, 0); height = Optional.of(0); } else { depths.putIfAbsent(parent, 0); int nodeDepth = Math.max(depths.get(parent) + 1, height.orElseThrow(AssertionError::new)); depths.put(node, nodeDepth); height = Optional.of(nodeDepth); } }
Source:
<code>public void testPathIncludeWhitelist() { OpenTracingManager.fileExtensionWhitelist.add("jsp"); OpenTracingManager.fileExtensionWhitelist.add("foo"); OpenTracingManager otm = new OpenTracingManager(null); assertTrue(otm.includePath("/foo/bar/test.jsp")); assertTrue(otm.includePath("/quux/test.foo")); <START> assertFalse(otm.includePath("/my/image.png")); <END> OpenTracingManager.fileExtensionWhitelist.clear(); }</code><technical_language>test a path extension</technical_language>

Target:
public void testPathIncludeWhitelist() { OpenTracingManager.fileExtensionWhitelist.add("foo"); OpenTracingManager otm = new OpenTracingManager(null); assertTrue(otm.includePath("/quux/test.foo")); assertFalse(otm.includePath("/my/image.bar")); OpenTracingManager.fileExtensionWhitelist.clear(); }
Source:
<code>public FilterResult apply(final Message message) { for (MessageFilter filter : messageFilters) { try { if (!filter.test(message)) { return FilterResult.failed(filter.getType(), "logical"); } } catch (Exception ex) { <START> return FilterResult.failed(filter.getType(), ex.getMessage()); <END> } } return FilterResult.PASS; }</code><technical_language>full exception passed, @sslavic suggested IIRC</technical_language>

Target:
public FilterResult apply(final Message message) { for (MessageFilter filter : messageFilters) { try { if (!filter.test(message)) { return FilterResult.failed(filter.getType(), "logical"); } } catch (Exception ex) { return FilterResult.failed(filter.getType(), ex); } } return FilterResult.PASS; }
Source:
<code>private RevocableMemoryOperator setupConsumeRevocableMemory(DataSize reservedPerPage, long numberOfPages) { <START> final AtomicReference<RevocableMemoryOperator> createOperator = new AtomicReference<>(); <END> setUp(() -> { DriverContext driverContext = taskContext.addPipelineContext(0, false, false).addDriverContext(); OperatorContext revokableOperatorContext = driverContext.addOperatorContext( Integer.MAX_VALUE, new PlanNodeId("revokable_operator"), TableScanOperator.class.getSimpleName()); OutputFactory outputFactory = new PageConsumerOutputFactory(types -> (page -> { })); Operator outputOperator = outputFactory.createOutputOperator(2, new PlanNodeId("output"), ImmutableList.of(), Function.identity(), new TestingPagesSerdeFactory()).createOperator(driverContext); RevocableMemoryOperator revocableMemoryOperator = new RevocableMemoryOperator(revokableOperatorContext, reservedPerPage, numberOfPages); createOperator.set(revocableMemoryOperator); return ImmutableList.of(new Driver(driverContext, revocableMemoryOperator, outputOperator)); }); return createOperator.get(); }</code><technical_language>final necessary</technical_language>

Target:
private RevocableMemoryOperator setupConsumeRevocableMemory(DataSize reservedPerPage, long numberOfPages) { AtomicReference<RevocableMemoryOperator> createOperator = new AtomicReference<>(); setUp(() -> { DriverContext driverContext = taskContext.addPipelineContext(0, false, false).addDriverContext(); OperatorContext revokableOperatorContext = driverContext.addOperatorContext( Integer.MAX_VALUE, new PlanNodeId("revokable_operator"), TableScanOperator.class.getSimpleName()); OutputFactory outputFactory = new PageConsumerOutputFactory(types -> (page -> { })); Operator outputOperator = outputFactory.createOutputOperator(2, new PlanNodeId("output"), ImmutableList.of(), Function.identity(), new TestingPagesSerdeFactory()).createOperator(driverContext); RevocableMemoryOperator revocableMemoryOperator = new RevocableMemoryOperator(revokableOperatorContext, reservedPerPage, numberOfPages); createOperator.set(revocableMemoryOperator); return ImmutableList.of(new Driver(driverContext, revocableMemoryOperator, outputOperator)); }); return createOperator.get(); }
Source:
<code>public RuleSetBuilder addRule(final Rule newRule) { if (newRule == null) { throw new IllegalArgumentException(MISSING_RULE); } for (Rule rule : rules) { if (rule.getName().equals(newRule.getName()) && rule.getLanguage() == newRule.getLanguage()) { <START> LOG.warning("Duplicated rule: " + newRule.getName()); <END> } } rules.add(newRule); return this; }</code><technical_language>break here, possibly return this avoid duplicate, we</technical_language>

Target:
public RuleSetBuilder addRule(final Rule newRule) { if (newRule == null) { throw new IllegalArgumentException(MISSING_RULE); } for (Rule rule : rules) { if (rule.getName().equals(newRule.getName()) && rule.getLanguage() == newRule.getLanguage()) { LOG.warning("The rule with name " + newRule.getName() + " is duplicated. " + "Future versions of PMD will reject to load such rulesets."); break; } } rules.add(newRule); return this; }
Source:
<code>public Object clone() throws CloneNotSupportedException { TimeLiteral timeLiteral = (TimeLiteral) super.clone(); <START> timeLiteral.time = (TimeValue) timeLiteral.clone(); <END> return timeLiteral; }</code><technical_language>'time' cloned instead of timeLiteral</technical_language>

Target:
public Object clone() throws CloneNotSupportedException { TimeLiteral timeLiteral = (TimeLiteral) super.clone(); timeLiteral.time = (TimeValue) timeLiteral.time.clone(); return timeLiteral; }
Source:
<code>public <T extends LogicalSegment> List<T> filterSegments(SegmentMetadataQuery query, List<T> segments) { <START> SegmentMetadataQuery updatedQuery = (SegmentMetadataQuery) query.withAnalysisTypes(getFinalAnalysisTypes(query)); <END> if (!updatedQuery.isUsingDefaultInterval()) { return segments; } if (segments.size() <= 1) { return segments; } final T max = segments.get(segments.size() - 1); DateTime targetEnd = max.getInterval().getEnd(); final Interval targetInterval = new Interval(config.getDefaultHistory(), targetEnd); return Lists.newArrayList( Iterables.filter( segments, new Predicate<T>() { @Override public boolean apply(T input) { return (input.getInterval().overlaps(targetInterval)); } } ) ); }</code><technical_language>This is pointless, affect isUsingDefaultInterval</technical_language>

Target:
public <T extends LogicalSegment> List<T> filterSegments(SegmentMetadataQuery query, List<T> segments) { if (!query.isUsingDefaultInterval()) { return segments; } if (segments.size() <= 1) { return segments; } final T max = segments.get(segments.size() - 1); DateTime targetEnd = max.getInterval().getEnd(); final Interval targetInterval = new Interval(config.getDefaultHistory(), targetEnd); return Lists.newArrayList( Iterables.filter( segments, new Predicate<T>() { @Override public boolean apply(T input) { return (input.getInterval().overlaps(targetInterval)); } } ) ); }
Source:
<code>private boolean isCheProjectNameValid(String projectName) { <START> if (cheProjectsList != null && cheProjectsList.contains(projectName)) { <END> view.showCheProjectNameError(locale.existingProjectNameError()); return false; } if (!NameUtils.checkProjectName(projectName)) { view.showCheProjectNameError(locale.invalidCheProjectNameError()); return false; } view.hideCheProjectNameError(); return true; }</code><technical_language>need init cheProjectsList null, empty list of projects condition allows import project</technical_language>

Target:
private boolean isCheProjectNameValid(String projectName) { if (cheProjects.contains(projectName)) { view.showCheProjectNameError(locale.existingProjectNameError()); return false; } if (!NameUtils.checkProjectName(projectName)) { view.showCheProjectNameError(locale.invalidCheProjectNameError()); return false; } view.hideCheProjectNameError(); return true; }
Source:
<code>public static Optional<RuleAttribute> build(final int columnIndex, final AnalyzerConfiguration configuration, final String attribute, final DTCellValue52 realCellValue) { PortablePreconditions.checkNotNull("columnIndex", columnIndex); PortablePreconditions.checkNotNull("attribute", attribute); PortablePreconditions.checkNotNull("realCellValue", realCellValue); final Comparable value = ActionBuilder.getValue(realCellValue); if (attribute.equals(DateExpiresRuleAttribute.NAME)) { final Date date = toDate(configuration, value); if (date != null) { return Optional.of(new DateExpiresRuleAttribute(columnIndex, <START> (Date) value)); <END> } } else if (attribute.equals(DateEffectiveRuleAttribute.NAME)) { final Date date = toDate(configuration, value); if (date != null) { return Optional.of(new DateEffectiveRuleAttribute(columnIndex, (Date) value)); } } return Optional.empty(); }</code><technical_language>new DateExpiresRuleAttribute(columnIndex, date)</technical_language>

Target:
public static Optional<RuleAttribute> build(final int columnIndex, final AnalyzerConfiguration configuration, final String attribute, final DTCellValue52 realCellValue) { PortablePreconditions.checkNotNull("columnIndex", columnIndex); PortablePreconditions.checkNotNull("attribute", attribute); PortablePreconditions.checkNotNull("realCellValue", realCellValue); final Comparable value = ActionBuilder.getValue(realCellValue); if (attribute.equals(DateExpiresRuleAttribute.NAME)) { final Date date = toDate(configuration, value); if (date != null) { return Optional.of(new DateExpiresRuleAttribute(columnIndex, date)); } } else if (attribute.equals(DateEffectiveRuleAttribute.NAME)) { final Date date = toDate(configuration, value); if (date != null) { return Optional.of(new DateEffectiveRuleAttribute(columnIndex, date)); } } return Optional.empty(); }
Source:
<code>private CreateImageVDSCommandParameters getCreateImageVDSCommandParameters() { DiskImage diskImage = getParameters().getDiskInfo(); if (getStorageDomain().getStorageType().isBlockDomain() && diskImage.getImage().getVolumeType().equals(VolumeType.Sparse) && diskImage.getActualSizeInBytes() != 0) { return new CreateImageVDSCommandParameters(getParameters().getStoragePoolId(), getParameters() .getStorageDomainId(), getImageGroupId(), getParameters().getDiskInfo().getSize(), getParameters().getDiskInfo().getVolumeType(), getParameters().getDiskInfo() .getVolumeFormat(), getDestinationImageId(), getJsonDiskDescription(getParameters().getDiskInfo()), diskImage.getActualSizeInBytes()); } else { return new CreateImageVDSCommandParameters(getParameters().getStoragePoolId(), getParameters() .getStorageDomainId(), getImageGroupId(), getParameters().getDiskInfo().getSize(), getParameters().getDiskInfo().getVolumeType(), getParameters().getDiskInfo() .getVolumeFormat(), getDestinationImageId(), getJsonDiskDescription(getParameters().getDiskInfo())); } <START> } <END></code><technical_language>please consider create parameters constructor arguments set actual size (if needed) setter in order reduce lines of code (see CreateAllSnapshotsFromVmCommand#buildLiveSnapshotParameters)</technical_language>

Target:
private CreateImageVDSCommandParameters getCreateImageVDSCommandParameters() { DiskImage diskImage = getParameters().getDiskInfo(); CreateImageVDSCommandParameters parameters = new CreateImageVDSCommandParameters(getParameters().getStoragePoolId(), getParameters() .getStorageDomainId(), getImageGroupId(), getParameters().getDiskInfo().getSize(), getParameters().getDiskInfo().getVolumeType(), getParameters().getDiskInfo() .getVolumeFormat(), getDestinationImageId(), getJsonDiskDescription(getParameters().getDiskInfo())); if (getStorageDomain().getStorageType().isBlockDomain() && diskImage.getImage().getVolumeType().equals(VolumeType.Sparse) && diskImage.getActualSizeInBytes() != 0) { parameters.setImageInitialSizeInBytes(diskImage.getActualSizeInBytes()); } return parameters; }
Source:
<code>public void setDefinitions(List<Definition> definitions) { <START> this.m_definitions = definitions; <END> }</code><technical_language>this.m_</technical_language>

Target:
public void setDefinitions(List<Definition> definitions) { m_definitions = definitions; }
Source:
<code>void unexport(MBeanExporter exporter) { for (Class<?> rule : stats.keySet()) { String name = ObjectNames.builder(PlanOptimizer.class) .withProperty("optimizer", rule.getSimpleName()) <START> .build(); <END> exporter.unexport(name); } }</code><technical_language>Consider extracting object name building a method emphasize export unexport naming strategy</technical_language>

Target:
void unexport(MBeanExporter exporter) { for (Class<?> rule : stats.keySet()) { exporter.unexport(getName(rule)); } }
Source:
<code>public TaskExecution getLatestTaskExecutionForTaskName(String taskName) { Assert.hasText(taskName, "The task name must not be empty."); final List<TaskExecution> te = this.getLatestTaskExecutionsByTaskNames(taskName); if (te.isEmpty()) { <START> return null; <END> } else if (te.size() == 1) { return te.get(0); } else { throw new IllegalStateException("Only expected a single TaskExecution but received " + te.size()); } }</code><technical_language>Internal class methods</technical_language>

Target:
public TaskExecution getLatestTaskExecutionForTaskName(String taskName) { Assert.hasText(taskName, "The task name must not be empty."); final List<TaskExecution> taskExecutions = this.getLatestTaskExecutionsByTaskNames(taskName); if (taskExecutions.isEmpty()) { return null; } else if (taskExecutions.size() == 1) { return taskExecutions.get(0); } else { throw new IllegalStateException("Only expected a single TaskExecution but received " + taskExecutions.size()); } }
Source:
<code>protected void copyToResponse(InputStream is, HttpServletResponse response) throws IOException { try (OutputStream os = response.getOutputStream()) { long totalBytes = 0L; int readLength; byte[] bytes = new byte[4096]; while ((readLength = is.read(bytes, 0, bytes.length)) != -1) { try { os.write(bytes, 0, readLength); os.flush(); } catch (EOFException e) { if (e.getCause().getMessage().equals("Connection reset by peer")) { logger.debug("Socket has been closed. Possibly, user cancelled download."); response.setStatus(202); break; <START> } <END> } totalBytes += readLength; } response.setHeader(HttpHeaders.CONTENT_LENGTH, Long.toString(totalBytes)); response.flushBuffer(); } }</code><technical_language>re-throw EOFException do</technical_language>

Target:
protected void copyToResponse(InputStream is, HttpServletResponse response) throws IOException { try (OutputStream os = new ExceptionHandlingOutputStream(response.getOutputStream())) { long totalBytes = 0L; int readLength; byte[] bytes = new byte[4096]; while ((readLength = is.read(bytes, 0, bytes.length)) != -1) { os.write(bytes, 0, readLength); os.flush(); totalBytes += readLength; } response.setHeader(HttpHeaders.CONTENT_LENGTH, Long.toString(totalBytes)); response.flushBuffer(); } }
Source:
<code>protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { try { abvs.reset(); sb.reset(abvs); TaggedValuePointable tvp = args[0]; if (tvp.getTag() == ValueTag.SEQUENCE_TAG) { tvp.getValue(seq); int seqLen = seq.getEntryCount(); for (int j = 0; j < seqLen; ++j) { seq.getEntry(j, p); check(p); <START> ah.atomize(p, ppool, tempTVP); <END> sb.addItem(tempTVP); } } else { check(tvp); ah.atomize(tvp, ppool, tempTVP); sb.addItem(tempTVP); } sb.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001); } }</code><technical_language>Move check atomize helper class. This user of atomize helper class get new error message</technical_language>

Target:
protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException { try { abvs.reset(); sb.reset(abvs); TaggedValuePointable tvp = args[0]; if (tvp.getTag() == ValueTag.SEQUENCE_TAG) { tvp.getValue(seq); int seqLen = seq.getEntryCount(); for (int j = 0; j < seqLen; ++j) { seq.getEntry(j, p); ah.atomize(p, ppool, tempTVP); sb.addItem(tempTVP); } } else { ah.atomize(tvp, ppool, tempTVP); sb.addItem(tempTVP); } sb.finish(); result.set(abvs); } catch (IOException e) { throw new SystemException(ErrorCode.SYSE0001); } }
Source:
<code>private Queue<LeaderElection> createCluster(ICluster seed, int numOfNodes) { Queue<LeaderElection> leaders = new ConcurrentLinkedQueue<LeaderElection>(); for (int i = 0; i < numOfNodes; i++) { exec.execute(new Runnable() { @Override public void run() { ICluster member = Cluster.joinAwait(seed.address()); leaders.add(createLeaderElection(member)); } }); <START> awaitSeconds(2); <END> } return leaders; }</code><technical_language>sense executor in case... start cluster nodes sequentially executors</technical_language>

Target:
private Queue<LeaderElection> createCluster(ICluster seed, int numOfNodes) { Queue<LeaderElection> leaders = new ConcurrentLinkedQueue<LeaderElection>(); ICluster member = Cluster.joinAwait(seed.address()); leaders.add(createLeaderElection(member)); return leaders; }
Source:
<code>public static int getDialogTheme(Context context) { String lightTheme = context.getResources().getString(R.string.light_theme_key); String darkTheme = context.getResources().getString(R.string.dark_theme_key); String blackTheme = context.getResources().getString(R.string.black_theme_key); <START> String terminalTheme = context.getResources().getString(R.string.terminal_theme_key); <END> String selectedTheme = getSelectedThemeString(context); int defaultTheme = R.style.DarkTheme; if (selectedTheme.equals(lightTheme)) defaultTheme = R.style.LightDialogTheme; else if (selectedTheme.equals(blackTheme)) defaultTheme = R.style.DarkDialogTheme; else if (selectedTheme.equals(darkTheme)) defaultTheme = R.style.DarkDialogTheme; else if (selectedTheme.equals(terminalTheme)) defaultTheme = R.style.TerminalDialogTheme; return defaultTheme; }</code><technical_language>Java String lightTheme = context.getResources().getString(R.string.light_theme_key); String darkTheme = context.getResources().getString(R.string.dark_theme_key); String blackTheme = context.getResources().getString(R.string.black_theme_key); String terminalTheme = context.getResources().getString(R.string.terminal_theme_key); find lines in a bunch of static methods in this class. Do is create class attributes instead? I do time check this out now, this tricky context is needed initialize them</technical_language>

Target:
public static int getDialogTheme(Context context) { String selectedTheme = getSelectedThemeString(context); int defaultTheme = R.style.DarkTheme; if (selectedTheme.equals(lightTheme)) defaultTheme = R.style.LightDialogTheme; else if (selectedTheme.equals(blackTheme)) defaultTheme = R.style.DarkDialogTheme; else if (selectedTheme.equals(darkTheme)) defaultTheme = R.style.DarkDialogTheme; else if (selectedTheme.equals(terminalTheme)) defaultTheme = R.style.TerminalDialogTheme; return defaultTheme; }
Source:
<code>public UserType getType() { if (isAdmin) { return UserType.ADMINISTRATOR; } else if (isTeacher){ return UserType.TEACHER; <START> } else { <END> return null; } }</code><technical_language>this like, a temp staff person answering calls a janitor something</technical_language>

Target:
public UserType getType() { if (isAdmin) { return UserType.ADMINISTRATOR; } else if (isTeacher){ return UserType.TEACHER; } else { return UserType.OTHER_STAFF; } }
Source:
<code>public DeviceStatusBreakdown getDeviceStatusBreakdown(@Scope(OAuthScope.ADMINISTRATION_READ) final AccessToken accessToken, @QueryParam("start_ts") final Long startTs, <START> @QueryParam("end_ts") final Long endTs) { <END> final Jedis jedis = jedisPool.getResource(); Long sensesCount = -1L; Long pillsCount = -1L; try { sensesCount = jedis.zcount(ActiveDevicesTrackerConfiguration.SENSE_ACTIVE_SET_KEY, startTs, endTs); pillsCount = jedis.zcount(ActiveDevicesTrackerConfiguration.PILL_ACTIVE_SET_KEY, startTs, endTs); } catch (Exception e) { LOGGER.error("Failed to get active senses count because {}", e.getMessage()); throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR) .entity(e.getMessage()).build()); } finally { jedisPool.returnResource(jedis); } LOGGER.debug("Senses count is from to {}", sensesCount, startTs, endTs); LOGGER.debug("Pills count is from to {}", pillsCount, startTs, endTs); return new DeviceStatusBreakdown(sensesCount, pillsCount); }</code><technical_language>start_ts end_ts null</technical_language>

Target:
public DeviceStatusBreakdown getDeviceStatusBreakdown(@Scope(OAuthScope.ADMINISTRATION_READ) final AccessToken accessToken, @QueryParam("start_ts") final Long startTs, @QueryParam("end_ts") final Long endTs) { if (startTs == null || endTs == null) { throw new WebApplicationException(Response.status(Response.Status.BAD_REQUEST) .entity("Require start_ts & end_ts").build()); } final Jedis jedis = jedisPool.getResource(); Long sensesCount = -1L; Long pillsCount = -1L; try { sensesCount = jedis.zcount(ActiveDevicesTrackerConfiguration.SENSE_ACTIVE_SET_KEY, startTs, endTs); pillsCount = jedis.zcount(ActiveDevicesTrackerConfiguration.PILL_ACTIVE_SET_KEY, startTs, endTs); } catch (Exception e) { LOGGER.error("Failed to get active senses count because {}", e.getMessage()); throw new WebApplicationException(Response.status(Response.Status.INTERNAL_SERVER_ERROR) .entity(e.getMessage()).build()); } finally { jedisPool.returnResource(jedis); } LOGGER.debug("Senses count is from to {}", sensesCount, startTs, endTs); LOGGER.debug("Pills count is from to {}", pillsCount, startTs, endTs); return new DeviceStatusBreakdown(sensesCount, pillsCount); }
Source:
<code>public void testLastDDLTimestampBootstrap() throws Exception { String schemaName = "S_" + generateUniqueName(); String tableName = "T_" + generateUniqueName(); String viewName = "V_" + generateUniqueName(); String fullTableName = SchemaUtil.getTableName(schemaName, tableName); String fullViewName = SchemaUtil.getTableName(schemaName, viewName); try (Connection conn = getConnection(false, null)) { conn.createStatement().execute( "CREATE TABLE " + fullTableName + " (PK1 VARCHAR NOT NULL, PK2 VARCHAR, KV1 VARCHAR, KV2 VARCHAR CONSTRAINT " + "PK PRIMARY KEY(PK1, PK2)) "); conn.createStatement().execute( "CREATE VIEW " + fullViewName + " AS SELECT * FROM " + fullTableName); nullDDLTimestamps(conn); <START> conn.commit(); <END> long tableTS = getRowTimestampForMetadata(conn, schemaName, tableName, PTableType.TABLE); long viewTS = getRowTimestampForMetadata(conn, schemaName, viewName, PTableType.VIEW); UpgradeUtil.bootstrapLastDDLTimestamp(conn.unwrap(PhoenixConnection.class)); long actualTableTS = getLastTimestampForMetadata(conn, schemaName, tableName, PTableType.TABLE); long actualViewTS = getLastTimestampForMetadata(conn, schemaName, viewName, PTableType.VIEW); assertEquals(tableTS, actualTableTS); assertEquals(viewTS, actualViewTS); } }</code><technical_language>nit: conn.commit()inside nullDDLTimestamps()</technical_language>

Target:
public void testLastDDLTimestampBootstrap() throws Exception { String schemaName = "S_" + generateUniqueName(); String tableName = "T_" + generateUniqueName(); String viewName = "V_" + generateUniqueName(); String fullTableName = SchemaUtil.getTableName(schemaName, tableName); String fullViewName = SchemaUtil.getTableName(schemaName, viewName); try (Connection conn = getConnection(false, null)) { conn.createStatement().execute( "CREATE TABLE " + fullTableName + " (PK1 VARCHAR NOT NULL, PK2 VARCHAR, KV1 VARCHAR, KV2 VARCHAR CONSTRAINT " + "PK PRIMARY KEY(PK1, PK2)) "); conn.createStatement().execute( "CREATE VIEW " + fullViewName + " AS SELECT * FROM " + fullTableName); nullDDLTimestamps(conn); long tableTS = getRowTimestampForMetadata(conn, schemaName, tableName, PTableType.TABLE); long viewTS = getRowTimestampForMetadata(conn, schemaName, viewName, PTableType.VIEW); UpgradeUtil.bootstrapLastDDLTimestamp(conn.unwrap(PhoenixConnection.class)); long actualTableTS = getLastTimestampForMetadata(conn, schemaName, tableName, PTableType.TABLE); long actualViewTS = getLastTimestampForMetadata(conn, schemaName, viewName, PTableType.VIEW); assertEquals(tableTS, actualTableTS); assertEquals(viewTS, actualViewTS); } }
Source:
<code>private String getProcessName(String tid) { String execName = fProcessNameMap.get(tid); if (execName != null) { return execName; } ITmfTrace trace = getTrace(); if (trace == null) { return tid; } ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID); if (kernelSs == null) { return tid; } try { int cpusNode = kernelSs.getQuarkAbsolute(Attributes.THREADS); List<Integer> cpuNodes = kernelSs.getSubAttributes(cpusNode, false); for (Integer tidQuark : cpuNodes) { if (kernelSs.getAttributeName(tidQuark).equals(tid)) { int execNameQuark; List<ITmfStateInterval> execNameIntervals; try { execNameQuark = kernelSs.getQuarkRelative(tidQuark, Attributes.EXEC_NAME); execNameIntervals = <START> StateSystemUtils.queryHistoryRange(kernelSs, <END> execNameQuark, getStartTime(), getEndTime()); } catch (AttributeNotFoundException e) { continue; } catch (StateSystemDisposedException e) { break; } for (ITmfStateInterval execNameInterval : execNameIntervals) { if (!execNameInterval.getStateValue().isNull() && execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) { execName = execNameInterval.getStateValue().unboxStr(); fProcessNameMap.put(tid, execName); return execName; } } } } } catch (AttributeNotFoundException e) { } return tid; }</code><technical_language>I get a TimeRangeException</technical_language>

Target:
private String getProcessName(String tid) { String execName = fProcessNameMap.get(tid); if (execName != null) { return execName; } ITmfTrace trace = getTrace(); if (trace == null) { return tid; } ITmfStateSystem kernelSs = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysisModule.ID); if (kernelSs == null) { return tid; } try { int cpusNode = kernelSs.getQuarkAbsolute(Attributes.THREADS); List<Integer> cpuNodes = kernelSs.getSubAttributes(cpusNode, false); for (Integer tidQuark : cpuNodes) { if (kernelSs.getAttributeName(tidQuark).equals(tid)) { int execNameQuark; List<ITmfStateInterval> execNameIntervals; try { execNameQuark = kernelSs.getQuarkRelative(tidQuark, Attributes.EXEC_NAME); execNameIntervals = StateSystemUtils.queryHistoryRange(kernelSs, execNameQuark, getStartTime(), getEndTime()); } catch (TimeRangeException | AttributeNotFoundException e) { continue; } catch (StateSystemDisposedException e) { break; } for (ITmfStateInterval execNameInterval : execNameIntervals) { if (!execNameInterval.getStateValue().isNull() && execNameInterval.getStateValue().getType() == ITmfStateValue.Type.STRING) { execName = execNameInterval.getStateValue().unboxStr(); fProcessNameMap.put(tid, execName); return execName; } } } } } catch (AttributeNotFoundException e) { } return tid; }
Source:
<code>public void initialize() { delayTimeline = new Timeline( new KeyFrame(Duration.ZERO, event -> updateWatchButtonTimer()), new KeyFrame(Duration.seconds(1)) ); delayTimeline.setCycleCount(Timeline.INDEFINITE); watchButton.setDisable(true); watchButton.setOnAction(event -> { var player = getAnyPlayer(game); if (player.isPresent()) { replayService.runLiveReplay(game.getId(), player.get().getId()); <START> } <END> }); }</code><technical_language>This optimized: getAnyPlayer(game) .ifPresent(player -> replayService.runLiveReplay(game.getId(), player.getId()))</technical_language>

Target:
public void initialize() { delayTimeline = new Timeline( new KeyFrame(Duration.ZERO, event -> updateWatchButtonTimer()), new KeyFrame(Duration.seconds(1)) ); delayTimeline.setCycleCount(Timeline.INDEFINITE); watchButton.setDisable(true); watchButton.setOnAction(event -> replayService.runLiveReplay(game.getId())); }
Source:
<code>protected Collection<VView> getViews(ExecutionEvent event) { final IStructuredSelection selection = (IStructuredSelection) HandlerUtil .getCurrentSelection(event); final List<VView> views = new LinkedList<VView>(); final List<IFile> failedFiles = new LinkedList<IFile>(); @SuppressWarnings("unchecked") final Iterator<Object> it = selection.iterator(); while (it.hasNext()) { final Object selectedObject = it.next(); if (selectedObject instanceof IFile) { final IFile file = (IFile) selectedObject; VView view = null; try { view = ViewModelHelper.loadView(file, registeredEcores); } catch (final IOException ex) { Activator.logException(ex); } <START> if (view == null) { <END> failedFiles.add(file); continue; } views.add(view); } } if (!failedFiles.isEmpty()) { showErrorMessage(failedFiles, views.isEmpty()); if (views.isEmpty()) { return null; } } return views; }</code><technical_language>change semantics of ViewModelHelper (see ViewModelHelper.java) check for null for resolve state of view unresolved views here</technical_language>

Target:
protected Collection<VView> getViews(ExecutionEvent event) { final IStructuredSelection selection = (IStructuredSelection) HandlerUtil .getCurrentSelection(event); final List<VView> views = new LinkedList<VView>(); final List<IFile> failedFiles = new LinkedList<IFile>(); @SuppressWarnings("unchecked") final Iterator<Object> it = selection.iterator(); while (it.hasNext()) { final Object selectedObject = it.next(); if (selectedObject instanceof IFile) { final IFile file = (IFile) selectedObject; VView view = null; try { view = ViewModelHelper.loadView(file, registeredEcores); } catch (final IOException ex) { Activator.logException(ex); } if (view == null || !ViewModelHelper.viewIsResolved(view)) { failedFiles.add(file); continue; } views.add(view); } } if (!failedFiles.isEmpty()) { showErrorMessage(failedFiles, views.isEmpty()); if (views.isEmpty()) { return null; } } return views; }
Source:
<code>public void setTopItem (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT); <START> if (item.parent != this) return; <END> long vAdjustment; if (OS.GTK3) { vAdjustment = OS.gtk_scrollable_get_vadjustment(handle); } else { vAdjustment = OS.gtk_tree_view_get_vadjustment(handle); } cachedAdjustment = OS.gtk_adjustment_get_value(vAdjustment); topItem= item; }</code><technical_language>Some code deleted here, showing of item needs stay, i.e.: long /*int*/ path = OS.gtk_tree_model_get_path (modelHandle, item.handle); showItem (path, false); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0); OS.gtk_tree_path_free (path); modified code setting topItem = item, etc. added</technical_language>

Target:
public void setTopItem (TreeItem item) { if (item == null) error (SWT.ERROR_NULL_ARGUMENT); if (item.isDisposed ()) error(SWT.ERROR_INVALID_ARGUMENT); if (item.parent != this) return; long path = OS.gtk_tree_model_get_path (modelHandle, item.handle); showItem (path, false); OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0); OS.gtk_tree_path_free (path); long vAdjustment; if (OS.GTK3) { vAdjustment = OS.gtk_scrollable_get_vadjustment(handle); } else { vAdjustment = OS.gtk_tree_view_get_vadjustment(handle); } cachedAdjustment = OS.gtk_adjustment_get_value(vAdjustment); topItem = item; }
Source:
<code>void shutdown() { LOGGER.info("Shutdown requested. Please wait when cleaning up..."); for (WorkerSubQuery p : executingSubQueries.values()) { p.kill(); } if (!connectionPool.isShutdown()) { if (!abruptShutdown) { connectionPool.shutdown(); } else { connectionPool.shutdownNow(); } } connectionPool.releaseExternalResources(); if (pipelineExecutor != null && !pipelineExecutor.isShutdown()) { pipelineExecutor.shutdown(); } if (LOGGER.isInfoEnabled()) { LOGGER.info("shutdown IPC completed"); } messageProcessingExecutor.shutdownNow(); <START> queryExecutor.shutdown(); <END> apiServer.shutdownNow(); if (LOGGER.isInfoEnabled()) { LOGGER.info("Worker #" + myID + " shutdown completed"); } }</code><technical_language>is OK call shutdown() shutdownNow()? Is want allow already-executing queries complete</technical_language>

Target:
void shutdown() { LOGGER.info("Shutdown requested. Please wait when cleaning up..."); for (WorkerSubQuery p : executingSubQueries.values()) { p.kill(); } if (!connectionPool.isShutdown()) { if (!abruptShutdown) { connectionPool.shutdown(); } else { connectionPool.shutdownNow(); } } connectionPool.releaseExternalResources(); if (pipelineExecutor != null && !pipelineExecutor.isShutdown()) { pipelineExecutor.shutdown(); } if (LOGGER.isInfoEnabled()) { LOGGER.info("shutdown IPC completed"); } messageProcessingExecutor.shutdownNow(); queryExecutor.shutdownNow(); apiServer.shutdownNow(); if (LOGGER.isInfoEnabled()) { LOGGER.info("Worker #" + myID + " shutdown completed"); } }
Source:
<code>public File findHook(Repository repository, String hookName) { if (hookName == null) { return null; } File hookDir = getHooksDirectory(repository); if (hookDir == null) { return null; } File hookFile = new File(hookDir, hookName); if (hookFile.isAbsolute()) { if (!hookFile.exists() || FS.DETECTED.supportsExecute() && !FS.DETECTED.canExecute(hookFile)) { return null; } return hookFile; <START> } else { <END> try { File runDirectory = getRunDirectory(repository, hookName); if (runDirectory == null) { return null; } Path hookPath = runDirectory.getAbsoluteFile().toPath() .resolve(hookFile.toPath()); FS fs = repository.getFS(); if (fs == null) { fs = FS.DETECTED; } if (!Files.exists(hookPath) || fs.supportsExecute() && !fs.canExecute(hookPath.toFile())) { return null; } return hookPath.toFile(); } catch (InvalidPathException e) { LOG.warn(MessageFormat.format(JGitText.get().invalidHooksPath, hookFile)); return null; } } }</code><technical_language>remove unnecessary else clause</technical_language>

Target:
public File findHook(Repository repository, String hookName) { if (hookName == null) { return null; } File hookDir = getHooksDirectory(repository); if (hookDir == null) { return null; } File hookFile = new File(hookDir, hookName); if (hookFile.isAbsolute()) { if (!hookFile.exists() || FS.DETECTED.supportsExecute() && !FS.DETECTED.canExecute(hookFile)) { return null; } } else { try { File runDirectory = getRunDirectory(repository, hookName); if (runDirectory == null) { return null; } Path hookPath = runDirectory.getAbsoluteFile().toPath() .resolve(hookFile.toPath()); FS fs = repository.getFS(); if (fs == null) { fs = FS.DETECTED; } if (!Files.exists(hookPath) || fs.supportsExecute() && !fs.canExecute(hookPath.toFile())) { return null; } hookFile = hookPath.toFile(); } catch (InvalidPathException e) { LOG.warn(MessageFormat.format(JGitText.get().invalidHooksPath, hookFile)); return null; } } return hookFile; }
Source:
<code>protected void executeVmCommand() { Guid newActiveSnapshotId = Guid.NewGuid(); Guid createdSnapshotId = getSnapshotDao().getId(getVmId(), SnapshotType.ACTIVE); getParameters().setSnapshotType(determineSnapshotType()); getParameters().setInitialVmStatus(getVm().getStatus()); getSnapshotDao().updateId(createdSnapshotId, newActiveSnapshotId); setActionReturnValue(createdSnapshotId); addSnapshotToDB(createdSnapshotId); createSnapshotsForDisks(getDisksList(), newActiveSnapshotId); if (getTaskIdList().isEmpty()) { <START> getParameters().setTaskGroupSuccess(true); <END> incrementVmGeneration(); } setSucceeded(true); }</code><technical_language>this is called a flow now. is this intentional</technical_language>

Target:
protected void executeVmCommand() { Guid newActiveSnapshotId = Guid.NewGuid(); Guid createdSnapshotId = getSnapshotDao().getId(getVmId(), SnapshotType.ACTIVE); getParameters().setSnapshotType(determineSnapshotType()); getParameters().setInitialVmStatus(getVm().getStatus()); getSnapshotDao().updateId(createdSnapshotId, newActiveSnapshotId); setActionReturnValue(createdSnapshotId); addSnapshotToDB(createdSnapshotId); createSnapshotsForDisks(newActiveSnapshotId); if (getTaskIdList().isEmpty()) { getParameters().setTaskGroupSuccess(true); incrementVmGeneration(); } setSucceeded(true); }
Source:
<code>protected Collection<ICompletionProposal> getCompletionProposals(Collection<Proposal> proposals, String prefix, int offset) { final List<ICompletionProposal> result = new ArrayList<>(); <START> prefix = "".equals(prefix) ? null : prefix; <END> for (Proposal proposal : proposals) { StyledCompletionProposal styledProposal = proposal.asStyledCompletionProposal(prefix, offset); if (styledProposal != null) { result.add(styledProposal); } } return result; }</code><technical_language>StringUtils.emptyToNull here</technical_language>

Target:
protected Collection<ICompletionProposal> getCompletionProposals(Collection<Proposal> proposals, String prefix, int offset) { final List<ICompletionProposal> result = new ArrayList<>(); prefix = StringUtils.emptyToNull(prefix); for (Proposal proposal : proposals) { StyledCompletionProposal styledProposal = proposal.asStyledCompletionProposal(prefix, offset); if (styledProposal != null) { result.add(styledProposal); } } return result; }
Source:
<code>protected SQLException logAndConvert(Throwable ex) { SQLException e = null; try { e = DbException.toSQLException(ex); if (trace == null) { DbException.traceThrowable(e); } else { int errorCode = e.getErrorCode(); if (errorCode >= 23000 && errorCode < 24000) { trace.info(e, "exception"); } else { trace.error(e, "exception"); } } } catch(Throwable another) { if (e == null) { try { e = new SQLException("GeneralError", "HY000", ErrorCode.GENERAL_ERROR_1, ex); } catch (OutOfMemoryError | NoClassDefFoundError ignored) { e = DbException.SQL_OOME; } } <START> e.addSuppressed(another); <END> } return e; }</code><technical_language>changes e DbException.SQL_OOME, I a good idea accumulate suppressed exceptions in this constant</technical_language>

Target:
protected SQLException logAndConvert(Throwable ex) { SQLException e = null; try { e = DbException.toSQLException(ex); if (trace == null) { DbException.traceThrowable(e); } else { int errorCode = e.getErrorCode(); if (errorCode >= 23000 && errorCode < 24000) { trace.info(e, "exception"); } else { trace.error(e, "exception"); } } } catch(Throwable another) { if (e == null) { try { e = new SQLException("GeneralError", "HY000", ErrorCode.GENERAL_ERROR_1, ex); } catch (OutOfMemoryError | NoClassDefFoundError ignored) { return DbException.SQL_OOME; } } e.addSuppressed(another); } return e; }
Source:
<code>public void dataReceived(byte[] data) { String dataString = new String(data); END'. if (dataString.equals(MSG_START)) { if (receivedFile != null && receivedFile.exists()) receivedFile.delete(); try { <START> String dateTime = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()); <END> receivedFile = new File(String.format(FILE_NAME, dateTime)); receivedFile.createNewFile(); if (fileOutputStream != null) fileOutputStream.close(); fileOutputStream = new FileOutputStream(receivedFile); } catch (IOException e) { e.printStackTrace(); } System.out.println(">> START message received, saving data to file..."); sendAck(); } else if (dataString.equals(MSG_END)) { if (fileOutputStream != null) { try { fileOutputStream.close(); } catch (IOException ignore) fileOutputStream = null; } System.out.format(">> END message received, file '%s'\n\n", receivedFile.getAbsolutePath()); sendAck(); } else if (fileOutputStream != null) { byte[] payload = Arrays.copyOfRange(data, 0, data.length - 1); int checksum = ByteUtils.byteToInt(data[data.length - 1]); XBeeChecksum chk = new XBeeChecksum(); chk.add(payload); if (chk.generate() == checksum) { try { fileOutputStream.write(payload); } catch (IOException e) { e.printStackTrace(); } sendAck(); } } }</code><technical_language>name of file included in START message? This avoid hard code name of file give proper extension (user send a png, pdf other file type mobile app)</technical_language>

Target:
public void dataReceived(byte[] data) { String dataString = new String(data); END'. if (dataString.startsWith(MSG_START)) { String fileName = dataString.split(SEPARATOR)[1]; try { receivedFile = new File(fileName); if (receivedFile.exists()) receivedFile.delete(); receivedFile.createNewFile(); if (fileOutputStream != null) fileOutputStream.close(); fileOutputStream = new FileOutputStream(receivedFile); } catch (IOException e) { e.printStackTrace(); } System.out.println(">> START message received, saving data to file..."); sendAck(); } else if (dataString.equals(MSG_END)) { if (fileOutputStream != null) { try { fileOutputStream.close(); } catch (IOException ignore) fileOutputStream = null; } System.out.format(">> END message received, file '%s'\n\n", receivedFile.getAbsolutePath()); sendAck(); } else if (fileOutputStream != null) { byte[] payload = Arrays.copyOfRange(data, 0, data.length - 1); int checksum = ByteUtils.byteToInt(data[data.length - 1]); XBeeChecksum chk = new XBeeChecksum(); chk.add(payload); if (chk.generate() == checksum) { try { fileOutputStream.write(payload); } catch (IOException e) { e.printStackTrace(); } sendAck(); } } }
Source:
<code>private List<Record> getRecordsForXLSX(InputStream xls) throws IOException { List<Record> records = new ArrayList<>(); XSSFWorkbook wb = new XSSFWorkbook(xls); XSSFSheet sheet = wb.getSheetAt(0); for (int j = 0; j <= sheet.getLastRowNum(); j++) { XSSFRow row = sheet.getRow(j); if (row != null) { for (int i = 0; i < row.getLastCellNum(); i++) { XSSFCell cell = row.getCell(i); cell.setCellType(HSSFCell.CELL_TYPE_STRING); Record record = changeCellTypeToString(cell, i, j); <START> if (record != null) { <END> records.add(record); } } } } return records; }</code><technical_language>a Objects.nonNull(record) other places changes</technical_language>

Target:
private List<Record> getRecordsForXLSX(InputStream xls) throws IOException { List<Record> records = new ArrayList<>(); XSSFWorkbook wb = new XSSFWorkbook(xls); XSSFSheet sheet = wb.getSheetAt(0); for (int j = 0; j <= sheet.getLastRowNum(); j++) { XSSFRow row = sheet.getRow(j); if (Objects.nonNull(row)) { for (int i = 0; i < row.getLastCellNum(); i++) { XSSFCell cell = row.getCell(i); cell.setCellType(HSSFCell.CELL_TYPE_STRING); Record record = changeCellTypeToString(cell, i, j); if (Objects.nonNull(record)) { records.add(record); } } } } return records; }
Source:
<code><START> private static int decodeBucketIndex(int entry) <END> { return entry >>> (Integer.SIZE - EXTENDED_PREFIX_BITS); }</code><technical_language>this implemented with: decodeBucketIndex(EXTENDED_PREFIX_BITS, entry)</technical_language>

Target:
private static int decodeBucketIndex(int entry) { return decodeBucketIndex(EXTENDED_PREFIX_BITS, entry); }
Source:
<code>public DimFilter optimize() { <START> if (this.getExtractionFn() instanceof LookupExtractionFn <END> && ((LookupExtractionFn) this.getExtractionFn()).isOptimize()) { LookupExtractionFn exFn = (LookupExtractionFn) this.getExtractionFn(); if (exFn.isRetainMissingValue()) { return this; } if (Objects.equals(Strings.emptyToNull(this.getValue()), exFn.getReplaceMissingValueWith())) { return this; } LookupExtractor lookup = exFn.getLookup(); final List<String> keys = lookup.unapply(this.getValue()); final String dimensionName = this.getDimension(); if (!keys.isEmpty()) { return new InDimFilter(dimensionName, keys, null); } } return this; }</code><technical_language>return new SelectorDimFilter(dimension, value, extractionFn).optimize();</technical_language>

Target:
public DimFilter optimize() { return new SelectorDimFilter(dimension, value, extractionFn).optimize(); }
Source:
<code>default String toIndentedString() { class Local { String toString(Tree<T> tree, int depth) { if (tree.isEmpty()) { return ""; } else { final String indent = repeat(' ', depth * 2); final String value = String.valueOf(tree.getValue()).replaceAll("\\s+", " ").trim(); if (tree.isLeaf()) { return "\n" + indent + value; } else { final String children = tree.getChildren() .map(child -> toString(child, depth + 1)) .join(); <START> return String.format("%n%s%s%s", indent, value, children); <END> } } } String repeat(char c, int n) { final char[] buf = new char[n]; Arrays.fill(buf, c); return String.valueOf(buf); } } return new Local().toString(this, 0); }</code><technical_language>This a \n, a %n create a new line</technical_language>

Target:
default String toIndentedString() { class Local { String toString(Tree<T> tree, int depth) { if (tree.isEmpty()) { return ""; } else { final String indent = repeat(' ', depth * 2); final String value = String.valueOf(tree.getValue()).replaceAll("\\s+", " ").trim(); if (tree.isLeaf()) { return "\n" + indent + value; } else { final String children = tree.getChildren() .map(child -> toString(child, depth + 1)) .join(); return "\n" + indent + value + children; } } } String repeat(char c, int n) { final char[] buf = new char[n]; Arrays.fill(buf, c); return String.valueOf(buf); } } return new Local().toString(this, 0); }
Source:
<code>public Digest() { super(new Column[] { <START> new Column("org/apache/tajo/storage/text", TajoDataTypes.Type.TEXT) <END> }); }</code><technical_language>This changed while refactor 'text'</technical_language>

Target:
public Digest() { super(new Column[] { new Column("text", TajoDataTypes.Type.TEXT) }); }
Source:
<code>public int getGracePeriodMinutes() { <START> return (int) gracePeriod.toMinutes(); <END> }</code><technical_language>this changed long (to match return type of Duration.toMinutes()) is hassle? a big deal cuz I encounter a situation overflow int..</technical_language>

Target:
public long getGracePeriodMinutes() { return gracePeriod.toMinutes(); }
Source:
<code>public Object circuitBreakerAroundAdvice(ProceedingJoinPoint proceedingJoinPoint, @Nullable CircuitBreaker circuitBreakerAnnotation) throws Throwable { Method method = ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod(); String methodName = method.getDeclaringClass().getName() + "#" + method.getName(); if (circuitBreakerAnnotation == null) { circuitBreakerAnnotation = getCircuitBreakerAnnotation(proceedingJoinPoint); } if(circuitBreakerAnnotation == null) { return proceedingJoinPoint.proceed(); } String backend = circuitBreakerAnnotation.name(); io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker = getOrCreateCircuitBreaker(methodName, backend); Class<?> returnType = method.getReturnType(); if (StringUtils.isEmpty(circuitBreakerAnnotation.fallbackMethod())) { return proceed(proceedingJoinPoint, methodName, circuitBreaker, returnType); } <START> FallbackMethod fallbackMethod = FallbackMethod.builder().recoveryMethodName(circuitBreakerAnnotation.fallbackMethod()) <END> .originalMethod(method).originalMethodArgs(proceedingJoinPoint.getArgs()) .targetObject(proceedingJoinPoint.getTarget()).build(); return fallbackDecorators.decorate(fallbackMethod, () -> proceed(proceedingJoinPoint, methodName, circuitBreaker, returnType)).apply(); }</code><technical_language>Is optional? I parameter (recoveryMethodName, originalMethod, targetObject) is mandatory or? builder pattern if some parameters optional</technical_language>

Target:
public Object circuitBreakerAroundAdvice(ProceedingJoinPoint proceedingJoinPoint, @Nullable CircuitBreaker circuitBreakerAnnotation) throws Throwable { Method method = ((MethodSignature) proceedingJoinPoint.getSignature()).getMethod(); String methodName = method.getDeclaringClass().getName() + "#" + method.getName(); if (circuitBreakerAnnotation == null) { circuitBreakerAnnotation = getCircuitBreakerAnnotation(proceedingJoinPoint); } if(circuitBreakerAnnotation == null) { return proceedingJoinPoint.proceed(); } String backend = circuitBreakerAnnotation.name(); io.github.resilience4j.circuitbreaker.CircuitBreaker circuitBreaker = getOrCreateCircuitBreaker(methodName, backend); Class<?> returnType = method.getReturnType(); if (StringUtils.isEmpty(circuitBreakerAnnotation.fallbackMethod())) { return proceed(proceedingJoinPoint, methodName, circuitBreaker, returnType); } FallbackMethod fallbackMethod = FallbackMethod.create(circuitBreakerAnnotation.fallbackMethod(), method, proceedingJoinPoint.getArgs(), proceedingJoinPoint.getTarget()); return fallbackDecorators.decorate(fallbackMethod, () -> proceed(proceedingJoinPoint, methodName, circuitBreaker, returnType)).apply(); }