auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private Mono<DatabaseAccount> getDatabaseAccountAsync(URI serviceEndpoint) { final GlobalEndpointManager that = this; Callable<Mono<DatabaseAccount>> fetchDatabaseAccount = () -> { return that.owner.getDatabaseAccountFromEndpoint(serviceEndpoint).doOnNext(databaseAccount -> { if(databaseAccount != null) { this.latestDatabaseAccount = databaseAccount; } logger.debug("account retrieved: {}", databaseAccount); }).single(); }; Mono<DatabaseAccount> obsoleteValueMono = databaseAccountAsyncCache.getAsync(StringUtils.EMPTY, null, fetchDatabaseAccount); return obsoleteValueMono.flatMap(obsoleteValue -> { if (firstTimeDatabaseAccountInitialization.compareAndSet(true, false)) { return Mono.just(obsoleteValue); } return databaseAccountAsyncCache.getAsync(StringUtils.EMPTY, obsoleteValue, fetchDatabaseAccount).doOnError(t -> { databaseAccountAsyncCache.set(StringUtils.EMPTY, obsoleteValue); }); }); }

Target:
private Mono<DatabaseAccount> getDatabaseAccountAsync(URI serviceEndpoint) { return this.owner.getDatabaseAccountFromEndpoint(serviceEndpoint) .doOnNext(databaseAccount -> { if(databaseAccount != null) { this.latestDatabaseAccount = databaseAccount; } logger.debug("account retrieved: {}", databaseAccount); }).single(); }
Source:
private CommentUtils() { throw new AssertionError(); }

Target:
private CommentUtils() { }
Source:
public void patchReplacePasswordWithRandomTokenPatchFail() throws Exception { context.turnOffAuthorisationSystem(); EPerson ePerson = EPersonBuilder.createEPerson(context) .withNameInMetadata("John", "Doe") .withEmail("Johndoe@fake-email.com") .withPassword(password) .build(); String newPassword = "newpassword"; context.restoreAuthSystemState(); List<Operation> ops = new ArrayList<Operation>(); ReplaceOperation replaceOperation = new ReplaceOperation("/password", newPassword); ops.add(replaceOperation); String patchBody = getPatchContent(ops); accountService.sendRegistrationInfo(context, ePerson.getEmail()); String tokenForEPerson = registrationDataService.findByEmail(context, ePerson.getEmail()).getToken(); String token = getAuthToken(admin.getEmail(), password); PasswordHash oldPassword = ePersonService.getPasswordHash(ePerson); getClient(token).perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON) .param("token", "RandomToken")) .andExpect(status().isForbidden()); PasswordHash newPasswordHash = ePersonService.getPasswordHash(ePerson); assertTrue(StringUtils.equalsIgnoreCase(oldPassword.getHashString(),newPasswordHash.getHashString())); assertFalse(registrationDataService.findByEmail(context, ePerson.getEmail()) == null); assertTrue(StringUtils.equals(registrationDataService.findByEmail(context, ePerson.getEmail()).getToken(), tokenForEPerson)); context.turnOffAuthorisationSystem(); registrationDataService.deleteByToken(context, tokenForEPerson); context.restoreAuthSystemState(); }

Target:
public void patchReplacePasswordWithRandomTokenPatchFail() throws Exception { context.turnOffAuthorisationSystem(); EPerson ePerson = EPersonBuilder.createEPerson(context) .withNameInMetadata("John", "Doe") .withEmail("Johndoe@fake-email.com") .withPassword(password) .build(); String newPassword = "newpassword"; context.restoreAuthSystemState(); List<Operation> ops = new ArrayList<Operation>(); ReplaceOperation replaceOperation = new ReplaceOperation("/password", newPassword); ops.add(replaceOperation); String patchBody = getPatchContent(ops); accountService.sendRegistrationInfo(context, ePerson.getEmail()); String tokenForEPerson = registrationDataService.findByEmail(context, ePerson.getEmail()).getToken(); PasswordHash oldPassword = ePersonService.getPasswordHash(ePerson); getClient().perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON) .param("token", "RandomToken")) .andExpect(status().isUnauthorized()); PasswordHash newPasswordHash = ePersonService.getPasswordHash(ePerson); assertEquals(oldPassword.getHashString(),newPasswordHash.getHashString()); assertNotNull(registrationDataService.findByEmail(context, ePerson.getEmail())); assertEquals(registrationDataService.findByEmail(context, ePerson.getEmail()).getToken(), tokenForEPerson); context.turnOffAuthorisationSystem(); registrationDataService.deleteByToken(context, tokenForEPerson); context.restoreAuthSystemState(); }
Source:
private int getCourseAccountId(String courseId){ M_log.debug("getCourseAccountId() call"); int course_account_id = 0; String url = canvasURL + "/api/v1/courses/" + courseId; M_log.info("API call "+url); HttpResponse response = processApiCall(new HttpGet(url)); if (response == null) { return 0; } int statusCode = response.getStatusLine().getStatusCode(); if (statusCode != HttpStatus.SC_OK) { return course_account_id; } String courseData = null; try { courseData = EntityUtils.toString(response.getEntity(), "UTF-8"); } catch (IOException e) { e.printStackTrace(); } JSONObject courseJson = new JSONObject(courseData); course_account_id = (int) courseJson.get("account_id"); return course_account_id; }

Target:
private int getCourseAccountId(String courseId){ M_log.debug("getCourseAccountId() call"); int course_account_id = 0; String url = makeCanvasURL("/courses/" + courseId); HttpResponse response = processApiCall(new HttpGet(url)); if (response == null) { return 0; } int statusCode = response.getStatusLine().getStatusCode(); if (statusCode != HttpStatus.SC_OK) { return course_account_id; } String courseData = null; String errMsg = "As part of SubAccountAdmin check, couldn't get accountId the course %s belong to"; try { courseData = EntityUtils.toString(response.getEntity(), "UTF-8"); } catch (IOException e) { M_log.error(String.format(errMsg, courseId)); return 0; } catch (Exception e) { M_log.error(String.format(errMsg, courseId)); return 0; } JSONObject courseJson = new JSONObject(courseData); if (!courseJson.isNull("account_id")) { course_account_id = (int) courseJson.get("account_id"); } return course_account_id; }
Source:
public void testWindowsReservedNames() { if (!SystemReader.getInstance().isWindows()) return; assertValid(false, "refs/heads/con"); assertValid(false, "refs/con/x"); assertValid(false, "con/heads/x"); assertValid(true, "refs/heads/conx"); assertValid(true, "refs/heads/xcon"); }

Target:
public void testWindowsReservedNames() { SystemReader original = SystemReader.getInstance(); try { SystemReader.setInstance(new MockSystemReader() { public boolean isWindows() { return true; } }); assertValid(false, "refs/heads/con"); assertValid(false, "refs/con/x"); assertValid(false, "con/heads/x"); assertValid(true, "refs/heads/conx"); assertValid(true, "refs/heads/xcon"); } finally { SystemReader.setInstance(original); } }
Source:
private void saveUserWithRoles(String username, Set<String> roles) { UserEntity user = new UserEntity(username); user.setPassword("password"); user.setSecurityTokenKey("security-token"); Set<UserRole> userRoles = roles.stream() .map(role -> new UserRoleEntity(role)) .collect(Collectors.toSet()); user.setRoles(userRoles); user.setEnabled(true); user.setLastUpdated(EntityTraversalUtils.toLocalDateTime(new Date())); userRepository.save(user); }

Target:
private void saveUserWithRoles(String username, Set<String> roles) { UserEntity user = new UserEntity(username); user.setPassword("password"); user.setSecurityTokenKey("security-token"); Set<SecurityRole> userRoles = roles.stream() .map(SecurityRoleEntity::new) .collect(Collectors.toSet()); user.setRoles(userRoles); user.setEnabled(true); user.setLastUpdated(EntityTraversalUtils.toLocalDateTime(new Date())); userRepository.save(user); }
Source:
public static MergeStrategy getMergeStrategy(Map<String, String> taskConfigs) { String mergeStrategyTypeStr = taskConfigs.getOrDefault(MinionConstants.MergeRollupTask.MERGE_STRATEGY_TYPE, MergeStrategyType.TIME.name()); MergeStrategyType mergeStrategyType; try { mergeStrategyType = MergeStrategyType.valueOf(mergeStrategyTypeStr.toUpperCase()); } catch (IllegalArgumentException e) { mergeStrategyType = MergeStrategyType.TIME; } switch (mergeStrategyType) { case TIME: return new TimeBasedMergeStrategy(taskConfigs); default: throw new RuntimeException("Unsupported merge strategy type."); } }

Target:
public static MergeStrategy getMergeStrategy(Map<String, String> taskConfigs) { String mergeStrategyTypeStr = taskConfigs.getOrDefault(MinionConstants.MergeRollupTask.MERGE_STRATEGY_TYPE, MergeStrategyType.TIME.name()); MergeStrategyType mergeStrategyType; try { mergeStrategyType = MergeStrategyType.valueOf(mergeStrategyTypeStr.toUpperCase()); } catch (IllegalArgumentException e) { LOGGER.error("Invalid merge type: {}", mergeStrategyTypeStr); throw e; } switch (mergeStrategyType) { case TIME: return new TimeBasedMergeStrategy(taskConfigs); default: throw new RuntimeException("Unsupported merge strategy type."); } }
Source:
public List<String> getTemplateDetails() throws Exception { int index = triggerRowToggle(templatesTable, "First template"); Thread.sleep(5000); WebElement detailsTable = Browser.getDriver() .findElement(By.id(TEMPLATE_TABLE + ":" + index + ":templateDetailTable")); Thread.sleep(5000); return new ArrayList<>(); }

Target:
public List<String> getTemplateDetails() { int index = triggerRowToggle(templatesTable, "First template"); WebElement detailsTable = Browser.getDriver() .findElement(By.id(TEMPLATE_TABLE + ":" + index + ":templateDetailTable")); return new ArrayList<>(); }
Source:
protected void validateSubmit(SchedulerStateManagerAdaptor adaptor, String topologyName) throws TopologySubmissionException { Boolean isTopologyRunning = adaptor.isTopologyRunning(topologyName); if (isTopologyRunning != null && isTopologyRunning.equals(Boolean.TRUE)) { throw new TopologySubmissionException("Topology already exists"); } }

Target:
protected void validateSubmit(SchedulerStateManagerAdaptor adaptor, String topologyName) throws TopologySubmissionException { Boolean isTopologyRunning = adaptor.isTopologyRunning(topologyName); if (isTopologyRunning != null && isTopologyRunning.equals(Boolean.TRUE)) { throw new TopologySubmissionException( String.format("Topology '%s' already exists", topologyName)); } }
Source:
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession(); Matcher keyMatched = getKeyPattern.matcher(req.getRequestURI()); if (keyMatched.find()) { String[] split = keyMatched.group().split("/"); String key = split[1]; Object value = session.getAttribute(key); System.out.println("get sessionId="+session.getId()+" key="+key+" val="+value); if(value==null){ resp.getWriter().write("key="+key+" Not found in session "+session.getId()); } else{ resp.getWriter().write(value.toString()); } } }

Target:
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession(); Matcher keyMatched = getKeyPattern.matcher(req.getRequestURI()); if (keyMatched.find()) { String[] split = keyMatched.group().split("/"); String key = split[1]; Object value = session.getAttribute(key); if(value==null){ resp.getWriter().write("key="+key+" Not found in session "+session.getId()); } else{ resp.getWriter().write(value.toString()); } } }
Source:
public EObject updateCreatedObject(EObject newObject, String loadedVersion) { EObject returnedValue = newObject; for (IMigrationParticipant contribution : delegatesParticipants) { returnedValue = contribution.updateCreatedObject(newObject, loadedVersion); } return returnedValue; }

Target:
public EObject updateCreatedObject(EObject newObject, String loadedVersion) { EObject returnedValue = null; for (IMigrationParticipant contribution : delegatesParticipants) { returnedValue = contribution.updateCreatedObject(newObject, loadedVersion); if (returnedValue != null) { break; } } return returnedValue; }
Source:
public OrderRequestBuilder withAuthorisationDetails(AuthCardDetails authCardDetails) { OrderRequestBuilder orderRequestBuilder = super.withAuthorisationDetails(authCardDetails); authCardDetails.getAddress().ifPresent(address -> northAmericanRegionMapper.getNorthAmericanRegionForCountry(address) .ifPresent(stateOrProvince -> smartpayTemplateData.setStateOrProvince(stateOrProvince.getAbbreviation())) ); return orderRequestBuilder; }

Target:
public OrderRequestBuilder withAuthorisationDetails(AuthCardDetails authCardDetails) { OrderRequestBuilder orderRequestBuilder = super.withAuthorisationDetails(authCardDetails); authCardDetails.getAddress() .flatMap(northAmericanRegionMapper::getNorthAmericanRegionForCountry) .map(NorthAmericaRegion::getAbbreviation) .ifPresent(smartpayTemplateData::setStateOrProvince); return orderRequestBuilder; }
Source:
public Class<T> getBaseClass() { return baseClass; }

Target:
public Class<? extends T> getBaseClass() { return baseClass; }
Source:
public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, byte[] authenticationData) { return withContext(context -> client.encrypt(algorithm, plaintext, context, iv, authenticationData)).block(); }

Target:
public EncryptResult encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, byte[] iv, byte[] authenticationData) { return encrypt(algorithm, plaintext, iv, authenticationData, Context.NONE); }
Source:
public UsageEventType(String componentName, String componentVersion, String categoryName, String actionName, String labelDescription, String valueDescription) { if(componentName == null) { throw new IllegalArgumentException("Component name may not be null"); } componentName = componentName.replaceAll("\\s", "-"); if(componentVersion == null) { throw new IllegalArgumentException("Component version may not be null"); } if(actionName == null) { throw new IllegalArgumentException("Action name may not be null"); } actionName = actionName.replaceAll("\\s", "-"); if(categoryName == null) { categoryName = componentName; } categoryName = categoryName.replaceAll("\\s", "-"); this.componentName = componentName; this.componentVersion = componentVersion; this.categoryName = categoryName; this.actionName = actionName; this.labelDescription = labelDescription; this.valueDescription = valueDescription; }

Target:
public UsageEventType(String componentName, String componentVersion, String categoryName, String actionName, String labelDescription, String valueDescription) { Assert.isLegal(componentName!=null, "Component name may not be null"); Assert.isLegal(componentVersion!=null, "Component version may not be null"); Assert.isLegal(actionName != null, "Action name may not be null"); this.componentName = componentName.replaceAll("\\s", "-");; this.componentVersion = componentVersion; if(categoryName == null) { this.categoryName = this.componentName; } else { this.categoryName = categoryName.replaceAll("\\s", "-"); } this.actionName = actionName.replaceAll("\\s", "-");; this.labelDescription = labelDescription; this.valueDescription = valueDescription; }
Source:
protected void run() throws Exception { if (localName != null && gitdir != null) throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments); final URIish uri = new URIish(sourceUri); File localNameF; if (localName == null) { try { localName = uri.getHumanishName() + (isBare ? Constants.DOT_GIT : ""); localNameF = new File(SystemReader.getInstance().getProperty( Constants.OS_USER_DIR), localName); } catch (IllegalArgumentException e) { throw die(MessageFormat.format( CLIText.get().cannotGuessLocalNameFrom, sourceUri)); } } else localNameF = new File(localName); if (branch == null) branch = Constants.HEAD; CloneCommand command = Git.cloneRepository(); command.setURI(sourceUri).setRemote(remoteName).setBare(isBare) .setNoCheckout(noCheckout).setBranch(branch) .setCloneSubmodules(cloneSubmodules); command.setGitDir(gitdir == null ? null : new File(gitdir)); command.setDirectory(localNameF); boolean msgs = quiet == null || !quiet.booleanValue(); if (msgs) { command.setProgressMonitor(new TextProgressMonitor(errw)) .setCallback(this); outw.println(MessageFormat.format( CLIText.get().cloningInto, localName)); outw.flush(); } try { db = command.call().getRepository(); if (msgs && db.resolve(Constants.HEAD) == null) outw.println(CLIText.get().clonedEmptyRepository); } catch (InvalidRemoteException e) { throw die(MessageFormat.format(CLIText.get().doesNotExist, sourceUri)); } finally { if (db != null) db.close(); } if (msgs) { outw.println(); outw.flush(); } }

Target:
protected void run() throws Exception { if (localName != null && gitdir != null) throw die(CLIText.get().conflictingUsageOf_git_dir_andArguments); final URIish uri = new URIish(sourceUri); File localNameF; if (localName == null) { try { localName = uri.getHumanishName() + (isBare ? Constants.DOT_GIT_EXT : ""); localNameF = new File(SystemReader.getInstance().getProperty( Constants.OS_USER_DIR), localName); } catch (IllegalArgumentException e) { throw die(MessageFormat.format( CLIText.get().cannotGuessLocalNameFrom, sourceUri)); } } else localNameF = new File(localName); if (branch == null) branch = Constants.HEAD; CloneCommand command = Git.cloneRepository(); command.setURI(sourceUri).setRemote(remoteName).setBare(isBare) .setNoCheckout(noCheckout).setBranch(branch) .setCloneSubmodules(cloneSubmodules); command.setGitDir(gitdir == null ? null : new File(gitdir)); command.setDirectory(localNameF); boolean msgs = quiet == null || !quiet.booleanValue(); if (msgs) { command.setProgressMonitor(new TextProgressMonitor(errw)) .setCallback(this); outw.println(MessageFormat.format( CLIText.get().cloningInto, localName)); outw.flush(); } try { db = command.call().getRepository(); if (msgs && db.resolve(Constants.HEAD) == null) outw.println(CLIText.get().clonedEmptyRepository); } catch (InvalidRemoteException e) { throw die(MessageFormat.format(CLIText.get().doesNotExist, sourceUri)); } finally { if (db != null) db.close(); } if (msgs) { outw.println(); outw.flush(); } }
Source:
public PythonFunctionRegistrar(final ConnectionInfo connectionInfo) throws DbException { Preconditions.checkArgument( connectionInfo.getDbms().equals(MyriaConstants.STORAGE_SYSTEM_POSTGRESQL), "Profiling only supported with Postgres JDBC connection"); accessMethod = (JdbcAccessMethod) AccessMethod.of(connectionInfo.getDbms(), connectionInfo, false); accessMethod.createUnloggedTableIfNotExists( MyriaConstants.PYUDF_RELATION, MyriaConstants.PYUDF_SCHEMA); udfs = new TupleBatchBuffer(MyriaConstants.PYUDF_SCHEMA); }

Target:
public PythonFunctionRegistrar(final ConnectionInfo connectionInfo) throws DbException { Preconditions.checkArgument( connectionInfo.getDbms().equals(MyriaConstants.STORAGE_SYSTEM_POSTGRESQL), "Python functions only supported with Postgres JDBC connection"); this.connectionInfo = connectionInfo; connect(); accessMethod.createUnloggedTableIfNotExists( MyriaConstants.PYUDF_RELATION, MyriaConstants.PYUDF_SCHEMA); pyFunctions = new TupleBatchBuffer(MyriaConstants.PYUDF_SCHEMA); }
Source:
public DataSerializableFactory createFactory() { ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN]; constructors[UPDATE_MAP_CONFIG] = arg -> new UpdateMapConfigOperation(); constructors[UPDATE_PERMISSION_CONFIG_OPERATION] = arg -> new UpdatePermissionConfigOperation(); constructors[PERMISSION_CONFIG_DTO] = arg -> new PermissionConfigDTO(); constructors[SET_LICENSE] = arg -> new SetLicenseOperation(); constructors[CHANGE_CLUSTER_STATE] = arg -> new ChangeClusterStateOperation(); return new ArrayDataSerializableFactory(constructors); }

Target:
public DataSerializableFactory createFactory() { ConstructorFunction<Integer, IdentifiedDataSerializable>[] constructors = new ConstructorFunction[LEN]; constructors[UPDATE_MAP_CONFIG] = arg -> new UpdateMapConfigOperation(); constructors[SET_LICENSE] = arg -> new SetLicenseOperation(); constructors[CHANGE_CLUSTER_STATE] = arg -> new ChangeClusterStateOperation(); constructors[UPDATE_PERMISSION_CONFIG_OPERATION] = arg -> new UpdatePermissionConfigOperation(); return new ArrayDataSerializableFactory(constructors); }
Source:
Map<Token, Set<Host>> computeTokenToReplicaMap(String keyspaceName, Map<Token, Host> tokenToPrimary, List<Token> ring) { int rf = Math.min(replicationFactor, ring.size()); Map<Host, Set<Host>> hostSetMap = new HashMap<Host, Set<Host>>(); Map<Token, Set<Host>> replicaMap = new HashMap<Token, Set<Host>>(tokenToPrimary.size()); for (int i = 0; i < ring.size(); i++) { Host primaryHost = tokenToPrimary.get(getTokenWrapping(i, ring)); Set<Host> replicas = hostSetMap.get(primaryHost); if (replicas == null) { replicas = new LinkedHashSet<Host>(); replicas.add(primaryHost); for (int j = 1; j < ring.size() && replicas.size() < rf; j++) replicas.add(tokenToPrimary.get(getTokenWrapping(i + j, ring))); hostSetMap.put(primaryHost, replicas = ImmutableSet.copyOf(replicas)); } replicaMap.put(ring.get(i), replicas); } return replicaMap; }

Target:
Map<Token, Set<Host>> computeTokenToReplicaMap(String keyspaceName, Map<Token, Host> tokenToPrimary, List<Token> ring) { int rf = Math.min(replicationFactor, ring.size()); Map<Token, Set<Host>> replicaMap = new HashMap<Token, Set<Host>>(tokenToPrimary.size()); for (int i = 0; i < ring.size(); i++) { Set<Host> replicas = new LinkedHashSet<Host>(); for (int j = 0; j < ring.size() && replicas.size() < rf; j++) replicas.add(tokenToPrimary.get(getTokenWrapping(i+j, ring))); replicaMap.put(ring.get(i), ImmutableSet.copyOf(replicas)); } return replicaMap; }
Source:
private boolean validateNoActiveImageTransfers(VDS vds) { List<ImageTransfer> transfers = imageTransferDao.getByVdsId(vds.getId()); if (!transfers.isEmpty() && !transfers.stream().allMatch(ImageTransfer::isPaused)) { List<String> replacements = new ArrayList<>(2); replacements.add(ReplacementUtils.createSetVariableString("host", vds.getName())); replacements.addAll(ReplacementUtils.replaceWith("disks", transfers.stream().map(ImageTransfer::getDiskId).collect(Collectors.toList()))); return failValidation(EngineMessage.VDS_CANNOT_MAINTENANCE_HOST_WITH_RUNNING_IMAGE_TRANSFERS, replacements); } return true; }

Target:
private boolean validateNoActiveImageTransfers(VDS vds) { List<ImageTransfer> transfers = imageTransferDao.getByVdsId(vds.getId()); if (!transfers.stream().allMatch(ImageTransfer::isPaused)) { List<String> replacements = new ArrayList<>(3); replacements.add(ReplacementUtils.createSetVariableString("host", vds.getName())); replacements.addAll(ReplacementUtils.replaceWith("disks", transfers.stream() .filter(imageTransfer -> !imageTransfer.isPaused()) .map(ImageTransfer::getDiskId) .sorted() .collect(Collectors.toList()))); return failValidation(EngineMessage.VDS_CANNOT_MAINTENANCE_HOST_WITH_RUNNING_IMAGE_TRANSFERS, replacements); } return true; }
Source:
public Cluster getMappedCluster(String clusterName, Guid vmId, Map<String, String> clusterMap) { log.info("Mapping cluster '{}' for vm '{}'.", clusterName, vmId); return getRelatedEntity(clusterMap, clusterName, val -> clusterDao.getByName((String) val)); }

Target:
public Cluster getMappedCluster(String clusterName, Guid vmId, Map<String, String> clusterMap) { Cluster mappedCluster = getRelatedEntity(clusterMap, clusterName, val -> clusterDao.getByName((String) val)); log.info("Mapping cluster '{}' to '{}' for vm '{}'.", mappedCluster, clusterName, vmId); return mappedCluster; }
Source:
public boolean permit(ReqContext context, String operation, Map topology_conf) { LOG.info("[req "+ context.requestID()+ "] Access " + " from: " + (context.remoteAddress() == null? "null" : context.remoteAddress().toString()) + (context.principal() == null? "" : (" principal:"+ context.principal())) +" op:"+operation + (topology_conf == null? "" : (" topoology:"+topology_conf.get(Config.TOPOLOGY_NAME)))); return true; }

Target:
public boolean permit(ReqContext context, String operation, Map topology_conf) { return true; }
Source:
public boolean compare(IResource local, IResourceVariant remote) { if (!local.exists() || remote == null) { return false; } if (local instanceof IFile) { if (remote.isContainer()) { return false; } try { InputStream remoteStream = remote.getStorage( new NullProgressMonitor()).getContents(); InputStream stream = ((IFile) local).getContents(); byte[] remoteBytes = new byte[8096]; byte[] bytes = new byte[8096]; int remoteRead = remoteStream.read(remoteBytes); int read = stream.read(bytes); if (remoteRead != read) { return false; } while (Arrays.equals(bytes, remoteBytes)) { remoteRead = remoteStream.read(remoteBytes); read = stream.read(bytes); if (remoteRead != read) { return false; } else if (read == -1) { return Arrays.equals(bytes, remoteBytes); } } } catch (IOException e) { logException(e); return false; } catch (CoreException e) { logException(e); return false; } } else if (local instanceof IContainer) { if (!remote.isContainer()) { return false; } GitFolderResourceVariant gitVariant = (GitFolderResourceVariant) remote; return local.getFullPath().equals( gitVariant.getResource().getFullPath()); } return false; }

Target:
public boolean compare(IResource local, IResourceVariant remote) { if (!local.exists() || remote == null) { return false; } if (local instanceof IFile) { if (remote.isContainer()) { return false; } InputStream stream = null; InputStream remoteStream = null; try { remoteStream = remote.getStorage( new NullProgressMonitor()).getContents(); stream = ((IFile) local).getContents(); byte[] remoteBytes = new byte[8096]; byte[] bytes = new byte[8096]; int remoteRead = remoteStream.read(remoteBytes); int read = stream.read(bytes); if (remoteRead != read) { return false; } while (Arrays.equals(bytes, remoteBytes)) { remoteRead = remoteStream.read(remoteBytes); read = stream.read(bytes); if (remoteRead != read) { return false; } else if (read == -1) { return Arrays.equals(bytes, remoteBytes); } } } catch (IOException e) { logException(e); return false; } catch (CoreException e) { logException(e); return false; } finally { closeStream(stream); closeStream(remoteStream); } } else if (local instanceof IContainer) { if (!remote.isContainer()) { return false; } GitFolderResourceVariant gitVariant = (GitFolderResourceVariant) remote; return local.getFullPath().equals( gitVariant.getResource().getFullPath()); } return false; }
Source:
public static void validateBootConfig(BootConfig config) { if (config == null) { throw new BootConfigException("No boot config provided."); } if (config.configIsHybrid) { if (BootConfig.isAbsoluteUrl(config.getStartPage())) { throw new BootConfigException("Start page should not be absolute URL."); } if (config.isLocal() && config.getUnauthenticatedStartPage() != null) { SalesforceSDKLogger.w(TAG, UNAUTHENTICATED_START_PAGE + " set for local app, but it will never be used."); } if (!config.isLocal() && config.shouldAuthenticate() && config.getUnauthenticatedStartPage() != null) { SalesforceSDKLogger.w(TAG, UNAUTHENTICATED_START_PAGE + " set for remote app with authentication, but it will never be used."); } if (!config.isLocal() && !config.shouldAuthenticate() && (config.getUnauthenticatedStartPage() == null || config.getUnauthenticatedStartPage().length() == 0)) { throw new BootConfigException(UNAUTHENTICATED_START_PAGE + " required for remote app with deferred authentication."); } if (config.getUnauthenticatedStartPage() != null && config.getUnauthenticatedStartPage().length() > 0 && !BootConfig.isAbsoluteUrl(config.getUnauthenticatedStartPage())) { throw new BootConfigException(UNAUTHENTICATED_START_PAGE + " should be absolute URL."); } } }

Target:
public static void validateBootConfig(BootConfig config) { if (config == null) { throw new BootConfigException("No boot config provided."); } if (config.configIsHybrid) { if (BootConfig.isAbsoluteUrl(config.getStartPage())) { throw new BootConfigException("Start page should not be absolute URL."); } if (config.isLocal() && config.getUnauthenticatedStartPage() != null) { SalesforceSDKLogger.w(TAG, UNAUTHENTICATED_START_PAGE + " set for local app, but it will never be used."); } if (!config.isLocal() && config.shouldAuthenticate() && config.getUnauthenticatedStartPage() != null) { SalesforceSDKLogger.w(TAG, UNAUTHENTICATED_START_PAGE + " set for remote app with authentication, but it will never be used."); } if (!config.isLocal() && !config.shouldAuthenticate() && TextUtils.isEmpty(config.getUnauthenticatedStartPage())) { throw new BootConfigException(UNAUTHENTICATED_START_PAGE + " required for remote app with deferred authentication."); } if (!TextUtils.isEmpty(config.getUnauthenticatedStartPage()) && !BootConfig.isAbsoluteUrl(config.getUnauthenticatedStartPage())) { throw new BootConfigException(UNAUTHENTICATED_START_PAGE + " should be absolute URL."); } } }
Source:
public Sendgrid parseMimeMessageToSendgrid(MimeMessage message) throws MessagingException, JSONException, IOException { Sendgrid email = new Sendgrid(Config.SENDGRID_USERNAME, Config.SENDGRID_PASSWORD); for (int i = 0; i < message.getRecipients(Message.RecipientType.TO).length; i++) { email.addTo(message.getRecipients(Message.RecipientType.TO)[i].toString()); } String from = message.getFrom()[0].toString(); String html = message.getContent().toString(); if (from.contains("<") && from.contains(">")) { from = from.substring(from.indexOf("<") + 1, from.indexOf(">")); } email.setFrom(from) .setSubject(message.getSubject()) .setHtml(html) .setText(Jsoup.parse(html).text()); if (message.getRecipients(Message.RecipientType.BCC) != null && message.getRecipients(Message.RecipientType.BCC).length > 0) { email.setBcc(message.getRecipients(Message.RecipientType.BCC)[0].toString()); } if (message.getReplyTo() != null && message.getReplyTo().length > 0) { email.setReplyTo(message.getReplyTo()[0].toString()); } return email; }

Target:
public Sendgrid parseMimeMessageToSendgrid(MimeMessage message) throws MessagingException, JSONException, IOException { Sendgrid email = new Sendgrid(Config.SENDGRID_USERNAME, Config.SENDGRID_PASSWORD); for (int i = 0; i < message.getRecipients(Message.RecipientType.TO).length; i++) { email.addTo(message.getRecipients(Message.RecipientType.TO)[i].toString()); } String from = extractSenderEmail(message.getFrom()[0].toString()); String html = message.getContent().toString(); email.setFrom(from) .setSubject(message.getSubject()) .setHtml(html) .setText(Jsoup.parse(html).text()); if (message.getRecipients(Message.RecipientType.BCC) != null && message.getRecipients(Message.RecipientType.BCC).length > 0) { email.setBcc(message.getRecipients(Message.RecipientType.BCC)[0].toString()); } if (message.getReplyTo() != null && message.getReplyTo().length > 0) { email.setReplyTo(message.getReplyTo()[0].toString()); } return email; }
Source:
private void close() { if (timeoutBeforeNextMessageOperation != null && !timeoutBeforeNextMessageOperation.isDisposed()) { timeoutBeforeNextMessageOperation.dispose(); } }

Target:
public void close() { if (!nextMessageSubscriber.isDisposed()) { nextMessageSubscriber.dispose(); } }
Source:
TxnContext touch(@Nonnull Table<K, V, M> table, @Nonnull final K key) { if (!table.getNamespace().equals(namespace)) { throw new IllegalArgumentException("TxnContext can't apply table from namespace " + table.getNamespace() + " to transaction on namespace " + namespace); } tablesInTxn.add(table); operations.add(() -> { CorfuRecord<V, M> touchedObject = table.get(key); if (touchedObject != null) { table.put(key, touchedObject.getPayload(), touchedObject.getMetadata()); } else { txAbort(); log.error("TX Abort touch on non-existing object: in "+ table.getFullyQualifiedTableName()); throw new UnsupportedOperationException( "Attempt to touch() a non-existing object in " + table.getFullyQualifiedTableName()); } table.getMetrics().numTouches.incrementAndGet(); }); return this; }

Target:
TxnContext touch(@Nonnull Table<K, V, M> table, @Nonnull final K key) { validateTableWrittenIsInNamespace(table); operations.add(() -> { CorfuRecord<V, M> touchedObject = table.get(key); if (touchedObject != null) { table.put(key, touchedObject.getPayload(), touchedObject.getMetadata()); } else { txAbort(); log.error("TX Abort touch on non-existing object: in "+ table.getFullyQualifiedTableName()); throw new UnsupportedOperationException( "Attempt to touch() a non-existing object in " + table.getFullyQualifiedTableName()); } table.getMetrics().incNumTouches(); }); return this; }
Source:
public SelectionKey keyForId(String id) { SelectionKey key = this.keys.get(id); if (key == null) { throw new IllegalStateException( "Attempt to write to socket for which there is no open connection. Connection id " + id + " existing connections " + keys.keySet().toString()); } return key; }

Target:
private SelectionKey keyForId(String id) { SelectionKey key = this.keyMap.get(id); if (key == null) { throw new IllegalStateException( "Attempt to write to socket for which there is no open connection. Connection id " + id + " existing connections " + keyMap.keySet().toString()); } return key; }
Source:
public final String getChr() { return getContig(); }

Target:
public String getChr() { return getContig(); }
Source:
private void addSObjectField(XmlObject xmlObject, Schema fieldSchema, String fieldName, Object value) { fieldSchema = AvroUtils.unwrapIfNullable(fieldSchema); String javaClassFlag = fieldSchema.getProp(SchemaConstants.JAVA_CLASS_FLAG); if (LogicalTypes.timestampMillis() == fieldSchema.getLogicalType() || "java.util.Date".equals(javaClassFlag)) { xmlObject.setField(fieldName, SalesforceRuntime.convertDateToCalendar(new Date((Long) value))); } else { if (fieldSchema.getType() == Schema.Type.BYTES) { if ((value instanceof String) || (value instanceof byte[])) { byte[] base64Data = null; if (value instanceof byte[]) { base64Data = (byte[]) value; } else { base64Data = ((String) value).getBytes(); } if (Base64.isBase64(new String(base64Data))) { value = Base64.decode(base64Data); } } } else if ("java.math.BigDecimal".equals(javaClassFlag)) { value = new BigDecimal((String) value); } Schema.Field se = moduleSchema.getField(fieldName); if (se != null && value instanceof String) { xmlObject.setField(fieldName, SalesforceAvroRegistry.get().getConverterFromString(se).convertToAvro((String) value)); } else { xmlObject.setField(fieldName, value); } } }

Target:
private void addSObjectField(XmlObject xmlObject, Schema fieldSchema, String fieldName, Object value) { Schema basicSchema = AvroUtils.unwrapIfNullable(fieldSchema); if (LogicalTypeUtils.isLogicalTimestampMillis(basicSchema) || AvroUtils.isSameType(basicSchema, AvroUtils._date())) { xmlObject.setField(fieldName, SalesforceRuntime.convertDateToCalendar(new Date((Long) value))); } else { if (basicSchema.getType() == Schema.Type.BYTES) { byte[] base64Data = null; if (value instanceof String) { base64Data = ((String) value).getBytes(); } if (value instanceof byte[]) { base64Data = (byte[]) value; } if (Base64.isBase64(new String(base64Data))) { value = Base64.decode(base64Data); } } else if (AvroUtils.isSameType(basicSchema, AvroUtils._decimal())) { value = new BigDecimal((String) value); } Schema.Field se = moduleSchema.getField(fieldName); if (se != null && value instanceof String) { xmlObject.setField(fieldName, SalesforceAvroRegistry.get().getConverterFromString(se).convertToAvro((String) value)); } else { xmlObject.setField(fieldName, value); } } }
Source:
public static void toFile(Node node, File file, int indent, Map<String, String> namespaces) throws IOException { OutputStream out = null; try { Transformer transformer = TransformerFactory.newInstance().newTransformer(); if (indent > -1) { transformer.setOutputProperty(OutputKeys.INDENT, TRANSFORMER_INDENT_TRUE); transformer.setOutputProperty(TRANSFORMER_INDENT_VALUE, Integer.toString(indent)); } out = new FileOutputStream(file); transformer.transform(new DOMSource(toDocument(node, namespaces)), new StreamResult(out)); out.flush(); } catch (TransformerException e) { String message = e.getMessage(); throw new RuntimeException(message != null ? message : e.getClass().getSimpleName(), e); } finally { if (out != null) { out.close(); } } }

Target:
public static void toFile(Node node, File file, int indent, Map<String, String> namespaces) throws IOException { try (OutputStream out = new FileOutputStream(file)) { toStream(node, out, indent, namespaces, Optional.empty()); out.flush(); } }
Source:
public AmazonBucketIngester(ImportServiceFactory importServiceFactory, FileRepositoryCollectionFactory fileRepositoryCollectionFactory, FileMetaFactory fileMetaFactory, FileStore fileStore, AmazonBucketClient amazonBucketClient) { this.importServiceFactory = requireNonNull(importServiceFactory); this.fileRepositoryCollectionFactory = requireNonNull(fileRepositoryCollectionFactory); this.fileMetaFactory = requireNonNull(fileMetaFactory); this.fileStore = fileStore; this.amazonBucketClient = amazonBucketClient; }

Target:
public AmazonBucketIngester(ImportServiceFactory importServiceFactory, FileRepositoryCollectionFactory fileRepositoryCollectionFactory, FileMetaFactory fileMetaFactory, FileStore fileStore, AmazonBucketClient amazonBucketClient) { this.importServiceFactory = requireNonNull(importServiceFactory); this.fileRepositoryCollectionFactory = requireNonNull(fileRepositoryCollectionFactory); this.fileMetaFactory = requireNonNull(fileMetaFactory); this.fileStore = requireNonNull(fileStore); this.amazonBucketClient = requireNonNull(amazonBucketClient); }
Source:
private SimRobot(){ super(); nodeList.add(new HighTrustGPSLocalizer()); nodeList.add(new SimulatedImuNode(100)); nodeList.add(new SimulatedGPSNode(500)); nodeList.add(new SimulatedRBSMNode()); try { ArrayList<GpsMeasurement> wayPoints = WayPointUtil.createWayPointsFromWaypointList(RobobuggyConfigFile.getWaypointSourceLogFile()); nodeList.add(new WayPointFollowerPlanner(wayPoints)); } catch (FileNotFoundException e) { e.printStackTrace(); } SimulatedBuggy simBuggy = SimulatedBuggy.getInstance(); simBuggy.setY(LocalizerUtil.convertLatToMeters(40.441705)); simBuggy.setX(LocalizerUtil.convertLonToMeters(-79.941585)); simBuggy.setTh(-110); try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } simBuggy.setDx(10); nodeList.add(new LoggingNode(NodeChannel.GUI_LOGGING_BUTTON, RobobuggyConfigFile.LOG_FILE_LOCATION, NodeChannel.getLoggingChannels())); RobobuggyJFrame mainWindow = new RobobuggyJFrame("MainWindow",1.0,1.0); Gui.getInstance().addWindow(mainWindow); RobobuggyGUITabs tabs = new RobobuggyGUITabs(); mainWindow.addComponent(tabs, 0.0, 0.0, 1.0, 1.0); tabs.addTab(new MainGuiWindow(), "Home"); tabs.addTab(new AutonomousPanel(),"Autonomous"); tabs.addTab(new SimulationPanel(),"Simulation"); tabs.addTab(new PathPanel(),"Path Panel"); tabs.addTab(new ConfigurationPanel(), "Configuration"); }

Target:
private SimRobot(){ super(); nodeList.add(new HighTrustGPSLocalizer()); nodeList.add(new SimulatedImuNode(100)); nodeList.add(new SimulatedGPSNode(500)); nodeList.add(new SimulatedRBSMNode()); try { ArrayList<GpsMeasurement> wayPoints = WayPointUtil.createWayPointsFromWaypointList(RobobuggyConfigFile.getWaypointSourceLogFile()); nodeList.add(new WayPointFollowerPlanner(wayPoints)); } catch (FileNotFoundException e) { e.printStackTrace(); } SimulatedBuggy simBuggy = SimulatedBuggy.getInstance(); simBuggy.setY(LocalizerUtil.convertLatToMeters(40.441705)); simBuggy.setX(LocalizerUtil.convertLonToMeters(-79.941585)); simBuggy.setTh(-110); simBuggy.setDx(10); nodeList.add(new LoggingNode(NodeChannel.GUI_LOGGING_BUTTON, RobobuggyConfigFile.LOG_FILE_LOCATION, NodeChannel.getLoggingChannels())); RobobuggyJFrame mainWindow = new RobobuggyJFrame("MainWindow",1.0,1.0); Gui.getInstance().addWindow(mainWindow); RobobuggyGUITabs tabs = new RobobuggyGUITabs(); mainWindow.addComponent(tabs, 0.0, 0.0, 1.0, 1.0); tabs.addTab(new MainGuiWindow(), "Home"); tabs.addTab(new AutonomousPanel(),"Autonomous"); tabs.addTab(new SimulationPanel(),"Simulation"); tabs.addTab(new PathPanel(),"Path Panel"); tabs.addTab(new ConfigurationPanel(), "Configuration"); }
Source:
public void initializeProcessList() { Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); String originLink = params.get("linkId"); if (Objects.equals(originLink, "newProcess")) { NeuenVorgangAnlegen(); } else if (Objects.equals(originLink, "templates")) { FilterVorlagen(); } else if (Objects.equals(originLink, "allProcesses")) { FilterAktuelleProzesse(); } else { System.err.println("ERROR: did not recognize link ID '"+originLink+"'."); } setFilter(""); }

Target:
public void initializeProcessList() { Map<String,String> params = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap(); String originLink = params.get("linkId"); if (Objects.equals(originLink, "newProcess")) { NeuenVorgangAnlegen(); } else if (Objects.equals(originLink, "templates")) { FilterVorlagen(); } else if (Objects.equals(originLink, "allProcesses")) { FilterAktuelleProzesse(); } else { logger.error("ERROR: did not recognize link ID '" + originLink + "'."); } setFilter(""); }
Source:
public static Change.Source<? extends Change.Batch> buildKafkaPoller( String kafkaServers, Collection<String> clusterNames, Uris uris, int batchSize, Date startTime) { Map<String, Class<? extends ChangeEvent>> topicsToClass = clusterNamesAwareTopics(clusterNames); ImmutableSet<String> topics = ImmutableSet.copyOf(topicsToClass.keySet()); return new KafkaPoller(buildKafkaConsumer(kafkaServers, topicsToClass, batchSize), uris, startTime, batchSize, topics); }

Target:
public static KafkaPoller buildKafkaPoller( String kafkaServers, Collection<String> clusterNames, Uris uris, int batchSize, Date startTime) { Map<String, Class<? extends ChangeEvent>> topicsToClass = clusterNamesAwareTopics(clusterNames); ImmutableSet<String> topics = ImmutableSet.copyOf(topicsToClass.keySet()); return new KafkaPoller(buildKafkaConsumer(kafkaServers, topicsToClass, batchSize), uris, startTime, batchSize, topics); }
Source:
public Double getValue(ResultSet rs, long fid) throws ParameterException { try { if(rs.getRow() != fid) { rs.absolute((int)fid); } Object value = this.getFieldValue(rs, fid); if (value instanceof Double) { return (Double)value; } else { return null; } } catch (SQLException e) { throw new ParameterException(I18N.tr("Could not fetch feature attribute \"") + getColumnName() + "\"", e); } }

Target:
public Double getValue(ResultSet rs, long fid) throws ParameterException { try { if(rs.getRow() != fid) { rs.absolute((int)fid); } Object value = this.getFieldValue(rs, fid); if (value instanceof Double) { return (Double)value; } else { return null; } } catch (SQLException e) { throw new ParameterException(I18N.tr("Could not fetch feature attribute \"{0}\"", getColumnName()), e); } }
Source:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } HandleInstanceError that = (HandleInstanceError) o; return _errorMessage.equals(that._errorMessage); }

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } if (!super.equals(o)) { return false; } HandleInstanceError that = (HandleInstanceError) o; return Objects.equals(_errorMessage, that._errorMessage); }
Source:
public void setQuery(String query) { this.query = query; }

Target:
public void setQuery(String query) { this.query = query; if (!query.isEmpty()) { try { final XPathEvaluator xpathEvaluator = new XPathEvaluator(Configuration.newConfiguration()); xpathExpression = xpathEvaluator.createExpression(query); } catch (XPathException ex) { throw new IllegalStateException("Creating Xpath expression failed: " + query, ex); } } }
Source:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (dropDuplicates ? 1231 : 1237); result = prime * result + ObjectUtils.nullSafeHashCode(indexFields); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + (sparse ? 1231 : 1237); result = prime * result + (unique ? 1231 : 1237); result = prime * result + ((language == null) ? 0 : language.hashCode()); return result; }

Target:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (dropDuplicates ? 1231 : 1237); result = prime * result + ObjectUtils.nullSafeHashCode(indexFields); result = prime * result + ((name == null) ? 0 : name.hashCode()); result = prime * result + (sparse ? 1231 : 1237); result = prime * result + (unique ? 1231 : 1237); result = prime * result + ObjectUtils.nullSafeHashCode(language); return result; }
Source:
protected void onContextMenu(ContextMenuEvent event) { final int eventX = event.getNativeEvent().getClientX(); final int eventY = event.getNativeEvent().getClientY(); event.preventDefault(); event.stopPropagation(); Scheduler.get().scheduleDeferred(() -> { if (hasActionButtons()) { updateContextMenu(menu, actionButtonList); menuContainer.addStyleName(OPEN); clickButton.getElement().setAttribute(ARIA_EXPANDED, Boolean.TRUE.toString()); menuContainer.getElement().getStyle().setPosition(Position.ABSOLUTE); menuContainer.getElement().getStyle().setTop(Window.getScrollTop() + eventY, Unit.PX); menuContainer.getElement().getStyle().setLeft(eventX, Unit.PX); } }); }

Target:
protected void onContextMenu(ContextMenuEvent event) { final int eventX = event.getNativeEvent().getClientX(); final int eventY = event.getNativeEvent().getClientY(); event.preventDefault(); event.stopPropagation(); Scheduler.get().scheduleDeferred(() -> { if (hasActionButtons()) { updateContextMenu(menu, actionButtonList); styleAndPositionMenuContainer(eventX, eventY); } }); }
Source:
protected void executeRuntimeStep(OperationContext context, ModelNode operation) { String name = this.nameExtractor.apply(operation); Operation<C> executable = this.executables.get(name); try { ModelNode result = this.executor.execute(context, operation, executable); if (result != null) { context.getResult().set(result); } } catch (OperationFailedException e) { context.getFailureDescription().set(e.getLocalizedMessage()); } context.completeStep(OperationContext.ResultHandler.NOOP_RESULT_HANDLER); }

Target:
protected void executeRuntimeStep(OperationContext context, ModelNode operation) { String name = Operations.getName(operation); Operation<C> executable = this.executables.get(name); try { ModelNode result = this.executor.execute(context, operation, executable); if (result != null) { context.getResult().set(result); } } catch (OperationFailedException e) { context.getFailureDescription().set(e.getLocalizedMessage()); } context.completeStep(OperationContext.ResultHandler.NOOP_RESULT_HANDLER); }
Source:
private static String getMessage(String[] strings) { if (strings.length < 1) return "info: Hello World!"; return Stream.of(strings).collect(Collectors.joining(" ")); }

Target:
private static String getMessage(String[] strings) { if (strings.length < 1) return "info: Hello World!"; return String.join(" ", strings); }