auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private synchronized BufferedMutator getMutator(String tableName) throws IOException { if (mutators == null) { mutators = new HashMap<>(); <START> } <END> BufferedMutator mutator = mutators.get(tableName); if (mutator == null) { mutator = getConnection().getBufferedMutator(TableName.valueOf(tableName)); mutators.put(tableName, mutator); } return mutator; }</code><technical_language>nicer move bundle initialization startBundle(), avoid null check in finishBundle</technical_language>

Target:
private BufferedMutator getMutator(String tableName) throws IOException { BufferedMutator mutator = mutators.get(tableName); if (mutator == null) { mutator = getConnection().getBufferedMutator(TableName.valueOf(tableName)); mutators.put(tableName, mutator); } return mutator; }
Source:
<code>public BindingProperties getBindingProperties(String channelName) { if (this.bindings.containsKey(channelName)) { return this.bindings.get(channelName); } <START> BindingProperties bindingProperties = new BindingProperties(); <END> this.bindings.put(channelName, bindingProperties); return bindingProperties; }</code><technical_language>I update property map for bindings update binding instance. do instead is return a copy is populated default (i.e. is supposed override unset value)</technical_language>

Target:
public BindingProperties getBindingProperties(String channelName) { BindingProperties bindingProperties = new BindingProperties(); if (this.bindings.containsKey(channelName)) { BeanUtils.copyProperties(this.bindings.get(channelName), bindingProperties); } if (bindingProperties.getDestination() == null) { bindingProperties.setDestination(channelName); } return bindingProperties; }
Source:
<code>static double[] trimDistribution(final double[] distribution) { int endOfDistribution = 0; <START> for (endOfDistribution = distribution.length - 1; endOfDistribution >= 0; endOfDistribution--) { <END> if (distribution[endOfDistribution] != 0) { break; } } return Arrays.copyOfRange(distribution, 0, endOfDistribution); }</code><technical_language>int end = distribution.length; while(distribution[end] != 0) { end--; } shorter int end = distribution.length; while( distribution[--end] != 0) { } final int numTrailingZeroes = IntStream.range(1, distribution.length).findFirst(n -> distribution[distribution.length - n] != 0); return Arrays.copyOfRange(distribution, 0, distribution.length = numTrailingZeroes);</technical_language>

Target:
static double[] trimDistribution(final double[] distribution) { int endOfDistribution = distribution.length - 1; while(distribution[endOfDistribution] == 0) { endOfDistribution--; } return Arrays.copyOfRange(distribution, 0, endOfDistribution); }
Source:
<code>public Map<String, Object> consume(String jwt) throws InvalidJwtException { JwtConsumer jwtConsumer = new JwtConsumerBuilder().setRequireExpirationTime() .setAllowedClockSkewInSeconds(Integer.parseInt(env.getProperty("jwtAllowedClockSkew"))) .setRequireSubject() .setExpectedIssuer(env.getProperty("jwtIssuer")) .setExpectedAudience(env.getProperty("jwtAudience")) .setVerificationKey(jwk.getKey()) .build(); try { JwtClaims jwtClaims = jwtConsumer.processToClaims(jwt); return jwtClaims.getClaimsMap(); } catch (InvalidJwtException e) { <START> logger.error("Invalid JWT", e); <END> throw new InvalidJwtException("Invalid JWT - failed in JWTConsumerRsaJoseJImpl."); } }</code><technical_language>this log entire stack trace? If so, stop that? a real error logs harder read</technical_language>

Target:
public Map<String, Object> consume(String jwt) throws InvalidJwtException { JwtConsumer jwtConsumer = new JwtConsumerBuilder().setRequireExpirationTime() .setAllowedClockSkewInSeconds(Integer.parseInt(env.getProperty("jwtAllowedClockSkew"))) .setRequireSubject() .setExpectedIssuer(env.getProperty("jwtIssuer")) .setExpectedAudience(env.getProperty("jwtAudience")) .setVerificationKey(jwk.getKey()) .build(); try { JwtClaims jwtClaims = jwtConsumer.processToClaims(jwt); return jwtClaims.getClaimsMap(); } catch (InvalidJwtException e) { logger.error("Invalid JWT - " + e.getMessage()); throw new InvalidJwtException("Invalid JWT - failed in JWTConsumerRsaJoseJImpl."); } }
Source:
<code>private void setProductsHref(Brand brand) { String nameToken = NameTokens.PRODUCT; if (localeHelper.isFrench()) { <START> nameToken = NameTokens.translate(nameToken); <END> } PlaceRequest newPlaceRequest = new PlaceRequest.Builder() .nameToken(nameToken) .with(NameTokens.PARAM_BRAND, brand.getValue()) .with(NameTokens.PARAM_ID, String.valueOf(Product.SHIRT.getId())) .build(); productsAnchor.setHref("#" + placeManager.buildHistoryToken(newPlaceRequest)); }</code><technical_language>set NameTokens fields private add getters do this check (in another PR)</technical_language>

Target:
private void setProductsHref(Brand brand) { PlaceRequest newPlaceRequest = new PlaceRequest.Builder() .nameToken(nameTokensConstants.PRODUCT()) .with(NameTokens.PARAM_BRAND, brand.getValue()) .with(NameTokens.PARAM_ID, String.valueOf(Product.SHIRT.getId())) .build(); productsAnchor.setHref("#" + placeManager.buildHistoryToken(newPlaceRequest)); }
Source:
<code>public void perform(GraphRewrite event, EvaluationContext context) { checkVariableName(event, context); WindupVertexFrame payload = resolveVariable(event, getVariableName()); if (payload instanceof FileReferenceModel) { perform(event, context, ((FileReferenceModel) payload).getFile()); } else { <START> perform(event, context); <END> } }</code><technical_language>this is self-reference I accidentally did. This OutOfMemory classification is created for example variable is FileModel (right is case). please fix in PR super.perform(event,context)</technical_language>

Target:
public void perform(GraphRewrite event, EvaluationContext context) { checkVariableName(event, context); WindupVertexFrame payload = resolveVariable(event, getVariableName()); if (payload instanceof FileReferenceModel) { perform(event, context, ((FileReferenceModel) payload).getFile()); } else { super.perform(event, context); } }
Source:
<code>public void visitFile(@Nullable AstNode astNode) { newHighlighting = context.newHighlighting(); <START> System.out.println("high = " + newHighlighting); <END> System.out.println("fs = " + context.fileSystem()); InputFile inputFile = context.fileSystem().inputFile(context.fileSystem().predicates().is(getContext().getFile().getAbsoluteFile())); newHighlighting.onFile(inputFile); }</code><technical_language>@ivandalbosco do forget remove</technical_language>

Target:
public void visitFile(@Nullable AstNode astNode) { newHighlighting = context.newHighlighting(); InputFile inputFile = context.fileSystem().inputFile(context.fileSystem().predicates().is(getContext().getFile().getAbsoluteFile())); newHighlighting.onFile(inputFile); }
Source:
<code>private String getBinaryPath(DebugConfiguration debugConfiguration) { <START> Map<String, String> connectionProperties = debugConfiguration.getConnectionProperties(); <END> String binaryPath = connectionProperties.get(BIN_PATH_CONNECTION_PROPERTY); return binaryPath == null ? currentProjectPathProvider.getKey() + "/" + DEFAULT_EXECUTABLE_TARGET_NAME : binaryPath; }</code><technical_language>Add check for null here</technical_language>

Target:
private String getBinaryPath(DebugConfiguration debugConfiguration) { if (debugConfiguration == null) { return getDefaultBinaryPath(); } Map<String, String> connectionProperties = debugConfiguration.getConnectionProperties(); String binaryPath = connectionProperties.get(BIN_PATH_CONNECTION_PROPERTY); return binaryPath == null ? getDefaultBinaryPath() : binaryPath; }
Source:
<code>public TilesetManager(BoardView1 bv) throws IOException { boardview = bv; hexTileset = new HexTileset(boardview.game); tracker = new MediaTracker(boardview); try { camos = new DirectoryItems( Configuration.camoDir(), "", ImageFileFactory.getInstance() ); } catch (Exception e) { camos = null; } mechTileset.loadFromFile("mechset.txt"); wreckTileset.loadFromFile("wreckset.txt"); try { hexTileset.incDepth = 0; hexTileset.loadFromFile(PreferenceManager.getClientPreferences().getMapTileset()); } catch (Exception FileNotFoundException) { System.out.println("Error loading tileset, " + "reverting to default hexset! " + "Could not find file: " + PreferenceManager.getClientPreferences().getMapTileset()); if (new MegaMekFile(Configuration.hexesDir(), FILENAME_DEFAULT_HEX_SET).getFile().exists()){ hexTileset.loadFromFile(FILENAME_DEFAULT_HEX_SET); } else { <START> System.err.println("Critical Error loading default tileset!"); <END> } } PreferenceManager.getClientPreferences().addPreferenceChangeListener(this); GUIPreferences.getInstance().addPreferenceChangeListener(this); }</code><technical_language>Do want avoid system.out.println instead log error</technical_language>

Target:
public TilesetManager(BoardView1 bv) throws IOException { boardview = bv; hexTileset = new HexTileset(boardview.game); tracker = new MediaTracker(boardview); try { camos = new DirectoryItems( Configuration.camoDir(), "", ScaledImageFileFactory.getInstance() ); } catch (Exception e) { camos = null; } mechTileset.loadFromFile("mechset.txt"); wreckTileset.loadFromFile("wreckset.txt"); try { hexTileset.incDepth = 0; hexTileset.loadFromFile(PreferenceManager.getClientPreferences().getMapTileset()); } catch (Exception FileNotFoundException) { DefaultMmLogger.getInstance().error(getClass(), "TilesetManager()", "Error loading tileset " + PreferenceManager.getClientPreferences().getMapTileset() + " Reverting to default hexset! "); if (new MegaMekFile(Configuration.hexesDir(), FILENAME_DEFAULT_HEX_SET).getFile().exists()){ hexTileset.loadFromFile(FILENAME_DEFAULT_HEX_SET); } else { DefaultMmLogger.getInstance().fatal(getClass(), "TilesetManager()", "Could not load default tileset " + FILENAME_DEFAULT_HEX_SET); } } PreferenceManager.getClientPreferences().addPreferenceChangeListener(this); GUIPreferences.getInstance().addPreferenceChangeListener(this); }
Source:
<code>public Option<Command> localChangesAboutToCommit(Collection<Notification> notifications) { final Set<EObject> allDetachedObjects = getChangedEObjectsAndChildren(Iterables.filter(notifications, IS_DETACHMENT)); if (allDetachedObjects.size() > 0) { final Set<EObject> allAttachedObjects = getChangedEObjectsAndChildren(Iterables.filter(notifications, IS_ATTACHMENT)); final Set<EObject> toRemoveXRefFrom = Sets.difference(allDetachedObjects, allAttachedObjects); <START> <END> if (toRemoveXRefFrom.size() > 0) { Command removeDangling = new RecordingCommand(domain) { @Override protected void doExecute() { DslCommonPlugin.PROFILER.startWork(SiriusTasksKey.CLEANING_REMOVEDANGLING_KEY); for (EObject eObject : toRemoveXRefFrom) { accessor.eDelete(eObject, xRef, Predicates.or(DSEMANTICDECORATOR_REFERENCE_T0_IGNORE_PREDICATE, VIEW_ELEMENT_REFERENCE_TO_IGNORE_PREDICATE)); } DslCommonPlugin.PROFILER.stopWork(SiriusTasksKey.CLEANING_REMOVEDANGLING_KEY); } }; return Options.newSome(removeDangling); } } return Options.newNone(); }</code><technical_language>some situations handled: a tool modification moves element A B.containmentFeature1 C.containmentFeature2, B C children of element D. If D is in detached objects, A removed toRemoveXrefFrom. check computation of allAttachedObject new container (the notifier) is in detached object</technical_language>

Target:
public Option<Command> localChangesAboutToCommit(Collection<Notification> notifications) { final Set<EObject> allDetachedObjects = getChangedEObjectsAndChildren(Iterables.filter(notifications, IS_DETACHMENT), null); if (allDetachedObjects.size() > 0) { Predicate<EObject> ignoreNotifierInDetachedObjects = Predicates.in(allDetachedObjects); final Set<EObject> allAttachedObjects = getChangedEObjectsAndChildren(Iterables.filter(notifications, IS_ATTACHMENT), ignoreNotifierInDetachedObjects); final Set<EObject> toRemoveXRefFrom = Sets.difference(allDetachedObjects, allAttachedObjects); if (toRemoveXRefFrom.size() > 0) { Predicate<EReference> refToIgnore = Predicates.or(DSEMANTICDECORATOR_REFERENCE_T0_IGNORE_PREDICATE, VIEW_ELEMENT_REFERENCE_TO_IGNORE_PREDICATE, EPACKAGE_EFACTORYINSTANCE_REFERENCE_TO_IGNORE_PREDICATE); Command removeDangling = new RemoveDanglingReferencesCommand(domain, toRemoveXRefFrom, refToIgnore); return Options.newSome(removeDangling); } } return Options.newNone(); }
Source:
<code>private static void setupLogger(Map<String, Object> args) throws IOException{ String logfile = (String)args.get("log-file"); Logger logger = Logger.getLogger(""); logger.setLevel((Level)args.get("log-level")); logger.addHandler(new ConsoleHandler()); if(logfile != null) { FileHandler fh = new FileHandler(logfile); fh.setFormatter(new SimpleFormatter()); logger.addHandler(fh); <START> } <END> }</code><technical_language>set logging.properties</technical_language>

Target:
private void setupLogger(Map<String, Object> args) throws IOException{ Logger logger = Logger.getLogger(""); logger.setLevel((Level)args.get("log-level")); String logfile = (String)args.get("log-file"); if(logfile != null) { FileHandler fh = new FileHandler(logfile); fh.setFormatter(new SimpleFormatter()); logger.addHandler(fh); } }
Source:
<code>private static String resolveSibling(String path1, String path2) { List<String> path1Parts = new ArrayList(Arrays.asList(path1.split("/"))); <START> List<String> path2Parts = new ArrayList(Arrays.asList(path2.split("/"))); <END> if (path1Parts.size() > 0) { path1Parts.remove(path1Parts.size() - 1); } int path1Pos = path1Parts.size() - 1; int path2Pos = 0; while (path1Pos >= 0 && path2Pos < path2Parts.size()) { if (path2Parts.get(path2Pos).equals(".")) { path2Parts.remove(path2Pos); } else if (path2Parts.get(path2Pos).equals("..")) { path2Parts.remove(path2Pos); path1Parts.remove(path1Parts.size() - 1); } else { break; } } path1Parts.addAll(path2Parts); return String.join("/", path1Parts); }</code><technical_language>add diamond operators</technical_language>

Target:
private static String resolveSibling(String path1, String path2) { List<String> path1Parts = new ArrayList<>(Arrays.asList(path1.split("/"))); List<String> path2Parts = new ArrayList<>(Arrays.asList(path2.split("/"))); if (path1Parts.size() > 0) { path1Parts.remove(path1Parts.size() - 1); } while (path1Parts.size() > 0 && path2Parts.size() > 0) { if (path2Parts.get(0).equals(".")) { path2Parts.remove(0); } else if (path2Parts.get(0).equals("..")) { path2Parts.remove(0); path1Parts.remove(path1Parts.size() - 1); } else { break; } } path1Parts.addAll(path2Parts); return String.join("/", path1Parts); }
Source:
<code>public DataTransactionResult offerToStore(ValueContainer<?> container, Boolean value) { final ImmutableValue<Boolean> proposedValue = ImmutableDataCachingUtil.getValue(ImmutableSpongeValue.class, Keys.IS_FLYING, value, false); if (supports(container)) { final DataTransactionBuilder builder = DataTransactionBuilder.builder(); final ImmutableValue<Boolean> newFlyingValue = ImmutableDataCachingUtil.getValue(ImmutableSpongeValue.class, Keys.IS_FLYING, value, false); final ImmutableValue<Boolean> oldFlyingData = getApiValueFromContainer(container).get().asImmutable(); if (value == null) { return DataTransactionBuilder.errorResult(newFlyingValue); } try { net.minecraft.entity.Entity entity = ((net.minecraft.entity.Entity) container); if (entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) entity; player.capabilities.allowFlying = newFlyingValue.get(); } else { entity.isAirBorne = newFlyingValue.get(); } <START> return builder.success(newFlyingValue).replace(oldFlyingData).result(DataTransactionResult.Type.SUCCESS).build(); <END> } catch (Exception e) { return DataTransactionBuilder.errorResult(newFlyingValue); } } return DataTransactionBuilder.failResult(proposedValue); }</code><technical_language>do return DataTransactionBuilder.successReplaceResult(oldFlyingData, newFlyingValue);</technical_language>

Target:
public DataTransactionResult offerToStore(ValueContainer<?> container, Boolean value) { final ImmutableValue<Boolean> proposedValue = ImmutableDataCachingUtil.getValue(ImmutableSpongeValue.class, Keys.IS_FLYING, value, false); if (supports(container)) { final ImmutableValue<Boolean> oldFlyingData = getApiValueFromContainer(container).get().asImmutable(); try { if (container instanceof EntityPlayer) { ((EntityPlayer) container).capabilities.isFlying = proposedValue.get(); } else { ((Entity) container).isAirBorne = proposedValue.get(); } return DataTransactionBuilder.successReplaceResult(oldFlyingData, proposedValue); } catch (Exception e) { return DataTransactionBuilder.errorResult(proposedValue); } } return DataTransactionBuilder.failResult(proposedValue); }
Source:
<code>public void setUp() throws Exception { Constant.getInstance(); I18N i18n = Mockito.mock(I18N.class, withSettings().lenient()); given(i18n.getString(anyString())).willReturn(""); given(i18n.getString(anyString(), any())).willReturn(""); given(i18n.getLocal()).willReturn(Locale.getDefault()); Constant.messages = i18n; Control.initSingletonForTesting(Model.getSingleton()); <START> session = new Session(Model.getSingleton()); <END> }</code><technical_language>a mocked Model avoid need tidy up</technical_language>

Target:
public void setUp() throws Exception { Constant.getInstance(); I18N i18n = Mockito.mock(I18N.class, withSettings().lenient()); given(i18n.getString(anyString())).willReturn(""); given(i18n.getString(anyString(), any())).willReturn(""); given(i18n.getLocal()).willReturn(Locale.getDefault()); Constant.messages = i18n; factory = new VariantFactory(); Model model = mock(Model.class); given(model.getVariantFactory()).willReturn(factory); Control.initSingletonForTesting(model); session = new Session(model); given(model.getSession()).willReturn(session); }
Source:
<code>protected Tuple<I> doForward(E entity) { final Any stateAny = pack(entity.getState()); final EntityRecord.Builder builder = EntityRecord.newBuilder() .setState(stateAny); if (entity instanceof AbstractVersionableEntity) { <START> AbstractVersionableEntity versionable = (AbstractVersionableEntity) entity; <END> builder.setVersion(versionable.getVersion()) .setVisibility(versionable.getVisibility()); } final Tuple<I> result = tuple(entity.getId(), builder.build()); return result; }</code><technical_language>declared final</technical_language>

Target:
protected Tuple<I> doForward(E entity) { final Any stateAny = pack(entity.getState()); final EntityRecord.Builder builder = EntityRecord.newBuilder() .setState(stateAny); if (entity instanceof AbstractVersionableEntity) { final AbstractVersionableEntity versionable = (AbstractVersionableEntity) entity; builder.setVersion(versionable.getVersion()) .setVisibility(versionable.getVisibility()); } final Tuple<I> result = tuple(entity.getId(), builder.build()); return result; }
Source:
<code>private void sendExtraRateAmount(InvestExtraRateModel investExtraRateModel, long actualInterest, long actualFee) { InvestModel investModel = investMapper.findById(investExtraRateModel.getInvestId()); AccountModel accountModel = accountMapper.findByLoginName(investModel.getLoginName()); if (accountModel == null) { logger.debug(MessageFormat.format("user has no account, investId={0} loginName={1} amount={3}", String.valueOf(investModel.getId()), investModel.getLoginName(), String.valueOf(investModel.getAmount()))); return; } long amount = actualInterest - actualFee; if (amount <= 0) { return; } <START> long orderId = idGenerator.generate(); <END> try { TransferRequestModel requestModel = TransferRequestModel.newRequest(String.valueOf(orderId), accountModel.getPayUserId(), String.valueOf(amount)); TransferResponseModel responseModel = paySyncClient.send(TransferMapper.class, requestModel, TransferResponseModel.class); if (responseModel.isSuccess()) { this.updateExtraRateData(investExtraRateModel, investModel, accountModel, actualInterest, actualFee, amount, orderId); } } catch (Exception e) { logger.error(MessageFormat.format("extra rate is failed, investId={0} loginName={1} amount={3}", String.valueOf(investModel.getId()), investModel.getLoginName(), String.valueOf(investModel.getAmount())), e); return; } }</code><technical_language>investExtraRateModel id + timestamp</technical_language>

Target:
private void sendExtraRateAmount(InvestExtraRateModel investExtraRateModel, long actualInterest, long actualFee) throws Exception{ InvestModel investModel = investMapper.findById(investExtraRateModel.getInvestId()); AccountModel accountModel = accountMapper.findByLoginName(investModel.getLoginName()); if (accountModel == null) { logger.debug(MessageFormat.format("user has no account, investId={0} loginName={1} amount={3}", String.valueOf(investModel.getId()), investModel.getLoginName(), String.valueOf(investModel.getAmount()))); return; } long amount = actualInterest - actualFee; boolean isSuccess = false; if (amount > 0) { String orderId = investExtraRateModel.getInvestId() + "X" + System.currentTimeMillis(); TransferRequestModel requestModel = TransferRequestModel.newRequest(orderId, accountModel.getPayUserId(), String.valueOf(amount)); TransferResponseModel responseModel = paySyncClient.send(TransferMapper.class, requestModel, TransferResponseModel.class); isSuccess = responseModel.isSuccess(); } if (isSuccess || amount == 0) { investRateService.updateExtraRateData(investExtraRateModel, actualInterest, actualFee); } }
Source:
<code>public void reset() { opcodeList = null; direction = null; if(payloadFilter != null){ payloadFilter = null; <START> } <END> }</code><technical_language>Is worth checking setting it</technical_language>

Target:
public void reset() { opcodeList = null; direction = null; payloadFilter = null; }
Source:
<code><START> public ScopedPreferenceProvider getPreferenceProvider() { <END> if (preferenceProvider == null) { preferenceProvider = new ScopedPreferenceProvider(getBundle().getSymbolicName()); } return preferenceProvider; }</code><technical_language>return type IEclipsePreferences expose internal implementation in a public API. Curiously, I get a warning here, in EMFCompareRCPPlugin. why, changed anyway</technical_language>

Target:
public EMFComparePreferences getPreferenceProvider() { if (preferenceProvider == null) { preferenceProvider = new EMFComparePreferences(getBundle().getSymbolicName()); } return preferenceProvider; }
Source:
<code>public String getClassName() { String canonicalName = clazz.getCanonicalName(); if (canonicalName != null && getPackageName() != null) { return canonicalName.substring(getPackageName().length() + 1, canonicalName.length()); } <START> return null; <END> }</code><technical_language>I if want return null</technical_language>

Target:
public String getClassName() { String qualifiedName = getQualifiedName(); if(qualifiedName.contains(".")) { return qualifiedName.substring(qualifiedName.lastIndexOf("."), qualifiedName.length()); } else { return qualifiedName; } }
Source:
<code>private void toolsIdTool() throws Exception { Response response = checkedResponse(basePath + "tools/quay.io%2Ftest_org%2Ftest6"); ToolV1 responseObject = response.readEntity(ToolV1.class); assertTool(SUPPORT.getObjectMapper().writeValueAsString(responseObject), true); response = checkedResponse(basePath + "tools?id=quay.io%2Ftest_org%2Ftest6"); List<ToolV1> responseList = response.readEntity(List.class); <START> assertTool(SUPPORT.getObjectMapper().writeValueAsString(responseList), false); <END> }</code><technical_language>i supposed , true);</technical_language>

Target:
private void toolsIdTool() throws Exception { Response response = checkedResponse(basePath + "tools/quay.io%2Ftest_org%2Ftest6"); ToolV1 responseObject = response.readEntity(ToolV1.class); assertTool(SUPPORT.getObjectMapper().writeValueAsString(responseObject), true); response = checkedResponse(basePath + "tools?id=quay.io%2Ftest_org%2Ftest6"); List<ToolV1> responseList = response.readEntity(List.class); assertTool(SUPPORT.getObjectMapper().writeValueAsString(responseList), true); }
Source:
<code>public void setLocaleProvider(LocaleProvider localeProvider) { <START> this.locale = localeProvider.getLocale(); <END> }</code><technical_language>localeProvider call localeProvider.getLocale() need it. notice if user changes locale settings</technical_language>

Target:
public void setLocaleProvider(LocaleProvider localeProvider) { this.localeProvider = localeProvider; }
Source:
<code>public int compare(String s, String s2) <START> { <END> if(s == s2) { return 0; } if (s == null) { return -1; } if (s2 == null) { return 1; } int res = Ints.compare(s.length(), s2.length()); if (res == 0) { res = s.compareTo(s2); } return res; }</code><technical_language>Ordering.natural().nullFirst().compare</technical_language>

Target:
public int compare(String s, String s2) { if (s == s2) { return 0; } return ORDERING.compare(s, s2); }
Source:
<code>public void testNoAvailabilitiesSetsActivelyPublishedToFalse() throws IOException { LoveFilmDataRow row = rowFromFile("battle-royale-no-availability.csv"); Optional<Content> extracted = extractor.extract(row); <START> assertTrue(extracted.isPresent()); <END> Content content = extracted.get(); Film film = (Film) content; assertFalse(film.isActivelyPublished()); }</code><technical_language>strictly necessary, .get() throw if extracted content</technical_language>

Target:
public void testNoAvailabilitiesSetsActivelyPublishedToFalse() throws IOException { LoveFilmDataRow row = rowFromFile("battle-royale-no-availability.csv"); Optional<Content> extracted = extractor.extract(row); Content content = extracted.get(); Film film = (Film) content; assertFalse(film.isActivelyPublished()); }
Source:
<code>public Ref call() throws IOException { checkCallable(); Ref r; RevCommit commit; try { boolean merging = false; if (repo.getRepositoryState().equals(RepositoryState.MERGING) || repo.getRepositoryState().equals( RepositoryState.MERGING_RESOLVED)) merging = true; final ObjectId commitId; try { commitId = repo.resolve(ref); <START> } catch (IOException e) { <END> throw e; } RevWalk rw = new RevWalk(repo); try { commit = rw.parseCommit(commitId); } catch (IOException e) { throw e; } finally { rw.release(); } final RefUpdate ru = repo.updateRef(Constants.HEAD); ru.setNewObjectId(commitId); String refName = Repository.shortenRefName(ref); String message = "reset --" + mode.toString().toLowerCase() + " " + refName; ru.setRefLogMessage(message, false); if (ru.forceUpdate() == RefUpdate.Result.LOCK_FAILURE) throw new IOException(); switch (mode) { case HARD: checkoutIndex(commit); break; case MIXED: resetIndex(commit); break; case SOFT: case KEEP: case MERGE: } if (mode != ResetType.SOFT && merging) resetMerge(); setCallable(false); r = ru.getRef(); } catch (IOException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfResetCommand, e); } return r; }</code><technical_language>is this catch good for if immediately rethrow</technical_language>

Target:
public Ref call() throws IOException { checkCallable(); Ref r; RevCommit commit; try { boolean merging = false; if (repo.getRepositoryState().equals(RepositoryState.MERGING) || repo.getRepositoryState().equals( RepositoryState.MERGING_RESOLVED)) merging = true; final ObjectId commitId; try { commitId = repo.resolve(ref); } catch (IOException e) { throw new JGitInternalException( MessageFormat.format(JGitText.get().cannotRead, ref), e); } RevWalk rw = new RevWalk(repo); try { commit = rw.parseCommit(commitId); } catch (IOException e) { throw new JGitInternalException( MessageFormat.format( JGitText.get().cannotReadCommit, commitId.toString()), e); } finally { rw.release(); } final RefUpdate ru = repo.updateRef(Constants.HEAD); ru.setNewObjectId(commitId); String refName = Repository.shortenRefName(ref); String message = "reset --" + mode.toString().toLowerCase() + " " + refName; ru.setRefLogMessage(message, false); if (ru.forceUpdate() == RefUpdate.Result.LOCK_FAILURE) throw new JGitInternalException(MessageFormat.format( JGitText.get().cannotLock, ru.getName())); switch (mode) { case HARD: checkoutIndex(commit); break; case MIXED: resetIndex(commit); break; case SOFT: break; case KEEP: case MERGE: throw new UnsupportedOperationException(); } if (mode != ResetType.SOFT && merging) resetMerge(); setCallable(false); r = ru.getRef(); } catch (IOException e) { throw new JGitInternalException( JGitText.get().exceptionCaughtDuringExecutionOfResetCommand, e); } return r; }
Source:
<code>private static List<RequiredFeatures> getClassRequiredFeatures(Class<?> testClass) { <START> assertNull(testClass.getEnclosingClass(), "Add support (and tests!) if you need it"); <END> Class<?>[] interfaces = testClass.getInterfaces(); Optional<RequiredFeatures> requiredFeatures = Optional.ofNullable(testClass.getAnnotation(RequiredFeatures.class)); return Stream.concat( requiredFeatures.map(Stream::of).orElse(Stream.empty()), Arrays.stream(interfaces) .map(SupportedTestCondition::getClassRequiredFeatures) .flatMap(List::stream)) .collect(toImmutableList()); }</code><technical_language>this Preconditions.checkState. exception message more meaningful. "Inner classes supported test classes"</technical_language>

Target:
private static List<ConnectorFeature> getClassRequiredFeatures(Class<?> testClass) { Preconditions.checkState(testClass.getEnclosingClass() == null, "Inner classes not supported as test classes. Add support (and tests!) if you need it"); Class<?>[] interfaces = testClass.getInterfaces(); return Streams.concat( streamOfRequired(testClass), stream(interfaces) .map(SupportedTestCondition::getClassRequiredFeatures) .flatMap(List::stream)) .collect(toImmutableList()); }
Source:
<code>protected Map<ComponentType, String> buildCustomVersionDisplayNames() { Map<ComponentType, String> result = new HashMap<>(); result.put(ComponentType.HIVE, "Qubole Hadoop2 (Hive 2.1.1 Beta)"); result.put(ComponentType.PIG, "Qubole Hadoop2"); result.put(ComponentType.PIGOUTPUT, "Qubole Hadoop2"); <START> result.put(ComponentType.SPARKBATCH, "Qubole Hadoop2"); <END> return result; }</code><technical_language>Qubole Spark 2.2</technical_language>

Target:
protected Map<ComponentType, String> buildCustomVersionDisplayNames() { Map<ComponentType, String> result = new HashMap<>(); result.put(ComponentType.HIVE, "Qubole Hadoop2 (Hive 2.1.1 Beta)"); result.put(ComponentType.PIG, "Qubole Hadoop2"); result.put(ComponentType.PIGOUTPUT, "Qubole Hadoop2"); result.put(ComponentType.SPARKBATCH, "Qubole Spark 2.2"); return result; }
Source:
<code>protected ParsedSql getParsedSql(String sql) { if (getCacheLimit() <= 0) { return NamedParameterUtils.parseSqlStatement(sql); } ParsedSql parsedSql = this.parsedSqlCache.get(sql); if (parsedSql == null) { synchronized (this.parsedSqlCache) { <START> parsedSql = this.parsedSqlCache.get(sql); <END> if(parsedSql==null) { parsedSql = NamedParameterUtils.parseSqlStatement(sql); this.parsedSqlCache.put(sql, parsedSql); } } } return parsedSql; }</code><technical_language>I change code more computeIfAbsent() method. recommend refer [this](<LINK_0></technical_language>

Target:
protected ParsedSql getParsedSql(String sql) { if (getCacheLimit() <= 0) { return NamedParameterUtils.parseSqlStatement(sql); } synchronized (this.parsedSqlCache) { return this.parsedSqlCache.computeIfAbsent(sql, NamedParameterUtils::parseSqlStatement); } }
Source:
<code>public static Object[][] extraMarker() { return new Object[][]{ { "adtest", "SyntheticTests/Async/Hop/ExtraMarker?log_level=9&log_group=Wikia.Tracker", "TOP_RIGHT_BOXAD", <START> "test-marker=42" <END> } }; }</code><technical_language>important adType async method top</technical_language>

Target:
public static Object[][] extraMarker() { return new Object[][]{ { "adtest", "SyntheticTests/Async/Hop/ExtraMarker?log_level=9&log_group=Wikia.Tracker", "adType=async;method=hop;pos=TOP_RIGHT_BOXAD;", "test-marker=42" } }; }
Source:
<code>public Entity checkIfEnemyNear(double radius, Class<? extends Entity> c, boolean isEnemyCheck) { Set<Entity> entities = level.getEntities(pos.x - radius, pos.y - radius, pos.x + radius, pos.y + radius, c); Entity closest = null; <START> double closestDist = 99999999.0f; <END> for (Entity e : entities) { final double dist = e.pos.distSqr(pos); if (dist < closestDist && !isTargetBehindWall(e.pos.x, e.pos.y, e)) { if (isEnemyCheck) { if (!(e instanceof Mob)) continue; if (!((Mob)e).isNotFriendOf(this)) continue; } closestDist = dist; closest = e; } } return closest; }</code><technical_language>Float.MAX_VALUE</technical_language>

Target:
public Entity checkIfEnemyNear(double radius, Class<? extends Entity> c, boolean isEnemyCheck) { Set<Entity> entities = level.getEntities(pos.x - radius, pos.y - radius, pos.x + radius, pos.y + radius, c); Entity closest = null; double closestDist = Double.MAX_VALUE; for (Entity e : entities) { final double dist = e.pos.distSqr(pos); if (dist < closestDist && !isTargetBehindWall(e.pos.x, e.pos.y, e)) { if (isEnemyCheck) { if (!(e instanceof Mob)) continue; if (!((Mob)e).isNotFriendOf(this)) continue; } closestDist = dist; closest = e; } } return closest; }
Source:
<code>public static String printSuppressions(File file, String suppressionLineColumnNumber, int tabWidth) throws IOException, CheckstyleException { if (VALID_SUPPRESSION_LINE_COLUMN_NUMBER_REGEX.matcher(suppressionLineColumnNumber) .matches()) { final FileText fileText = new FileText(file.getAbsoluteFile(), System.getProperty("file.encoding", StandardCharsets.UTF_8.name())); final DetailAST detailAST = parseFileText(fileText); final int lineNumber = extractLineNumber(suppressionLineColumnNumber); final int columnNumber = extractColumnNumber(suppressionLineColumnNumber); return generate(fileText, detailAST, lineNumber, columnNumber, tabWidth); } else { final String exceptionMsg = String.format(Locale.ROOT, <START> "%s does not match valid format.", <END> suppressionLineColumnNumber); throw new IllegalStateException(exceptionMsg); } }</code><technical_language>Please, print user valid format</technical_language>

Target:
public static String printSuppressions(File file, String suppressionLineColumnNumber, int tabWidth) throws IOException, CheckstyleException { final Matcher matcher = VALID_SUPPRESSION_LINE_COLUMN_NUMBER_REGEX.matcher(suppressionLineColumnNumber); if (matcher.matches()) { final FileText fileText = new FileText(file.getAbsoluteFile(), System.getProperty("file.encoding", StandardCharsets.UTF_8.name())); final DetailAST detailAST = JavaParser.parseFileText(fileText, JavaParser.Options.WITH_COMMENTS); final int lineNumber = Integer.parseInt(matcher.group(1)); final int columnNumber = Integer.parseInt(matcher.group(2)); return generate(fileText, detailAST, lineNumber, columnNumber, tabWidth); } else { final String exceptionMsg = String.format(Locale.ROOT, "%s does not match valid format 'line:column'.", suppressionLineColumnNumber); throw new IllegalStateException(exceptionMsg); } }
Source:
<code>public static List<LookupDto> changeLookupFieldsForDay8AndDay57Report(List<LookupDto> lookups) { List<String> availableVisitTypes = Arrays.asList(VisitType.PRIME_VACCINATION_FIRST_FOLLOW_UP_VISIT.toString() + ":" + VisitType.PRIME_VACCINATION_FIRST_FOLLOW_UP_VISIT.getValue(), VisitType.BOOST_VACCINATION_DAY.toString() + ":" + VisitType.BOOST_VACCINATION_DAY.getValue()); for(LookupDto lookup : lookups) { for(LookupFieldDto lookupFieldDto : lookup.getLookupFields()) { if(lookupFieldDto.getDisplayName().equals("Visit Type")) { for(SettingDto settingDto : lookupFieldDto.getSettings()) { if(settingDto.getName().equals("mds.form.label.values")) { settingDto.setValue(availableVisitTypes); } <START> break; <END> } } break; } } return lookups; }</code><technical_language>this if, loop iteration</technical_language>

Target:
public static List<LookupDto> changeLookupFieldsForDay8AndDay57Report(List<LookupDto> lookups) { List<String> availableVisitTypes = Arrays.asList(VisitType.PRIME_VACCINATION_FIRST_FOLLOW_UP_VISIT.toString() + ":" + VisitType.PRIME_VACCINATION_FIRST_FOLLOW_UP_VISIT.getValue(), VisitType.BOOST_VACCINATION_DAY.toString() + ":" + VisitType.BOOST_VACCINATION_DAY.getValue()); for(LookupDto lookup : lookups) { for(LookupFieldDto lookupFieldDto : lookup.getLookupFields()) { if(lookupFieldDto.getDisplayName().equals("Visit Type")) { for(SettingDto settingDto : lookupFieldDto.getSettings()) { if(settingDto.getName().equals("mds.form.label.values")) { settingDto.setValue(availableVisitTypes); break; } } break; } } } return lookups; }
Source:
<code>String catalogMatchesCompilerFunctionSet(Client client) throws NoConnectionsException, IOException, ProcCallException { StringBuffer success = new StringBuffer(); Set<String> dfns = FunctionForVoltDB.getAllUserDefinedFunctionNamesForDebugging(); VoltTable vt = client.callProcedure("@SystemCatalog", "functions").getResults()[0]; <START> if (!(dfns.size() - 1 == vt.getRowCount() && dfns.contains("FORMAT_TIMESTAMP"))) { <END> success.append(String.format("Compiler set has %d elements, catalog has %d functions\n", dfns.size(), vt.getRowCount())); } else { return ""; } success.append("Catalog:\n"); while (vt.advanceRow()) { String name = vt.getString("FUNCTION_NAME"); success.append(" ") .append(name); if ( ! dfns.contains(name)) { success.append("(*)"); } success.append("\n"); } success.append("FunctionForVolt:\n"); for (String dfn : dfns) { success.append(" " + dfn + "\n"); } return success.toString(); }</code><technical_language>FORMAT_TIMESTAMP in catalog, is this change</technical_language>

Target:
String catalogMatchesCompilerFunctionSet(Client client) throws NoConnectionsException, IOException, ProcCallException { StringBuffer success = new StringBuffer(); Set<String> dfns = FunctionForVoltDB.getAllUserDefinedFunctionNamesForDebugging(); VoltTable vt = client.callProcedure("@SystemCatalog", "functions").getResults()[0]; if (dfns.size() != vt.getRowCount()) { success.append(String.format("Compiler set has %d elements, catalog has %d functions\n", dfns.size(), vt.getRowCount())); } else { return ""; } success.append("Catalog:\n"); while (vt.advanceRow()) { String name = vt.getString("FUNCTION_NAME"); success.append(" ") .append(name); if ( ! dfns.contains(name)) { success.append("(*)"); } success.append("\n"); } success.append("FunctionForVolt:\n"); for (String dfn : dfns) { success.append(" " + dfn + "\n"); } return success.toString(); }
Source:
<code>public ProfileLaunchShortcut getProfilingProvider(String type) { IExtensionPoint extPoint = Platform.getExtensionRegistry() .getExtensionPoint(ProfileLaunchPlugin.PLUGIN_ID, "launchProvider"); IConfigurationElement[] configs = extPoint.getConfigurationElements(); ArrayList<IConfigurationElement> configList = new ArrayList<IConfigurationElement>(); for (IConfigurationElement config : configs) { if (config.getName().equals("provider")) { String currentType = config.getAttribute("type"); String shortcut = config.getAttribute("shortcut"); if (currentType != null && shortcut != null && currentType.equals(type)) { String priority = config.getAttribute("priority"); if (priority != null) { try { Integer.parseInt(priority); configList.add(config); <START> } catch (Exception e) { <END> } } } } } Collections.sort(configList, new Comparator<IConfigurationElement>() { public int compare(IConfigurationElement c1, IConfigurationElement c2) { int p1, p2; try { p1 = Integer.parseInt(c1.getAttribute("priority")); if (p1 <= 0) { return 1; } } catch (NumberFormatException e) { return 1; } try { p2 = Integer.parseInt(c2.getAttribute("priority")); if (p2 <= 0) { return -1; } } catch (NumberFormatException e) { return -1; } return p1 < p2 ? -1 : 1; } }); for (IConfigurationElement config : configList) { try { Object obj = config.createExecutableExtension("shortcut"); if (obj instanceof ProfileLaunchShortcut) { return (ProfileLaunchShortcut) obj; } } catch (CoreException e) { } } return null; }</code><technical_language>Do catch Exception this catching runtime exceptions is definetely for</technical_language>

Target:
public ProfileLaunchShortcut getProfilingProvider(String type) { IExtensionPoint extPoint = Platform.getExtensionRegistry() .getExtensionPoint(ProfileLaunchPlugin.PLUGIN_ID, "launchProvider"); IConfigurationElement[] configs = extPoint.getConfigurationElements(); ArrayList<IConfigurationElement> configList = new ArrayList<IConfigurationElement>(); for (IConfigurationElement config : configs) { if (config.getName().equals("provider")) { String currentType = config.getAttribute("type"); String shortcut = config.getAttribute("shortcut"); if (currentType != null && shortcut != null && currentType.equals(type)) { String priority = config.getAttribute("priority"); if (priority != null) { try { Integer.parseInt(priority); configList.add(config); } catch (NumberFormatException e) { } } } } } Collections.sort(configList, new Comparator<IConfigurationElement>() { public int compare(IConfigurationElement c1, IConfigurationElement c2) { int p1, p2; try { p1 = Integer.parseInt(c1.getAttribute("priority")); if (p1 <= 0) { return 1; } } catch (NumberFormatException e) { return 1; } try { p2 = Integer.parseInt(c2.getAttribute("priority")); if (p2 <= 0) { return -1; } } catch (NumberFormatException e) { return -1; } return p1 < p2 ? -1 : 1; } }); for (IConfigurationElement config : configList) { try { Object obj = config.createExecutableExtension("shortcut"); if (obj instanceof ProfileLaunchShortcut) { return (ProfileLaunchShortcut) obj; } } catch (CoreException e) { } } return null; }
Source:
<code>public ElasticPool(int sizeLimit) { elements = new ConcurrentLinkedQueue<>(); <START> semaphore = new Semaphore(sizeLimit); <END> }</code><technical_language>fair semaphore</technical_language>

Target:
public ElasticPool(int sizeLimit) { elements = new ConcurrentLinkedQueue<>(); semaphore = new Semaphore(sizeLimit, true); }
Source:
<code>public TabbarArrangeMenuManager(IDiagramWorkbenchPart iDiagramWorkbenchPart) { this.representationPart = iDiagramWorkbenchPart; <START> ISelectionService selectionService = (ISelectionService) representationPart.getSite().getService(ISelectionService.class); <END> if (selectionService != null) { selectionService.addSelectionListener(this); } }</code><technical_language>I this happen getSite coud null. add remove selection listener code eventually shared in EclipseUIUtil in another proper helper</technical_language>

Target:
public TabbarArrangeMenuManager(IDiagramWorkbenchPart iDiagramWorkbenchPart) { this.representationPart = iDiagramWorkbenchPart; EclipseUIUtil.addSelectionListener(this.representationPart, this); }
Source:
<code>@Test public void tesEventOnRegistrationWithSameEmailAsExistingUser() { DocumentModel userInfo = buildSampleUserInfo(); userInfo.setPropertyValue("userinfo:login", "vdu-" + userInfo.getPropertyValue("userinfo:login")); userInfo.setPropertyValue("userinfo:email", "vdu-" + userInfo.getPropertyValue("userinfo:email")); DocumentModel user1 = userManager.getBareUserModel(); user1.setPropertyValue(userManager.getUserIdField(), userInfo.getPropertyValue("userinfo:login") + "2"); user1.setPropertyValue(userManager.getUserEmailField(), userInfo.getPropertyValue("userinfo:email")); userManager.createUser(user1); try { userRegistrationService.submitRegistrationRequest(userInfo, buildAdditionalInfo(), UserInvitationService.ValidationMethod.NONE, true); fail("submitRegistrationRequest() should have thrown an exception as the email address is already used."); } catch (UserAlreadyExistsException e) { e.printStackTrace(); <START> DocumentModelList regDocs = session.query("SELECT * FROM Document WHERE ecm:primaryType='TestRegistration'" <END> + " AND userinfo:login='" + userInfo.getPropertyValue("userinfo:login") + "'" ); assertTrue("A 'TestRegistration' document should not have been created as the email address is already used. (" + (!regDocs.isEmpty() ? regDocs.get(0).getProperties("userinfo") + ")" : ""), regDocs.isEmpty()); } }</code><technical_language>SELECT * TestRegistration is simpler</technical_language>

Target:
@Test public void tesEventOnRegistrationWithSameEmailAsExistingUser() { DocumentModel userInfo = buildSampleUserInfo(); userInfo.setPropertyValue("userinfo:login", "vdu-" + userInfo.getPropertyValue("userinfo:login")); userInfo.setPropertyValue("userinfo:email", "vdu-" + userInfo.getPropertyValue("userinfo:email")); DocumentModel user1 = userManager.getBareUserModel(); user1.setPropertyValue(userManager.getUserIdField(), userInfo.getPropertyValue("userinfo:login") + "2"); user1.setPropertyValue(userManager.getUserEmailField(), userInfo.getPropertyValue("userinfo:email")); userManager.createUser(user1); try { userRegistrationService.submitRegistrationRequest(userInfo, buildAdditionalInfo(), UserInvitationService.ValidationMethod.NONE, true); fail("submitRegistrationRequest() should have thrown an exception as the email address is already used."); } catch (UserAlreadyExistsException e) { DocumentModelList regDocs = session.query("SELECT * FROM TestRegistration WHERE " + "userinfo:login='" + userInfo.getPropertyValue("userinfo:login") + "'" ); assertTrue("A 'TestRegistration' document should not have been created as the email address is already used. (" + (!regDocs.isEmpty() ? regDocs.get(0).getProperties("userinfo") + ")" : ""), regDocs.isEmpty()); } }
Source:
<code>public void saveCurrentProperty() { List<Property> ppList = getProperties(); for (Property pp : ppList) { this.property = pp; Process currentProcess = this.currentProcess; List<Property> propertyList = currentProcess.getProperties(); for (Property processProperty : propertyList) { if (processProperty.getTitle() == null) { currentProcess.getProperties().remove(processProperty); } } for (Process process : this.property.getProcesses()) { if (!process.getProperties().contains(this.property)) { process.getProperties().add(this.property); } } try { serviceManager.getProcessService().save(this.currentProcess); Helper.setMeldung("propertySaved"); } catch (DataException e) { <START> logger.error(e.getMessage(), e); <END> Helper.setFehlerMeldung("propertyNotSaved"); } } }</code><technical_language>setErrorMessage</technical_language>

Target:
public void saveCurrentProperty() { List<Property> ppList = getProperties(); for (Property pp : ppList) { this.property = pp; Process currentProcess = this.currentProcess; List<Property> propertyList = currentProcess.getProperties(); for (Property processProperty : propertyList) { if (processProperty.getTitle() == null) { currentProcess.getProperties().remove(processProperty); } } for (Process process : this.property.getProcesses()) { if (!process.getProperties().contains(this.property)) { process.getProperties().add(this.property); } } try { serviceManager.getProcessService().save(this.currentProcess); Helper.setMeldung("propertySaved"); } catch (DataException e) { Helper.setErrorMessage("propertyNotSaved", logger, e); } } }
Source:
<code>public Map<String, Serializable> getAllNonTaskVariablesInjectNodesFile(TaskContext taskContext, String nodesFile) { Map<String, Serializable> variables = new HashMap<>(); Map<String, Serializable> dictionary = new HashMap<>(); try { if (taskContext != null) { variables.putAll(extractSystemVariables(taskContext, nodesFile)); variables.putAll(extractJobVariables(taskContext)); variables.putAll(extractInheritedVariables(taskContext)); } dictionary = extractAllVariables(taskContext, null, nodesFile); } catch (IOException | ClassNotFoundException e) { <START> logger.error("Error reading variables from task context!"); <END> } return resolveVariables(variables, dictionary); }</code><technical_language>log exception</technical_language>

Target:
public Map<String, Serializable> getAllNonTaskVariablesInjectNodesFile(TaskContext taskContext, String nodesFile) { Map<String, Serializable> variables = new HashMap<>(); Map<String, Serializable> dictionary = new HashMap<>(); try { variables.putAll(extractJobVariables(taskContext)); variables.putAll(extractInheritedVariables(taskContext)); variables.putAll(extractSystemVariables(taskContext, nodesFile)); dictionary = extractAllVariables(taskContext, null, nodesFile); } catch (IOException | ClassNotFoundException e) { logger.error(ERROR_READING_VARIABLES, e); } return resolveVariables(variables, dictionary); }