auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void afterPropertiesSet() throws Exception { poolingOptions = newPoolingOptions(); if (heartbeatIntervalSeconds != null) { poolingOptions.setHeartbeatIntervalSeconds(heartbeatIntervalSeconds); } if (idleTimeoutSeconds != null) { poolingOptions.setIdleTimeoutSeconds(idleTimeoutSeconds); } if (initializationExecutor != null) { poolingOptions.setInitializationExecutor(initializationExecutor); } if (poolTimeoutMilliseconds != null) { poolingOptions.setPoolTimeoutMillis(poolTimeoutMilliseconds); } HostDistancePoolingOptions local = LocalHostDistancePoolingOptions.create(localCoreConnections, localMaxConnections, localMaxSimultaneousRequests, localMinSimultaneousRequests); <START> local.setMaxConnectionsPerHost(poolingOptions); <END> local.setCoreConnectionsPerHost(poolingOptions); local.setMaxRequestsPerConnection(poolingOptions); local.setNewConnectionThreshold(poolingOptions); HostDistancePoolingOptions remote = RemoteHostDistancePoolingOptions.create(remoteCoreConnections, remoteMaxConnections, remoteMaxSimultaneousRequests, remoteMinSimultaneousRequests); remote.setMaxConnectionsPerHost(poolingOptions); remote.setCoreConnectionsPerHost(poolingOptions); remote.setMaxRequestsPerConnection(poolingOptions); remote.setNewConnectionThreshold(poolingOptions); }</code><technical_language>add another method extract calls for HostDistancePoolingOptions</technical_language>

Target:
public void afterPropertiesSet() throws Exception { poolingOptions = configureRemoteHostDistancePoolingOptions( configureLocalHostDistancePoolingOptions(newPoolingOptions())); if (heartbeatIntervalSeconds != null) { poolingOptions.setHeartbeatIntervalSeconds(heartbeatIntervalSeconds); } if (idleTimeoutSeconds != null) { poolingOptions.setIdleTimeoutSeconds(idleTimeoutSeconds); } if (initializationExecutor != null) { poolingOptions.setInitializationExecutor(initializationExecutor); } if (poolTimeoutMilliseconds != null) { poolingOptions.setPoolTimeoutMillis(poolTimeoutMilliseconds); } }
Source:
<code>public OracleWeekDiffFunction() { <START> super("(select sign(i1) * floor(abs(i1)) from (values (trunc(-(cast(?1 as date) - cast(?2 as date))) / 7)) as temp(i1))"); <END> }</code><technical_language>a cast int enough</technical_language>

Target:
public OracleWeekDiffFunction() { super("trunc(-(cast(?1 as date) - cast(?2 as date))/7)"); }
Source:
<code>private boolean checkNullBytesPrepended(final byte[] bytes) { if (bytes.length > IVBYTES.length) { <START> boolean ivPrepended = false; <END> for (short s = 0; s < IVBYTES.length; s++) { if (bytes[s] == 0) { ivPrepended = true; } else { return false; } } return ivPrepended; } else { return false; } }</code><technical_language>Please change this variable name too.</technical_language>

Target:
private boolean checkNullBytesPrepended(final byte[] bytes) { if (bytes.length > IVBYTES.length) { boolean nullBytesPrepended = false; for (short s = 0; s < IVBYTES.length; s++) { if (bytes[s] == 0) { nullBytesPrepended = true; } else { return false; } } return nullBytesPrepended; } else { return false; } }
Source:
<code>public void onSaveInstanceState(Bundle outState) { <START> if (backStack != null) { <END> updateCurrentBackStackItem(); outState.putParcelableArrayList("backStack", backStack); } }</code><technical_language>rest of this class expects backStack nonnull. I recommend initialize backStack empty mutable list @NonNull in setter</technical_language>

Target:
public void onSaveInstanceState(Bundle outState) { updateCurrentBackStackItem(); outState.putParcelableArrayList("backStack", backStack); }
Source:
<code>public abstract boolean isCollection(String schemaName, String fieldTypeName) throws SQLException; public abstract boolean isStruct(String schemaName, String fieldTypeName) throws SQLException; public abstract boolean isPrimitive(String fieldTypeName) throws SQLException; public List<String> getAllTablesInDatabase() throws SQLException { <START> throw new DatastreamRuntimeException("getAllTablesInDatabase operation not supported"); <END> }</code><technical_language>UnsupportedOperationException instead</technical_language>

Target:
public abstract boolean isCollection(String schemaName, String fieldTypeName) throws SQLException; public abstract boolean isStruct(String schemaName, String fieldTypeName) throws SQLException; public abstract boolean isPrimitive(String fieldTypeName) throws SQLException; public List<String> getAllTablesInDatabase() throws SQLException { throw new UnsupportedOperationException("getAllTablesInDatabase operation not supported"); }
Source:
<code>public void force(boolean force) throws IOException { long start = System.nanoTime (); fileChannel.force (force); <START> update(syncMetrics, SYNC_METRICS, start, MB_DATA); <END> }</code><technical_language>want measure force force separately right histogram incorrect is measuring metadata fsync non-metadata fsync (fdatasync) right</technical_language>

Target:
public void force(boolean force) throws IOException { final long start = System.nanoTime(); fileChannel.force(force); if(force) update(syncMetaMetrics, SYNC_META_METRICS, start, MB_DATA); else update(syncMetrics, SYNC_METRICS, start, MB_DATA); }
Source:
<code>public void toExecute(JobExecutionContext context) throws JobExecutionException { try { JobDataMap map = context.getMergedJobDataMap(); String ownerKey = map.getString(JobStatus.TARGET_ID); Boolean lazy = map.getBoolean(LAZY_REGEN); Owner owner = ownerCurator.lookupByKey(ownerKey); if (owner == null) { context.setResult("Nothing to do. Owner no longer exists"); return; } poolManager.getRefresher(lazy).setUnitOfWork(unitOfWork).add(owner).run(); context.setResult("Pools refreshed for owner " + owner.getDisplayName()); } catch (PersistenceException e) { throw new RetryJobException("RefreshPoolsJob encountered a problem.", e); } catch (RuntimeException e) { <START> if (e.getCause() != null && <END> SQLException.class.isAssignableFrom(e.getCause().getClass())) { log.warn("Caught a runtime exception wrapping an SQLException."); throw new RetryJobException("RefreshPoolsJob encountered a problem.", e); } log.error("RefreshPoolsJob encountered a problem.", e); context.setResult(e.getMessage()); throw new JobExecutionException(e.getMessage(), e, false); } catch (Exception e) { log.error("RefreshPoolsJob encountered a problem.", e); context.setResult(e.getMessage()); throw new JobExecutionException(e.getMessage(), e, false); } }</code><technical_language>(fuzzy java exception details, bear me...) RunTimeException multiple causing exceptions? (or I guess, a stack of them...). common/src/main/java/org/candlepin/common/exceptions/mappers/CandlepinExceptionMapper.java iterates getCause() is null</technical_language>

Target:
public void toExecute(JobExecutionContext context) throws JobExecutionException { try { JobDataMap map = context.getMergedJobDataMap(); String ownerKey = map.getString(JobStatus.TARGET_ID); Boolean lazy = map.getBoolean(LAZY_REGEN); Owner owner = ownerCurator.lookupByKey(ownerKey); if (owner == null) { context.setResult("Nothing to do. Owner no longer exists"); return; } poolManager.getRefresher(lazy).setUnitOfWork(unitOfWork).add(owner).run(); context.setResult("Pools refreshed for owner " + owner.getDisplayName()); } catch (PersistenceException e) { throw new RetryJobException("RefreshPoolsJob encountered a problem.", e); } catch (RuntimeException e) { Throwable cause = e.getCause(); while (cause != null) { if (SQLException.class.isAssignableFrom(cause.getClass())) { log.warn("Caught a runtime exception wrapping an SQLException."); throw new RetryJobException("RefreshPoolsJob encountered a problem.", e); } cause = cause.getCause(); } log.error("RefreshPoolsJob encountered a problem.", e); context.setResult(e.getMessage()); throw new JobExecutionException(e.getMessage(), e, false); } catch (Exception e) { log.error("RefreshPoolsJob encountered a problem.", e); context.setResult(e.getMessage()); throw new JobExecutionException(e.getMessage(), e, false); } }
Source:
<code>public WriteCompletedEvent( String queryId, String path, String schemaName, String tableName, @Nullable String partitionName, String storageFormat, String writerImplementation, String prestoVersion, String serverAddress, @Nullable String principal, String environment, Map<String, String> sessionProperties, @Nullable Long bytes, long rows) { this.queryId = requireNonNull(queryId, "queryId is null"); this.path = requireNonNull(path, "path is null"); this.schemaName = requireNonNull(schemaName, "schemaName is null"); this.tableName = requireNonNull(tableName, "tableName is null"); this.partitionName = partitionName; this.storageFormat = requireNonNull(storageFormat, "storageFormat is null"); this.writerImplementation = requireNonNull(writerImplementation, "writerImplementation is null"); this.prestoVersion = requireNonNull(prestoVersion, "prestoVersion is null"); this.host = requireNonNull(serverAddress, "serverAddress is null"); this.principal = principal; this.environment = requireNonNull(environment, "environment is null"); this.sessionProperties = requireNonNull(sessionProperties, "sessionProperties is null"); this.bytes = bytes; this.rows = rows; <START> this.timestamp = Instant.now(); <END> }</code><technical_language>Initialize this in field declaration</technical_language>

Target:
public WriteCompletedEvent( String queryId, String path, String schemaName, String tableName, @Nullable String partitionName, String storageFormat, String writerImplementation, String prestoVersion, String serverAddress, @Nullable String principal, String environment, Map<String, String> sessionProperties, @Nullable Long bytes, long rows) { this.queryId = requireNonNull(queryId, "queryId is null"); this.path = requireNonNull(path, "path is null"); this.schemaName = requireNonNull(schemaName, "schemaName is null"); this.tableName = requireNonNull(tableName, "tableName is null"); this.partitionName = partitionName; this.storageFormat = requireNonNull(storageFormat, "storageFormat is null"); this.writerImplementation = requireNonNull(writerImplementation, "writerImplementation is null"); this.prestoVersion = requireNonNull(prestoVersion, "prestoVersion is null"); this.host = requireNonNull(serverAddress, "serverAddress is null"); this.principal = principal; this.environment = requireNonNull(environment, "environment is null"); this.sessionProperties = requireNonNull(sessionProperties, "sessionProperties is null"); this.bytes = bytes; this.rows = rows; }
Source:
<code>private Map<Pair<String, Integer>, Pair<String, Integer>> gbyMatches(MaterializedViewInfo mv) { <START> final FilterMatcher filter = new FilterMatcher(m_stmt.m_joinTree.getJoinExpression(), predicate_of(mv)); <END> if(filter.match() && gbyTablesEqual(mv) && gbyColumnsMatch(mv)) { return getViewColumnMaps(mv); } else { return null; } }</code><technical_language>m_stmt.m_joinTree.getJoinExpression() cover of filters in statement? single-table predicates end in scan nodes else</technical_language>

Target:
private Map<Pair<String, Integer>, Pair<String, Integer>> gbyMatches(MaterializedViewInfo mv) { final FilterMatcher filter = new FilterMatcher(m_selectStmt.m_joinTree.getJoinExpression(), predicate_of(mv)); if (filter.match() && gbyTablesEqual(mv) && gbyColumnsMatch(mv)) { return getViewColumnMaps(mv); } else { return null; } }
Source:
<code>private String getValueFromRequest(HttpServletRequest request, String parameter) { String parameterValue = request.getParameter(parameter); if (parameterValue != null) { return parameterValue; <START> } <END> Map allParams = (Map) request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE); if (allParams != null) { return (String) allParams.get(parameter); } return null; }</code><technical_language>This is problematic: If a user foo access pipelineA, pipelineB - (s)he possibly craft this url for pipeline history page get access pipelineB, impl prefer query parameter, ignore path param. GET /go/tab/pipeline/history/pipelineB?pipelineName=pipelineA</technical_language>

Target:
private String getValueFromRequest(HttpServletRequest request, String parameter) { String parameterValue = null; Map allParams = (Map) request.getAttribute(HandlerMapping.URI_TEMPLATE_VARIABLES_ATTRIBUTE); if (allParams != null) { parameterValue = (String) allParams.get(parameter); } if (parameterValue == null) { parameterValue = request.getParameter(parameter); } return parameterValue; }
Source:
<code>public String saveEntityJson(HttpServletRequest request, HttpServletResponse response, Model model, @PathVariable Map<String, String> pathVars, @PathVariable(value = "id") String id, @ModelAttribute(value = "entityForm") EntityForm entityForm, BindingResult result, RedirectAttributes ra) throws Exception { saveEntity(request, response, model, pathVars, id, entityForm, result, ra); JsonResponse json = new JsonResponse(response); if (result.hasErrors()) { populateJsonValidationErrors(entityForm, result, json); } List<String> dirtyList = buildDirtyList(pathVars, request, id); <START> if (!dirtyList.isEmpty()) { <END> json.with("dirty", dirtyList); } return json.done(); }</code><technical_language>Based buildDirtyList() below, if catch a ServiceException return null. If happens, this line of code throw a NullPointerException dirtyList is null. get habit of CollectionUtils possible. In this case, this code transform to: java if (CollectionUtils.isNotEmpty(dirtyList)) a couple of advantages: 1. Readability is 100x 2. automatically protects NPEs. If dirtyList is null, method return false (it treats null empty)</technical_language>

Target:
public String saveEntityJson(HttpServletRequest request, HttpServletResponse response, Model model, @PathVariable Map<String, String> pathVars, @PathVariable(value = "id") String id, @ModelAttribute(value = "entityForm") EntityForm entityForm, BindingResult result, RedirectAttributes ra) throws Exception { saveEntity(request, response, model, pathVars, id, entityForm, result, ra); JsonResponse json = new JsonResponse(response); if (result.hasErrors()) { populateJsonValidationErrors(entityForm, result, json); } List<String> dirtyList = buildDirtyList(pathVars, request, id); if (CollectionUtils.isNotEmpty(dirtyList)) { json.with("dirty", dirtyList); } return json.done(); }
Source:
<code><START> public static VersionInfo parseVersionInfoFromClusterVersion(ClusterVersion clusterVersion) throws ParseException { <END> String[] versionParts = clusterVersion.getStatus().getDesired().getVersion().split("\\."); VersionInfo.Builder versionInfoBuilder = new VersionInfo.Builder(); if (versionParts.length == 3) { versionInfoBuilder.withMajor(versionParts[0]); versionInfoBuilder.withMinor(versionParts[1] + "." + versionParts[2]); } versionInfoBuilder.withBuildDate(clusterVersion.getMetadata().getCreationTimestamp()); return versionInfoBuilder.build(); }</code><technical_language>this private</technical_language>

Target:
private static VersionInfo parseVersionInfoFromClusterVersion(ClusterVersion clusterVersion) throws ParseException { String[] versionParts = clusterVersion.getStatus().getDesired().getVersion().split("\\."); VersionInfo.Builder versionInfoBuilder = new VersionInfo.Builder(); if (versionParts.length == 3) { versionInfoBuilder.withMajor(versionParts[0]); versionInfoBuilder.withMinor(versionParts[1] + "." + versionParts[2]); } versionInfoBuilder.withBuildDate(clusterVersion.getMetadata().getCreationTimestamp()); return versionInfoBuilder.build(); }
Source:
<code><START> public GatewayResponse capture(CaptureGatewayRequest request) { <END> return worldpayCaptureHandler.capture(request); }</code><technical_language>Adding a generic type <BaseCaptureResponse> remove potential compile warnings</technical_language>

Target:
public GatewayResponse<BaseCaptureResponse> capture(CaptureGatewayRequest request) { return worldpayCaptureHandler.capture(request); }
Source:
<code>public BinaryContent transform( SourceResponse upstreamResponse, Map<String, Serializable> arguments) throws CatalogTransformerException { List<Metacard> metacards = upstreamResponse .getResults() .stream() .map(Result::getMetacard) .collect(Collectors.toList()); <START> Set<String> hiddenFields = <END> Optional.ofNullable((Set<String>) arguments.get(HIDDEN_FIELDS_KEY)) .orElse(Collections.emptySet()); List<String> attributeOrder = Optional.ofNullable((List<String>) arguments.get(COLUMN_ORDER_KEY)) .orElse(Collections.emptyList()); Map<String, String> columnAliasMap = Optional.ofNullable((Map<String, String>) arguments.get(COLUMN_ALIAS_KEY)) .orElse(Collections.emptyMap()); Set<AttributeDescriptor> allAttributeDescriptors = getAllAttributes(metacards, hiddenFields); Set<String> requestedFields = new HashSet<>(attributeOrder); if (!requestedFields.isEmpty()) { allAttributeDescriptors = allAttributeDescriptors .stream() .filter(attrDesc -> requestedFields.contains(attrDesc.getName())) .collect(Collectors.toSet()); } List<AttributeDescriptor> sortedAttributeDescriptors = sortAttributes(allAttributeDescriptors, attributeOrder); Appendable csv = writeMetacardsToCsv(metacards, sortedAttributeDescriptors, columnAliasMap); return createResponse(csv); }</code><technical_language>a getOrDefault() for this instead</technical_language>

Target:
public BinaryContent transform( SourceResponse upstreamResponse, Map<String, Serializable> arguments) throws CatalogTransformerException { List<Metacard> metacards = upstreamResponse .getResults() .stream() .map(Result::getMetacard) .collect(Collectors.toList()); Set<String> hiddenFields = Optional.ofNullable((Set<String>) arguments.get(HIDDEN_FIELDS_KEY)) .orElse(Collections.emptySet()); List<String> attributeOrder = Optional.ofNullable((List<String>) arguments.get(COLUMN_ORDER_KEY)) .orElse(Collections.emptyList()); Map<String, String> columnAliasMap = Optional.ofNullable((Map<String, String>) arguments.get(COLUMN_ALIAS_KEY)) .orElse(Collections.emptyMap()); Set<String> requestedFields = new HashSet<>(attributeOrder); Set<AttributeDescriptor> requestedAttributeDescriptors = requestedFields.isEmpty() ? getAllCsvAttributeDescriptors(metacards) : getOnlyRequestedAttributes(metacards, requestedFields); Set<AttributeDescriptor> filteredAttributeDescriptors = requestedAttributeDescriptors .stream() .filter(desc -> !hiddenFields.contains(desc.getName())) .collect(Collectors.toSet()); List<AttributeDescriptor> sortedAttributeDescriptors = sortAttributes(filteredAttributeDescriptors, attributeOrder); Appendable csv = writeMetacardsToCsv(metacards, sortedAttributeDescriptors, columnAliasMap); return createResponse(csv); }
Source:
<code>protected void loadApp(String appKey) { <START> if(salesforceReactActivity != null && !salesforceReactActivity.shouldAuthenticate()){ <END> super.loadApp(appKey); } }</code><technical_language>This conditional (or a similar one) is in multiple place. I need restClient here. following: - a shouldReactBeRunning() method in SalesforceReactActivity internally checks shouldAuthenticate() -- details do need delegate class. - a isRunning member in SalesforceReactActivityDelegate class (initially false). - loadApp() do: java if (!isRunning && salesforceReactActivity != null && salesforceReactActivity.shouldReactBeRunning()) { super.loadApp(appComponentName); isRunning = true; } - onResume do: java loadApp(); // NB loadApp if is loaded</technical_language>

Target:
protected void loadApp(String appKey) { loadReactAppOnceIfReady(appKey); }
Source:
<code>public synchronized Delta<UsbSerialDeviceInformation> scan() throws IOException { Set<UsbSerialDeviceInformation> deviceInfos = usbSerialScanner.scan(); Set<UsbSerialDeviceInformation> added = getAddedDeviceInfos(deviceInfos); Set<UsbSerialDeviceInformation> removed = getRemovedDeviceInfos(deviceInfos); <START> Set<UsbSerialDeviceInformation> unchanged = Sets.difference(deviceInfos, added); <END> lastScanResult = deviceInfos; return new Delta<>(added, removed, unchanged); }</code><technical_language>java ... = new HashSet<>(deviceInfos).removeAll(added);</technical_language>

Target:
public synchronized Delta<UsbSerialDeviceInformation> scan() throws IOException { Set<UsbSerialDeviceInformation> scanResult = usbSerialScanner.scan(); Set<UsbSerialDeviceInformation> added = setDifference(scanResult, lastScanResult); Set<UsbSerialDeviceInformation> removed = setDifference(lastScanResult, scanResult); Set<UsbSerialDeviceInformation> unchanged = setDifference(scanResult, added); lastScanResult = scanResult; return new Delta<>(added, removed, unchanged); }
Source:
<code>public void testGenerateThirdPartyNameToFullModuleNameWithException() throws Exception { final URLClassLoader classLoader = mock(URLClassLoader.class); final Set<String> packages = new LinkedHashSet<>(1); <START> packages.add(BASE_PACKAGE); <END> mockStatic(ModuleReflectionUtil.class); doThrow(new IOException("mock exception")).when(ModuleReflectionUtil.class); ModuleReflectionUtil.getCheckstyleModules(packages, classLoader); final PackageObjectFactory objectFactory = new PackageObjectFactory(packages, Thread.currentThread().getContextClassLoader()); final Method method = objectFactory.getClass().getDeclaredMethod( "generateThirdPartyNameToFullModuleName", ClassLoader.class); method.setAccessible(true); final int size = ((Map<String, String>) method.invoke(objectFactory, classLoader)).size(); assertEquals("Invalid map size", 0, size); }</code><technical_language>Please do stream <LINK_0>, jump next java, easy update code, I inspection hint this update</technical_language>

Target:
public void testGenerateThirdPartyNameToFullModuleNameWithException() throws Exception { final String name = "String"; final String packageName = "java.lang"; final ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); final Set<String> packages = Collections.singleton(packageName); final PackageObjectFactory objectFactory = new PackageObjectFactory(packages, classLoader, TRY_IN_ALL_REGISTERED_PACKAGES); mockStatic(ModuleReflectionUtil.class); doThrow(new IOException("mock exception")).when(ModuleReflectionUtil.class); ModuleReflectionUtil.getCheckstyleModules(packages, classLoader); final String internalFieldName = "thirdPartyNameToFullModuleNames"; final Map<String, String> nullMap = Whitebox.getInternalState(objectFactory, internalFieldName); assertNull("Expected uninitialized field", nullMap); final Object instance = objectFactory.createModule(name); assertEquals("Expected empty string", "", instance); final Map<String, String> emptyMap = Whitebox.getInternalState(objectFactory, internalFieldName); assertEquals("Expected empty map", Collections.emptyMap(), emptyMap); }
Source:
<code>public KudoResourceMappingProvider () { <START> mappings.put("kudo.dev/v1beta1#InstanceList", io.fabric8.kudo.api.model.v1beta1.InstanceList.class); <END> mappings.put("kudo.dev/v1beta1#Instance", io.fabric8.kudo.api.model.v1beta1.Instance.class); }</code><technical_language>I more classes need add</technical_language>

Target:
public KudoResourceMappingProvider () { mappings.put("kudo.dev/v1beta1#InstanceList", io.fabric8.kudo.v1beta1.InstanceList.class); mappings.put("kudo.dev/v1beta1#Instance", io.fabric8.kudo.v1beta1.Instance.class); mappings.put("kudo.dev/v1beta1#OperatorVersion", io.fabric8.kudo.v1beta1.OperatorVersion.class); mappings.put("kudo.dev/v1beta1#OperatorVersionList", io.fabric8.kudo.v1beta1.OperatorVersionList.class); mappings.put("kudo.dev/v1beta1#Operator", io.fabric8.kudo.v1beta1.Operator.class); mappings.put("kudo.dev/v1beta1#OperatorList", io.fabric8.kudo.v1beta1.OperatorList.class); }
Source:
<code>public void reset() { super.reset(); CTabFolder folder = (CTabFolder) getWidget(); folder.setSelectionBackground((Color) null); folder.setSelectionForeground((Color) null); folder.setBackground(null, null); CTabFolderRenderer renderer = folder.getRenderer(); <START> if (renderer != null <END> && !renderer.getClass().getName() .equals(CTabFolderRenderer.class.getName())) { try { Method m = renderer.getClass().getMethod("setSelectedTabFill", new Class[] { Color.class }); m.invoke(renderer, (Color) null); m = renderer.getClass().getMethod("setTabOutline", new Class[] { Color.class }); m.invoke(renderer, (Color) null); m = renderer.getClass().getMethod("setInnerKeyline", new Class[] { Color.class }); m.invoke(renderer, (Color) null); m = renderer.getClass().getMethod("setOuterKeyline", new Class[] { Color.class }); m.invoke(renderer, (Color) null); m = renderer.getClass().getMethod("setShadowColor", new Class[] { Color.class }); m.invoke(renderer, (Color) null); m = renderer.getClass().getMethod("setActiveToolbarGradient", new Class[] { Color[].class, int[].class }); m.invoke(renderer, null, null); m = renderer.getClass().getMethod("setInactiveToolbarGradient", new Class[] { Color[].class, int[].class }); m.invoke(renderer, null, null); } catch (Exception e) { } folder.setRenderer(null); } }</code><technical_language>define interface in this plug-in, CTabRendering implement it</technical_language>

Target:
public void reset() { super.reset(); CTabFolder folder = (CTabFolder) getWidget(); folder.setSelectionBackground((Color) null); folder.setSelectionForeground((Color) null); folder.setBackground(null, null); if (folder.getRenderer() instanceof ICTabRendering) { ICTabRendering renderer = (ICTabRendering) folder .getRenderer(); folder.setRenderer(null); renderer.setSelectedTabFill(null); renderer.setTabOutline(null); renderer.setInnerKeyline(null); renderer.setOuterKeyline(null); renderer.setShadowColor(null); renderer.setActiveToolbarGradient(null, null); renderer.setInactiveToolbarGradient(null, null); } }
Source:
<code>public void setUp() { <START> Context context = InstrumentationRegistry.getTargetContext().getApplicationContext(); <END> sensorNames.addAll(Arrays.asList(context.getResources().getStringArray(R.array.nxt_sensor_chooser))); sensorCodes.addAll(Arrays.asList(NXTSensor.Sensor.getSensorCodes())); sensorName = context.getString(sensorNameStringId); }</code><technical_language>..getTargetContext(); enough return current instrumented applications contex</technical_language>

Target:
public void setUp() { Context context = InstrumentationRegistry.getTargetContext(); sensorNames.addAll(Arrays.asList(context.getResources().getStringArray(R.array.nxt_sensor_chooser))); sensorCodes.addAll(Arrays.asList(NXTSensor.Sensor.getSensorCodes())); sensorName = context.getString(sensorNameStringId); }
Source:
<code>public GetReplyResponse getReply(GetReplyRequest input) { LOG.finer("Entering getReply"); GetReplyResponse output = new GetReplyResponse(); try { <START> output.status = StatusType.StatusTypeSuccess; <END> } catch (Exception e) { output.status = StatusType.StatusTypeFailure; output.error = convertToErrorAndLog(LOG, e); } LOG.finer("Exiting getReply"); return output; }</code><technical_language>getReply body? message</technical_language>

Target:
public GetReplyResponse getReply(GetReplyRequest input) { LOG.finer("Entering getReply"); GetReplyResponse output = new GetReplyResponse(); try { if (input == null) throw new InputValidationException(ApiError.InvalidValueNull.getCode(), ApiError.InvalidValueNull.getMessage("GetReplyRequest: input")); if (input.id == null) throw new InputValidationException(ApiError.InvalidValueNull.getCode(), ApiError.InvalidValueNull.getMessage("Long: input.id")); input.accessCode = ValidationHelper.validateAccessCode(input.accessCode, "input"); input.session = ValidationHelper.validateAndExtendSession(input.session, "input.session"); output.reply = ReplyServiceProvider.provide().getReply(input.id); output.status = StatusType.StatusTypeSuccess; } catch (Exception e) { output.status = StatusType.StatusTypeFailure; output.error = convertToErrorAndLog(LOG, e); } LOG.finer("Exiting getReply"); return output; }
Source:
<code>public BlockSnapshot snapshotFor(Location<World> location) { final SpongeBlockSnapshotBuilder builder = new SpongeBlockSnapshotBuilder() .blockState(this) .position(location.getBlockPosition()) .worldId(location.getExtent().getUniqueId()); if (this.block.hasTileEntity() && location.getBlockType().equals(this.block)) { final TileEntity tileEntity = location.getTileEntity().get(); <START> tileEntity.getContainers().forEach(builder::add); <END> final NBTTagCompound compound = new NBTTagCompound(); ((net.minecraft.tileentity.TileEntity) tileEntity).writeToNBT(compound); builder.unsafeNbt(compound); } return builder.build(); }</code><technical_language>nope</technical_language>

Target:
public BlockSnapshot snapshotFor(Location<World> location) { final SpongeBlockSnapshotBuilder builder = new SpongeBlockSnapshotBuilder() .blockState(this) .position(location.getBlockPosition()) .worldId(location.getExtent().getUniqueId()); if (this.block.hasTileEntity() && location.getBlockType().equals(this.block)) { final TileEntity tileEntity = location.getTileEntity().get(); for (DataManipulator<?, ?> manipulator : tileEntity.getContainers()) { builder.add(manipulator); } final NBTTagCompound compound = new NBTTagCompound(); ((net.minecraft.tileentity.TileEntity) tileEntity).writeToNBT(compound); builder.unsafeNbt(compound); } return builder.build(); }
Source:
<code>public static Webrequest getInstance(){ <START> return webrequest_instance; <END> }</code><technical_language>Please change "instance"</technical_language>

Target:
public static Webrequest getInstance(){ return instance; }
Source:
<code>public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { ObjectMap variantOptions = variantJobsArgs.getVariantOptions(); ObjectMap pipelineOptions = variantJobsArgs.getPipelineOptions(); VariantStorageManager variantStorageManager = StorageManagerFactory.getVariantStorageManager(); QueryOptions statsOptions = new QueryOptions(variantOptions); VariantStatisticsManager variantStatisticsManager = new VariantStatisticsManager(); <START> VariantDBAdaptor dbAdaptor = variantStorageManager.getDBAdaptor(variantOptions.getString("dbName"), variantOptions); <END> URI outdirUri = URLHelper.createUri(pipelineOptions.getString("output.dir.statistics")); VariantSource variantSource = variantOptions.get(VariantStorageManager.VARIANT_SOURCE, VariantSource.class); URI statsOutputUri = outdirUri.resolve(VariantStorageManager.buildFilename(variantSource)); variantStatisticsManager.loadStats(dbAdaptor, statsOutputUri, statsOptions); return RepeatStatus.FINISHED; }</code><technical_language>variantOptions.getString(VariantStorageManager.DB_NAME) used, in VariantStatsCreate</technical_language>

Target:
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { ObjectMap variantOptions = variantJobsArgs.getVariantOptions(); ObjectMap pipelineOptions = variantJobsArgs.getPipelineOptions(); VariantStorageManager variantStorageManager = StorageManagerFactory.getVariantStorageManager(); VariantSource variantSource = variantOptions.get(VariantStorageManager.VARIANT_SOURCE, VariantSource.class); VariantDBAdaptor dbAdaptor = variantStorageManager.getDBAdaptor( variantOptions.getString(VariantStorageManager.DB_NAME), variantOptions); URI outdirUri = URLHelper.createUri(pipelineOptions.getString("output.dir.statistics")); URI statsOutputUri = outdirUri.resolve(VariantStorageManager.buildFilename(variantSource)); VariantStatisticsManager variantStatisticsManager = new VariantStatisticsManager(); QueryOptions statsOptions = new QueryOptions(variantOptions); variantStatisticsManager.loadStats(dbAdaptor, statsOutputUri, statsOptions); return RepeatStatus.FINISHED; }
Source:
<code>public static boolean deleteFile(File file) { boolean shouldFailIfOpen = DefaultMuleConfiguration.shouldFailIfDeleteOpenFile(); if (shouldFailIfOpen) { if (isFileOpen(file)) { Message message = MessageFactory.createStaticMessage("Attempting to delete an open file: " + file); <START> throw new MuleRuntimeException(message); <END> } } else if (shouldLogWarningIfDeleteOpenFile()) { if (isFileOpen(file)) { logger.warn("Attempting to delete an open file: " + file); } } return file.delete(); }</code><technical_language>inline message</technical_language>

Target:
public static boolean deleteFile(File file) { boolean shouldFailIfOpen = shouldFailIfDeleteOpenFile(); if (shouldFailIfOpen) { if (isFileOpen(file)) { throw new MuleRuntimeException(createStaticMessage("Attempting to delete an open file: " + file)); } } else if (shouldLogWarningIfDeleteOpenFile()) { if (isFileOpen(file)) { logger.warn("Attempting to delete an open file: " + file); } } return file.delete(); }
Source:
<code>public void ignoresParameterAfterSemiColon() throws IOException { final String data = "Build and Run"; final String ignored = ";ignored-stuff"; final String length = Integer.toHexString(data.length()); final InputStream stream = new RqChunk( new RqFake( Arrays.asList( "GET /h?a=3", "Host: c.example.com", CHUNKED_HEADER ), Joiner.on(CRLF).join( length + ignored, data, <START> END_OF_CHUNK <END> ) ) ).body(); final byte[] buf = new byte[data.length()]; MatcherAssert.assertThat( stream.read(buf), Matchers.equalTo(data.length()) ); MatcherAssert.assertThat(buf, Matchers.equalTo(data.getBytes())); MatcherAssert.assertThat(stream.available(), Matchers.equalTo(0)); }</code><technical_language>@HDouss missed trailing CRLF</technical_language>

Target:
public void ignoresParameterAfterSemiColon() throws IOException { final String data = "Build and Run"; final String ignored = ";ignored-stuff"; final String length = Integer.toHexString(data.length()); final InputStream stream = new RqChunk( new RqFake( Arrays.asList( "GET /h?a=3", "Host: c.example.com", CHUNKED_HEADER ), Joiner.on(CRLF).join( length + ignored, data, END_OF_CHUNK, "" ) ) ).body(); final byte[] buf = new byte[data.length()]; MatcherAssert.assertThat( stream.read(buf), Matchers.equalTo(data.length()) ); MatcherAssert.assertThat(buf, Matchers.equalTo(data.getBytes())); MatcherAssert.assertThat(stream.available(), Matchers.equalTo(0)); }
Source:
<code>private void closeResponse(CloseableHttpResponse response) { try { if (response != null) { EntityUtils.consume(response.getEntity()); response.close(); } } catch (IOException e) { <START> LOGGER.error("Error trying to close response: " + e.getMessage()); <END> } }</code><technical_language>want print ex stracktrace, do LOGGER.error("Error close response", e) instead</technical_language>

Target:
private void closeResponse(CloseableHttpResponse response) { try { if (response != null) { EntityUtils.consume(response.getEntity()); response.close(); } } catch (IOException e) { LOGGER.error("Error trying to close response", e); } }
Source:
<code>private void initializeDistanceUnitSelector() { if (Settings.useImperialUnits()) { getDistanceUnitSelector().setSelection(2); distanceUnit = DistanceParser.UNIT.getById(2); } else { getDistanceUnitSelector().setSelection(0); <START> distanceUnit = DistanceParser.UNIT.getById(0); <END> } getDistanceUnitSelector().setOnItemSelectedListener(new ChangeDistanceUnit(this)); }</code><technical_language>simplify this more: distanceUnit = Settings.useImperialUnits() ? DistanceParser.UNIT.FT : DistanceParser.UNIT.M; getDistanceUnitSelector().setSelection(distanceUnit.ordinal());</technical_language>

Target:
private void initializeDistanceUnitSelector() { distanceUnit = Settings.useImperialUnits() ? DistanceParser.DistanceUnit.FT : DistanceParser.DistanceUnit.M; getDistanceUnitSelector().setSelection(distanceUnit.getValue()); getDistanceUnitSelector().setOnItemSelectedListener(new ChangeDistanceUnit(this)); }
Source:
<code>private VirtualMachine getVMwareTemplate(String imageName, Folder rootFolder) { VirtualMachine image = null; try { VirtualMachine node = getVM(imageName, rootFolder); if (VSpherePredicate.isTemplatePredicate.apply(node)) image = node; <START> } catch (NullPointerException e) { <END> logger.error("cannot find an image called " + imageName, e); throw e; } return checkNotNull(image, "image"); }</code><technical_language>catching NPEs this way. a proper exception return value</technical_language>

Target:
private VirtualMachine getVMwareTemplate(String imageName, Folder rootFolder) { VirtualMachine image = null; try { VirtualMachine node = getVM(imageName, rootFolder); if (VSpherePredicate.isTemplatePredicate.apply(node)) image = node; } catch (Exception e) { logger.error("cannot find an image called " + imageName, e); propagate(e); } return checkNotNull(image, "image with name " + imageName + " not found."); }
Source:
<code>protected <T> T buildManager(Class<T> manager, HttpPipeline httpPipeline, AzureProfile profile) { try { Constructor<T> constructor = manager.getDeclaredConstructor(httpPipeline.getClass(), profile.getClass()); AccessController.doPrivileged((PrivilegedAction<Object>) () -> { constructor.setAccessible(true); return null; }); return constructor.newInstance(httpPipeline, profile); } catch (NoSuchMethodException ex) { throw logger.logExceptionAsError(new RuntimeException(ex)); } catch (IllegalAccessException ex) { throw logger.logExceptionAsError(new RuntimeException(ex)); } catch (InstantiationException ex) { throw logger.logExceptionAsError(new RuntimeException(ex)); <START> } catch (InvocationTargetException ex) { <END> throw logger.logExceptionAsError(new RuntimeException(ex)); } }</code><technical_language>nit, java able (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException ex)</technical_language>

Target:
protected <T> T buildManager(Class<T> manager, HttpPipeline httpPipeline, AzureProfile profile) { try { Constructor<T> constructor = manager.getDeclaredConstructor(httpPipeline.getClass(), profile.getClass()); AccessController.doPrivileged((PrivilegedAction<Object>) () -> { constructor.setAccessible(true); return null; }); return constructor.newInstance(httpPipeline, profile); } catch (NoSuchMethodException | IllegalAccessException | InstantiationException | InvocationTargetException ex) { throw logger.logExceptionAsError(new RuntimeException(ex)); } }
Source:
<code>public void <START> encodeToByteBuffer(ByteBuffer <END> byteBuffer) { byteBuffer .putLong(ikeInitiatorSpi) .putLong(ikeResponderSpi) .put((byte) nextPayloadType) .put(IKE_HEADER_VERSION_INFO) .put((byte) exchangeType); byte flag = 0; if (isResponse) { flag |= IKE_HEADER_FLAG_IS_RESP; } if (fromIkeInitiator) { flag |= IKE_HEADER_FLAG_FROM_INITIATOR; } byteBuffer.put(flag).putInt(messageId).putInt(messageLength); }</code><technical_language>This function name familiar... is in defining interface supports write-to / read-from byte buffer pattern chunks of message it? (not for this CL... about)</technical_language>

Target:
public void encodeToByteBuffer(ByteBuffer byteBuffer) { byteBuffer .putLong(ikeInitiatorSpi) .putLong(ikeResponderSpi) .put((byte) nextPayloadType) .put(IKE_HEADER_VERSION_INFO) .put((byte) exchangeType); byte flag = 0; if (isResponseMsg) { flag |= IKE_HEADER_FLAG_IS_RESP_MSG; } if (fromIkeInitiator) { flag |= IKE_HEADER_FLAG_FROM_IKE_INITIATOR; } byteBuffer.put(flag).putInt(messageId).putInt(messageLength); }
Source:
<code>public void sendMessage(ChatType type, Text message) { checkNotNull(type, "type"); checkNotNull(message, "message"); if (this.conversation != null && this.conversation.getChatHandler(this).isPresent() && !this.conversation.getChatHandler(this).get().process(message)) { return; } <START> ITextComponent component = SpongeTexts.toComponent(message); <END> if (type == ChatTypes.ACTION_BAR) { component = SpongeTexts.fixActionBarFormatting(component); } this.connection.sendPacket(new SPacketChat(component, ((SpongeChatType) type).getByteId())); }</code><technical_language>move this logic a method sendMessage0 call sendMessage sendThroughMessage</technical_language>

Target:
public void sendMessage(ChatType type, Text message) { checkNotNull(type, "type"); checkNotNull(message, "message"); if (type != ChatTypes.ACTION_BAR && this.conversation != null && this.conversation.getChatHandler(this).isPresent() && !this.conversation.getChatHandler(this).get().process(message)) { return; } ITextComponent component = SpongeTexts.toComponent(message); if (type == ChatTypes.ACTION_BAR) { component = SpongeTexts.fixActionBarFormatting(component); } this.connection.sendPacket(new SPacketChat(component, ((SpongeChatType) type).getByteId())); }
Source:
<code>public static void main(String[] args) { Thread.setDefaultUncaughtExceptionHandler(new StoRMDefaultUncaughtExceptionHandler()); StoRM storm = new StoRM(); try { storm.init(); } catch (BootstrapException e) { log.error(e.getMessage(), e); <START> return; <END> } Runtime.getRuntime().addShutdownHook(new ShutdownHook(storm)); if (storm.startServices()) { log.info("StoRM: Backend services successfully started."); } else { log.error("StoRM: error starting storm services."); storm.stopServices(); Runtime.getRuntime().exit(1); } }</code><technical_language>exit a non-zero exit code here</technical_language>

Target:
public static void main(String[] args) { Thread.setDefaultUncaughtExceptionHandler(new StoRMDefaultUncaughtExceptionHandler()); StoRM storm = new StoRM(); try { storm.init(); } catch (BootstrapException e) { log.error(e.getMessage(), e); exit(1); } Runtime.getRuntime().addShutdownHook(new ShutdownHook(storm)); try { storm.startServices(); log.info("StoRM: Backend services successfully started."); } catch (Exception e) { log.error("StoRM: error starting storm services: {}", e.getMessage()); storm.stopServices(); exit(1); } }
Source:
<code>public void execute() { List<QuotaUsageVO> quotaUsage = _responseBuilder.getQuotaUsage(this); QuotaStatementResponse response = _responseBuilder.createQuotaStatementResponse(quotaUsage); response.setStartDate(startDate); <START> response.setEndDate(endDate); <END> response.setResponseName(getCommandName()); setResponseObject(response); }</code><technical_language>Dates mutable, startDate endDate copied response avoid downstream side-effects</technical_language>

Target:
public void execute() { List<QuotaUsageVO> quotaUsage = _responseBuilder.getQuotaUsage(this); QuotaStatementResponse response = _responseBuilder.createQuotaStatementResponse(quotaUsage); response.setStartDate(startDate == null ? null : new Date(startDate.getTime())); response.setEndDate(endDate == null ? null : new Date(endDate.getTime())); response.setResponseName(getCommandName()); setResponseObject(response); }
Source:
<code><START> public PasswordKeyMapper(String credentialName, String algorithm, int hash) throws InvalidKeyException { <END> Assert.checkNotNullParam("algorithm", algorithm); Assert.checkMinimumParameter("hash", 1, hash); this.algorithm = algorithm; this.passwordType = toPasswordType(algorithm); this.hash = hash; this.credentialName = credentialName; }</code><technical_language>API for this class is raising more questions moment, merge this PR this class changes required in subsystem need get this correct first. @honza889 chat @pedroigor - @dmlloyd a questions if this is largely redundant</technical_language>

Target:
public PasswordKeyMapper(String credentialName, String algorithm, int hash) throws InvalidKeyException { Assert.checkNotNullParam("credentialName", credentialName); Assert.checkNotNullParam("algorithm", algorithm); Assert.checkMinimumParameter("hash", 1, hash); this.algorithm = algorithm; this.passwordType = toPasswordType(algorithm); this.hash = hash; this.credentialName = credentialName; }
Source:
<code>protected boolean canRunOn(@NotNull ErlangFile file) { <START> return !file.getName().endsWith(ErlangFileType.HEADER.getDefaultExtension()) && !file.isExportedAll(); <END> }</code><technical_language>file.getFileType() == ErlangFileType.MODULE instead</technical_language>

Target:
protected boolean canRunOn(@NotNull ErlangFile file) { return file.getFileType() == ErlangFileType.MODULE && !file.isExportedAll(); }
Source:
<code>void createHandle (int index) { state |= HANDLE | MENU; fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); long adjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); if (adjustment == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gtk_spin_button_new (adjustment, climbRate, 0); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); OS.gtk_editable_set_editable (handle, (style & SWT.READ_ONLY) == 0); if (OS.GTK_VERSION <= OS.VERSION(3, 20, 0)) { OS.gtk_entry_set_has_frame (handle, (style & SWT.BORDER) != 0); } OS.gtk_spin_button_set_wrap (handle, (style & SWT.WRAP) != 0); if (OS.GTK3) { imContext = OS.imContextLast(); } <START> if (OS.GTK_VERSION < OS.VERSION(3, 21, 0)) { <END> setFontDescription(defaultFont().handle); } }</code><technical_language>Generally check for GTK dev versions. GTK3.21 is a development version, this call GTK3.22</technical_language>

Target:
void createHandle (int index) { state |= HANDLE | MENU; fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); long adjustment = OS.gtk_adjustment_new (0, 0, 100, 1, 10, 0); if (adjustment == 0) error (SWT.ERROR_NO_HANDLES); handle = OS.gtk_spin_button_new (adjustment, climbRate, 0); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); OS.gtk_editable_set_editable (handle, (style & SWT.READ_ONLY) == 0); if (OS.GTK_VERSION <= OS.VERSION(3, 20, 0)) { OS.gtk_entry_set_has_frame (handle, (style & SWT.BORDER) != 0); } OS.gtk_spin_button_set_wrap (handle, (style & SWT.WRAP) != 0); if (OS.GTK3) { imContext = OS.imContextLast(); } if (OS.GTK_VERSION < OS.VERSION(3, 22, 0)) { setFontDescription(defaultFont().handle); } }
Source:
<code><START> private static ActiveThreadsFilter getActiveThreadsFilter(ViewerFilter[] filters) { return (ActiveThreadsFilter) Arrays.stream(filters).filter(filter -> filter instanceof ActiveThreadsFilter).findFirst().orElse(null); } <END></code><technical_language>Stream abuse: this is a simple for loop, converting array a stream is costly</technical_language>

Target:
private static ActiveThreadsFilter getActiveThreadsFilter(ViewerFilter[] filters) { return Arrays.stream(filters) .filter(filter -> filter instanceof ActiveThreadsFilter) .map(filter -> (ActiveThreadsFilter) filter) .findFirst().orElse(null); }
Source:
<code>protected boolean activate(IVampirePlayer playerIn) { <START> VampirePlayer player = VampirePlayer.get(playerIn.getRepresentingPlayer()); <END> player.getSpecialAttributes().half_invulnerable = true; return true; }</code><technical_language>cast IVampirePlayer VampirePlayer. argument is IVampirePlayer mods API of (since access VampirePlayer), actual object passed is instance of VampirePlayer</technical_language>

Target:
protected boolean activate(IVampirePlayer playerIn) { ((VampirePlayer) playerIn).getSpecialAttributes().half_invulnerable = true; playerIn.getRepresentingPlayer().addPotionEffect( new PotionEffect(MobEffects.SLOWNESS, getDuration(playerIn.getLevel()) - 1, 1, false, false)); return true; }
Source:
<code>public static String decryptPassword(String password) { String result = password; String keyFile = Config.<String> GetValue(ConfigValues.keystoreUrl, Config.DefaultConfigurationVersion); String passwd = Config.<String> GetValue(ConfigValues.keystorePass, Config.DefaultConfigurationVersion); <START> String alias = Config.<String> GetValue(ConfigValues.CertAlias, Config.DefaultConfigurationVersion); <END> try { result = EncryptionUtils.decrypt((String) result, keyFile, passwd, alias); } catch (Exception e) { result = password; } return result; }</code><technical_language>keyFile,passwd & alias for methods, I nice put private (final) members of class</technical_language>

Target:
public static String decryptPassword(String password) { String result = password; String keyFile = Config.<String> GetValue(ConfigValues.keystoreUrl, Config.DefaultConfigurationVersion); String passwd = Config.<String> GetValue(ConfigValues.keystorePass, Config.DefaultConfigurationVersion); String alias = Config.<String> GetValue(ConfigValues.CertAlias, Config.DefaultConfigurationVersion); try { result = EncryptionUtils.decrypt((String) result, keyFile, passwd, alias); } catch (Exception e) { log.debugFormat("Failed to decrypt password, error message: {0}", e.getMessage()); result = password; } return result; }