auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>InputStream[] getOutput(InputStream[] output, Consumer<InputStream> outputConsumer) { <START> processOutput(output, outputConsumer); <END> if(allowsEndpointState()) { return Arrays.copyOfRange(output, 1, output.length); } return output; }</code><technical_language>sense support asynchronous consumption of output output consumer synchronous consumption of output next() both? concern is avoiding need buffer data InputStream resuse data for synchronous asynchronous consumption. In other words, sense delete call line 283</technical_language>

Target:
InputStream[] getOutput(InputStream[] output, Consumer<InputStream> outputConsumer) { assignEndpointState(output); if(allowsEndpointState() && output.length>0) { return Arrays.copyOfRange(output, 1, output.length); } return output; }
Source:
<code>public void clearAll() { synchronized (keptjobinfos) { JobTreeElement[] all = (JobTreeElement[]) keptjobinfos .toArray(new JobTreeElement[keptjobinfos.size()]); <START> for (JobTreeElement element : all) { <END> disposeAction(element); } keptjobinfos.clear(); finishedTime.clear(); } for (Object listener : getListeners()) { KeptJobsListener jv = (KeptJobsListener) listener; jv.removed(null); } }</code><technical_language>jobTreeElement</technical_language>

Target:
public void clearAll() { synchronized (keptjobinfos) { JobTreeElement[] all = (JobTreeElement[]) keptjobinfos .toArray(new JobTreeElement[keptjobinfos.size()]); for (JobTreeElement jobTreeElement : all) { disposeAction(jobTreeElement); } keptjobinfos.clear(); finishedTime.clear(); } for (Object listener : getListeners()) { KeptJobsListener jv = (KeptJobsListener) listener; jv.removed(null); } }
Source:
<code>public void afterClass() throws Exception { String testClassName = this.getShortClassName(); <START> System.out.println("AfterClass: " + testClassName + " of TestStuckTaskQuota called."); <END> super.afterClass(); }</code><technical_language>here. methods get names here</technical_language>

Target:
public void afterClass() throws Exception { super.afterClass(); }
Source:
<code>public void close() throws IOException { if (jp != null) { jp.close(); } try { <START> resourceCloser.close(); <END> } catch (Exception e) { throw new RuntimeException(e); } }</code><technical_language>Closer close multiple closeables. closes closeables if exception while closing object</technical_language>

Target:
public void close() throws IOException { Closer closer = Closer.create(); if (jp != null) { closer.register(jp); } closer.register(resourceCloser); closer.close(); }
Source:
<code>public void runWorkerStartHooks() { WorkerTopologyContext workerContext = getWorkerTopologyContext(); <START> if (topology.is_set_worker_hooks()) { <END> for (IWorkerHook hook : getDeserializedWorkerHooks()) { hook.start(topologyConf, workerContext); } } }</code><technical_language>if statement unnecessary for now</technical_language>

Target:
public void runWorkerStartHooks() { WorkerTopologyContext workerContext = getWorkerTopologyContext(); for (IWorkerHook hook : getDeserializedWorkerHooks()) { hook.start(topologyConf, workerContext); } }
Source:
<code>public Response remove() { Cluster cluster = parent.getClusterEntity(); SupportedAdditionalClusterFeature feature = cluster.getAddtionalFeaturesSupported() .stream() .filter(f -> f.getFeature().getId().equals(asGuid(id))) .findFirst() .orElse(null); if (feature != null) { feature.setEnabled(false); } <START> return parent.updateClusterEntity(cluster); <END> }</code><technical_language>Same, avoid parent, a helper class instead</technical_language>

Target:
public Response remove() { return BackendClusterFeatureHelper.disableClusterFeature(this, asGuid(clusterId), asGuid(id)); }
Source:
<code>public GitSubscriberMergeContext(final GitResourceVariantTreeSubscriber subscriber, ISynchronizationScopeManager manager, GitSynchronizeDataSet gsds) { super(subscriber, manager); this.subscriber = subscriber; this.gsds = gsds; indexChangeListener = (Repository repository, IndexDiffData indexDiffData) -> { handleRepositoryChange(repository); <START> }; <END> resourceChangeListener = new IResourceChangeListener() { @Override public void resourceChanged(IResourceChangeEvent event) { IResourceDelta delta = event.getDelta(); if (delta == null) return; handleResourceChange(delta); } }; IndexDiffCache indexDiffCache = Activator.getDefault().getIndexDiffCache(); if (indexDiffCache != null) indexDiffCache.addIndexDiffChangedListener(indexChangeListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener); initialize(); }</code><technical_language>Inconsistent indentation; TABs. indexChangeListener = (repository, indexDiffData) -> handleRepositoryChange(repository);</technical_language>

Target:
public GitSubscriberMergeContext(final GitResourceVariantTreeSubscriber subscriber, ISynchronizationScopeManager manager, GitSynchronizeDataSet gsds) { super(subscriber, manager); this.subscriber = subscriber; this.gsds = gsds; indexChangeListener = (repository, indexDiffData) -> handleRepositoryChange(repository); resourceChangeListener = event -> { IResourceDelta delta = event.getDelta(); if (delta != null) { handleResourceChange(delta); } }; IndexDiffCache indexDiffCache = Activator.getDefault().getIndexDiffCache(); if (indexDiffCache != null) indexDiffCache.addIndexDiffChangedListener(indexChangeListener); ResourcesPlugin.getWorkspace().addResourceChangeListener(resourceChangeListener); initialize(); }
Source:
<code>protected <K, V> void bindProperties( String prefix, Iterable<Map.Entry<K, V>> properties, boolean skipUnresolved) { StringBuilder buf = null; for (Map.Entry<K, V> e : properties) { String name = (String) e.getKey(); String value = (String) e.getValue(); if (NULL.equals(value)) { bindProperty(prefix, name, null); } else { final Matcher matcher = PROPERTIES_PLACE_HOLDER_PATTERN.matcher(value); if (matcher.find()) { int start = 0; if (buf == null) { buf = new StringBuilder(); } else { buf.setLength(0); } do { buf.append(value.substring(start, matcher.start())); final String placeholder = value.substring(matcher.start(), matcher.end()); final String placeholderName = removePlaceholderFormatting(placeholder); String resolvedPlaceholder = resolvePlaceholder(placeholderName); if (resolvedPlaceholder != null) { buf.append(resolvedPlaceholder); } else if (skipUnresolved) { buf.append(placeholder); LOG.warn( "Placeholder cannot be resolved neither from environment variable nor from system property, " + "leaving as is.", placeholderName); } else { throw new ConfigurationException( format( <START> "%s is not a system property or " + "an environment variable.", <END> placeholderName)); } start = matcher.end(); } while (matcher.find()); buf.append(value.substring(start)); value = buf.toString(); } bindProperty(prefix, name, value); } } }</code><technical_language>string split appears unnecessary. suggestion "%s is a system property environment variable.", I nitpick here, dropping indefinite article is fine here</technical_language>

Target:
protected <K, V> void bindProperties( String prefix, Iterable<Map.Entry<K, V>> properties, boolean skipUnresolved) { StringBuilder buf = null; for (Map.Entry<K, V> e : properties) { String name = (String) e.getKey(); String value = (String) e.getValue(); if (NULL.equals(value)) { bindProperty(prefix, name, null); } else { final Matcher matcher = PROPERTIES_PLACE_HOLDER_PATTERN.matcher(value); if (matcher.find()) { int start = 0; if (buf == null) { buf = new StringBuilder(); } else { buf.setLength(0); } do { buf.append(value.substring(start, matcher.start())); final String placeholder = value.substring(matcher.start(), matcher.end()); final String placeholderName = removePlaceholderFormatting(placeholder); String resolvedPlaceholder = resolvePlaceholder(placeholderName); if (resolvedPlaceholder != null) { buf.append(resolvedPlaceholder); } else if (skipUnresolved) { buf.append(placeholder); LOG.warn( "Placeholder cannot be resolved neither from environment variable nor from system property, " + "leaving as is.", placeholderName); } else { throw new ConfigurationException( format( "%s is not a system property or environment variable.", placeholderName)); } start = matcher.end(); } while (matcher.find()); buf.append(value.substring(start)); value = buf.toString(); } bindProperty(prefix, name, value); } } }
Source:
<code><START> public ITmfEventField[] extractItemFields(final ITmfEvent event) { <END> ITmfEventField[] fields = EMPTY_FIELD_ARRAY; if (event != null) { final String timestamp = event.getTimestamp().toString(); final String source = event.getSource(); final String type = event.getType().getName(); final String reference = event.getReference(); final String content = event.getContent().toString(); fields = new TmfEventField[] { new TmfEventField(ITmfEvent.EVENT_FIELD_TIMESTAMP, timestamp, null), new TmfEventField(ITmfEvent.EVENT_FIELD_SOURCE, source, null), new TmfEventField(ITmfEvent.EVENT_FIELD_TYPE, type, null), new TmfEventField(ITmfEvent.EVENT_FIELD_REFERENCE, reference, null), new TmfEventField(ITmfEvent.EVENT_FIELD_CONTENT, content, null) }; } return fields; }</code><technical_language>This is API breaking change. This classes extending TmfEventsTable change for (There in company). I suggest this method (extractItemFields()) protected add a public method calls extractItemFields(). that: public final ITmfEventField[] getItemsField(final ITmfEvent event) { return extractItemFields(event); } (final method is tempted overwrite it)</technical_language>

Target:
protected ITmfEventField[] extractItemFields(final ITmfEvent event) { ITmfEventField[] fields = EMPTY_FIELD_ARRAY; if (event != null) { final String timestamp = event.getTimestamp().toString(); final String source = event.getSource(); final String type = event.getType().getName(); final String reference = event.getReference(); final String content = event.getContent().toString(); fields = new TmfEventField[] { new TmfEventField(ITmfEvent.EVENT_FIELD_TIMESTAMP, timestamp, null), new TmfEventField(ITmfEvent.EVENT_FIELD_SOURCE, source, null), new TmfEventField(ITmfEvent.EVENT_FIELD_TYPE, type, null), new TmfEventField(ITmfEvent.EVENT_FIELD_REFERENCE, reference, null), new TmfEventField(ITmfEvent.EVENT_FIELD_CONTENT, content, null) }; } return fields; }
Source:
<code>public String getHostFingerprint() throws IOException { if (_client == null) { <START> throw new java.net.ConnectException("SSH is not connected"); <END> } return ((EngineSSHClient)_client).getHostFingerprint(); }</code><technical_language>please import this</technical_language>

Target:
public String getHostFingerprint() throws IOException { if (_client == null) { throw new ConnectException("SSH is not connected"); } return ((EngineSSHClient)_client).getHostFingerprint(); }
Source:
<code>public ResourceDescriptor addRequiredChildren(Set<? extends ResourceDefinition> set) { <START> set.forEach(definition -> this.requiredChildren.add(definition.getPathElement())); <END> return this; }</code><technical_language>normal for-each loop instead of lambda</technical_language>

Target:
public ResourceDescriptor addRequiredChildren(Set<? extends ResourceDefinition> set) { for (ResourceDefinition definition : set) { this.requiredChildren.add(definition.getPathElement()); } return this; }
Source:
<code>private synchronized void computeSortOnlyDescriptors() { INavigatorContentDescriptor[] allDescriptors; allDescriptors = NavigatorContentDescriptorManager.getInstance().getSortOnlyContentDescriptors(); List sortOnlyList = new ArrayList(); for (INavigatorContentDescriptor <START> allDescriptor : <END> allDescriptors) { if (contentService.isActive(allDescriptor.getId())) { sortOnlyList.add(allDescriptor); } } sortOnlyDescriptors = (INavigatorContentDescriptor[]) sortOnlyList.toArray(new INavigatorContentDescriptor[]{}); }</code><technical_language>rename 'descriptor'</technical_language>

Target:
private synchronized void computeSortOnlyDescriptors() { List sortOnlyList = new ArrayList(); for (INavigatorContentDescriptor descriptor : NavigatorContentDescriptorManager.getInstance() .getSortOnlyContentDescriptors()) { if (contentService.isActive(descriptor.getId())) { sortOnlyList.add(descriptor); } } sortOnlyDescriptors = (INavigatorContentDescriptor[]) sortOnlyList.toArray(new INavigatorContentDescriptor[]{}); }
Source:
<code>public BytecodeNode generateExpression(Signature signature, BytecodeGeneratorContext context, Type returnType, List<RowExpression> arguments) { BytecodeBlock block = new BytecodeBlock().setDescription("Partial apply"); Scope scope = context.getScope(); Variable wasNull = scope.getVariable("wasNull"); <START> ImmutableList.Builder<BytecodeExpression> bytecodeCaptureVariablesBuilder = ImmutableList.builder(); <END> int numValues = arguments.size() - 1; for (int i = 0; i < numValues; i++) { Class<?> valueType = Primitives.wrap(arguments.get(i).getType().getJavaType()); Variable valueVariable = scope.createTempVariable(valueType); block.append(context.generate(arguments.get(i))); block.append(boxPrimitiveIfNecessary(scope, valueType)); block.putVariable(valueVariable); block.append(wasNull.set(constantFalse())); bytecodeCaptureVariablesBuilder.add(valueVariable.cast(Object.class)); } Variable functionVariable = scope.createTempVariable(MethodHandle.class); block.append(context.generate(arguments.get(numValues))); block.append( new IfStatement() .condition(wasNull) .ifFalse( new BytecodeBlock() .putVariable(functionVariable) .append(invokeStatic( MethodHandles.class, "insertArguments", MethodHandle.class, functionVariable, constantInt(0), newArray(type(Object[].class), bytecodeCaptureVariablesBuilder.build()))))); return block; }</code><technical_language>call this captureVariablesBuilder</technical_language>

Target:
public BytecodeNode generateExpression(Signature signature, BytecodeGeneratorContext context, Type returnType, List<RowExpression> arguments) { int numCaptures = arguments.size() - 1; LambdaDefinitionExpression lambda = (LambdaDefinitionExpression) arguments.get(numCaptures); checkState(compiledLambdaMap.containsKey(lambda), "lambda expressions map does not contain this lambda definition"); CompiledLambda compiledLambda = compiledLambdaMap.get(lambda); return LambdaBytecodeGenerator.generateLambda( context, arguments.subList(0, numCaptures), compiledLambda, lambdaInterface); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bot_controller); debugView = Views.findById(this, R.id.bot_controller_debug_view); DirectionPadView padView = Views.findById(this, R.id.bot_controller_direction_view); padView.setOnDirectionPressedListener(new OnDirectionPressedListener() { @Override public void onDirectionPressed(BotDirection direction) { String arrowCharacter = arrowOf(direction); debugView.showPermanently(arrowCharacter); } @Override public void onDirectionReleased(BotDirection direction) { String arrowCharacter = arrowOf(direction); debugView.showTimed(arrowCharacter + " released", DURATION_DIRECTIONS); } private String arrowOf(BotDirection direction) { <START> switch (direction) { <END> case FORWARD: return "↑"; case BACKWARD: return "↓"; case STEER_LEFT: return "←"; case STEER_RIGHT: return "→"; } throw new IllegalArgumentException("Invalid direction " + direction); } @Override public void onLazersFired() { debugView.showTimed(LAZERS, DURATION_LAZERS); } @Override public void onLazersReleased() { debugView.clearMessage(); } }); }</code><technical_language>suggest rid of switch case statement is considered a code smell . instantiate enum a direction parameter get it. This [link](<LINK_0> useful a reference of treatments for this kind of statement. Another solution in swift though, a array of directions assigned values(string) get direction out of array enum is defined return a treated type</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_bot_controller); debugView = Views.findById(this, R.id.bot_controller_debug_view); ControllerView controllerView = Views.findById(this, R.id.bot_controller_direction_view); controllerView.setControllerListener(new ControllerListener() { @Override public void onDirectionPressed(Direction direction) { debugView.showPermanently(direction.getRepresentation()); } @Override public void onDirectionReleased(Direction direction) { debugView.showTimed(direction.getRepresentation() + " released", DURATION_DIRECTIONS); } @Override public void onLazersFired() { debugView.showTimed(LAZERS, DURATION_LAZERS); } @Override public void onLazersReleased() { debugView.clearMessage(); } }); }
Source:
<code>Point resizeCalculationsGTK3(long widget, int width, int height) { Point size = super.resizeCalculationsGTK3(widget, width, height); if (widget == handle && GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) { <START> size.y = Math.max(size.y, 26); END> } return size; }</code><technical_language>If 26 is minimum fetch gtk_widget_get_preferred_size. If code base examples of this -- hard code sorts of numbers obvious (like 1, for example)</technical_language>

Target:
Point resizeCalculationsGTK3(long widget, int width, int height) { Point size = super.resizeCalculationsGTK3(widget, width, height); if (widget == handle && GTK.GTK_VERSION >= OS.VERSION(3, 22, 0)) { GtkRequisition naturalSize = new GtkRequisition(); GtkRequisition minimumSize = new GtkRequisition(); GTK.gtk_widget_get_preferred_size(handle, minimumSize, naturalSize); size.y = Math.max(size.y, minimumSize.height); } return size; }
Source:
<code>protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException { try { <START> if (resource != null) { END> return fetchVariant(resource, monitor); } else { return null; } } finally { monitor.done(); } }</code><technical_language>style nit: braces single line put bug number here, this belongs commit message more relevance soon bug is fixed. If wants understand this added check project history (e.g. git blame) find bug number in commit message</technical_language>

Target:
protected IResourceVariant fetchVariant(IResource resource, int depth, IProgressMonitor monitor) throws TeamException { try { if (resource != null) return fetchVariant(resource, monitor); else return null; } finally { monitor.done(); } }
Source:
<code>public TaskResult runTask() { Config params = request.getConfig().mergeDefault( request.getConfig().getNestedOrGetEmpty("td")); int pollInterval = getPollInterval(params); String query = templateEngine.templateCommand(workspacePath, params, "query", UTF_8); <START> int defaultRows = query.trim().isEmpty() ? 0 : 1; <END> int rows = params.get("rows", int.class, defaultRows); boolean done = runPollQuery(request, params, query, rows); if (done) { return TaskResult.empty(request); } else { throw TaskExecutionException.ofNextPolling(pollInterval, ConfigElement.copyOf(request.getLastStateParams())); } }</code><technical_language>query.trim() empty? (does td_wait allow empty query string?)</technical_language>

Target:
public TaskResult runTask() { try (TDOperator op = TDOperator.fromConfig(params)) { if (!existingJobId.isPresent()) { String jobId = startJob(op); state.set(JOB_ID, jobId); throw TaskExecutionException.ofNextPolling(JOB_STATUS_API_POLL_INTERVAL, ConfigElement.copyOf(state)); } assert existingJobId.isPresent(); TDJobOperator job = op.newJobOperator(existingJobId.get()); TDJob jobInfo = job.getJobInfo(); TDJob.Status status = jobInfo.getStatus(); logger.debug("poll job status: {}: {}", existingJobId.get(), jobInfo); if (!status.isFinished()) { throw TaskExecutionException.ofNextPolling(JOB_STATUS_API_POLL_INTERVAL, ConfigElement.copyOf(state)); } if (status != SUCCESS) { String message = jobInfo.getCmdOut() + "\n" + jobInfo.getStdErr(); throw new TaskExecutionException(message, ConfigElement.empty()); } logger.debug("fetching poll job result: {}", existingJobId.get()); boolean done = fetchJobResult(job); if (!done) { state.remove(JOB_ID); throw TaskExecutionException.ofNextPolling(pollInterval, ConfigElement.copyOf(state)); } return TaskResult.empty(request); } }
Source:
<code>void afterCommand() { ProjectId id = givenAggregateId(Identifier.newUuid()); AggCreateProject create = AggCreateProject .newBuilder() .setProjectId(id) .setName("Command Dispatching") .build(); Task task = Task .newBuilder() .setTitle("Dummy Task") .setDescription("Dummy Task Description") .build(); AggAddTask addTask = AggAddTask .newBuilder() .setProjectId(id) .setTask(task) .build(); AggStartProject start = AggStartProject .newBuilder() .setProjectId(id) .build(); <START> BlackBoxBoundedContext.singletenant() <END> .with(repository()) .receivesCommands(create, addTask, start) .assertThat(emittedEventsHadVersions(1, 2, 3)) .close(); }</code><technical_language>please newInstance() back, meaning "single-tenant context" default</technical_language>

Target:
void afterCommand() { ProjectId id = givenAggregateId(Identifier.newUuid()); AggCreateProject create = AggCreateProject .newBuilder() .setProjectId(id) .setName("Command Dispatching") .build(); Task task = Task .newBuilder() .setTitle("Dummy Task") .setDescription("Dummy Task Description") .build(); AggAddTask addTask = AggAddTask .newBuilder() .setProjectId(id) .setTask(task) .build(); AggStartProject start = AggStartProject .newBuilder() .setProjectId(id) .build(); BlackBoxBoundedContext.newInstance() .with(repository()) .receivesCommands(create, addTask, start) .assertThat(emittedEventsHadVersions(1, 2, 3)) .close(); }
Source:
<code>public PinotExpression visitCall(CallExpression call, Function<VariableReferenceExpression, Selection> context) { String displayName = call.getDisplayName().toLowerCase(ENGLISH); <START> if (displayName.equals("not")) { <END> return handleNot(call, context); } else if (displayName.equals("cast")) { return handleCast(call, context); } else if (displayName.equals("between")) { return handleBetween(call, context); } FunctionMetadata functionMetadata = functionMetadataManager.getFunctionMetadata(call.getFunctionHandle()); Optional<OperatorType> operatorTypeOptional = functionMetadata.getOperatorType(); if (operatorTypeOptional.isPresent()) { OperatorType operatorType = operatorTypeOptional.get(); if (operatorType.isArithmeticOperator()) { throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), "Arithmetic expressions are not supported in filter: " + call); } else if (operatorType.isComparisonOperator()) { return handleLogicalBinary(operatorType.getOperator(), call, context); } } return handleFunction(call, context); }</code><technical_language>Instead of string matching, StandardFunctionResolution::isNotFunction. functionHandle is call use</technical_language>

Target:
public PinotExpression visitCall(CallExpression call, Function<VariableReferenceExpression, Selection> context) { FunctionHandle functionHandle = call.getFunctionHandle(); if (standardFunctionResolution.isNotFunction(functionHandle)) { return handleNot(call, context); } if (standardFunctionResolution.isCastFunction(functionHandle)) { return handleCast(call, context); } if (standardFunctionResolution.isBetweenFunction(functionHandle)) { return handleBetween(call, context); } FunctionMetadata functionMetadata = functionMetadataManager.getFunctionMetadata(call.getFunctionHandle()); Optional<OperatorType> operatorTypeOptional = functionMetadata.getOperatorType(); if (operatorTypeOptional.isPresent()) { OperatorType operatorType = operatorTypeOptional.get(); if (operatorType.isArithmeticOperator()) { throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), "Arithmetic expressions are not supported in filter: " + call); } if (operatorType.isComparisonOperator()) { return handleLogicalBinary(operatorType.getOperator(), call, context); } } throw new PinotException(PINOT_UNSUPPORTED_EXPRESSION, Optional.empty(), format("function %s not supported in filter", call)); }
Source:
<code>protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getRequestParamValue(Const.ParamsNames.COURSE_ID); Assumption.assertPostParamNotNull(Const.ParamsNames.COURSE_ID, courseId); String feedbackSessionName = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); Assumption.assertPostParamNotNull(Const.ParamsNames.FEEDBACK_SESSION_NAME, feedbackSessionName); FeedbackSessionAttributes fsa = logic.getFeedbackSession(feedbackSessionName, courseId); InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, account.googleId); gateKeeper.verifyAccessible(instructor, fsa, false); FeedbackSessionResponseStatus fsResponseStatus = logic.getFeedbackSessionResponseStatus(feedbackSessionName, courseId); InstructorFeedbackAjaxStudentsListPageData data = new InstructorFeedbackAjaxStudentsListPageData(account, sessionToken, fsResponseStatus, <START> courseId, feedbackSessionName); <END> return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_AJAX_RESEND_PUBLISHED_EMAIL_MODAL, data); }</code><technical_language>8-space indentation. constructor call line arguments line</technical_language>

Target:
protected ActionResult execute() throws EntityDoesNotExistException { String courseId = getNonNullRequestParamValue(Const.ParamsNames.COURSE_ID); String feedbackSessionName = getNonNullRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_NAME); FeedbackSessionAttributes fsa = logic.getFeedbackSession(feedbackSessionName, courseId); InstructorAttributes instructor = logic.getInstructorForGoogleId(courseId, account.googleId); gateKeeper.verifyAccessible(instructor, fsa, false); FeedbackSessionResponseStatus fsResponseStatus = logic.getFeedbackSessionResponseStatus(feedbackSessionName, courseId); InstructorFeedbackAjaxStudentsListPageData data = new InstructorFeedbackAjaxStudentsListPageData( account, sessionToken, fsResponseStatus, courseId, feedbackSessionName); return createShowPageResult(Const.ViewURIs.INSTRUCTOR_FEEDBACK_AJAX_RESEND_PUBLISHED_EMAIL_MODAL, data); }
Source:
<code>private Consumer reconcileByUuid(Consumer knownHost, Consumer incoming, Map<String, <START> Consumer> systemUuidKnownConsumersMap) { <END> if (knownHost == null && config.getBoolean(ConfigProperties.USE_SYSTEM_UUID) && incoming.hasFact(Consumer.Facts.SYSTEM_UUID) && systemUuidKnownConsumersMap.get( incoming.getFact(Consumer.Facts.SYSTEM_UUID).toLowerCase()) != null) { knownHost = systemUuidKnownConsumersMap.get(incoming.getFact( Consumer.Facts.SYSTEM_UUID).toLowerCase()); if (knownHost != null) { log.debug("Found a known host by system uuid"); } } return knownHost; }</code><technical_language>for readability break Map<String,Consumer> in line break (I'm surprised checkstyle complain)</technical_language>

Target:
private Consumer reconcileByUuid(Consumer knownHost, Consumer incoming, Map<String, Consumer> systemUuidKnownConsumersMap) { if (knownHost == null && config.getBoolean(ConfigProperties.USE_SYSTEM_UUID_FOR_MATCHING) && incoming.hasFact(Consumer.Facts.SYSTEM_UUID) && systemUuidKnownConsumersMap.get( incoming.getFact(Consumer.Facts.SYSTEM_UUID).toLowerCase()) != null) { knownHost = systemUuidKnownConsumersMap.get(incoming.getFact( Consumer.Facts.SYSTEM_UUID).toLowerCase()); if (knownHost != null) { log.debug("Found a known host by system uuid"); } } return knownHost; }
Source:
<code>public String stemWord(String word) { if (word == null) { return word; <START> } <END> word = word.toLowerCase(eoLocale); if (isExceptionOrNumber(word)) { return word; } String suffix = word; int localMinStemLength = Math.max(minStemLength, firstVowelPos(suffix) + 1); int pluralDirectOffset = calcPluralDirectOffset(suffix); if (pluralDirectOffset > 0) { suffix = suffix.substring(0, suffix.length() - pluralDirectOffset); if (pluralDirectChecks.contains(suffix) || stemmerExceptions.contains(suffix)) { return suffix; } } suffix = findLongestSuffix(suffix, word, localMinStemLength, pluralDirectOffset); int stemLength = 0; if (!suffix.isEmpty()) { stemLength = word.length() - suffix.length() - pluralDirectOffset; if (suffix.charAt(0) == '-' && suffix.length() + pluralDirectOffset < word.length()) { return word.substring(0, stemLength); } } if (stemLength < localMinStemLength) { return word; } return word.substring(0, stemLength); }</code><technical_language>"perfectly normal" indents kicking :)</technical_language>

Target:
public String stemWord(String word) { if (word == null) { return word; } word = word.toLowerCase(eoLocale); if (isExceptionOrNumber(word)) { return word; } String suffix = word; int localMinStemLength = Math.max(minStemLength, firstVowelPos(suffix) + 1); int pluralDirectOffset = calcPluralDirectOffset(suffix); if (pluralDirectOffset > 0) { suffix = suffix.substring(0, suffix.length() - pluralDirectOffset); if (pluralDirectChecks.contains(suffix) || stemmerExceptions.contains(suffix)) { return suffix; } } suffix = findLongestSuffix(suffix, localMinStemLength); int stemLength = word.length() - suffix.length() - pluralDirectOffset; if (!suffix.isEmpty() && stemLength > 0 && suffix.charAt(0) == '-') { return word.substring(0, stemLength); } if (stemLength < localMinStemLength) { return word; } return word.substring(0, stemLength); }
Source:
<code>public void testGameOverSetLives() { levels.add(l); Player p = new Player(po); ArrayList<Player> list = new ArrayList<Player>(); list.add(p); Game game = new Game(levels, list); game.start(); assertTrue(game.isRunning()); p.setLives(0); game.tickGO(); assertFalse(game.isRunning()); <START> <END> }</code><technical_language>Remove this whitespace for consistency. <layout</technical_language>

Target:
public void testGameOverSetLives() { levels.add(level); Player p = new Player(point, map); ArrayList<Player> list = new ArrayList<Player>(); list.add(p); Game game = new Game(levels, list); game.start(); assertTrue(game.isRunning()); p.setLives(0); game.tickGO(); assertFalse(game.isRunning()); }
Source:
<code>public synchronized void bind(ServiceReference<QueryFilterTransformer> reference) { if (reference == null) { return; } List<QName> namespaces = getNamespaces(reference); QueryFilterTransformer transformer = getTransformer(reference); for (QName namespace : namespaces) { queryFilterTransformerMap.put(namespace, transformer); List<String> typeNames = getTypeNames(reference); <START> if (CollectionUtils.isNotEmpty(typeNames)) { <END> for (String typeName : typeNames) { typeNameQNameMap.put(typeName, namespace); } } } }</code><technical_language>This if statement is unnecessary; getTypeNames is @Nullable returns null if list is empty, for loop iterate</technical_language>

Target:
public synchronized void bind(ServiceReference<QueryFilterTransformer> reference) { if (reference == null) { return; } List<QName> namespaces = getNamespaces(reference); QueryFilterTransformer transformer = getTransformer(reference); for (QName namespace : namespaces) { queryFilterTransformerMap.put(namespace, transformer); List<String> typeNames = getTypeNames(reference); for (String typeName : typeNames) { typeNameQNameMap.put(typeName, namespace); } } }
Source:
<code><START> void onCanvasElementSelectedEvent(final @Observes CanvasElementSelectedEvent event) { <END> checkNotNull("event", event); if (checkEventContext(event)) { toolboxControl.show(event.getElementUUID()); } }</code><technical_language>IDK if want consider avoid future potential (difficult diagnose) problems</technical_language>

Target:
void onCanvasElementSelectedEvent(final @Observes CanvasElementSelectedEvent event) { checkNotNull("event", event); handleCanvasElementSelectedEvent(event); }
Source:
<code><START> private Optional<TurboIssue> getIssue(String repoId, int issueId) { <END> Optional<Model> modelLookUpResult = models.getModelById(repoId); return Utility.flatMapOptional(modelLookUpResult, (model) -> model.getIssueById(issueId), () -> logger.error("Model " + repoId + " not found in models")); }</code><technical_language>this a MultiModel method instead? operates models. Also, a caller expect handle empty case (can issue missing in some legitimate case)? If not, throw a runtime exception failure, seriously wrong. I this is a problem other MultiModel methods well</technical_language>

Target:
private Optional<TurboIssue> getIssue(String repoId, int issueId) { Optional<Model> modelLookUpResult = models.getModelById(repoId); return Utility.safeFlatMapOptional(modelLookUpResult, (model) -> model.getIssueById(issueId), () -> logger.error("Model " + repoId + " not found in models")); }
Source:
<code><START> private static boolean checkEvidenceTrusted(final RealmIdentity realmIdentity, final SecurityDomain domain, final Evidence evidence) throws RealmUnavailableException { <END> Assert.checkNotNullParam("evidence", evidence); if (! realmIdentity.exists()) { return false; } if (evidence instanceof SecurityIdentityEvidence) { final SecurityIdentity evidenceIdentity = ((SecurityIdentityEvidence) evidence).getSecurityIdentity(); final RealmInfo evidenceRealmInfo = evidenceIdentity.getRealmInfo(); final SecurityRealm evidenceSecurityRealm = evidenceRealmInfo.getSecurityRealm(); final SecurityDomain evidenceSecurityDomain = evidenceIdentity.getSecurityDomain(); return realmIdentity.createdBySecurityRealm(evidenceSecurityRealm) || domain.trustsDomain(evidenceSecurityDomain); } return false; }</code><technical_language>this code is referenced a static nested class, access package-private, private. If private, compile compiler generate invisible "access" method package-private access in order work (which shows stack traces debuggers a weird method call line number typically corresponds line number of class). a big deal, a cleanup item for later</technical_language>

Target:
static boolean checkEvidenceTrusted(final RealmIdentity realmIdentity, final SecurityDomain domain, final Evidence evidence) throws RealmUnavailableException { Assert.checkNotNullParam("evidence", evidence); if (! realmIdentity.exists()) { return false; } if (evidence instanceof SecurityIdentityEvidence) { final SecurityIdentity evidenceIdentity = ((SecurityIdentityEvidence) evidence).getSecurityIdentity(); final RealmInfo evidenceRealmInfo = evidenceIdentity.getRealmInfo(); final SecurityRealm evidenceSecurityRealm = evidenceRealmInfo.getSecurityRealm(); final SecurityDomain evidenceSecurityDomain = evidenceIdentity.getSecurityDomain(); return realmIdentity.createdBySecurityRealm(evidenceSecurityRealm) || domain.trustsDomain(evidenceSecurityDomain); } return false; }
Source:
<code>public Comparator<Path> getComparator() { try { Object obj = comparatorClass.newInstance(); ((LiveFileNameSetter) obj).setName(liveFileName); return (Comparator<Path>) obj; } catch (Exception ex) { <START> throw new RuntimeException("Unknown OnError value " + ex.toString(), ex); <END> } }</code><technical_language>This is "Unknown OnError value" want update message "Unexpected exception"</technical_language>

Target:
public Comparator<Path> getComparator() { try { Object obj = comparatorClass.newInstance(); ((LiveFileNameSetter) obj).setName(liveFileName); return (Comparator<Path>) obj; } catch (Exception ex) { throw new RuntimeException(Utils.format("Unexpected exception: {}", ex.toString()), ex); } }
Source:
<code>private String getDefaultRemoteName() { String defaultName = ""; boolean onlyOneRemote = syncRepos.size() == 2; if(onlyOneRemote) { defaultName = syncRepos.get(1).getName(); } else { for (SyncRepoEntity repo : syncRepos) { if(repo.getName().equals(DEFAULT_REMOTE_NAME)) { <START> defaultName = DEFAULT_REMOTE_NAME; <END> } } } return defaultName; }</code><technical_language>In humble opinion break for if find occurrence of DEFAULT_REMOTE_NAME. I get iterate more finding next one</technical_language>

Target:
private String getDefaultRemoteName() { String defaultName = ""; boolean onlyOneRemote = syncRepos.size() == 2; if (onlyOneRemote) { defaultName = syncRepos.get(1).getName(); } else { for (SyncRepoEntity repo : syncRepos) if (repo.getName().equals(DEFAULT_REMOTE_NAME)) return DEFAULT_REMOTE_NAME; } return defaultName; }
Source:
<code>public DataSegment push(File inDir, DataSegment segment) throws IOException { <START> log.info("Uploading segment[%s] to HDFS", segment.getIdentifier()); <END> final String storageDir = DataSegmentPusherUtil.getHdfsStorageDir(segment); Path outFile = new Path(String.format("%s/%s/index.zip", config.getStorageDirectory(), storageDir)); FileSystem fs = outFile.getFileSystem(hadoopConfig); fs.mkdirs(outFile.getParent()); log.info("Compressing files from[%s] to [%s]", inDir, outFile); final long size; try (FSDataOutputStream out = fs.create(outFile)) { size = CompressionUtils.zip(inDir, out); } return createDescriptorFile( segment.withLoadSpec(makeLoadSpec(outFile)) .withSize(size) .withBinaryVersion(SegmentUtils.getVersionFromDir(inDir)), outFile.getParent(), fs ); }</code><technical_language>this next statement include is going</technical_language>

Target:
public DataSegment push(File inDir, DataSegment segment) throws IOException { final String storageDir = DataSegmentPusherUtil.getHdfsStorageDir(segment); log.info( "Copying segment[%s] to HDFS at location[%s/%s]", segment.getIdentifier(), config.getStorageDirectory(), storageDir ); Path outFile = new Path(String.format("%s/%s/index.zip", config.getStorageDirectory(), storageDir)); FileSystem fs = outFile.getFileSystem(hadoopConfig); fs.mkdirs(outFile.getParent()); log.info("Compressing files from[%s] to [%s]", inDir, outFile); final long size; try (FSDataOutputStream out = fs.create(outFile)) { size = CompressionUtils.zip(inDir, out); } return createDescriptorFile( segment.withLoadSpec(makeLoadSpec(outFile)) .withSize(size) .withBinaryVersion(SegmentUtils.getVersionFromDir(inDir)), outFile.getParent(), fs ); }
Source:
<code>public static Set<BlacklistedPartition> getBlacklistedPartitions() { String query = "SELECT keyspace_name, columnfamily_name, partition_key FROM %s.%s"; UntypedResultSet results; try { results = QueryProcessor.execute(format(query, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, BLACKLISTED_PARTITIONS), ConsistencyLevel.ONE); } catch (Exception e) { <START> logger.error("Error querying blacklisted partitions"); <END> return Collections.emptySet(); } Set<BlacklistedPartition> blacklistedPartitions = new HashSet<>(); for (UntypedResultSet.Row row : results) { try { blacklistedPartitions.add(new BlacklistedPartition(row.getString("keyspace_name"), row.getString("columnfamily_name"), row.getString("partition_key"))); } catch (IllegalArgumentException ex) { logger.warn("Exception parsing blacklisted partition. {}", ex.getMessage()); } } return blacklistedPartitions; }</code><technical_language>want log exception also</technical_language>

Target:
public static UntypedResultSet getBlacklistedPartitions() { String query = "SELECT keyspace_name, columnfamily_name, partition_key FROM %s.%s"; try { return QueryProcessor.execute(format(query, SchemaConstants.DISTRIBUTED_KEYSPACE_NAME, BLACKLISTED_PARTITIONS), ConsistencyLevel.ONE); } catch (Exception e) { logger.error("Error querying blacklisted partitions", e); return null; } }
Source:
<code>private static void updateNetwrokDetailsInInterface(VDS vds, Map<String, Integer> currVlans, Map<String, Integer> networkVlans, Map<String, Object> network, network net, String ifaceName) { VdsNetworkInterface iface = null; for (VdsNetworkInterface tempInterface : vds.getInterfaces()) { if (tempInterface.getName().equals(ifaceName)) { iface = tempInterface; break; } } if (iface != null) { iface.setNetworkName(net.getname()); if (currVlans.containsKey(iface.getName())) { networkVlans.put(net.getname(), currVlans.get(iface.getName())); } iface.setAddress(net.getaddr()); boolean bridged = false; <START> if (network.get("bridged") != null) { <END> bridged = Boolean.parseBoolean(network.get("bridged").toString()); } if (DbFacade.getInstance() .getVdsGroupDAO() .get(vds.getvds_group_id()) .getcompatibility_version() .compareTo(Version.v3_0) > 0) { iface.setBridged(bridged); } else { iface.setBridged(true); } if (StringHelper.EqOp(iface.getNetworkName(), NetworkUtils.getEngineNetwork())) { iface.setType(iface.getType() | VdsInterfaceType.Management.getValue()); } iface.setSubnet(net.getsubnet()); iface.setGateway(net.getgateway()); Map<String, Object> networkConfigAsMap = (Map<String, Object>) ((network.get("cfg") instanceof Map) ? network.get("cfg") : null); XmlRpcStruct networkConfig = networkConfigAsMap == null ? null : new XmlRpcStruct( networkConfigAsMap); AddBootProtocol(networkConfig, iface); } }</code><technical_language>try extract here, if compatibility version matches</technical_language>

Target:
private static void updateNetwrokDetailsInInterface(VDS vds, Map<String, Integer> currVlans, Map<String, Integer> networkVlans, Map<String, Object> network, network net, String ifaceName) { VdsNetworkInterface iface = null; for (VdsNetworkInterface tempInterface : vds.getInterfaces()) { if (tempInterface.getName().equals(ifaceName)) { iface = tempInterface; break; } } if (iface != null) { iface.setNetworkName(net.getname()); if (currVlans.containsKey(iface.getName())) { networkVlans.put(net.getname(), currVlans.get(iface.getName())); } iface.setAddress(net.getaddr()); if (network.get("bridged") == null) { iface.setBridged(true); } else { iface.setBridged(Boolean.parseBoolean(network.get("bridged").toString())); } if (StringHelper.EqOp(iface.getNetworkName(), NetworkUtils.getEngineNetwork())) { iface.setType(iface.getType() | VdsInterfaceType.Management.getValue()); } iface.setSubnet(net.getsubnet()); iface.setGateway(net.getgateway()); Map<String, Object> networkConfigAsMap = (Map<String, Object>) ((network.get("cfg") instanceof Map) ? network.get("cfg") : null); XmlRpcStruct networkConfig = networkConfigAsMap == null ? null : new XmlRpcStruct( networkConfigAsMap); AddBootProtocol(networkConfig, iface); } }
Source:
<code>private Optional<PlanNodeStatsEstimate> estimateLogicalAnd(Expression left, Expression right) { Optional<PlanNodeStatsEstimate> leftEstimate = process(left); <START> if (leftEstimate.isPresent()) { <END> Optional<PlanNodeStatsEstimate> logicalAndEstimate = new FilterExpressionStatsCalculatingVisitor(leftEstimate.get(), session, types).process(right); if (logicalAndEstimate.isPresent()) { return logicalAndEstimate; } return leftEstimate.map(FilterStatsCalculator::filterStatsForUnknownExpression); } Optional<PlanNodeStatsEstimate> rightEstimate = process(right); return rightEstimate.map(FilterStatsCalculator::filterStatsForUnknownExpression); }</code><technical_language>code obvious leftEstimate is "unknown" (has NaN output row count). read FilterStatsCalculator code mentally prove that. source of truth if PlanNodeStatsEstimate is unknown (depending) context is PlanNodeStatsEstimate itself. consistent optional PlanNodeStatsEstimate required stats. is I prefer remove Optional either</technical_language>

Target:
private PlanNodeStatsEstimate estimateLogicalAnd(Expression left, Expression right) { PlanNodeStatsEstimate leftEstimate = process(left); if (!leftEstimate.isOutputRowCountUnknown()) { PlanNodeStatsEstimate logicalAndEstimate = new FilterExpressionStatsCalculatingVisitor(leftEstimate, session, types).process(right); if (!logicalAndEstimate.isOutputRowCountUnknown()) { return logicalAndEstimate; } } PlanNodeStatsEstimate rightEstimate = process(right); PlanNodeStatsEstimate smallestKnownEstimate; if (leftEstimate.isOutputRowCountUnknown()) { smallestKnownEstimate = rightEstimate; } else if (rightEstimate.isOutputRowCountUnknown()) { smallestKnownEstimate = leftEstimate; } else { smallestKnownEstimate = leftEstimate.getOutputRowCount() <= rightEstimate.getOutputRowCount() ? leftEstimate : rightEstimate; } if (smallestKnownEstimate.isOutputRowCountUnknown()) { return PlanNodeStatsEstimate.unknown(); } return normalizer.normalize(smallestKnownEstimate.mapOutputRowCount(rowCount -> rowCount * UNKNOWN_FILTER_COEFFICIENT), types); }
Source:
<code>protected void disconnectSource(RestClient client) { try (AeshTestConnection terminal = new AeshTestConnection()) { CLI.main(new AeshDelegatingShell(terminal), new String[]{}); terminal.readln("connect"); terminal.assertContains(" terminal.clear(); <START> terminal.readln("migrate disconnect --cache=" + CACHE_NAME); <END> } }</code><technical_language>migrate cluster disconnect...</technical_language>

Target:
protected void disconnectSource(RestClient client) { try (AeshTestConnection terminal = new AeshTestConnection()) { CLI.main(new AeshDelegatingShell(terminal), new String[]{}); terminal.readln("connect"); terminal.assertContains(" terminal.clear(); terminal.readln("migrate cluster disconnect --cache=" + CACHE_NAME); } }
Source:
<code>public boolean matches(Pattern pattern) { <START> if(pattern.matcher(getName()).find()) <END> { return true; } if(pattern.matcher(Integer.toString(fThreadId)).find()) { return true; } if(pattern.matcher(Integer.toString(fParentThreadId)).find()) { return true; } if ( pattern.matcher(Utils.formatTime(getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC)).find()) { return true; } if ( pattern.matcher(fTrace.getName()).find()) { return true; } return pattern.matcher(Integer.toString(fThreadQuark)).find(); }</code><technical_language>formatting</technical_language>

Target:
public boolean matches(Pattern pattern) { if (pattern.matcher(getName()).find()) { return true; } if (pattern.matcher(Integer.toString(fThreadId)).find()) { return true; } if (pattern.matcher(Integer.toString(fParentThreadId)).find()) { return true; } if (pattern.matcher(Integer.toString(fThreadQuark)).find()) { return true; } if (pattern.matcher(fTrace.getName()).find()) { return true; } return pattern.matcher(Utils.formatTime(getStartTime(), TimeFormat.CALENDAR, Resolution.NANOSEC)).find(); }
Source:
<code>public void doCreateAccount() { new AMCreateAccountInfoTask() { @Override public void onCatch(Throwable caught) { <START> L.e(caught); <END> } @Override public void onFinish(AMCreateAccountInfoResult result) { if (result.getEnabled()) { L.i("Creating account with AuthManager"); captchaHandler.handleCaptcha(new CaptchaResult(result.getCaptchaId()), true); } else { L.i("Creating account with legacy API"); doLegacyCreateAccount(); } } }.execute(); }</code><technical_language>show feedback user in this scenario</technical_language>

Target:
public void doCreateAccount() { new AMCreateAccountInfoTask() { @Override public void onCatch(Throwable caught) { handleError(caught.getMessage()); L.e(caught); } @Override public void onFinish(AMCreateAccountInfoResult result) { if (result.getEnabled()) { L.i("Creating account with AuthManager"); captchaHandler.handleCaptcha(new CaptchaResult(result.getCaptchaId()), true); } else { L.i("Creating account with legacy API"); doLegacyCreateAccount(); } } }.execute(); }
Source:
<code>public void stop() { giant.lock(); try { if (isLeader()) { <START> leadershipListener.stopBeingLeader(); <END> } overlordLeaderSelector.unregisterListener(); } finally { giant.unlock(); } }</code><technical_language>Is this racy all? I loose leadership isLeader here, exception out unregister listener</technical_language>

Target:
public void stop() { giant.lock(); try { gracefulStopLeaderLifecycle(); overlordLeaderSelector.unregisterListener(); } finally { giant.unlock(); } }
Source:
<code>boolean verifyEvidence(final Evidence evidence) throws RealmUnavailableException { <START> return checkEvidenceTrusted(realmIdentity, domain, evidence) ? true : realmIdentity.verifyEvidence(evidence); <END> }</code><technical_language>below</technical_language>

Target:
boolean verifyEvidence(final Evidence evidence) throws RealmUnavailableException { return checkEvidenceTrusted(realmIdentity, getSecurityDomain(), evidence) || realmIdentity.verifyEvidence(evidence); }
Source:
<code>public Link discoverUnique(String rel) throws Exception { List<Link> discover = discover(rel); <START> assertThat(discover, hasSize(1)); <END> return discover.get(0); }</code><technical_language>Please, AssertJ: assertThat(discover).hasSize(1)</technical_language>

Target:
public Link discoverUnique(String rel) throws Exception { List<Link> discover = discover(rel); assertThat(discover).hasSize(1); return discover.get(0); }
Source:
<code>public AuditLogType getAuditLogTypeValue() { <START> return getSucceeded() ? AuditLogType.USER_REMOVE_VM_POOL : AuditLogType.USER_REMOVE_VM_POOL_FAILED; <END> }</code><technical_language>logic be: if execute phase VMs "user initiated remove pool" presented, existing condition</technical_language>

Target:
public AuditLogType getAuditLogTypeValue() { if (getActionState() == CommandActionState.EXECUTE) { return AuditLogType.USER_REMOVE_VM_POOL_INITIATED; } else { return getSucceeded() ? AuditLogType.USER_REMOVE_VM_POOL : AuditLogType.USER_REMOVE_VM_POOL_FAILED; } }