auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof TargetPatternPhaseKey)) { return false; } TargetPatternPhaseKey other = (TargetPatternPhaseKey) obj; return other.targetPatterns.equals(this.targetPatterns) && other.offset.equals(this.offset) && other.compileOneDependency == compileOneDependency && other.buildTestsOnly == buildTestsOnly && other.determineTests == determineTests <START> && (other.buildTargetFilter == null && buildTargetFilter == null <END> || other.buildTargetFilter != null && other.buildTargetFilter.equals(buildTargetFilter)) && other.buildManualTests == buildManualTests && other.expandTestSuites == expandTestSuites && Objects.equals(other.testFilter, testFilter); }</code><technical_language>Objects.equal</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (!(obj instanceof TargetPatternPhaseKey)) { return false; } TargetPatternPhaseKey other = (TargetPatternPhaseKey) obj; return other.targetPatterns.equals(this.targetPatterns) && other.offset.equals(this.offset) && other.compileOneDependency == compileOneDependency && other.buildTestsOnly == buildTestsOnly && other.determineTests == determineTests && Objects.equals(other.buildTargetFilter, buildTargetFilter) && other.buildManualTests == buildManualTests && other.expandTestSuites == expandTestSuites && Objects.equals(other.testFilter, testFilter); }
Source:
<code>@Override protected void execute(TaskListener listener) throws IOException, InterruptedException { if (get().isUseBrowser()) { return; } boolean due = false; for (UpdateSite site : Jenkins.getInstance().getUpdateCenter().getSites()) { if (site.isDue()) { due = true; break; } } if (!due) { <START> final long now = System.currentTimeMillis(); <END> for (Downloadable d : Downloadable.all()) { if (d.getDue() <= now) { d.updateNow(); } } return; } HttpResponse rsp = Jenkins.getInstance().getPluginManager().doCheckUpdatesServer(); if (rsp instanceof FormValidation) { listener.error(((FormValidation) rsp).renderHtml()); } }</code><technical_language>in case, wrap code <code>catch (Exception ex)</code>. Downloadables external plugin, a NPE impact startup flow</technical_language>

Target:
@Override protected void execute(TaskListener listener) throws IOException, InterruptedException { if (get().isUseBrowser()) { return; } boolean due = false; for (UpdateSite site : Jenkins.getInstance().getUpdateCenter().getSites()) { if (site.isDue()) { due = true; break; } } if (!due) { final long now = System.currentTimeMillis(); for (Downloadable d : Downloadable.all()) { if (d.getDue() <= now) { try { d.updateNow(); } catch(Exception e) { LOGGER.log(Level.WARNING, String.format("Unable to update downloadable [%s]", d.getId()), e); } } } return; } HttpResponse rsp = Jenkins.getInstance().getPluginManager().doCheckUpdatesServer(); if (rsp instanceof FormValidation) { listener.error(((FormValidation) rsp).renderHtml()); } }
Source:
<code>private String getCommitMessage(ICommitMessageProvider provider, boolean isFirstMessage) { return <START> _buildCommitMessage(provider.getMessage(resourcesArray), <END> isFirstMessage); }</code><technical_language>this underscore</technical_language>

Target:
private String getCommitMessage(ICommitMessageProvider provider, boolean isFirstMessage) { return buildCommitMessage(provider.getMessage(resourcesArray), isFirstMessage); }
Source:
<code>private static boolean hasOnlyNonNullConstraint(ConstraintsByDomain constraints) { List<Class<? extends Constraint>> domains = constraints.domains().collect(Collectors.toList()); <START> return domains.size() == 1 && constraints.get(ObjectConstraint.class) == ObjectConstraint.NOT_NULL; <END> }</code><technical_language>constraints.domains().count() == 1</technical_language>

Target:
private static boolean hasOnlyNonNullConstraint(ConstraintsByDomain constraints) { return constraints.domains().count() == 1 && constraints.get(ObjectConstraint.class) == ObjectConstraint.NOT_NULL; }
Source:
<code>private String calculateTotalDurationString(Result result) { DecimalFormat numberFormat = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US); numberFormat.applyPattern("0.######"); <START> return numberFormat.format(((double) result.getTimeDuration().toNanos())); <END> }</code><technical_language>I division is stil needed</technical_language>

Target:
private String calculateTotalDurationString(Result result) { DecimalFormat numberFormat = (DecimalFormat) NumberFormat.getNumberInstance(Locale.US); numberFormat.applyPattern("0.######"); return numberFormat.format(((double) result.getDuration().toNanos() / NANOS_PER_SECONDS)); }
Source:
<code>public void exportTest() throws Exception { ConfiguratorRegistry registry = ConfiguratorRegistry.get(); ConfigurationContext context = new ConfigurationContext(registry); { AuthorizationStrategy authorizationStrategy = j.jenkins.getAuthorizationStrategy(); Configurator c = context.lookupOrFail(ProjectMatrixAuthorizationStrategy.class); @SuppressWarnings("unchecked") CNode node = c.describe(authorizationStrategy, context); assertNotNull(node); Mapping mapping = node.asMapping(); List<CNode> permissions = mapping.get("permissions").asSequence(); <START> assertEquals("list size", 18, permissions.size()); <END> assertNull("no grantedPermissions", mapping.get("grantedPermissions")); } { Configurator c = context.lookupOrFail(AuthorizationMatrixNodeProperty.class); CNode node = c.describe(j.jenkins.getNode("agent1").getNodeProperty(AuthorizationMatrixNodeProperty.class), context); assertNotNull(node); Mapping mapping = node.asMapping(); assertEquals("inheritance strategy", mapping.getScalarValue("inheritanceStrategy"), "inheritingGlobal"); List<CNode> permissions = mapping.get("permissions").asSequence(); assertEquals("list size", 6, permissions.size()); } }</code><technical_language>assert list contains of expected human-readable strings? e.g. "Job/Build:authenticated"</technical_language>

Target:
public void exportTest() throws Exception { ConfiguratorRegistry registry = ConfiguratorRegistry.get(); ConfigurationContext context = new ConfigurationContext(registry); { AuthorizationStrategy authorizationStrategy = j.jenkins.getAuthorizationStrategy(); Configurator c = context.lookupOrFail(ProjectMatrixAuthorizationStrategy.class); @SuppressWarnings("unchecked") CNode node = c.describe(authorizationStrategy, context); assertNotNull(node); Mapping mapping = node.asMapping(); List<CNode> permissions = mapping.get("permissions").asSequence(); assertEquals("list size", 18, permissions.size()); assertNull("no grantedPermissions", mapping.get("grantedPermissions")); } { Configurator c = context.lookupOrFail(AuthorizationMatrixNodeProperty.class); CNode node = c.describe(j.jenkins.getNode("agent1").getNodeProperty(AuthorizationMatrixNodeProperty.class), context); assertNotNull(node); Mapping mapping = node.asMapping(); assertEquals("inheritance strategy", mapping.getScalarValue("inheritanceStrategy"), "inheritingGlobal"); List<CNode> permissions = mapping.get("permissions").asSequence(); assertEquals("list size", 6, permissions.size()); { List<String> strings = Arrays.asList( "Agent/Build:anonymous", "Agent/Build:authenticated", "Agent/Configure:authenticated", "Agent/Connect:authenticated", "Agent/Delete:authenticated", "Agent/Disconnect:authenticated"); for (CNode entry : permissions) { String value = entry.asScalar().getValue(); assertTrue("list contains entry", strings.contains(value)); } } } }
Source:
<code>public static ValueMatcher getLongValueMatcher( final LongColumnSelector longSelector, Comparable value ) { try { if (value == null) { return new BooleanValueMatcher(false); } <START> final long longValue = Long.parseLong(value.toString()); <END> return new ValueMatcher() { @Override public boolean matches() { return longSelector.get() == longValue; } }; } catch (NumberFormatException nfe) { return new BooleanValueMatcher(false); } }</code><technical_language>Longs.tryParse returns null instead of throwing exception, a bit cleaner that</technical_language>

Target:
public static ValueMatcher getLongValueMatcher( final LongColumnSelector longSelector, Comparable value ) { if (value == null) { return new BooleanValueMatcher(false); } final Long longValue = Longs.tryParse(value.toString()); if (longValue == null) { return new BooleanValueMatcher(false); } return new ValueMatcher() { final long unboxedLong = longValue.longValue(); @Override public boolean matches() { return longSelector.get() == unboxedLong; } }; }
Source:
<code>protected Statement createFailOnTimeoutStatement( <START> Statement statement, Description description) throws Exception { <END> return FailOnTimeout.builder() .withTimeout(timeout, timeUnit) .withLookingForStuckThread(lookForStuckThread) .withDescription(description) .build(statement); }</code><technical_language>this method is protected. Changing signature break someone. @junit-team/junit-committers handle this? add new feature breaking extension point. in favour of modifying methods signature making private. Users create a new rule instead of extending Timeout. builder for creating statement</technical_language>

Target:
private Statement createFailOnTimeoutStatement( Statement statement, Description description) throws Exception { return FailOnTimeout.builder() .withDescription(description) .build(createFailOnTimeoutStatement(statement)); }
Source:
<code>static private void cleanUpStaleJobs() { long now = System.currentTimeMillis(); Collection<Long> keys; synchronized(jobs) { keys = new ArrayList<Long>(jobs.keySet()); } <START> logger.info("Cleaning Stale Import Jobs ..."); <END> for (Long id : keys) { ImportingJob job = jobs.get(id); if (job != null && !job.updating && now - job.lastTouched > STALE_PERIOD) { job.dispose(); jobs.remove(id); logger.info("Removed Job ID " + id); } } }</code><technical_language>I put logging here, is displayed time this is run (every 10 minutes) if is job clean: 18:10:08.083 [ importing] Cleaning Stale Import Jobs ... (410217ms) 18:20:08.083 [ importing] Cleaning Stale Import Jobs ... (600000ms) 18:30:08.083 [ importing] Cleaning Stale Import Jobs ... (523849ms)</technical_language>

Target:
static private void cleanUpStaleJobs() { long now = System.currentTimeMillis(); Collection<Long> keys; synchronized(jobs) { keys = new ArrayList<Long>(jobs.keySet()); } for (Long id : keys) { ImportingJob job = jobs.get(id); if (job != null && !job.updating && now - job.lastTouched > STALE_PERIOD) { job.dispose(); jobs.remove(id); logger.info("Removed Stale Import Job ID " + id); } } }
Source:
<code>public void setMaximumPoolingConnections(int maximumPoolingConnections) { <START> this.maximumPoolingConnections = maximumPoolingConnections; <END> }</code><technical_language>usefull include a check if maximumPoolingConnections is >= 1 throw illegalArgument Exception if</technical_language>

Target:
public void setMaximumPoolingConnections(int maximumPoolingConnections) { if (maximumPoolingConnections < 1) throw new IllegalArgumentException("maximumPoolingConnections must be 1 or greater"); this.maximumPoolingConnections = maximumPoolingConnections; }
Source:
<code>public boolean isNoexcept(boolean inCalledContext) { for (ICPPEvaluation arg : fArguments) { if (!arg.isNoexcept(inCalledContext)) return false; } <START> return true; <END> }</code><technical_language>consider getOverloads() well</technical_language>

Target:
public boolean isNoexcept(boolean inCalledContext) { if (getOverloads() != null) for (ICPPFunction overload : getOverloads()) { if (overload != null && !EvalUtil.evaluateNoexceptSpecifier(overload.getType().getNoexceptSpecifier())) return false; } for (ICPPEvaluation arg : fArguments) { if (!arg.isNoexcept(inCalledContext)) return false; } return true; }
Source:
<code>public Long create(Library library) throws IOException { loadChildEntities(library); setChangeDetails(library); if (library.getSecurityProfile() == null) { library.inheritPermissions(sampleDao.get(library.getSample().getId())); } authorizationManager.throwIfNotWritable(library); library.setName(generateTemporaryName()); if (isDetailedLibrary(library) && ((DetailedLibrary) library).hasNonStandardAlias()) { } else if (isStringEmptyOrNull(library.getAlias()) && namingScheme.hasLibraryAliasGenerator()) { try { library.setAlias(namingScheme.generateLibraryAlias(library)); } catch (MisoNamingException e) { throw new IOException("Error generating alias for library", e); } } else { <START> namingScheme.validateLibraryAlias(library.getAlias()); <END> } return save(library).getId(); }</code><technical_language>This returns a ValidationResult, check handle appropriately if validation failed</technical_language>

Target:
public Long create(Library library) throws IOException { loadChildEntities(library); setChangeDetails(library); if (library.getSecurityProfile() == null) { library.inheritPermissions(sampleDao.get(library.getSample().getId())); } authorizationManager.throwIfNotWritable(library); library.setName(generateTemporaryName()); if (isDetailedLibrary(library) && ((DetailedLibrary) library).hasNonStandardAlias()) { } else if (isStringEmptyOrNull(library.getAlias()) && namingScheme.hasLibraryAliasGenerator()) { try { library.setAlias(namingScheme.generateLibraryAlias(library)); } catch (MisoNamingException e) { throw new IOException("Error generating alias for library", e); } } else { validateAliasOrThrow(library); } return save(library).getId(); }
Source:
<code>public Vector<T> filter(Predicate<? super T> predicate) { Objects.requireNonNull(predicate, "predicate is null"); final Vector<T> results = ofAll(iterator().filter(predicate)); <START> if (results.isEmpty()) { <END> return empty(); } else if (results.length() == length()) { return this; } else { return results; } }</code><technical_language>This is redundant. If results.isEmpty() empty singleton return results</technical_language>

Target:
public Vector<T> filter(Predicate<? super T> predicate) { Objects.requireNonNull(predicate, "predicate is null"); final Vector<T> results = ofAll(iterator().filter(predicate)); return (results.length() == length()) ? this : results; }
Source:
<code>public synchronized void updateQuotaCache() { if (!isCacheUpdateNeeded()) { return; } log.debug("Updating Quota Cache..."); long timeStart = System.currentTimeMillis(); List<Quota> allQuotaIncludingConsumption = getQuotaDAO().getAllQuotaIncludingConsumption(); if (allQuotaIncludingConsumption.isEmpty()) { return; } HashMap<Guid, Map<Guid, Quota>> newStoragePoolQuotaMap = new HashMap<Guid, Map<Guid, Quota>>(); for (Quota quota : allQuotaIncludingConsumption) { if (!newStoragePoolQuotaMap.containsKey(quota.getStoragePoolId())) { newStoragePoolQuotaMap.put(quota.getStoragePoolId(), new HashMap<Guid,Quota>()); } newStoragePoolQuotaMap.get(quota.getStoragePoolId()).put(quota.getId(), quota); } lock.writeLock().lock(); try { storagePoolQuotaMap = newStoragePoolQuotaMap; } finally { lock.writeLock().unlock(); } long timeEnd = System.currentTimeMillis(); <START> log.debugFormat("Quota Cache updated. ({0} msec)", timeEnd-timeStart); <END> }</code><technical_language>Please move log entry info level. In normal mode enough cache updated (and xxx second)</technical_language>

Target:
public synchronized void updateQuotaCache() { if (!isCacheUpdateNeeded()) { return; } log.debug("Updating Quota Cache..."); long timeStart = System.currentTimeMillis(); List<Quota> allQuotaIncludingConsumption = getQuotaDAO().getAllQuotaIncludingConsumption(); if (allQuotaIncludingConsumption.isEmpty()) { return; } HashMap<Guid, Map<Guid, Quota>> newStoragePoolQuotaMap = new HashMap<Guid, Map<Guid, Quota>>(); for (Quota quota : allQuotaIncludingConsumption) { if (!newStoragePoolQuotaMap.containsKey(quota.getStoragePoolId())) { newStoragePoolQuotaMap.put(quota.getStoragePoolId(), new HashMap<Guid,Quota>()); } newStoragePoolQuotaMap.get(quota.getStoragePoolId()).put(quota.getId(), quota); } lock.writeLock().lock(); try { storagePoolQuotaMap = newStoragePoolQuotaMap; } finally { lock.writeLock().unlock(); } long timeEnd = System.currentTimeMillis(); log.infoFormat("Quota Cache updated. ({0} msec)", timeEnd-timeStart); }
Source:
<code>public String getDisplayName() { String n = getName(); boolean gitHubOrg = StringUtils.isBlank(apiUrl) || GITHUB_URL.equals(apiUrl); if (StringUtils.isBlank(n)) { <START> n = gitHubOrg ? GITHUB_NAME : SCMName.fromUrl(apiUrl, COMMON_PREFIX_HOSTNAMES); <END> } String a = gitHubOrg ? "<LINK_0>" : StringUtils.removeEnd(apiUrl, "/api/v3"); return StringUtils.isBlank(n) ? a : Messages.GitHubServerConfig_displayName(n, a); }</code><technical_language>please avoid one-letter vars. In java hard follow code if obfuscated variables</technical_language>

Target:
public String getDisplayName() { String gitHubName = getName(); boolean isGitHubCom = StringUtils.isBlank(apiUrl) || GITHUB_URL.equals(apiUrl); if (StringUtils.isBlank(gitHubName)) { gitHubName = isGitHubCom ? PUBLIC_GITHUB_NAME : SCMName.fromUrl(apiUrl, COMMON_PREFIX_HOSTNAMES); } String gitHubUrl = isGitHubCom ? "<LINK_0>" : StringUtils.removeEnd(apiUrl, "/api/v3"); return StringUtils.isBlank(gitHubName) ? gitHubUrl : Messages.GitHubServerConfig_displayName(gitHubName, gitHubUrl); }
Source:
<code>public static String getScoreString(final Context context, final String fullKey, final double score) { final String key = fullKey.split("\\.")[0]; int resource = R.string.na; if (strings.containsKey(key)) { resource = strings.get(key); } else if (key.startsWith(KEY_PREFIX_KILLS)) { resource = R.string.lb_sctype_kills; } else if (key.startsWith(KEY_PREFIX_SCORE)) { resource = R.string.lb_sctype_score; } if (resource == R.string.na) { <START> Log.d("LeaderbordUtils", "Missing string: " + key); <END> return context.getString(resource); } if (score % 1 == 0) { return String.format(context.getString(resource), NumberFormatter.format((int) score)); } else { return String.format(context.getString(resource), NumberFormatter.format(score)); } }</code><technical_language>I this dropped now. fear missed something</technical_language>

Target:
public static String getScoreString(final Context context, final String fullKey, final double score) { final String key = fullKey.split("\\.")[0]; int resource = R.string.na; if (strings.containsKey(key)) { resource = strings.get(key); } else if (key.startsWith(KEY_PREFIX_KILLS)) { resource = R.string.lb_sctype_kills; } else if (key.startsWith(KEY_PREFIX_SCORE)) { resource = R.string.lb_sctype_score; } if (resource == R.string.na) { return context.getString(resource); } if (score % 1 == 0) { return String.format(context.getString(resource), NumberFormatter.format((int) score)); } else { return String.format(context.getString(resource), NumberFormatter.format(score)); } }
Source:
<code>private void addContact(JID jid, String nickname) throws SarosCancellationException { <START> BiPredicate<String, String> questionDialog = <END> (title, message) -> { try { return SWTUtils.runSWTSync( () -> DialogUtils.openQuestionMessageDialog(null, title, message)); } catch (Exception e) { log.debug("Error opening questionMessageDialog", e); return false; } }; contactsService.addContact(jid, nickname, questionDialog); }</code><technical_language>questionable usage of a BiPredicate a callback function, works way</technical_language>

Target:
private void addContact(JID jid, String nickname) throws OperationCanceledException { BiPredicate<String, String> questionDialogHandler = (title, message) -> { try { return SWTUtils.runSWTSync( () -> DialogUtils.openQuestionMessageDialog(null, title, message)); } catch (Exception e) { log.debug("Error opening questionMessageDialog", e); return false; } }; contactsService.addContact(jid, nickname, questionDialogHandler); }
Source:
<code><START> private static Image getFBTypeImage(IFile element) { Image image; FBType type = getFBTypeFromFile(element); if (type instanceof BasicFBType) { image = FordiacImage.ICON_BASIC_FB.getImage(); } else if (type instanceof CompositeFBType) { image = FordiacImage.ICON_COMPOSITE_FB.getImage(); } else if (type instanceof ServiceInterfaceFBType) { image = FordiacImage.ICON_SIFB.getImage(); } else { image = checkUnloadedFBType(element); } return image; } <END></code><technical_language>instead of pure declaration of image top, returns for if body nicer imho</technical_language>

Target:
private static Image getFBTypeImage(IFile element) { FBType type = getFBTypeFromFile(element); if (type instanceof BasicFBType) { return FordiacImage.ICON_BASIC_FB.getImage(); } else if (type instanceof CompositeFBType) { return FordiacImage.ICON_COMPOSITE_FB.getImage(); } else if (type instanceof ServiceInterfaceFBType) { return FordiacImage.ICON_SIFB.getImage(); } return checkUnloadedFBType(element); }
Source:
<code>public void configure(String name, Object value) throws ConfigurationException { logger.debug("Configure item: to {}", name, value); try { if ("connectionUri".equals(name)) { try { disconnect(); fatekPLC = new FatekPLC((String) value); logger.info("New Fatek PLC connectionUri={}", value); } catch (Exception e) { fatekPLC = null; throw new ConfigurationException(name, e.getMessage()); } } else { throw new ConfigurationException(name, "Unknow property"); } } catch (ConfigurationException e) { <START> logger.error("", e); <END> throw e; } logger.debug("Configure item: end", name); }</code><technical_language>some message a helpful here</technical_language>

Target:
public void configure(String name, Object value) throws ConfigurationException { logger.debug("Configure item: to {}", name, value); if ("connectionUri".equals(name)) { try { disconnect(); fatekPLC = new FatekPLC((String) value); logger.info("New Fatek PLC connectionUri={}", value); } catch (Exception e) { fatekPLC = null; throw new ConfigurationException(name, e.getMessage()); } } else { throw new ConfigurationException(name, "Unknown property"); } logger.debug("Configure item: end", name); }
Source:
<code>public void testTryGetNonExistsDiskImage() { DiskImage result = dao.getDiskImageByDiskAndImageIds(Guid.newGuid(), Guid.newGuid()); <START> assertEquals(null, <END> result); }</code><technical_language>assertNull</technical_language>

Target:
public void testTryGetNonExistsDiskImage() { DiskImage result = dao.getDiskImageByDiskAndImageIds(Guid.newGuid(), Guid.newGuid()); assertNull(null, result); }
Source:
<code>private void initNode () { if ( _nodeInstance == null || _nodeInstance.isClosed()) { long start = System.currentTimeMillis(); synchronized (syncMe) { if ( _nodeInstance == null || _nodeInstance.isClosed()) { loadConfig(); shutDownNode(); String node_id = ConfigUtils.getServerId(); try{ _nodeInstance = new Node( Settings.builder(). put( "cluster.name", Config.getStringProperty("es.cluster.name")). put( "node.name", node_id ). <START> put("path.home", "WEB-INF/elastic_search"). <END> put("path.data", Config.getStringProperty(DATA_PATH)). put("path.repo", Config.getStringProperty(REPO_PATH)).build() ).start(); } catch (NodeValidationException e){ Logger.error(this, "Error validating ES node at start.", e); } try { Optional<UpdateSettingsRequest> settingsRequest = getReplicasSettings(); if(settingsRequest.isPresent()) { _nodeInstance.client().admin().indices().updateSettings( settingsRequest.get() ).actionGet(); } } catch ( IndexNotFoundException e ) { Logger.warn( ESClient.class, "Unable to set ES property auto_expand_replicas: [No indices found]" ); } catch ( Exception e ) { Logger.error( ESClient.class, "Unable to set ES property auto_expand_replicas.", e ); } try { Thread.sleep( 5000L ); } catch ( InterruptedException e ) { Logger.error( ESClient.class, "Error waiting for node to be available", e ); } } } System.setProperty(WebKeys.DOTCMS_STARTUP_TIME_ES, String.valueOf(System.currentTimeMillis() - start)); } }</code><technical_language>is this for? put("path.home", "WEB-INF/elastic_search")</technical_language>

Target:
private void initNode () { if ( _nodeInstance == null || _nodeInstance.isClosed()) { long start = System.currentTimeMillis(); synchronized (syncMe) { if ( _nodeInstance == null || _nodeInstance.isClosed()) { loadConfig(); shutDownNode(); String node_id = ConfigUtils.getServerId(); try{ _nodeInstance = new Node( Settings.builder(). put( "cluster.name", Config.getStringProperty("es.cluster.name")). put( "node.name", node_id ). put("path.home", Config.getStringProperty("es.path.home", "WEB-INF/elastic_search")). put("path.data", Config.getStringProperty(DATA_PATH)). put("path.repo", Config.getStringProperty(REPO_PATH)).build() ).start(); } catch (NodeValidationException e){ Logger.error(this, "Error validating ES node at start.", e); } try { Optional<UpdateSettingsRequest> settingsRequest = getReplicasSettings(); if(settingsRequest.isPresent()) { _nodeInstance.client().admin().indices().updateSettings( settingsRequest.get() ).actionGet(); } } catch ( IndexNotFoundException e ) { Logger.warn( ESClient.class, "Unable to set ES property auto_expand_replicas: [No indices found]" ); } catch ( Exception e ) { Logger.error( ESClient.class, "Unable to set ES property auto_expand_replicas.", e ); } try { Thread.sleep( 5000L ); } catch ( InterruptedException e ) { Logger.error( ESClient.class, "Error waiting for node to be available", e ); } } } System.setProperty(WebKeys.DOTCMS_STARTUP_TIME_ES, String.valueOf(System.currentTimeMillis() - start)); } }
Source:
<code>public void getAllEntityTypeEndpointWithPaging() throws Exception { getClient().perform(get("/api/core/entitytypes").param("size", "5")) .andExpect(status().isOk()) .andExpect(jsonPath("$.page.size", is(5))) .andExpect(jsonPath("$.page.totalElements", is(7))) .andExpect(jsonPath("$.page.totalPages", is(2))) .andExpect(jsonPath("$._links.self.href", containsString("api/core/entitytypes"))) .andExpect(jsonPath("$._embedded.entitytypes", containsInAnyOrder( EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Publication")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Person")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Project")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "OrgUnit")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Journal")) <START> ))); <END> }</code><technical_language>need check page works verify pagination</technical_language>

Target:
public void getAllEntityTypeEndpointWithPaging() throws Exception { getClient().perform(get("/api/core/entitytypes").param("size", "5")) .andExpect(status().isOk()) .andExpect(jsonPath("$.page.size", is(5))) .andExpect(jsonPath("$.page.totalElements", is(7))) .andExpect(jsonPath("$.page.totalPages", is(2))) .andExpect(jsonPath("$._links.self.href", containsString("api/core/entitytypes"))) .andExpect(jsonPath("$._embedded.entitytypes", containsInAnyOrder( EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Publication")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Person")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Project")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "OrgUnit")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Journal")) ))); getClient().perform(get("/api/core/entitytypes").param("size", "5").param("page", "1")) .andExpect(status().isOk()) .andExpect(jsonPath("$.page.size", is(5))) .andExpect(jsonPath("$.page.totalElements", is(7))) .andExpect(jsonPath("$.page.totalPages", is(2))) .andExpect(jsonPath("$.page.number", is(1))) .andExpect(jsonPath("$._links.self.href", containsString("api/core/entitytypes"))) .andExpect(jsonPath("$._embedded.entitytypes", containsInAnyOrder( EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "JournalVolume")), EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "JournalIssue")) ))); }
Source:
<code>private Credentials initializeStsSession(String asgAccount) { AWSSecurityTokenService sts = new AWSSecurityTokenServiceClient(new InstanceProfileCredentialsProvider()); String region = DiscoveryManager.getInstance().getEurekaClientConfig() .getRegion(); if (!region.equals("us-east-1")) { sts.setEndpoint("sts." + region + ".amazonaws.com"); } <START> String roleArn = "arn:aws:iam::" + asgAccount + ":role/ListAutoScalingGroups"; <END> AssumeRoleResult assumeRoleResult = sts.assumeRole(new AssumeRoleRequest() .withRoleArn(roleArn) .withRoleSessionName("sts-session-" + asgAccount) ); return assumeRoleResult.getCredentials(); }</code><technical_language>role name (ListAutoScalingGroups) a configurable parameter? add a config param EurekaServerConfig/DefaultEurekaServerConfig this default</technical_language>

Target:
private Credentials initializeStsSession(String asgAccount) { AWSSecurityTokenService sts = new AWSSecurityTokenServiceClient(new InstanceProfileCredentialsProvider()); String region = DiscoveryManager.getInstance().getEurekaClientConfig() .getRegion(); if (!region.equals("us-east-1")) { sts.setEndpoint("sts." + region + ".amazonaws.com"); } String roleName = EurekaServerConfigurationManager.getInstance().getConfiguration(). getListAutoScalingGroupsRoleName(); String roleArn = "arn:aws:iam::" + asgAccount + ":role/" + roleName; AssumeRoleResult assumeRoleResult = sts.assumeRole(new AssumeRoleRequest() .withRoleArn(roleArn) .withRoleSessionName("sts-session-" + asgAccount) ); return assumeRoleResult.getCredentials(); }
Source:
<code>public int run(CommandLine cl) throws AlluxioException, IOException { <START> mCpCommand.run(cl); <END> String[] args = cl.getArgs(); AlluxioURI srcPath = new AlluxioURI(args[0]); System.out.println("Deleting " + srcPath); mFileSystem.delete(srcPath, DeletePOptions.newBuilder().setUnchecked(true).setRecursive(true).build()); return 0; }</code><technical_language>If this throw exception, try catch it, user copy phase complete, in inconsistent state? If is in inconsistent state, if run distributedMv again</technical_language>

Target:
public int run(CommandLine cl) throws AlluxioException, IOException { try { mCpCommand.run(cl); } catch (AlluxioException | IOException e) { System.out.println("Copy operation portion of Move failed. If the error below is " + "intermittent, you can rerun this by deleting the destination first."); throw e; } String[] args = cl.getArgs(); AlluxioURI srcPath = new AlluxioURI(args[0]); System.out.println("Deleting " + srcPath); mFileSystem.delete(srcPath, DeletePOptions.newBuilder().setUnchecked(true).setRecursive(true).build()); return 0; }
Source:
<code>void createHandle (int index) { state |= HANDLE | THEME_BACKGROUND; 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); handle = OS.gtk_toolbar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); if ((style & SWT.FLAT) != 0) { byte swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true); OS.gtk_widget_set_name (handle, swt_toolbar_flat); } if (OS.GTK_VERSION >= OS.VERSION (3, 10, 0)) { long context = OS.gtk_widget_get_style_context (handle); String css ="GtkToolbar {\n"+ "padding-top: 0;\n"+ "padding-bottom: 0;\n"+ "}\n"; <START> if (provider == 0) { <END> provider = OS.gtk_css_provider_new (); OS.gtk_style_context_add_provider (context, provider, OS.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); OS.g_object_unref (provider); OS.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (null, css, true), -1, null); OS.gtk_style_context_invalidate (context); } } OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR); if (OS.GTK3) { setFontDescription(defaultFont().handle); } }</code><technical_language>of function in Control thing. calls add_provider find it</technical_language>

Target:
void createHandle (int index) { state |= HANDLE | THEME_BACKGROUND; 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); handle = OS.gtk_toolbar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); if ((style & SWT.FLAT) != 0) { byte swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true); OS.gtk_widget_set_name (handle, swt_toolbar_flat); } if (OS.GTK3) { long context = OS.gtk_widget_get_style_context (handle); if (OS.GTK_VERSION >= OS.VERSION (3, 10, 0)) { String css ="GtkToolbar {\n"+ "padding-top: 0;\n"+ "padding-bottom: 0;\n"+ "}\n"; gtk_css_provider_load_from_css(context, css); } OS.gtk_style_context_invalidate (context); } OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR); if (OS.GTK3) { setFontDescription(defaultFont().handle); } }
Source:
<code>public static <T> GenericIndexed<T> read(ByteBuffer buffer, ObjectStrategy<T> strategy, SmooshedFileMapper fileMapper) { byte versionFromBuffer = buffer.get(); if (VERSION_ONE == versionFromBuffer) { return createVersionOneGenericIndexed(buffer, strategy); } else { if (VERSION_TWO == versionFromBuffer) { if (fileMapper == null) { throw new IAE("SmooshedFileMapper can not be null for version 2."); } boolean allowReverseLookup = buffer.get() == 0x1; int logBaseTwoOfElementsPerValueFile = buffer.getInt(); int numWritten = buffer.getInt(); String columnName; List<ByteBuffer> valueBuffersToUse; ByteBuffer headerBuffer; try { columnName = new SerializerUtils().readString(buffer); valueBuffersToUse = Lists.newArrayList(); <START> for (int i = 0; i <= numWritten / (1 << logBaseTwoOfElementsPerValueFile); i++) { <END> valueBuffersToUse.add(fileMapper.mapFile(GenericIndexedWriter.generateValueFileName(columnName, i)) .asReadOnlyBuffer()); } headerBuffer = fileMapper.mapFile(GenericIndexedWriter.generateHeaderFileName(columnName)); } catch (IOException e) { throw new RuntimeException("File mapping failed.", e); } return new GenericIndexed<T>( valueBuffersToUse, headerBuffer, strategy, allowReverseLookup, 1 << logBaseTwoOfElementsPerValueFile, numWritten ); } } throw new IAE("Unknown version [%s]", versionFromBuffer); }</code><technical_language>If this correct if numWritten == 1 << logBaseTwoOfElementsPerValueFile? numWritten / (1 << logBaseTwoOfElementsPerValueFile) is numWritten >> logBaseTwoOfElementsPerValueFile</technical_language>

Target:
public static <T> GenericIndexed<T> read(ByteBuffer buffer, ObjectStrategy<T> strategy, SmooshedFileMapper fileMapper) { byte versionFromBuffer = buffer.get(); if (VERSION_ONE == versionFromBuffer) { return createVersionOneGenericIndexed(buffer, strategy); } else if (VERSION_TWO == versionFromBuffer) { return createVersionTwoGenericIndexed(buffer, strategy, fileMapper); } throw new IAE("Unknown version [%s]", versionFromBuffer); }
Source:
<code>private void loadIdTitleMap() { if (pageIdTitleMapping == null) { <START> try { <END> File mappingFile = getFile(FileType.Mapping); logger.info("Reading mapping file: " + mappingFile.getAbsolutePath()); pageIdTitleMapping = new HashMap<>(); BufferedReader bf = new BufferedReader(new FileReader(mappingFile)); String line; while ((line = bf.readLine()) != null) { if (line.length() == 0) continue; String[] tokens = line.split("\t"); if (tokens.length != 2) continue; Integer id = Integer.parseInt(tokens[0].trim()); if (pageIdTitleMapping.containsKey(id) == false) { pageIdTitleMapping.put(id, tokens[1]); } } bf.close(); logger.info("Done."); } catch (Exception e) { e.printStackTrace(); logger.error("IO Error while reading the name-mapping file ... exiting"); } } }</code><technical_language>close reader in a 'finally' block, try-with-resources</technical_language>

Target:
private void loadIdTitleMap() { if (pageIdTitleMapping == null) { File mappingFile = null; try { mappingFile = getFile(FileType.Mapping); } catch (DatastoreException e) { e.printStackTrace(); logger.error("Error obtaining Name-mapping file from Datastore"); throw new RuntimeException("Error obtaining Name-mapping file from Datastore"); } try(BufferedReader bf = new BufferedReader(new FileReader(mappingFile))) { logger.info("Reading mapping file: " + mappingFile.getAbsolutePath()); pageIdTitleMapping = new HashMap<>(); String line; while ((line = bf.readLine()) != null) { if (line.length() == 0) continue; String[] tokens = line.split("\t"); if (tokens.length != 2) continue; Integer id = Integer.parseInt(tokens[0].trim()); if (!pageIdTitleMapping.containsKey(id)) { pageIdTitleMapping.put(id, tokens[1]); } } logger.info("Done."); } catch (FileNotFoundException e) { e.printStackTrace(); logger.error("Name-mapping file not found"); throw new RuntimeException("Name-mapping file not found"); } catch (IOException e) { e.printStackTrace(); logger.error("IO Error while reading the name-mapping file"); throw new RuntimeException("IO Error while reading the name-mapping file"); } } }
Source:
<code>public Collection<ListWorkflowExecutorResponse> listWorkflowExecutors() { <START> return workflowExecutors.getWorkflowExecutors().stream() <END> .map(executor -> this.converter.convert(executor)) .collect(Collectors.toList()); }</code><technical_language>return workflowExecutors.getWorkflowExecutors().stream().map(executor -> converter.convert(executor)).collect(toList());</technical_language>

Target:
public Collection<ListWorkflowExecutorResponse> listWorkflowExecutors() { return workflowExecutors.getWorkflowExecutors().stream().map(executor -> converter.convert(executor)).collect(toList()); }
Source:
<code>private void setInitialGestureValues() { if (getAudioReactor() != null) { final float currentVolumeNormalized = (float) getAudioReactor().getVolume() / getAudioReactor().getMaxVolume(); volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized)); } <START> final float screenBrightness = getWindow().getAttributes().screenBrightness; <END> brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness)); if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() [" + volumeProgressBar.getProgress() + "] " + "brightnessProgressBar.getProgress() [" + brightnessProgressBar.getProgress() + "]"); }</code><technical_language>suggestion final float screenBrightness = getWindow().getAttributes().screenBrightness;</technical_language>

Target:
private void setInitialGestureValues() { if (getAudioReactor() != null) { final float currentVolumeNormalized = (float) getAudioReactor().getVolume() / getAudioReactor().getMaxVolume(); volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized)); } float screenBrightness = getWindow().getAttributes().screenBrightness; if (screenBrightness < 0) screenBrightness = Settings.System.getInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 0) / 255.0f; brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness)); if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() [" + volumeProgressBar.getProgress() + "] " + "brightnessProgressBar.getProgress() [" + brightnessProgressBar.getProgress() + "]"); }
Source:
<code>public static User map(DbUser entity, User template) { User model = template != null ? template : new User(); model.setName(entity.getname()); model.setUserName(entity.getusername()); model.setId(entity.getuser_id().toString()); model.setLastName(entity.getsurname()); model.setEmail(entity.getemail()); model.setDepartment(entity.getdepartment()); if (entity.getgroups() != null) { <START> if (entity.getgroups().trim().length() > 0) { <END> model.setGroups(new Groups()); for (String name : entity.getgroups().split(",")) { Group group = new Group(); group.setName(name); model.getGroups().getGroups().add(group); } } } if(!StringHelper.isNullOrEmpty(entity.getdomain())){ Domain dom = new Domain(); dom.setName(entity.getdomain()); dom.setId(new NGuid(entity.getdomain().getBytes(), true).toString()); model.setDomain(dom); } return model; }</code><technical_language>adding this condition clause line 25</technical_language>

Target:
public static User map(DbUser entity, User template) { User model = template != null ? template : new User(); model.setName(entity.getname()); model.setUserName(entity.getusername()); model.setId(entity.getuser_id().toString()); model.setLastName(entity.getsurname()); model.setEmail(entity.getemail()); model.setDepartment(entity.getdepartment()); if (entity.getgroups() != null && entity.getgroups().trim().length() > 0) { model.setGroups(new Groups()); for (String name : entity.getgroups().split(",")) { Group group = new Group(); group.setName(name); model.getGroups().getGroups().add(group); } } if(!StringHelper.isNullOrEmpty(entity.getdomain())){ Domain dom = new Domain(); dom.setName(entity.getdomain()); dom.setId(new NGuid(entity.getdomain().getBytes(), true).toString()); model.setDomain(dom); } return model; }
Source:
<code>public Object invoke(MethodInvocation invocation) throws Throwable { String spanName = getSpanName(invocation); try (Scope scope = tracer.buildSpan(spanName).asChildOf(tracer.activeSpan()).startActive(true)) { Traced.TagsStack.push(); try { return invocation.proceed(); } finally { for (Map.Entry<String, Supplier<?>> e : Traced.TagsStack.pop().entrySet()) { Object val; try { val = e.getValue().get(); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug( "Could not get the value for a tag called " + e.getKey() + " when tracing " + spanName <START> + ".", <END> ex); } continue; } if (val instanceof String) { scope.span().setTag(e.getKey(), (String) val); } else if (val instanceof Boolean) { scope.span().setTag(e.getKey(), (Boolean) val); } else if (val instanceof Number) { scope.span().setTag(e.getKey(), (Number) val); } } } } }</code><technical_language>String.format() here</technical_language>

Target:
public Object invoke(MethodInvocation invocation) throws Throwable { String spanName = getSpanName(invocation); try (Scope scope = tracer.buildSpan(spanName).asChildOf(tracer.activeSpan()).startActive(true)) { Traced.TagsStack.push(); try { return invocation.proceed(); } finally { for (Map.Entry<String, Supplier<?>> e : Traced.TagsStack.pop().entrySet()) { Object val; try { val = e.getValue().get(); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug( "Could not get the value for a tag called when tracing {}.", e.getKey(), spanName, ex); } continue; } if (val instanceof String) { scope.span().setTag(e.getKey(), (String) val); } else if (val instanceof Boolean) { scope.span().setTag(e.getKey(), (Boolean) val); } else if (val instanceof Number) { scope.span().setTag(e.getKey(), (Number) val); } } } } }
Source:
<code>private void setupSSLVerify(Repository repo) throws java.io.IOException { StoredConfig config = repo.getConfig(); if (sslVerify) { config.setBoolean("http", null, "sslVerify", true); config.save(); } else { <START> config.setBoolean("http", null, "sslVerify", false); <END> config.save(); } }</code><technical_language>Nitpick accomplished if-else: java config.setBoolean("http", null, "sslVerify", sslVerify); config.save(); block merging this PR</technical_language>

Target:
private void setupSSLVerify(Repository repo) throws java.io.IOException { StoredConfig config = repo.getConfig(); config.setBoolean("http", null, "sslVerify", sslVerify); config.save(); }
Source:
<code>public void updateMessage() throws Exception { assertThat(modifier.createEdit(change, getCurrentPatchSet(changeId))) .isEqualTo(RefUpdate.Result.NEW); Optional<ChangeEdit> edit = editUtil.byChange(change); try { modifier.modifyMessage( edit.get(), edit.get().getEditCommit().getFullMessage()); <START> fail("UnchangedCommitMessage expected"); <END> } catch (UnchangedCommitMessageException ex) { assertThat(ex.getMessage()).isEqualTo( "New commit message cannot be same as existing commit message"); } String msg = String.format("New commit message\n\nChange-Id: %s", change.getKey()); assertThat(modifier.modifyMessage(edit.get(), msg)).isEqualTo( RefUpdate.Result.FORCED); edit = editUtil.byChange(change); assertThat(edit.get().getEditCommit().getFullMessage()).isEqualTo(msg); editUtil.publish(edit.get()); assertThat(editUtil.byChange(change).isPresent()).isFalse(); ChangeInfo info = get(changeId, ListChangesOption.CURRENT_COMMIT, ListChangesOption.CURRENT_REVISION); assertThat(info.revisions.get(info.currentRevision).commit.message) .isEqualTo(msg); }</code><technical_language>UnchangedCommitMessageException</technical_language>

Target:
public void updateMessage() throws Exception { assertThat(modifier.createEdit(change, getCurrentPatchSet(changeId))) .isEqualTo(RefUpdate.Result.NEW); Optional<ChangeEdit> edit = editUtil.byChange(change); try { modifier.modifyMessage( edit.get(), edit.get().getEditCommit().getFullMessage()); fail("UnchangedCommitMessageException expected"); } catch (UnchangedCommitMessageException ex) { assertThat(ex.getMessage()).isEqualTo( "New commit message cannot be same as existing commit message"); } String msg = String.format("New commit message\n\nChange-Id: %s", change.getKey()); assertThat(modifier.modifyMessage(edit.get(), msg)).isEqualTo( RefUpdate.Result.FORCED); edit = editUtil.byChange(change); assertThat(edit.get().getEditCommit().getFullMessage()).isEqualTo(msg); editUtil.publish(edit.get()); assertThat(editUtil.byChange(change).isPresent()).isFalse(); ChangeInfo info = get(changeId, ListChangesOption.CURRENT_COMMIT, ListChangesOption.CURRENT_REVISION); assertThat(info.revisions.get(info.currentRevision).commit.message) .isEqualTo(msg); }
Source:
<code>void pingScheduling(int pingInterval){ <START> executor = Executors.newScheduledThreadPool(1); <END> executor.scheduleAtFixedRate(new SendPing(),pingInterval, pingInterval, TimeUnit.MILLISECONDS); }</code><technical_language>reuse executor</technical_language>

Target:
void pingScheduling(int pingInterval) { pingTimer = new Timer("pingTimer"); pingTimer.scheduleAtFixedRate(new SendPing(), pingInterval, pingInterval); }
Source:
<code><START> private DelayDays(String value) { <END> this.value = value; }</code><technical_language>update generator remove modifier constructor stays package-private level</technical_language>

Target:
DelayDays(String value) { this.value = value; }
Source:
<code>public void initialize() throws Exception { if (dataSource == null) { logger.warn("No datasource was provided...using a Map based JobRepository"); if (this.transactionManager == null) { this.transactionManager = new ResourcelessTransactionManager(); } MapJobRepositoryFactoryBean jobRepositoryFactory = new MapJobRepositoryFactoryBean(this.transactionManager); jobRepositoryFactory.afterPropertiesSet(); this.jobRepository = jobRepositoryFactory.getObject(); MapJobExplorerFactoryBean jobExplorerFactory = new MapJobExplorerFactoryBean(jobRepositoryFactory); jobExplorerFactory.afterPropertiesSet(); this.jobExplorer = jobExplorerFactory.getObject(); <START> } <END> else { this.jobRepository = createJobRepository(); JobExplorerFactoryBean jobExplorerFactoryBean = new JobExplorerFactoryBean(); jobExplorerFactoryBean.setDataSource(this.dataSource); jobExplorerFactoryBean.afterPropertiesSet(); this.jobExplorer = jobExplorerFactoryBean.getObject(); } this.jobLauncher = createJobLauncher(); }</code><technical_language>this is correct in a Spring XD context. I need corrected, I Spring XD HSQLDB default. argue map job repository implementation option in Spring XD</technical_language>

Target:
public void initialize() { Assert.notNull(dataSource, "No dataSource was provided for Batch runtime configuration"); try { this.jobRepository = createJobRepository(); this.jobExplorer = createJobExplorer(); this.jobLauncher = createJobLauncher(); } catch (Exception ex) { throw new IllegalStateException("Unable to initialize Spring Batch", ex); } }