id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
131,700
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/UserInfoServiceImpl.java
UserInfoServiceImpl.isUserValid
@Override public boolean isUserValid(String userId, AuthType authType) { if (userInfoRepository.findByUsernameAndAuthType(userId, authType) != null) { return true; } else { if (authType == AuthType.LDAP) { try { return searchLdapUser(userId); } catch (NamingException ne) { LOGGER.error("Fai...
java
@Override public boolean isUserValid(String userId, AuthType authType) { if (userInfoRepository.findByUsernameAndAuthType(userId, authType) != null) { return true; } else { if (authType == AuthType.LDAP) { try { return searchLdapUser(userId); } catch (NamingException ne) { LOGGER.error("Fai...
[ "@", "Override", "public", "boolean", "isUserValid", "(", "String", "userId", ",", "AuthType", "authType", ")", "{", "if", "(", "userInfoRepository", ".", "findByUsernameAndAuthType", "(", "userId", ",", "authType", ")", "!=", "null", ")", "{", "return", "true...
Can be called to check validity of userId when creating a dashboard remotely via api @param userId @param authType @return
[ "Can", "be", "called", "to", "check", "validity", "of", "userId", "when", "creating", "a", "dashboard", "remotely", "via", "api" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/UserInfoServiceImpl.java#L134-L150
131,701
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java
DashboardRemoteServiceImpl.getOwners
private List<Owner> getOwners(DashboardRemoteRequest request) throws HygieiaException { DashboardRemoteRequest.DashboardMetaData metaData = request.getMetaData(); Owner owner = metaData.getOwner(); List<Owner> owners = metaData.getOwners(); if (owner == null && CollectionUtils.isEmpty(o...
java
private List<Owner> getOwners(DashboardRemoteRequest request) throws HygieiaException { DashboardRemoteRequest.DashboardMetaData metaData = request.getMetaData(); Owner owner = metaData.getOwner(); List<Owner> owners = metaData.getOwners(); if (owner == null && CollectionUtils.isEmpty(o...
[ "private", "List", "<", "Owner", ">", "getOwners", "(", "DashboardRemoteRequest", "request", ")", "throws", "HygieiaException", "{", "DashboardRemoteRequest", ".", "DashboardMetaData", "metaData", "=", "request", ".", "getMetaData", "(", ")", ";", "Owner", "owner", ...
Creates a list of unique owners from the owner and owners requests @param request @return List<Owner> list of owners to be added to the dashboard @throws HygieiaException
[ "Creates", "a", "list", "of", "unique", "owners", "from", "the", "owner", "and", "owners", "requests" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java#L72-L90
131,702
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java
DashboardRemoteServiceImpl.generateRequestWidgetList
private Map < String, WidgetRequest > generateRequestWidgetList( List < DashboardRemoteRequest.Entry > entries, Dashboard dashboard ) throws HygieiaException { Map< String, WidgetRequest > allWidgetRequests = new HashMap<>(); //builds widgets for ( DashboardRemoteRequest.Entry entry : entries )...
java
private Map < String, WidgetRequest > generateRequestWidgetList( List < DashboardRemoteRequest.Entry > entries, Dashboard dashboard ) throws HygieiaException { Map< String, WidgetRequest > allWidgetRequests = new HashMap<>(); //builds widgets for ( DashboardRemoteRequest.Entry entry : entries )...
[ "private", "Map", "<", "String", ",", "WidgetRequest", ">", "generateRequestWidgetList", "(", "List", "<", "DashboardRemoteRequest", ".", "Entry", ">", "entries", ",", "Dashboard", "dashboard", ")", "throws", "HygieiaException", "{", "Map", "<", "String", ",", "...
Generates a Widget Request list of Widgets to be created from the request @param entries @param dashboard @return Map< String, WidgetRequest > list of Widgets to be created @throws HygieiaException
[ "Generates", "a", "Widget", "Request", "list", "of", "Widgets", "to", "be", "created", "from", "the", "request" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java#L180-L203
131,703
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java
DashboardRemoteServiceImpl.findExistingDashboardsFromRequest
private List< Dashboard > findExistingDashboardsFromRequest( DashboardRemoteRequest request ) { String businessService = request.getMetaData().getBusinessService(); String businessApplication = request.getMetaData().getBusinessApplication(); if( !StringUtils.isEmpty( businessService ) && !Strin...
java
private List< Dashboard > findExistingDashboardsFromRequest( DashboardRemoteRequest request ) { String businessService = request.getMetaData().getBusinessService(); String businessApplication = request.getMetaData().getBusinessApplication(); if( !StringUtils.isEmpty( businessService ) && !Strin...
[ "private", "List", "<", "Dashboard", ">", "findExistingDashboardsFromRequest", "(", "DashboardRemoteRequest", "request", ")", "{", "String", "businessService", "=", "request", ".", "getMetaData", "(", ")", ".", "getBusinessService", "(", ")", ";", "String", "busines...
Takes a DashboardRemoteRequest. If the request contains a Business Service and Business Application then returns dashboard. Otherwise, Checks dashboards for existing Title and returns dashboards. @param request @return List< Dashboard >
[ "Takes", "a", "DashboardRemoteRequest", ".", "If", "the", "request", "contains", "a", "Business", "Service", "and", "Business", "Application", "then", "returns", "dashboard", ".", "Otherwise", "Checks", "dashboards", "for", "existing", "Title", "and", "returns", "...
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java#L210-L219
131,704
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java
DashboardRemoteServiceImpl.entryToWidgetRequest
private WidgetRequest entryToWidgetRequest(Dashboard dashboard, DashboardRemoteRequest.Entry entry, Collector collector) throws HygieiaException { WidgetRequest request = new WidgetRequest(); CollectorItem item = entryToCollectorItem(entry, collector); if (item != null) { request.set...
java
private WidgetRequest entryToWidgetRequest(Dashboard dashboard, DashboardRemoteRequest.Entry entry, Collector collector) throws HygieiaException { WidgetRequest request = new WidgetRequest(); CollectorItem item = entryToCollectorItem(entry, collector); if (item != null) { request.set...
[ "private", "WidgetRequest", "entryToWidgetRequest", "(", "Dashboard", "dashboard", ",", "DashboardRemoteRequest", ".", "Entry", "entry", ",", "Collector", "collector", ")", "throws", "HygieiaException", "{", "WidgetRequest", "request", "=", "new", "WidgetRequest", "(", ...
Creates a widget from entry @param dashboard @param entry @return WidgetRequest
[ "Creates", "a", "widget", "from", "entry" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java#L235-L247
131,705
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java
DashboardRemoteServiceImpl.requestToDashboard
private Dashboard requestToDashboard(DashboardRemoteRequest request) throws HygieiaException { DashboardRemoteRequest.DashboardMetaData metaData = request.getMetaData(); Application application = new Application(metaData.getApplicationName(), new Component(metaData.getComponentName())); String a...
java
private Dashboard requestToDashboard(DashboardRemoteRequest request) throws HygieiaException { DashboardRemoteRequest.DashboardMetaData metaData = request.getMetaData(); Application application = new Application(metaData.getApplicationName(), new Component(metaData.getComponentName())); String a...
[ "private", "Dashboard", "requestToDashboard", "(", "DashboardRemoteRequest", "request", ")", "throws", "HygieiaException", "{", "DashboardRemoteRequest", ".", "DashboardMetaData", "metaData", "=", "request", ".", "getMetaData", "(", ")", ";", "Application", "application",...
Creates a Dashboard object from the request. @param request @return Dashboard @throws HygieiaException
[ "Creates", "a", "Dashboard", "object", "from", "the", "request", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardRemoteServiceImpl.java#L257-L274
131,706
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java
ApplicationScoreService.getDashboardScoreFromWidgets
private ScoreWeight getDashboardScoreFromWidgets(List<ScoreWeight> widgetScores) { if (null == widgetScores) { return getDashboardScore(new ScoreTypeValue(Constants.ZERO_SCORE), widgetScores); } try { //Calculate score return getDashboardScore( ScoreCalculationUtils.calculateCompo...
java
private ScoreWeight getDashboardScoreFromWidgets(List<ScoreWeight> widgetScores) { if (null == widgetScores) { return getDashboardScore(new ScoreTypeValue(Constants.ZERO_SCORE), widgetScores); } try { //Calculate score return getDashboardScore( ScoreCalculationUtils.calculateCompo...
[ "private", "ScoreWeight", "getDashboardScoreFromWidgets", "(", "List", "<", "ScoreWeight", ">", "widgetScores", ")", "{", "if", "(", "null", "==", "widgetScores", ")", "{", "return", "getDashboardScore", "(", "new", "ScoreTypeValue", "(", "Constants", ".", "ZERO_S...
Calculate dashboard score from widget score settings @param widgetScores widget score settings @return dashboard score
[ "Calculate", "dashboard", "score", "from", "widget", "score", "settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java#L104-L123
131,707
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java
ApplicationScoreService.processWidgetScores
private List<ScoreWeight> processWidgetScores(List<Widget> widgets, ScoreCriteriaSettings scoreCriteriaSettings) { List<ScoreWeight> scoreWeights = new ArrayList<>(); Map<String, ScoreComponentSettings> scoreParamSettingsMap = generateWidgetSettings(scoreCriteriaSettings); Set<String> widgetTypes = scoreP...
java
private List<ScoreWeight> processWidgetScores(List<Widget> widgets, ScoreCriteriaSettings scoreCriteriaSettings) { List<ScoreWeight> scoreWeights = new ArrayList<>(); Map<String, ScoreComponentSettings> scoreParamSettingsMap = generateWidgetSettings(scoreCriteriaSettings); Set<String> widgetTypes = scoreP...
[ "private", "List", "<", "ScoreWeight", ">", "processWidgetScores", "(", "List", "<", "Widget", ">", "widgets", ",", "ScoreCriteriaSettings", "scoreCriteriaSettings", ")", "{", "List", "<", "ScoreWeight", ">", "scoreWeights", "=", "new", "ArrayList", "<>", "(", "...
Process scores for each widget based on widget settings @param widgets List of widgets @param scoreCriteriaSettings Score Criteria Settings @return List of widget scores
[ "Process", "scores", "for", "each", "widget", "based", "on", "widget", "settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java#L141-L168
131,708
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java
ApplicationScoreService.addSettingsToMap
private void addSettingsToMap(Map<String, ScoreComponentSettings> scoreParamSettingsMap, String widgetType, ScoreComponentSettings scoreComponentSettings) { LOGGER.info("addSettingsToMap with widgetType:" + widgetType + " scoreParamSettings:" + scoreComponentSettings); if (null != scoreComponentSettings) { ...
java
private void addSettingsToMap(Map<String, ScoreComponentSettings> scoreParamSettingsMap, String widgetType, ScoreComponentSettings scoreComponentSettings) { LOGGER.info("addSettingsToMap with widgetType:" + widgetType + " scoreParamSettings:" + scoreComponentSettings); if (null != scoreComponentSettings) { ...
[ "private", "void", "addSettingsToMap", "(", "Map", "<", "String", ",", "ScoreComponentSettings", ">", "scoreParamSettingsMap", ",", "String", "widgetType", ",", "ScoreComponentSettings", "scoreComponentSettings", ")", "{", "LOGGER", ".", "info", "(", "\"addSettingsToMap...
Add settings for widget in map if it exists This map is used to calculate score for team @param scoreParamSettingsMap Map to update the settings for a widget @param widgetType Type of widget @param scoreComponentSettings score settings for the widget
[ "Add", "settings", "for", "widget", "in", "map", "if", "it", "exists", "This", "map", "is", "used", "to", "calculate", "score", "for", "team" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java#L187-L192
131,709
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java
ApplicationScoreService.generateWidgetSettings
private Map<String, ScoreComponentSettings> generateWidgetSettings(ScoreCriteriaSettings scoreCriteriaSettings) { Map<String, ScoreComponentSettings> scoreParamSettingsMap = new HashMap<>(); addSettingsToMap( scoreParamSettingsMap, Constants.WIDGET_BUILD, getSettingsIfEnabled( scoreCr...
java
private Map<String, ScoreComponentSettings> generateWidgetSettings(ScoreCriteriaSettings scoreCriteriaSettings) { Map<String, ScoreComponentSettings> scoreParamSettingsMap = new HashMap<>(); addSettingsToMap( scoreParamSettingsMap, Constants.WIDGET_BUILD, getSettingsIfEnabled( scoreCr...
[ "private", "Map", "<", "String", ",", "ScoreComponentSettings", ">", "generateWidgetSettings", "(", "ScoreCriteriaSettings", "scoreCriteriaSettings", ")", "{", "Map", "<", "String", ",", "ScoreComponentSettings", ">", "scoreParamSettingsMap", "=", "new", "HashMap", "<>"...
Generate criteria settings for each widget type @param scoreCriteriaSettings Score Criteria Settings @return Map of settings by each widget name
[ "Generate", "criteria", "settings", "for", "each", "widget", "type" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ApplicationScoreService.java#L200-L232
131,710
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeQualityEvaluator.java
CodeQualityEvaluator.codeQualityDetailsForMissingStatus
private CodeQualityAuditResponse codeQualityDetailsForMissingStatus(CollectorItem codeQualityCollectorItem ){ CodeQualityAuditResponse detailsMissing =new CodeQualityAuditResponse(); detailsMissing.addAuditStatus(CodeQualityAuditStatus.CODE_QUALITY_DETAIL_MISSING); detailsMissing.setLastUpdated(...
java
private CodeQualityAuditResponse codeQualityDetailsForMissingStatus(CollectorItem codeQualityCollectorItem ){ CodeQualityAuditResponse detailsMissing =new CodeQualityAuditResponse(); detailsMissing.addAuditStatus(CodeQualityAuditStatus.CODE_QUALITY_DETAIL_MISSING); detailsMissing.setLastUpdated(...
[ "private", "CodeQualityAuditResponse", "codeQualityDetailsForMissingStatus", "(", "CollectorItem", "codeQualityCollectorItem", ")", "{", "CodeQualityAuditResponse", "detailsMissing", "=", "new", "CodeQualityAuditResponse", "(", ")", ";", "detailsMissing", ".", "addAuditStatus", ...
It will return response when codeQuality details not found in given date range. @param codeQualityCollectorItem @return missing details audit-resoonse.
[ "It", "will", "return", "response", "when", "codeQuality", "details", "not", "found", "in", "given", "date", "range", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeQualityEvaluator.java#L204-L215
131,711
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeQualityEvaluator.java
CodeQualityEvaluator.auditStatusWhenQualityGateDetailsFound
private void auditStatusWhenQualityGateDetailsFound(Map condition, CodeQualityAuditResponse codeQualityAuditResponse) { if (StringUtils.equalsIgnoreCase(condition.get("metric").toString(), CodeQualityMetricType.BLOCKER_VIOLATIONS.getType())) { codeQualityAuditResponse.addAuditStatus(CodeQualityAudit...
java
private void auditStatusWhenQualityGateDetailsFound(Map condition, CodeQualityAuditResponse codeQualityAuditResponse) { if (StringUtils.equalsIgnoreCase(condition.get("metric").toString(), CodeQualityMetricType.BLOCKER_VIOLATIONS.getType())) { codeQualityAuditResponse.addAuditStatus(CodeQualityAudit...
[ "private", "void", "auditStatusWhenQualityGateDetailsFound", "(", "Map", "condition", ",", "CodeQualityAuditResponse", "codeQualityAuditResponse", ")", "{", "if", "(", "StringUtils", ".", "equalsIgnoreCase", "(", "condition", ".", "get", "(", "\"metric\"", ")", ".", "...
Sets audit status when code quality gate details are found. Sonar 6.7 style data. @param condition @param codeQualityAuditResponse
[ "Sets", "audit", "status", "when", "code", "quality", "gate", "details", "are", "found", ".", "Sonar", "6", ".", "7", "style", "data", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/evaluator/CodeQualityEvaluator.java#L223-L246
131,712
Hygieia/Hygieia
collectors/scm/github-graphql/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java
DefaultGitHubClient.getDataFromRestCallPost
private JSONObject getDataFromRestCallPost(GitHubParsed gitHubParsed, GitHubRepo repo, String password, String personalAccessToken, JSONObject query) throws MalformedURLException, HygieiaException { ResponseEntity<String> response = makeRestCallPost(gitHubParsed.getGraphQLUrl(), repo.getUserId(), password, pers...
java
private JSONObject getDataFromRestCallPost(GitHubParsed gitHubParsed, GitHubRepo repo, String password, String personalAccessToken, JSONObject query) throws MalformedURLException, HygieiaException { ResponseEntity<String> response = makeRestCallPost(gitHubParsed.getGraphQLUrl(), repo.getUserId(), password, pers...
[ "private", "JSONObject", "getDataFromRestCallPost", "(", "GitHubParsed", "gitHubParsed", ",", "GitHubRepo", "repo", ",", "String", "password", ",", "String", "personalAccessToken", ",", "JSONObject", "query", ")", "throws", "MalformedURLException", ",", "HygieiaException"...
Makes use of the graphQL endpoint, will not work for REST api
[ "Makes", "use", "of", "the", "graphQL", "endpoint", "will", "not", "work", "for", "REST", "api" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/github-graphql/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java#L1059-L1095
131,713
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/WidgetScoreAbstract.java
WidgetScoreAbstract.processWidgetScore
@Override public ScoreWeight processWidgetScore(Widget widget, ScoreComponentSettings paramSettings) { if (!Utils.isScoreEnabled(paramSettings)) { return null; } //1. Init scores ScoreWeight scoreWidget = initWidgetScore(paramSettings); if (null == widget) { scoreWidget.setScore(par...
java
@Override public ScoreWeight processWidgetScore(Widget widget, ScoreComponentSettings paramSettings) { if (!Utils.isScoreEnabled(paramSettings)) { return null; } //1. Init scores ScoreWeight scoreWidget = initWidgetScore(paramSettings); if (null == widget) { scoreWidget.setScore(par...
[ "@", "Override", "public", "ScoreWeight", "processWidgetScore", "(", "Widget", "widget", ",", "ScoreComponentSettings", "paramSettings", ")", "{", "if", "(", "!", "Utils", ".", "isScoreEnabled", "(", "paramSettings", ")", ")", "{", "return", "null", ";", "}", ...
Process widget score @param widget widget configuration from dashboard @param paramSettings Score Settings for the widget @return
[ "Process", "widget", "score" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/WidgetScoreAbstract.java#L39-L80
131,714
Hygieia/Hygieia
collectors/feature/versionone/src/main/java/com/capitalone/dashboard/collector/TeamDataClient.java
TeamDataClient.getMaxChangeDate
@Override public String getMaxChangeDate() { Collector col = featureCollectorRepository.findByName(FeatureCollectorConstants.VERSIONONE); if (col == null) return ""; if (StringUtils.isEmpty(getFeatureSettings().getDeltaCollectorItemStartDate())) return ""; List<Team> response = teamRepo.findTopByChangeD...
java
@Override public String getMaxChangeDate() { Collector col = featureCollectorRepository.findByName(FeatureCollectorConstants.VERSIONONE); if (col == null) return ""; if (StringUtils.isEmpty(getFeatureSettings().getDeltaCollectorItemStartDate())) return ""; List<Team> response = teamRepo.findTopByChangeD...
[ "@", "Override", "public", "String", "getMaxChangeDate", "(", ")", "{", "Collector", "col", "=", "featureCollectorRepository", ".", "findByName", "(", "FeatureCollectorConstants", ".", "VERSIONONE", ")", ";", "if", "(", "col", "==", "null", ")", "return", "\"\""...
Retrieves the maximum change date for a given query. @return A list object of the maximum change date
[ "Retrieves", "the", "maximum", "change", "date", "for", "a", "given", "query", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/versionone/src/main/java/com/capitalone/dashboard/collector/TeamDataClient.java#L177-L190
131,715
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/GithubScmWidgetScore.java
GithubScmWidgetScore.getPercentCoverageForDays
private Double getPercentCoverageForDays(Iterable<Commit> commits, int days) { Set<String> dates = new HashSet<>(); for (Commit commit : commits) { dates.add(Constants.DAY_FORMAT.format(new Date(commit.getScmCommitTimestamp()))); } return (dates.size() / (double) days) * 100; }
java
private Double getPercentCoverageForDays(Iterable<Commit> commits, int days) { Set<String> dates = new HashSet<>(); for (Commit commit : commits) { dates.add(Constants.DAY_FORMAT.format(new Date(commit.getScmCommitTimestamp()))); } return (dates.size() / (double) days) * 100; }
[ "private", "Double", "getPercentCoverageForDays", "(", "Iterable", "<", "Commit", ">", "commits", ",", "int", "days", ")", "{", "Set", "<", "String", ">", "dates", "=", "new", "HashSet", "<>", "(", ")", ";", "for", "(", "Commit", "commit", ":", "commits"...
Calculate percentage of days with commits out of total days @param commits @param days @return percentage of days with commits
[ "Calculate", "percentage", "of", "days", "with", "commits", "out", "of", "total", "days" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/GithubScmWidgetScore.java#L164-L170
131,716
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/PipelineServiceImpl.java
PipelineServiceImpl.findUnmappedStages
private List<PipelineStage> findUnmappedStages(Dashboard dashboard,List<PipelineStage> pipelineStageList){ List<PipelineStage> unmappedStages = new ArrayList<>(); Map<PipelineStage, String> stageToEnvironmentNameMap = PipelineUtils.getStageToEnvironmentNameMap(dashboard); for (PipelineStage sy...
java
private List<PipelineStage> findUnmappedStages(Dashboard dashboard,List<PipelineStage> pipelineStageList){ List<PipelineStage> unmappedStages = new ArrayList<>(); Map<PipelineStage, String> stageToEnvironmentNameMap = PipelineUtils.getStageToEnvironmentNameMap(dashboard); for (PipelineStage sy...
[ "private", "List", "<", "PipelineStage", ">", "findUnmappedStages", "(", "Dashboard", "dashboard", ",", "List", "<", "PipelineStage", ">", "pipelineStageList", ")", "{", "List", "<", "PipelineStage", ">", "unmappedStages", "=", "new", "ArrayList", "<>", "(", ")"...
finds any stages for a dashboard that aren't mapped. @param dashboard @return a list of deploy PipelineStages that are not mapped
[ "finds", "any", "stages", "for", "a", "dashboard", "that", "aren", "t", "mapped", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/PipelineServiceImpl.java#L129-L144
131,717
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/PipelineServiceImpl.java
PipelineServiceImpl.getCommitsAfterStage
private Map<String, PipelineCommit> getCommitsAfterStage(PipelineStage stage, Pipeline pipeline, Dashboard dashboard,List<PipelineStage> pipelineStageList,Map<String,String> orderMap){ Map<String, PipelineCommit> unionOfAllSets = new HashMap<>(); // get key(ordinal) for stage name List<String> l...
java
private Map<String, PipelineCommit> getCommitsAfterStage(PipelineStage stage, Pipeline pipeline, Dashboard dashboard,List<PipelineStage> pipelineStageList,Map<String,String> orderMap){ Map<String, PipelineCommit> unionOfAllSets = new HashMap<>(); // get key(ordinal) for stage name List<String> l...
[ "private", "Map", "<", "String", ",", "PipelineCommit", ">", "getCommitsAfterStage", "(", "PipelineStage", "stage", ",", "Pipeline", "pipeline", ",", "Dashboard", "dashboard", ",", "List", "<", "PipelineStage", ">", "pipelineStageList", ",", "Map", "<", "String", ...
Finds a map of commits for all stages after the current stage @param stage @param pipeline @param dashboard @return
[ "Finds", "a", "map", "of", "commits", "for", "all", "stages", "after", "the", "current", "stage" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/PipelineServiceImpl.java#L153-L175
131,718
Hygieia/Hygieia
hygieia-jenkins-plugin/src/main/java/hygieia/utils/HygieiaUtils.java
HygieiaUtils.determineArtifactName
public static String determineArtifactName(FilePath file, String version) { String fileName = file.getBaseName(); if ("".equals(version)) return fileName; int vIndex = fileName.indexOf(version); if (vIndex <= 0) return fileName; if ((fileName.charAt(vIndex - 1) == '-') || (fi...
java
public static String determineArtifactName(FilePath file, String version) { String fileName = file.getBaseName(); if ("".equals(version)) return fileName; int vIndex = fileName.indexOf(version); if (vIndex <= 0) return fileName; if ((fileName.charAt(vIndex - 1) == '-') || (fi...
[ "public", "static", "String", "determineArtifactName", "(", "FilePath", "file", ",", "String", "version", ")", "{", "String", "fileName", "=", "file", ".", "getBaseName", "(", ")", ";", "if", "(", "\"\"", ".", "equals", "(", "version", ")", ")", "return", ...
Determine the artifact's name. The name excludes the version string and the file extension. Does not currently support classifiers @param file @param version @return
[ "Determine", "the", "artifact", "s", "name", ".", "The", "name", "excludes", "the", "version", "string", "and", "the", "file", "extension", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/hygieia-jenkins-plugin/src/main/java/hygieia/utils/HygieiaUtils.java#L85-L96
131,719
Hygieia/Hygieia
collectors/audit/nfrr/src/main/java/com/capitalone/dashboard/collector/AuditCollector.java
AuditCollector.prototype
public static AuditCollector prototype(List<String> servers) { AuditCollector protoType = new AuditCollector(); protoType.setName("AuditCollector"); protoType.setCollectorType(CollectorType.Audit); protoType.setOnline(true); protoType.setEnabled(true); protoType.auditServ...
java
public static AuditCollector prototype(List<String> servers) { AuditCollector protoType = new AuditCollector(); protoType.setName("AuditCollector"); protoType.setCollectorType(CollectorType.Audit); protoType.setOnline(true); protoType.setEnabled(true); protoType.auditServ...
[ "public", "static", "AuditCollector", "prototype", "(", "List", "<", "String", ">", "servers", ")", "{", "AuditCollector", "protoType", "=", "new", "AuditCollector", "(", ")", ";", "protoType", ".", "setName", "(", "\"AuditCollector\"", ")", ";", "protoType", ...
Audit Collector Instance built with required config settings
[ "Audit", "Collector", "Instance", "built", "with", "required", "config", "settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/audit/nfrr/src/main/java/com/capitalone/dashboard/collector/AuditCollector.java#L16-L24
131,720
Hygieia/Hygieia
collectors/scm/github-graphql/src/main/java/com/capitalone/dashboard/collector/GitHubCollectorTask.java
GitHubCollectorTask.processOrphanCommits
private void processOrphanCommits(GitHubRepo repo) { long refTime = Math.min(System.currentTimeMillis() - gitHubSettings.getCommitPullSyncTime(), gitHubClient.getRepoOffsetTime(repo)); List<Commit> orphanCommits = commitRepository.findCommitsByCollectorItemIdAndTimestampAfterAndPullNumberIsNull(repo.get...
java
private void processOrphanCommits(GitHubRepo repo) { long refTime = Math.min(System.currentTimeMillis() - gitHubSettings.getCommitPullSyncTime(), gitHubClient.getRepoOffsetTime(repo)); List<Commit> orphanCommits = commitRepository.findCommitsByCollectorItemIdAndTimestampAfterAndPullNumberIsNull(repo.get...
[ "private", "void", "processOrphanCommits", "(", "GitHubRepo", "repo", ")", "{", "long", "refTime", "=", "Math", ".", "min", "(", "System", ".", "currentTimeMillis", "(", ")", "-", "gitHubSettings", ".", "getCommitPullSyncTime", "(", ")", ",", "gitHubClient", "...
Retrieves a st of previous commits and Pulls and tries to reconnect them
[ "Retrieves", "a", "st", "of", "previous", "commits", "and", "Pulls", "and", "tries", "to", "reconnect", "them" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/github-graphql/src/main/java/com/capitalone/dashboard/collector/GitHubCollectorTask.java#L263-L272
131,721
Hygieia/Hygieia
collectors/performance/appdynamics/src/main/java/com/capitalone/dashboard/collector/DefaultAppdynamicsClient.java
DefaultAppdynamicsClient.getApplications
@Override public Set<AppdynamicsApplication> getApplications(String instanceUrl) { Set<AppdynamicsApplication> returnSet = new HashSet<>(); try { String url = joinURL(instanceUrl, APPLICATION_LIST_PATH); ResponseEntity<String> responseEntity = makeRestCall(url); S...
java
@Override public Set<AppdynamicsApplication> getApplications(String instanceUrl) { Set<AppdynamicsApplication> returnSet = new HashSet<>(); try { String url = joinURL(instanceUrl, APPLICATION_LIST_PATH); ResponseEntity<String> responseEntity = makeRestCall(url); S...
[ "@", "Override", "public", "Set", "<", "AppdynamicsApplication", ">", "getApplications", "(", "String", "instanceUrl", ")", "{", "Set", "<", "AppdynamicsApplication", ">", "returnSet", "=", "new", "HashSet", "<>", "(", ")", ";", "try", "{", "String", "url", ...
Retrieves a JSON array of all of the applications that are registered in AppDynamics. @return Set of applications used to populate the collector_items database. This data is later used by the front end to populate the dropdown list of applications.
[ "Retrieves", "a", "JSON", "array", "of", "all", "of", "the", "applications", "that", "are", "registered", "in", "AppDynamics", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/performance/appdynamics/src/main/java/com/capitalone/dashboard/collector/DefaultAppdynamicsClient.java#L85-L123
131,722
Hygieia/Hygieia
collectors/performance/appdynamics/src/main/java/com/capitalone/dashboard/collector/DefaultAppdynamicsClient.java
DefaultAppdynamicsClient.getPerformanceMetrics
@Override public Map<String,Object> getPerformanceMetrics(AppdynamicsApplication application, String instanceUrl ) { Map<String,Object> metrics = new HashMap<>(); metrics.putAll(getOverallMetrics(application, instanceUrl)); metrics.putAll(getCalculatedMetrics(metrics)); metrics.putA...
java
@Override public Map<String,Object> getPerformanceMetrics(AppdynamicsApplication application, String instanceUrl ) { Map<String,Object> metrics = new HashMap<>(); metrics.putAll(getOverallMetrics(application, instanceUrl)); metrics.putAll(getCalculatedMetrics(metrics)); metrics.putA...
[ "@", "Override", "public", "Map", "<", "String", ",", "Object", ">", "getPerformanceMetrics", "(", "AppdynamicsApplication", "application", ",", "String", "instanceUrl", ")", "{", "Map", "<", "String", ",", "Object", ">", "metrics", "=", "new", "HashMap", "<>"...
Obtains the relevant data via different appdynamics api calls. @param application the current application. Used to provide access to appID/name @return List of PerformanceMetrics used to populate the performance database
[ "Obtains", "the", "relevant", "data", "via", "different", "appdynamics", "api", "calls", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/performance/appdynamics/src/main/java/com/capitalone/dashboard/collector/DefaultAppdynamicsClient.java#L131-L141
131,723
Hygieia/Hygieia
collectors/performance/appdynamics/src/main/java/com/capitalone/dashboard/collector/DefaultAppdynamicsClient.java
DefaultAppdynamicsClient.getHealthMetrics
private Map<String,Object> getHealthMetrics(AppdynamicsApplication application, String instanceUrl ) { // business health percent long numNodeViolations = 0; long numBusinessViolations = 0; long numNodes = 0; long numBusinessTransactions = 0; double nodeHealthPercent = 0....
java
private Map<String,Object> getHealthMetrics(AppdynamicsApplication application, String instanceUrl ) { // business health percent long numNodeViolations = 0; long numBusinessViolations = 0; long numNodes = 0; long numBusinessTransactions = 0; double nodeHealthPercent = 0....
[ "private", "Map", "<", "String", ",", "Object", ">", "getHealthMetrics", "(", "AppdynamicsApplication", "application", ",", "String", "instanceUrl", ")", "{", "// business health percent", "long", "numNodeViolations", "=", "0", ";", "long", "numBusinessViolations", "=...
Calculates the Node Health Percent and Business Health Percent values @param application the current application. Used to provide access to appID/name @return List of two PerformanceMetrics that contain info about the health percents
[ "Calculates", "the", "Node", "Health", "Percent", "and", "Business", "Health", "Percent", "values" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/performance/appdynamics/src/main/java/com/capitalone/dashboard/collector/DefaultAppdynamicsClient.java#L227-L305
131,724
Hygieia/Hygieia
collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java
DefaultGitHubClient.getComments
public List<Comment> getComments(String commentsUrl, GitHubRepo repo) throws RestClientException { List<Comment> comments = new ArrayList<>(); // decrypt password String decryptedPassword = decryptString(repo.getPassword(), settings.getKey()); String personalAccessToken = (String) rep...
java
public List<Comment> getComments(String commentsUrl, GitHubRepo repo) throws RestClientException { List<Comment> comments = new ArrayList<>(); // decrypt password String decryptedPassword = decryptString(repo.getPassword(), settings.getKey()); String personalAccessToken = (String) rep...
[ "public", "List", "<", "Comment", ">", "getComments", "(", "String", "commentsUrl", ",", "GitHubRepo", "repo", ")", "throws", "RestClientException", "{", "List", "<", "Comment", ">", "comments", "=", "new", "ArrayList", "<>", "(", ")", ";", "// decrypt passwor...
Get comments from the given comment url @param commentsUrl @param repo @return @throws RestClientException
[ "Get", "comments", "from", "the", "given", "comment", "url" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java#L381-L421
131,725
Hygieia/Hygieia
collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java
DefaultGitHubClient.getCommitStatuses
public List<CommitStatus> getCommitStatuses(String statusUrl, GitHubRepo repo) throws RestClientException { Map<String, CommitStatus> statuses = new HashMap<>(); // decrypt password String decryptedPassword = decryptString(repo.getPassword(), settings.getKey()); String personalAccessTo...
java
public List<CommitStatus> getCommitStatuses(String statusUrl, GitHubRepo repo) throws RestClientException { Map<String, CommitStatus> statuses = new HashMap<>(); // decrypt password String decryptedPassword = decryptString(repo.getPassword(), settings.getKey()); String personalAccessTo...
[ "public", "List", "<", "CommitStatus", ">", "getCommitStatuses", "(", "String", "statusUrl", ",", "GitHubRepo", "repo", ")", "throws", "RestClientException", "{", "Map", "<", "String", ",", "CommitStatus", ">", "statuses", "=", "new", "HashMap", "<>", "(", ")"...
Get commit statuses from the given commit status url Retrieve the most recent status for each unique context. See https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref and https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref @param statusUrl @param repo...
[ "Get", "commit", "statuses", "from", "the", "given", "commit", "status", "url", "Retrieve", "the", "most", "recent", "status", "for", "each", "unique", "context", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java#L435-L472
131,726
Hygieia/Hygieia
collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java
DefaultGitHubClient.getReviews
public List<Review> getReviews(String reviewsUrl, GitHubRepo repo) throws RestClientException { List<Review> reviews = new ArrayList<>(); // decrypt password String decryptedPassword = decryptString(repo.getPassword(), settings.getKey()); String personalAccessToken = (String) repo.getO...
java
public List<Review> getReviews(String reviewsUrl, GitHubRepo repo) throws RestClientException { List<Review> reviews = new ArrayList<>(); // decrypt password String decryptedPassword = decryptString(repo.getPassword(), settings.getKey()); String personalAccessToken = (String) repo.getO...
[ "public", "List", "<", "Review", ">", "getReviews", "(", "String", "reviewsUrl", ",", "GitHubRepo", "repo", ")", "throws", "RestClientException", "{", "List", "<", "Review", ">", "reviews", "=", "new", "ArrayList", "<>", "(", ")", ";", "// decrypt password", ...
Get reviews from the given reviews url @param reviewsUrl @param repo @return @throws RestClientException
[ "Get", "reviews", "from", "the", "given", "reviews", "url" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java#L481-L515
131,727
Hygieia/Hygieia
collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java
DefaultGitHubClient.isRateLimitReached
private boolean isRateLimitReached(ResponseEntity<String> response) { HttpHeaders header = response.getHeaders(); List<String> limit = header.get("X-RateLimit-Remaining"); boolean rateLimitReached = CollectionUtils.isEmpty(limit) ? false : Integer.valueOf(limit.get(0)) < settings.getRateLimitTh...
java
private boolean isRateLimitReached(ResponseEntity<String> response) { HttpHeaders header = response.getHeaders(); List<String> limit = header.get("X-RateLimit-Remaining"); boolean rateLimitReached = CollectionUtils.isEmpty(limit) ? false : Integer.valueOf(limit.get(0)) < settings.getRateLimitTh...
[ "private", "boolean", "isRateLimitReached", "(", "ResponseEntity", "<", "String", ">", "response", ")", "{", "HttpHeaders", "header", "=", "response", ".", "getHeaders", "(", ")", ";", "List", "<", "String", ">", "limit", "=", "header", ".", "get", "(", "\...
Checks rate limit @param response @return boolean
[ "Checks", "rate", "limit" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java#L577-L585
131,728
Hygieia/Hygieia
collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java
DefaultGitHubClient.getTimeForApi
private static String getTimeForApi (Date dt) { Calendar calendar = new GregorianCalendar(); TimeZone timeZone = calendar.getTimeZone(); Calendar cal = Calendar.getInstance(timeZone); cal.setTime(dt); return String.format("%tFT%<tRZ", cal); }
java
private static String getTimeForApi (Date dt) { Calendar calendar = new GregorianCalendar(); TimeZone timeZone = calendar.getTimeZone(); Calendar cal = Calendar.getInstance(timeZone); cal.setTime(dt); return String.format("%tFT%<tRZ", cal); }
[ "private", "static", "String", "getTimeForApi", "(", "Date", "dt", ")", "{", "Calendar", "calendar", "=", "new", "GregorianCalendar", "(", ")", ";", "TimeZone", "timeZone", "=", "calendar", ".", "getTimeZone", "(", ")", ";", "Calendar", "cal", "=", "Calendar...
Format date the way Github api wants @param dt @return String
[ "Format", "date", "the", "way", "Github", "api", "wants" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/github/src/main/java/com/capitalone/dashboard/collector/DefaultGitHubClient.java#L715-L721
131,729
Hygieia/Hygieia
collectors/cmdb/hpsm/src/main/java/com/capitalone/dashboard/collector/DefaultBaseClient.java
DefaultBaseClient.makeSoapCall
protected String makeSoapCall(String soapMessageString, HpsmSoapModel hpsmSoapModel) throws HygieiaException { String requestAction = hpsmSoapModel.getSoapAction(); String response = ""; contentType = hpsmSettings.getContentType(); charset = hpsmSettings.getCharset(); try { ...
java
protected String makeSoapCall(String soapMessageString, HpsmSoapModel hpsmSoapModel) throws HygieiaException { String requestAction = hpsmSoapModel.getSoapAction(); String response = ""; contentType = hpsmSettings.getContentType(); charset = hpsmSettings.getCharset(); try { ...
[ "protected", "String", "makeSoapCall", "(", "String", "soapMessageString", ",", "HpsmSoapModel", "hpsmSoapModel", ")", "throws", "HygieiaException", "{", "String", "requestAction", "=", "hpsmSoapModel", ".", "getSoapAction", "(", ")", ";", "String", "response", "=", ...
Makes SOAP request for given soap message @param soapMessageString Generated SOAP ready for POST @param hpsmSoapModel hpsmSoapModel @return Soap response
[ "Makes", "SOAP", "request", "for", "given", "soap", "message" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/cmdb/hpsm/src/main/java/com/capitalone/dashboard/collector/DefaultBaseClient.java#L72-L100
131,730
Hygieia/Hygieia
collectors/cmdb/hpsm/src/main/java/com/capitalone/dashboard/collector/DefaultBaseClient.java
DefaultBaseClient.responseToDoc
protected Document responseToDoc(String response){ Document doc = null; try { DocumentBuilderFactory factory = new DocumentBuilderFactoryImpl(); DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); ByteArrayInputSt...
java
protected Document responseToDoc(String response){ Document doc = null; try { DocumentBuilderFactory factory = new DocumentBuilderFactoryImpl(); DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); ByteArrayInputSt...
[ "protected", "Document", "responseToDoc", "(", "String", "response", ")", "{", "Document", "doc", "=", "null", ";", "try", "{", "DocumentBuilderFactory", "factory", "=", "new", "DocumentBuilderFactoryImpl", "(", ")", ";", "DocumentBuilderFactory", ".", "newInstance"...
Converts String response into document for parsing @param response SOAP response required for creation of Document @return Document Object
[ "Converts", "String", "response", "into", "document", "for", "parsing" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/cmdb/hpsm/src/main/java/com/capitalone/dashboard/collector/DefaultBaseClient.java#L160-L179
131,731
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.getBoards
@Override public List<Team> getBoards() { int count = 0; int startAt = 0; boolean isLast = false; List<Team> result = new ArrayList<>(); while (!isLast) { String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/") ...
java
@Override public List<Team> getBoards() { int count = 0; int startAt = 0; boolean isLast = false; List<Team> result = new ArrayList<>(); while (!isLast) { String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/") ...
[ "@", "Override", "public", "List", "<", "Team", ">", "getBoards", "(", ")", "{", "int", "count", "=", "0", ";", "int", "startAt", "=", "0", ";", "boolean", "isLast", "=", "false", ";", "List", "<", "Team", ">", "result", "=", "new", "ArrayList", "<...
Get a list of Boards. It's saved as Team in Hygieia @return List of Team
[ "Get", "a", "list", "of", "Boards", ".", "It", "s", "saved", "as", "Team", "in", "Hygieia" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L156-L206
131,732
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.getTeams
@Override public List<Team> getTeams() { List<Team> result = new ArrayList<>(); try { String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/") + TEMPO_TEAMS_REST_SUFFIX; ResponseEntity<String> responseEnti...
java
@Override public List<Team> getTeams() { List<Team> result = new ArrayList<>(); try { String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/") + TEMPO_TEAMS_REST_SUFFIX; ResponseEntity<String> responseEnti...
[ "@", "Override", "public", "List", "<", "Team", ">", "getTeams", "(", ")", "{", "List", "<", "Team", ">", "result", "=", "new", "ArrayList", "<>", "(", ")", ";", "try", "{", "String", "url", "=", "featureSettings", ".", "getJiraBaseUrl", "(", ")", "+...
Get all the teams using Jira Rest API @return List of Teams
[ "Get", "all", "the", "teams", "using", "Jira", "Rest", "API" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L213-L241
131,733
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.processEpicData
protected static void processEpicData(Feature feature, Epic epic) { feature.setsEpicID(epic.getId()); feature.setsEpicIsDeleted("false"); feature.setsEpicName(epic.getName()); feature.setsEpicNumber(epic.getNumber()); feature.setsEpicType(""); feature.setsEpicAssetState(e...
java
protected static void processEpicData(Feature feature, Epic epic) { feature.setsEpicID(epic.getId()); feature.setsEpicIsDeleted("false"); feature.setsEpicName(epic.getName()); feature.setsEpicNumber(epic.getNumber()); feature.setsEpicType(""); feature.setsEpicAssetState(e...
[ "protected", "static", "void", "processEpicData", "(", "Feature", "feature", ",", "Epic", "epic", ")", "{", "feature", ".", "setsEpicID", "(", "epic", ".", "getId", "(", ")", ")", ";", "feature", ".", "setsEpicIsDeleted", "(", "\"false\"", ")", ";", "featu...
Process Epic data for a feature, updating the passed in feature @param feature @param epic
[ "Process", "Epic", "data", "for", "a", "feature", "updating", "the", "passed", "in", "feature" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L538-L549
131,734
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.processSprintData
protected void processSprintData(Feature feature, Sprint sprint) { // sSprintChangeDate - does not exist in Jira feature.setsSprintChangeDate(""); // sSprintIsDeleted - does not exist in Jira feature.setsSprintIsDeleted("False"); feature.setsSprintID(sprint.getId()); fe...
java
protected void processSprintData(Feature feature, Sprint sprint) { // sSprintChangeDate - does not exist in Jira feature.setsSprintChangeDate(""); // sSprintIsDeleted - does not exist in Jira feature.setsSprintIsDeleted("False"); feature.setsSprintID(sprint.getId()); fe...
[ "protected", "void", "processSprintData", "(", "Feature", "feature", ",", "Sprint", "sprint", ")", "{", "// sSprintChangeDate - does not exist in Jira", "feature", ".", "setsSprintChangeDate", "(", "\"\"", ")", ";", "// sSprintIsDeleted - does not exist in Jira", "feature", ...
Process Sprint data for a feature, updating the passed in feature @param feature @param sprint
[ "Process", "Sprint", "data", "for", "a", "feature", "updating", "the", "passed", "in", "feature" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L574-L593
131,735
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.processAssigneeData
@SuppressWarnings("PMD.NPathComplexity") protected static void processAssigneeData(Feature feature, JSONObject assignee) { if (assignee == null) { return; } String key = getString(assignee, "key"); String name = getString(assignee, "name"); String displayName = ge...
java
@SuppressWarnings("PMD.NPathComplexity") protected static void processAssigneeData(Feature feature, JSONObject assignee) { if (assignee == null) { return; } String key = getString(assignee, "key"); String name = getString(assignee, "name"); String displayName = ge...
[ "@", "SuppressWarnings", "(", "\"PMD.NPathComplexity\"", ")", "protected", "static", "void", "processAssigneeData", "(", "Feature", "feature", ",", "JSONObject", "assignee", ")", "{", "if", "(", "assignee", "==", "null", ")", "{", "return", ";", "}", "String", ...
Process Assignee data for a feature, updating the passed in feature @param feature @param assignee
[ "Process", "Assignee", "data", "for", "a", "feature", "updating", "the", "passed", "in", "feature" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L602-L614
131,736
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.getIssueLinks
protected static List<FeatureIssueLink> getIssueLinks(JSONArray issueLinkArray) { if (issueLinkArray == null) { return Collections.EMPTY_LIST; } List<FeatureIssueLink> jiraIssueLinks = new ArrayList<>(); issueLinkArray.forEach(issueLink -> { JSONObject outward = ...
java
protected static List<FeatureIssueLink> getIssueLinks(JSONArray issueLinkArray) { if (issueLinkArray == null) { return Collections.EMPTY_LIST; } List<FeatureIssueLink> jiraIssueLinks = new ArrayList<>(); issueLinkArray.forEach(issueLink -> { JSONObject outward = ...
[ "protected", "static", "List", "<", "FeatureIssueLink", ">", "getIssueLinks", "(", "JSONArray", "issueLinkArray", ")", "{", "if", "(", "issueLinkArray", "==", "null", ")", "{", "return", "Collections", ".", "EMPTY_LIST", ";", "}", "List", "<", "FeatureIssueLink"...
Get Array of issuesLinks @param issueLinkArray @return List of FeatureIssueLink
[ "Get", "Array", "of", "issuesLinks" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L623-L667
131,737
Hygieia/Hygieia
collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java
DefaultJiraClient.getEpic
@Override public Epic getEpic(String epicKey, Map<String, Epic> epicMap) { try { String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/") + String.format(EPIC_REST_SUFFIX, epicKey); ResponseEntity<String> responseEntity = makeRestCal...
java
@Override public Epic getEpic(String epicKey, Map<String, Epic> epicMap) { try { String url = featureSettings.getJiraBaseUrl() + (featureSettings.getJiraBaseUrl().endsWith("/") ? "" : "/") + String.format(EPIC_REST_SUFFIX, epicKey); ResponseEntity<String> responseEntity = makeRestCal...
[ "@", "Override", "public", "Epic", "getEpic", "(", "String", "epicKey", ",", "Map", "<", "String", ",", "Epic", ">", "epicMap", ")", "{", "try", "{", "String", "url", "=", "featureSettings", ".", "getJiraBaseUrl", "(", ")", "+", "(", "featureSettings", "...
Get Epic using Jira API @param epicKey @return epic
[ "Get", "Epic", "using", "Jira", "API" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/jira/src/main/java/com/capitalone/dashboard/collector/DefaultJiraClient.java#L676-L695
131,738
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java
CommonCodeReview.checkForServiceAccount
public static boolean checkForServiceAccount(String userLdapDN, ApiSettings settings,Map<String,String> allowedUsers,String author,List<String> commitFiles,boolean isCommit,AuditReviewResponse auditReviewResponse) { List<String> serviceAccountOU = settings.getServiceAccountOU(); boolean isValid = false;...
java
public static boolean checkForServiceAccount(String userLdapDN, ApiSettings settings,Map<String,String> allowedUsers,String author,List<String> commitFiles,boolean isCommit,AuditReviewResponse auditReviewResponse) { List<String> serviceAccountOU = settings.getServiceAccountOU(); boolean isValid = false;...
[ "public", "static", "boolean", "checkForServiceAccount", "(", "String", "userLdapDN", ",", "ApiSettings", "settings", ",", "Map", "<", "String", ",", "String", ">", "allowedUsers", ",", "String", "author", ",", "List", "<", "String", ">", "commitFiles", ",", "...
Check if the passed in account is a Service Account or not by comparing against list of valid ServiceAccountOU in ApiSettings. @param userLdapDN @param settings @return
[ "Check", "if", "the", "passed", "in", "account", "is", "a", "Service", "Account", "or", "not", "by", "comparing", "against", "list", "of", "valid", "ServiceAccountOU", "in", "ApiSettings", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java#L160-L182
131,739
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java
CommonCodeReview.getActors
private static Map<String, String> getActors(GitRequest pr) { Map<String, String> actors = new HashMap<>(); if (!StringUtils.isEmpty(pr.getMergeAuthorLDAPDN())) { actors.put(pr.getMergeAuthor(), pr.getMergeAuthorLDAPDN()); } Optional.ofNullable(pr.getCommits()).orElse(Collect...
java
private static Map<String, String> getActors(GitRequest pr) { Map<String, String> actors = new HashMap<>(); if (!StringUtils.isEmpty(pr.getMergeAuthorLDAPDN())) { actors.put(pr.getMergeAuthor(), pr.getMergeAuthorLDAPDN()); } Optional.ofNullable(pr.getCommits()).orElse(Collect...
[ "private", "static", "Map", "<", "String", ",", "String", ">", "getActors", "(", "GitRequest", "pr", ")", "{", "Map", "<", "String", ",", "String", ">", "actors", "=", "new", "HashMap", "<>", "(", ")", ";", "if", "(", "!", "StringUtils", ".", "isEmpt...
Get all the actors associated with this user.s @param pr @return
[ "Get", "all", "the", "actors", "associated", "with", "this", "user", ".", "s" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java#L222-L231
131,740
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java
CommonCodeReview.isPRLookedAtByPeer
private static boolean isPRLookedAtByPeer(GitRequest pr) { Set<String> commentUsers = pr.getComments() != null ? pr.getComments().stream().map(Comment::getUser).collect(Collectors.toCollection(HashSet::new)) : new HashSet<>(); Set<String> reviewAuthors = pr.getReviews() != null ? pr.getReviews().stream(...
java
private static boolean isPRLookedAtByPeer(GitRequest pr) { Set<String> commentUsers = pr.getComments() != null ? pr.getComments().stream().map(Comment::getUser).collect(Collectors.toCollection(HashSet::new)) : new HashSet<>(); Set<String> reviewAuthors = pr.getReviews() != null ? pr.getReviews().stream(...
[ "private", "static", "boolean", "isPRLookedAtByPeer", "(", "GitRequest", "pr", ")", "{", "Set", "<", "String", ">", "commentUsers", "=", "pr", ".", "getComments", "(", ")", "!=", "null", "?", "pr", ".", "getComments", "(", ")", ".", "stream", "(", ")", ...
Calculates if the PR was looked at by a peer @param pr @return true if PR was looked at by at least one peer
[ "Calculates", "if", "the", "PR", "was", "looked", "at", "by", "a", "peer" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/common/CommonCodeReview.java#L239-L252
131,741
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/ScopeServiceImpl.java
ScopeServiceImpl.getScopeByCollectorWithFilter
@Override public Page<Scope> getScopeByCollectorWithFilter(ObjectId collectorId, String projectName, Pageable pageable){ Page<Scope> scopeItems = scopeRepository.findAllByCollectorIdAndNameContainingIgnoreCase(collectorId,projectName,pageable); return scopeItems; }
java
@Override public Page<Scope> getScopeByCollectorWithFilter(ObjectId collectorId, String projectName, Pageable pageable){ Page<Scope> scopeItems = scopeRepository.findAllByCollectorIdAndNameContainingIgnoreCase(collectorId,projectName,pageable); return scopeItems; }
[ "@", "Override", "public", "Page", "<", "Scope", ">", "getScopeByCollectorWithFilter", "(", "ObjectId", "collectorId", ",", "String", "projectName", ",", "Pageable", "pageable", ")", "{", "Page", "<", "Scope", ">", "scopeItems", "=", "scopeRepository", ".", "fin...
Finds paged results of scope items of a given collectorId, projectName, pageable @param collectorId @param {@link org.springframework.data.domain.Pageable} object to determine which page to return @return scope items matching the specified type
[ "Finds", "paged", "results", "of", "scope", "items", "of", "a", "given", "collectorId", "projectName", "pageable" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/ScopeServiceImpl.java#L122-L127
131,742
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java
QualityWidgetScore.processQualityCCScore
private void processQualityCCScore( ScoreComponentSettings qualityCCSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { ScoreWeight qualityCCScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_CC_ID_NAME); Double qualityCCRatio = fetchQualityValue(cod...
java
private void processQualityCCScore( ScoreComponentSettings qualityCCSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { ScoreWeight qualityCCScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_CC_ID_NAME); Double qualityCCRatio = fetchQualityValue(cod...
[ "private", "void", "processQualityCCScore", "(", "ScoreComponentSettings", "qualityCCSettings", ",", "Iterable", "<", "CodeQuality", ">", "codeQualityIterable", ",", "List", "<", "ScoreWeight", ">", "categoryScores", ")", "{", "ScoreWeight", "qualityCCScore", "=", "getC...
Process Code Coverage score @param qualityCCSettings Code Coverage Param Settings @param codeQualityIterable Quality values @param categoryScores List of category scores
[ "Process", "Code", "Coverage", "score" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java#L151-L176
131,743
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java
QualityWidgetScore.processQualityUTScore
private void processQualityUTScore( ScoreComponentSettings qualityUTSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { ScoreWeight qualityUTScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_UT_ID_NAME); Double qualityUTRatio = fetchQualityValue(cod...
java
private void processQualityUTScore( ScoreComponentSettings qualityUTSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { ScoreWeight qualityUTScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_UT_ID_NAME); Double qualityUTRatio = fetchQualityValue(cod...
[ "private", "void", "processQualityUTScore", "(", "ScoreComponentSettings", "qualityUTSettings", ",", "Iterable", "<", "CodeQuality", ">", "codeQualityIterable", ",", "List", "<", "ScoreWeight", ">", "categoryScores", ")", "{", "ScoreWeight", "qualityUTScore", "=", "getC...
Process Unit Tests score @param qualityUTSettings Unit Tests Param Settings @param codeQualityIterable Quality values @param categoryScores List of category scores
[ "Process", "Unit", "Tests", "score" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java#L185-L210
131,744
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java
QualityWidgetScore.processQualityViolationsScore
private void processQualityViolationsScore( QualityScoreSettings.ViolationsScoreSettings qualityViolationsSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { ScoreWeight qualityViolationsScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_VIOLATIONS_ID_NA...
java
private void processQualityViolationsScore( QualityScoreSettings.ViolationsScoreSettings qualityViolationsSettings, Iterable<CodeQuality> codeQualityIterable, List<ScoreWeight> categoryScores) { ScoreWeight qualityViolationsScore = getCategoryScoreByIdName(categoryScores, WIDGET_QUALITY_VIOLATIONS_ID_NA...
[ "private", "void", "processQualityViolationsScore", "(", "QualityScoreSettings", ".", "ViolationsScoreSettings", "qualityViolationsSettings", ",", "Iterable", "<", "CodeQuality", ">", "codeQualityIterable", ",", "List", "<", "ScoreWeight", ">", "categoryScores", ")", "{", ...
Calculate Violations score based on Blocker, Critical & Major violations @param qualityViolationsSettings Violations Param Settings @param codeQualityIterable Quality values @param categoryScores List of category scores
[ "Calculate", "Violations", "score", "based", "on", "Blocker", "Critical", "&", "Major", "violations" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java#L219-L260
131,745
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java
QualityWidgetScore.fetchQualityValue
private Double fetchQualityValue(Iterable<CodeQuality> qualityIterable, String param) { Double paramValue = null; Iterator<CodeQuality> qualityIterator = qualityIterable.iterator(); if (!qualityIterator.hasNext()) { return paramValue; } CodeQuality codeQuality = qualityIterator.next(); f...
java
private Double fetchQualityValue(Iterable<CodeQuality> qualityIterable, String param) { Double paramValue = null; Iterator<CodeQuality> qualityIterator = qualityIterable.iterator(); if (!qualityIterator.hasNext()) { return paramValue; } CodeQuality codeQuality = qualityIterator.next(); f...
[ "private", "Double", "fetchQualityValue", "(", "Iterable", "<", "CodeQuality", ">", "qualityIterable", ",", "String", "param", ")", "{", "Double", "paramValue", "=", "null", ";", "Iterator", "<", "CodeQuality", ">", "qualityIterator", "=", "qualityIterable", ".", ...
Fetch param value by param name from quality values @param qualityIterable @param param quality param @return Param Value
[ "Fetch", "param", "value", "by", "param", "name", "from", "quality", "values" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/widget/QualityWidgetScore.java#L276-L293
131,746
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/rest/CloudInstanceController.java
CloudInstanceController.refreshInstances
@RequestMapping(value = "/cloud/instance/refresh", method = POST, consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE) public ResponseEntity<Collection<String>> refreshInstances( @Valid @RequestBody(required = false) CloudInstanceListRefreshRequest request) { return...
java
@RequestMapping(value = "/cloud/instance/refresh", method = POST, consumes = APPLICATION_JSON_VALUE, produces = APPLICATION_JSON_VALUE) public ResponseEntity<Collection<String>> refreshInstances( @Valid @RequestBody(required = false) CloudInstanceListRefreshRequest request) { return...
[ "@", "RequestMapping", "(", "value", "=", "\"/cloud/instance/refresh\"", ",", "method", "=", "POST", ",", "consumes", "=", "APPLICATION_JSON_VALUE", ",", "produces", "=", "APPLICATION_JSON_VALUE", ")", "public", "ResponseEntity", "<", "Collection", "<", "String", ">...
Cloud Instance Endpoints
[ "Cloud", "Instance", "Endpoints" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/rest/CloudInstanceController.java#L39-L45
131,747
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java
ScoreSettingsService.generateDashboardScoreSettings
public final void generateDashboardScoreSettings() { ScoreCriteriaSettings dashboardScoreCriteriaSettings = new ScoreCriteriaSettings(); dashboardScoreCriteriaSettings.setMaxScore( this.scoreSettings.getMaxScore() ); dashboardScoreCriteriaSettings.setType(ScoreValueType.DASHBOARD); dashboardSc...
java
public final void generateDashboardScoreSettings() { ScoreCriteriaSettings dashboardScoreCriteriaSettings = new ScoreCriteriaSettings(); dashboardScoreCriteriaSettings.setMaxScore( this.scoreSettings.getMaxScore() ); dashboardScoreCriteriaSettings.setType(ScoreValueType.DASHBOARD); dashboardSc...
[ "public", "final", "void", "generateDashboardScoreSettings", "(", ")", "{", "ScoreCriteriaSettings", "dashboardScoreCriteriaSettings", "=", "new", "ScoreCriteriaSettings", "(", ")", ";", "dashboardScoreCriteriaSettings", ".", "setMaxScore", "(", "this", ".", "scoreSettings"...
Generate Score Criteria Settings from Score Settings
[ "Generate", "Score", "Criteria", "Settings", "from", "Score", "Settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java#L36-L61
131,748
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java
ScoreSettingsService.initBuildScoreChildrenSettings
private void initBuildScoreChildrenSettings(BuildScoreSettings buildScoreSettings) { ScoreComponentSettings buildStatusSettings = Utils.getInstanceIfNull( buildScoreSettings.getStatus(), ScoreComponentSettings.class ); buildStatusSettings.setCriteria( Utils.mergeCriteria(buildScoreSettings...
java
private void initBuildScoreChildrenSettings(BuildScoreSettings buildScoreSettings) { ScoreComponentSettings buildStatusSettings = Utils.getInstanceIfNull( buildScoreSettings.getStatus(), ScoreComponentSettings.class ); buildStatusSettings.setCriteria( Utils.mergeCriteria(buildScoreSettings...
[ "private", "void", "initBuildScoreChildrenSettings", "(", "BuildScoreSettings", "buildScoreSettings", ")", "{", "ScoreComponentSettings", "buildStatusSettings", "=", "Utils", ".", "getInstanceIfNull", "(", "buildScoreSettings", ".", "getStatus", "(", ")", ",", "ScoreCompone...
Initialize Settings for child components in build widget 1. Build Status criteria settings 2. Build Duration criteria settings @param buildScoreSettings
[ "Initialize", "Settings", "for", "child", "components", "in", "build", "widget", "1", ".", "Build", "Status", "criteria", "settings", "2", ".", "Build", "Duration", "criteria", "settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java#L125-L144
131,749
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java
ScoreSettingsService.initDeployScoreChildrenSettings
private void initDeployScoreChildrenSettings(DeployScoreSettings deployScoreSettings) { ScoreComponentSettings deploySuccessSettings = Utils.getInstanceIfNull(deployScoreSettings.getDeploySuccess(), ScoreComponentSettings.class); deploySuccessSettings.setCriteria( Utils.mergeCriteria(deployScoreSettings.g...
java
private void initDeployScoreChildrenSettings(DeployScoreSettings deployScoreSettings) { ScoreComponentSettings deploySuccessSettings = Utils.getInstanceIfNull(deployScoreSettings.getDeploySuccess(), ScoreComponentSettings.class); deploySuccessSettings.setCriteria( Utils.mergeCriteria(deployScoreSettings.g...
[ "private", "void", "initDeployScoreChildrenSettings", "(", "DeployScoreSettings", "deployScoreSettings", ")", "{", "ScoreComponentSettings", "deploySuccessSettings", "=", "Utils", ".", "getInstanceIfNull", "(", "deployScoreSettings", ".", "getDeploySuccess", "(", ")", ",", ...
Initialize Settings for child components in deploy widget 1. Deploys Success criteria settings 2. Instances Online criteria settings @param deployScoreSettings
[ "Initialize", "Settings", "for", "child", "components", "in", "deploy", "widget", "1", ".", "Deploys", "Success", "criteria", "settings", "2", ".", "Instances", "Online", "criteria", "settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java#L170-L183
131,750
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java
ScoreSettingsService.initQualityScoreChildrenSettings
private void initQualityScoreChildrenSettings(QualityScoreSettings qualityScoreSettings) { ScoreComponentSettings qualityCCSettings = Utils.getInstanceIfNull(qualityScoreSettings.getCodeCoverage(), ScoreComponentSettings.class); qualityCCSettings.setCriteria( Utils.mergeCriteria(qualityScoreSettings.getCr...
java
private void initQualityScoreChildrenSettings(QualityScoreSettings qualityScoreSettings) { ScoreComponentSettings qualityCCSettings = Utils.getInstanceIfNull(qualityScoreSettings.getCodeCoverage(), ScoreComponentSettings.class); qualityCCSettings.setCriteria( Utils.mergeCriteria(qualityScoreSettings.getCr...
[ "private", "void", "initQualityScoreChildrenSettings", "(", "QualityScoreSettings", "qualityScoreSettings", ")", "{", "ScoreComponentSettings", "qualityCCSettings", "=", "Utils", ".", "getInstanceIfNull", "(", "qualityScoreSettings", ".", "getCodeCoverage", "(", ")", ",", "...
Initialize Settings for child components in quality widget 1. Code Coverage criteria settings 2. Unit Tests criteria settings 3. Violations criteria settings @param qualityScoreSettings
[ "Initialize", "Settings", "for", "child", "components", "in", "quality", "widget", "1", ".", "Code", "Coverage", "criteria", "settings", "2", ".", "Unit", "Tests", "criteria", "settings", "3", ".", "Violations", "criteria", "settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java#L210-L228
131,751
Hygieia/Hygieia
collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java
ScoreSettingsService.initGithubScmScoreChildrenSettings
private void initGithubScmScoreChildrenSettings(ScmScoreSettings scmScoreSettings) { ScoreComponentSettings commitsPerDaySettings = Utils.getInstanceIfNull(scmScoreSettings.getCommitsPerDay(), ScoreComponentSettings.class); commitsPerDaySettings.setCriteria( Utils.mergeCriteria(scmScoreSettings.getCriteri...
java
private void initGithubScmScoreChildrenSettings(ScmScoreSettings scmScoreSettings) { ScoreComponentSettings commitsPerDaySettings = Utils.getInstanceIfNull(scmScoreSettings.getCommitsPerDay(), ScoreComponentSettings.class); commitsPerDaySettings.setCriteria( Utils.mergeCriteria(scmScoreSettings.getCriteri...
[ "private", "void", "initGithubScmScoreChildrenSettings", "(", "ScmScoreSettings", "scmScoreSettings", ")", "{", "ScoreComponentSettings", "commitsPerDaySettings", "=", "Utils", ".", "getInstanceIfNull", "(", "scmScoreSettings", ".", "getCommitsPerDay", "(", ")", ",", "Score...
Initialize Settings for child components in scm widget 1. Commits Per Day criteria settings @param scmScoreSettings
[ "Initialize", "Settings", "for", "child", "components", "in", "scm", "widget", "1", ".", "Commits", "Per", "Day", "criteria", "settings" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/misc/score/src/main/java/com/capitalone/dashboard/ScoreSettingsService.java#L252-L258
131,752
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java
CollectorServiceImpl.removeJobUrlAndInstanceUrl
private Page<CollectorItem> removeJobUrlAndInstanceUrl(Page<CollectorItem> collectorItems) { for (CollectorItem cItem : collectorItems) { if(cItem.getOptions().containsKey("jobUrl")) cItem.getOptions().remove("jobUrl"); if(cItem.getOptions().containsKey("instanceUrl")) cItem.getOptions()...
java
private Page<CollectorItem> removeJobUrlAndInstanceUrl(Page<CollectorItem> collectorItems) { for (CollectorItem cItem : collectorItems) { if(cItem.getOptions().containsKey("jobUrl")) cItem.getOptions().remove("jobUrl"); if(cItem.getOptions().containsKey("instanceUrl")) cItem.getOptions()...
[ "private", "Page", "<", "CollectorItem", ">", "removeJobUrlAndInstanceUrl", "(", "Page", "<", "CollectorItem", ">", "collectorItems", ")", "{", "for", "(", "CollectorItem", "cItem", ":", "collectorItems", ")", "{", "if", "(", "cItem", ".", "getOptions", "(", "...
method to remove jobUrl and instanceUrl from build collector items.
[ "method", "to", "remove", "jobUrl", "and", "instanceUrl", "from", "build", "collector", "items", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java#L87-L93
131,753
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java
CollectorServiceImpl.createCollectorItemSelectOptions
@Override public CollectorItem createCollectorItemSelectOptions(CollectorItem item, Map<String, Object> allOptions, Map<String, Object> uniqueOptions) { Collector collector = collectorRepository.findOne(item.getCollectorId()); Map<String,Object> uniqueFieldsFromCollector = collector.getUniqueFields...
java
@Override public CollectorItem createCollectorItemSelectOptions(CollectorItem item, Map<String, Object> allOptions, Map<String, Object> uniqueOptions) { Collector collector = collectorRepository.findOne(item.getCollectorId()); Map<String,Object> uniqueFieldsFromCollector = collector.getUniqueFields...
[ "@", "Override", "public", "CollectorItem", "createCollectorItemSelectOptions", "(", "CollectorItem", "item", ",", "Map", "<", "String", ",", "Object", ">", "allOptions", ",", "Map", "<", "String", ",", "Object", ">", "uniqueOptions", ")", "{", "Collector", "col...
just update the new credentials.
[ "just", "update", "the", "new", "credentials", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/CollectorServiceImpl.java#L145-L158
131,754
Hygieia/Hygieia
collectors/feature/versionone/src/main/java/com/capitalone/dashboard/collector/BaseClient.java
BaseClient.toCanonicalList
public static List<String> toCanonicalList(List<String> list) { return list.stream().map(BaseClient::sanitizeResponse).collect(Collectors.toList()); }
java
public static List<String> toCanonicalList(List<String> list) { return list.stream().map(BaseClient::sanitizeResponse).collect(Collectors.toList()); }
[ "public", "static", "List", "<", "String", ">", "toCanonicalList", "(", "List", "<", "String", ">", "list", ")", "{", "return", "list", ".", "stream", "(", ")", ".", "map", "(", "BaseClient", "::", "sanitizeResponse", ")", ".", "collect", "(", "Collector...
Canonicalizes a given JSONArray to a basic List object to avoid the use of JSON parsers. @param list A given JSONArray object response from the source system @return The sanitized, canonical List<String>
[ "Canonicalizes", "a", "given", "JSONArray", "to", "a", "basic", "List", "object", "to", "avoid", "the", "use", "of", "JSON", "parsers", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/feature/versionone/src/main/java/com/capitalone/dashboard/collector/BaseClient.java#L114-L116
131,755
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/TeamServiceImpl.java
TeamServiceImpl.getTeamByCollectorWithFilter
@Override public Page<Team> getTeamByCollectorWithFilter(ObjectId collectorId, String teamName, Pageable pageable) { Page<Team> teams = teamRepository.findAllByCollectorIdAndNameContainingIgnoreCase(collectorId,teamName,pageable); return teams; }
java
@Override public Page<Team> getTeamByCollectorWithFilter(ObjectId collectorId, String teamName, Pageable pageable) { Page<Team> teams = teamRepository.findAllByCollectorIdAndNameContainingIgnoreCase(collectorId,teamName,pageable); return teams; }
[ "@", "Override", "public", "Page", "<", "Team", ">", "getTeamByCollectorWithFilter", "(", "ObjectId", "collectorId", ",", "String", "teamName", ",", "Pageable", "pageable", ")", "{", "Page", "<", "Team", ">", "teams", "=", "teamRepository", ".", "findAllByCollec...
Retrieves the team information for a given collectorId, teamName, pageable @param collectorId, teamName, pageable @return teams
[ "Retrieves", "the", "team", "information", "for", "a", "given", "collectorId", "teamName", "pageable" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/TeamServiceImpl.java#L115-L119
131,756
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java
DashboardServiceImpl.getDashboardsByCollectorItems
@Override public List<Dashboard> getDashboardsByCollectorItems(Set<CollectorItem> collectorItems, CollectorType collectorType) { if (org.apache.commons.collections4.CollectionUtils.isEmpty(collectorItems)) { return new ArrayList<>(); } List<ObjectId> collectorItemIds = collectorI...
java
@Override public List<Dashboard> getDashboardsByCollectorItems(Set<CollectorItem> collectorItems, CollectorType collectorType) { if (org.apache.commons.collections4.CollectionUtils.isEmpty(collectorItems)) { return new ArrayList<>(); } List<ObjectId> collectorItemIds = collectorI...
[ "@", "Override", "public", "List", "<", "Dashboard", ">", "getDashboardsByCollectorItems", "(", "Set", "<", "CollectorItem", ">", "collectorItems", ",", "CollectorType", "collectorType", ")", "{", "if", "(", "org", ".", "apache", ".", "commons", ".", "collection...
Get all the dashboards that have the collector items @param collectorItems collector items @param collectorType type of the collector @return a list of dashboards
[ "Get", "all", "the", "dashboards", "that", "have", "the", "collector", "items" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java#L143-L153
131,757
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java
DashboardServiceImpl.handleCollectorItems
private void handleCollectorItems(List<Component> components) { for (Component component : components) { Map<CollectorType, List<CollectorItem>> itemMap = component.getCollectorItems(); for (CollectorType type : itemMap.keySet()) { List<CollectorItem> items = itemMap.get(...
java
private void handleCollectorItems(List<Component> components) { for (Component component : components) { Map<CollectorType, List<CollectorItem>> itemMap = component.getCollectorItems(); for (CollectorType type : itemMap.keySet()) { List<CollectorItem> items = itemMap.get(...
[ "private", "void", "handleCollectorItems", "(", "List", "<", "Component", ">", "components", ")", "{", "for", "(", "Component", "component", ":", "components", ")", "{", "Map", "<", "CollectorType", ",", "List", "<", "CollectorItem", ">", ">", "itemMap", "="...
For the dashboard, get all the components and get all the collector items for the components. If a collector item is NOT associated with any Component, disable it. @param components
[ "For", "the", "dashboard", "get", "all", "the", "components", "and", "get", "all", "the", "collector", "items", "for", "the", "components", ".", "If", "a", "collector", "item", "is", "NOT", "associated", "with", "any", "Component", "disable", "it", "." ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java#L230-L243
131,758
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java
DashboardServiceImpl.setAppAndComponentNameToDashboard
private void setAppAndComponentNameToDashboard(Dashboard dashboard, String appName, String compName) { if(appName != null && !"".equals(appName)){ Cmdb cmdb = cmdbService.configurationItemByConfigurationItem(appName); if(cmdb !=null) { dashboard.setConfigurationItemBusS...
java
private void setAppAndComponentNameToDashboard(Dashboard dashboard, String appName, String compName) { if(appName != null && !"".equals(appName)){ Cmdb cmdb = cmdbService.configurationItemByConfigurationItem(appName); if(cmdb !=null) { dashboard.setConfigurationItemBusS...
[ "private", "void", "setAppAndComponentNameToDashboard", "(", "Dashboard", "dashboard", ",", "String", "appName", ",", "String", "compName", ")", "{", "if", "(", "appName", "!=", "null", "&&", "!", "\"\"", ".", "equals", "(", "appName", ")", ")", "{", "Cmdb",...
Sets business service, business application and valid flag for each to the give Dashboard @param dashboard @param appName @param compName
[ "Sets", "business", "service", "business", "application", "and", "valid", "flag", "for", "each", "to", "the", "give", "Dashboard" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java#L666-L682
131,759
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java
DashboardServiceImpl.duplicateDashboardErrorCheck
private void duplicateDashboardErrorCheck(Dashboard dashboard) throws HygieiaException { String appName = dashboard.getConfigurationItemBusServName(); String compName = dashboard.getConfigurationItemBusAppName(); if(appName != null && !appName.isEmpty() && compName != null && !compName.isEmpty(...
java
private void duplicateDashboardErrorCheck(Dashboard dashboard) throws HygieiaException { String appName = dashboard.getConfigurationItemBusServName(); String compName = dashboard.getConfigurationItemBusAppName(); if(appName != null && !appName.isEmpty() && compName != null && !compName.isEmpty(...
[ "private", "void", "duplicateDashboardErrorCheck", "(", "Dashboard", "dashboard", ")", "throws", "HygieiaException", "{", "String", "appName", "=", "dashboard", ".", "getConfigurationItemBusServName", "(", ")", ";", "String", "compName", "=", "dashboard", ".", "getCon...
Takes Dashboard and checks to see if there is an existing Dashboard with the same business service and business application Throws error if found @param dashboard @throws HygieiaException
[ "Takes", "Dashboard", "and", "checks", "to", "see", "if", "there", "is", "an", "existing", "Dashboard", "with", "the", "same", "business", "service", "and", "business", "application", "Throws", "error", "if", "found" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java#L690-L700
131,760
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java
DashboardServiceImpl.getAllDashboardsByTitleCount
@Override public Integer getAllDashboardsByTitleCount(String title, String type) { List<Dashboard> dashboards = null; if ((type != null) && (!type.isEmpty()) && (!UNDEFINED.equalsIgnoreCase(type))) { dashboards = dashboardRepository.findAllByTypeContainingIgnoreCaseAndTitleContainingIgno...
java
@Override public Integer getAllDashboardsByTitleCount(String title, String type) { List<Dashboard> dashboards = null; if ((type != null) && (!type.isEmpty()) && (!UNDEFINED.equalsIgnoreCase(type))) { dashboards = dashboardRepository.findAllByTypeContainingIgnoreCaseAndTitleContainingIgno...
[ "@", "Override", "public", "Integer", "getAllDashboardsByTitleCount", "(", "String", "title", ",", "String", "type", ")", "{", "List", "<", "Dashboard", ">", "dashboards", "=", "null", ";", "if", "(", "(", "type", "!=", "null", ")", "&&", "(", "!", "type...
Get count of all dashboards filtered by title @param title @return Integer
[ "Get", "count", "of", "all", "dashboards", "filtered", "by", "title" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java#L726-L735
131,761
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java
DashboardServiceImpl.count
@Override public long count(String type) { if ((type != null) && (!type.isEmpty()) && (!UNDEFINED.equalsIgnoreCase(type))) { return dashboardRepository.countByTypeContainingIgnoreCase(type); } else { return dashboardRepository.count(); } }
java
@Override public long count(String type) { if ((type != null) && (!type.isEmpty()) && (!UNDEFINED.equalsIgnoreCase(type))) { return dashboardRepository.countByTypeContainingIgnoreCase(type); } else { return dashboardRepository.count(); } }
[ "@", "Override", "public", "long", "count", "(", "String", "type", ")", "{", "if", "(", "(", "type", "!=", "null", ")", "&&", "(", "!", "type", ".", "isEmpty", "(", ")", ")", "&&", "(", "!", "UNDEFINED", ".", "equalsIgnoreCase", "(", "type", ")", ...
Get count of all dashboards, use dashboard type if supplied @param @return long
[ "Get", "count", "of", "all", "dashboards", "use", "dashboard", "type", "if", "supplied" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/DashboardServiceImpl.java#L743-L750
131,762
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java
CmdbRemoteServiceImpl.updateRelationship
private void updateRelationship( CmdbRequest request ) { if( !StringUtils.isEmpty( request.getConfigurationItemBusServName() ) ) { Cmdb busServiceItem = cmdbRepository.findByConfigurationItemAndItemType(request.getConfigurationItemBusServName(), APP_TYPE); if (busServiceItem.getComponen...
java
private void updateRelationship( CmdbRequest request ) { if( !StringUtils.isEmpty( request.getConfigurationItemBusServName() ) ) { Cmdb busServiceItem = cmdbRepository.findByConfigurationItemAndItemType(request.getConfigurationItemBusServName(), APP_TYPE); if (busServiceItem.getComponen...
[ "private", "void", "updateRelationship", "(", "CmdbRequest", "request", ")", "{", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "request", ".", "getConfigurationItemBusServName", "(", ")", ")", ")", "{", "Cmdb", "busServiceItem", "=", "cmdbRepository", "."...
If ConfigurationItemBusServName is set then update it with the new relationship @param request
[ "If", "ConfigurationItemBusServName", "is", "set", "then", "update", "it", "with", "the", "new", "relationship" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java#L63-L78
131,763
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java
CmdbRemoteServiceImpl.validateRequest
private void validateRequest(CmdbRequest request) throws HygieiaException { String busServiceName = request.getConfigurationItemBusServName(); if(!StringUtils.isEmpty( busServiceName ) && cmdbRepository.findByConfigurationItemAndItemType( busServiceName, APP_TYPE ) == null){ throw new Hygiei...
java
private void validateRequest(CmdbRequest request) throws HygieiaException { String busServiceName = request.getConfigurationItemBusServName(); if(!StringUtils.isEmpty( busServiceName ) && cmdbRepository.findByConfigurationItemAndItemType( busServiceName, APP_TYPE ) == null){ throw new Hygiei...
[ "private", "void", "validateRequest", "(", "CmdbRequest", "request", ")", "throws", "HygieiaException", "{", "String", "busServiceName", "=", "request", ".", "getConfigurationItemBusServName", "(", ")", ";", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "bus...
Validates CmdbRequest for errors @param request @throws HygieiaException
[ "Validates", "CmdbRequest", "for", "errors" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java#L85-L100
131,764
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java
CmdbRemoteServiceImpl.requestToCmdb
private Cmdb requestToCmdb( CmdbRequest request ){ Cmdb cmdb = new Cmdb(); cmdb.setConfigurationItem( request.getConfigurationItem() ); cmdb.setConfigurationItemSubType( request.getConfigurationItemSubType() ); cmdb.setConfigurationItemType( request.getConfigurationItemType() ); ...
java
private Cmdb requestToCmdb( CmdbRequest request ){ Cmdb cmdb = new Cmdb(); cmdb.setConfigurationItem( request.getConfigurationItem() ); cmdb.setConfigurationItemSubType( request.getConfigurationItemSubType() ); cmdb.setConfigurationItemType( request.getConfigurationItemType() ); ...
[ "private", "Cmdb", "requestToCmdb", "(", "CmdbRequest", "request", ")", "{", "Cmdb", "cmdb", "=", "new", "Cmdb", "(", ")", ";", "cmdb", ".", "setConfigurationItem", "(", "request", ".", "getConfigurationItem", "(", ")", ")", ";", "cmdb", ".", "setConfigurati...
Takes CmdbRequest and converts to Cmdb Object @param request @return Cmdb item
[ "Takes", "CmdbRequest", "and", "converts", "to", "Cmdb", "Object" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java#L107-L119
131,765
Hygieia/Hygieia
api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java
CmdbRemoteServiceImpl.buildCollectorItem
private CollectorItem buildCollectorItem( CmdbRequest request, Collector collector ) { CollectorItem collectorItem = new CollectorItem(); collectorItem.setCollectorId( collector.getId() ); collectorItem.setEnabled( false ); collectorItem.setPushed( true ); collectorItem.setDescr...
java
private CollectorItem buildCollectorItem( CmdbRequest request, Collector collector ) { CollectorItem collectorItem = new CollectorItem(); collectorItem.setCollectorId( collector.getId() ); collectorItem.setEnabled( false ); collectorItem.setPushed( true ); collectorItem.setDescr...
[ "private", "CollectorItem", "buildCollectorItem", "(", "CmdbRequest", "request", ",", "Collector", "collector", ")", "{", "CollectorItem", "collectorItem", "=", "new", "CollectorItem", "(", ")", ";", "collectorItem", ".", "setCollectorId", "(", "collector", ".", "ge...
Builds collector Item for new Cmdb item @param request @param collector @return
[ "Builds", "collector", "Item", "for", "new", "Cmdb", "item" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api/src/main/java/com/capitalone/dashboard/service/CmdbRemoteServiceImpl.java#L127-L139
131,766
Hygieia/Hygieia
collectors/scm/bitbucket/src/main/java/com/capitalone/dashboard/collector/DefaultBitbucketServerClient.java
DefaultBitbucketServerClient.buildUri
@SuppressWarnings({"PMD.NPathComplexity"}) /*package*/ URI buildUri(final String rawUrl, final String branch, final String lastKnownCommit) throws URISyntaxException { URIBuilder builder = new URIBuilder(); /* * Examples: * * ssh://git@company.com/project/repository.git * https://username@c...
java
@SuppressWarnings({"PMD.NPathComplexity"}) /*package*/ URI buildUri(final String rawUrl, final String branch, final String lastKnownCommit) throws URISyntaxException { URIBuilder builder = new URIBuilder(); /* * Examples: * * ssh://git@company.com/project/repository.git * https://username@c...
[ "@", "SuppressWarnings", "(", "{", "\"PMD.NPathComplexity\"", "}", ")", "/*package*/", "URI", "buildUri", "(", "final", "String", "rawUrl", ",", "final", "String", "branch", ",", "final", "String", "lastKnownCommit", ")", "throws", "URISyntaxException", "{", "URIB...
package for junit
[ "package", "for", "junit" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/collectors/scm/bitbucket/src/main/java/com/capitalone/dashboard/collector/DefaultBitbucketServerClient.java#L146-L221
131,767
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/service/DashboardAuditServiceImpl.java
DashboardAuditServiceImpl.getDashboardReviewResponse
@SuppressWarnings("PMD.NPathComplexity") @Override public DashboardReviewResponse getDashboardReviewResponse(String dashboardTitle, DashboardType dashboardType, String businessService, String businessApp, long beginDate, long endDate, Set<AuditType> auditTypes) throws AuditException { validateParameter...
java
@SuppressWarnings("PMD.NPathComplexity") @Override public DashboardReviewResponse getDashboardReviewResponse(String dashboardTitle, DashboardType dashboardType, String businessService, String businessApp, long beginDate, long endDate, Set<AuditType> auditTypes) throws AuditException { validateParameter...
[ "@", "SuppressWarnings", "(", "\"PMD.NPathComplexity\"", ")", "@", "Override", "public", "DashboardReviewResponse", "getDashboardReviewResponse", "(", "String", "dashboardTitle", ",", "DashboardType", "dashboardType", ",", "String", "businessService", ",", "String", "busine...
Calculates audit response for a given dashboard @param dashboardTitle @param dashboardType @param businessService @param businessApp @param beginDate @param endDate @param auditTypes @return @DashboardReviewResponse for a given dashboard @throws AuditException
[ "Calculates", "audit", "response", "for", "a", "given", "dashboard" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/service/DashboardAuditServiceImpl.java#L65-L102
131,768
Hygieia/Hygieia
api-audit/src/main/java/com/capitalone/dashboard/service/DashboardAuditServiceImpl.java
DashboardAuditServiceImpl.getDashboard
private Dashboard getDashboard(String title, DashboardType type, String busServ, String busApp) throws AuditException { if (!StringUtils.isEmpty(title) && (type != null)) { return dashboardRepository.findByTitleAndType(title, type); } else if (!StringUtils.isEmpty(busServ) && !S...
java
private Dashboard getDashboard(String title, DashboardType type, String busServ, String busApp) throws AuditException { if (!StringUtils.isEmpty(title) && (type != null)) { return dashboardRepository.findByTitleAndType(title, type); } else if (!StringUtils.isEmpty(busServ) && !S...
[ "private", "Dashboard", "getDashboard", "(", "String", "title", ",", "DashboardType", "type", ",", "String", "busServ", ",", "String", "busApp", ")", "throws", "AuditException", "{", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "title", ")", "&&", "("...
Finds the dashboard @param title @param type @param busServ @param busApp @return the @Dashboard for a given title, type, business service and app @throws AuditException
[ "Finds", "the", "dashboard" ]
d8b67a590da2744acf59bcd99d9b34ef1bb84890
https://github.com/Hygieia/Hygieia/blob/d8b67a590da2744acf59bcd99d9b34ef1bb84890/api-audit/src/main/java/com/capitalone/dashboard/service/DashboardAuditServiceImpl.java#L138-L154
131,769
Javen205/IJPay
src/main/java/com/jpay/util/IOUtils.java
IOUtils.toFile
public static void toFile(InputStream input, File file) throws IOException { OutputStream os = new FileOutputStream(file); int bytesRead = 0; byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; while ((bytesRead = input.read(buffer, 0, DEFAULT_BUFFER_SIZE)) != -1) { os.write(buffer, 0, bytesRead); } IOUtils.c...
java
public static void toFile(InputStream input, File file) throws IOException { OutputStream os = new FileOutputStream(file); int bytesRead = 0; byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; while ((bytesRead = input.read(buffer, 0, DEFAULT_BUFFER_SIZE)) != -1) { os.write(buffer, 0, bytesRead); } IOUtils.c...
[ "public", "static", "void", "toFile", "(", "InputStream", "input", ",", "File", "file", ")", "throws", "IOException", "{", "OutputStream", "os", "=", "new", "FileOutputStream", "(", "file", ")", ";", "int", "bytesRead", "=", "0", ";", "byte", "[", "]", "...
InputStream to File @param input the <code>InputStream</code> to read from @param file the File to write @throws IOException id异常
[ "InputStream", "to", "File" ]
78da6be4b70675abc6a41df74817532fa257ef29
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/util/IOUtils.java#L66-L75
131,770
Javen205/IJPay
src/main/java/com/jpay/ext/kit/HttpKit.java
HttpKit.get
public static String get(String url, Map<String, String> queryParas, Map<String, String> headers) { HttpURLConnection conn = null; try { conn = getHttpConnection(buildUrlWithQueryString(url, queryParas), GET, headers); conn.connect(); return readResponseString(conn); } catch (Exception e) { throw ne...
java
public static String get(String url, Map<String, String> queryParas, Map<String, String> headers) { HttpURLConnection conn = null; try { conn = getHttpConnection(buildUrlWithQueryString(url, queryParas), GET, headers); conn.connect(); return readResponseString(conn); } catch (Exception e) { throw ne...
[ "public", "static", "String", "get", "(", "String", "url", ",", "Map", "<", "String", ",", "String", ">", "queryParas", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "HttpURLConnection", "conn", "=", "null", ";", "try", "{", "conn...
Send GET request
[ "Send", "GET", "request" ]
78da6be4b70675abc6a41df74817532fa257ef29
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/ext/kit/HttpKit.java#L111-L126
131,771
Javen205/IJPay
src/main/java/com/jpay/ext/kit/HttpKit.java
HttpKit.post
public static String post(String url, Map<String, String> queryParas, String data, Map<String, String> headers) { HttpURLConnection conn = null; try { conn = getHttpConnection(buildUrlWithQueryString(url, queryParas), POST, headers); conn.connect(); OutputStream out = conn.getOutputStream(); out.wri...
java
public static String post(String url, Map<String, String> queryParas, String data, Map<String, String> headers) { HttpURLConnection conn = null; try { conn = getHttpConnection(buildUrlWithQueryString(url, queryParas), POST, headers); conn.connect(); OutputStream out = conn.getOutputStream(); out.wri...
[ "public", "static", "String", "post", "(", "String", "url", ",", "Map", "<", "String", ",", "String", ">", "queryParas", ",", "String", "data", ",", "Map", "<", "String", ",", "String", ">", "headers", ")", "{", "HttpURLConnection", "conn", "=", "null", ...
Send POST request
[ "Send", "POST", "request" ]
78da6be4b70675abc6a41df74817532fa257ef29
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/ext/kit/HttpKit.java#L139-L160
131,772
Javen205/IJPay
src/main/java/com/jpay/ext/kit/HttpKit.java
HttpKit.buildUrlWithQueryString
private static String buildUrlWithQueryString(String url, Map<String, String> queryParas) { if (queryParas == null || queryParas.isEmpty()) return url; StringBuilder sb = new StringBuilder(url); boolean isFirst; if (!url.contains("?")) { isFirst = true; sb.append("?"); } else { isFirst = fals...
java
private static String buildUrlWithQueryString(String url, Map<String, String> queryParas) { if (queryParas == null || queryParas.isEmpty()) return url; StringBuilder sb = new StringBuilder(url); boolean isFirst; if (!url.contains("?")) { isFirst = true; sb.append("?"); } else { isFirst = fals...
[ "private", "static", "String", "buildUrlWithQueryString", "(", "String", "url", ",", "Map", "<", "String", ",", "String", ">", "queryParas", ")", "{", "if", "(", "queryParas", "==", "null", "||", "queryParas", ".", "isEmpty", "(", ")", ")", "return", "url"...
Build queryString of the url
[ "Build", "queryString", "of", "the", "url" ]
78da6be4b70675abc6a41df74817532fa257ef29
https://github.com/Javen205/IJPay/blob/78da6be4b70675abc6a41df74817532fa257ef29/src/main/java/com/jpay/ext/kit/HttpKit.java#L203-L228
131,773
QNJR-GROUP/EasyTransaction
easytrans-core/src/main/java/com/yiqiniu/easytrans/idempotent/IdempotentHelper.java
IdempotentHelper.getIdempotentPo
public IdempotentPo getIdempotentPo(EasyTransFilterChain filterChain, Map<String,Object> header, EasyTransRequest<?, ?> reqest){ BusinessIdentifer businessType = ReflectUtil.getBusinessIdentifer(reqest.getClass()); Object trxIdObj = header.get(EasytransConstant.CallHeadKeys.PARENT_TRX_ID_KEY); TransactionId tr...
java
public IdempotentPo getIdempotentPo(EasyTransFilterChain filterChain, Map<String,Object> header, EasyTransRequest<?, ?> reqest){ BusinessIdentifer businessType = ReflectUtil.getBusinessIdentifer(reqest.getClass()); Object trxIdObj = header.get(EasytransConstant.CallHeadKeys.PARENT_TRX_ID_KEY); TransactionId tr...
[ "public", "IdempotentPo", "getIdempotentPo", "(", "EasyTransFilterChain", "filterChain", ",", "Map", "<", "String", ",", "Object", ">", "header", ",", "EasyTransRequest", "<", "?", ",", "?", ">", "reqest", ")", "{", "BusinessIdentifer", "businessType", "=", "Ref...
get execute result from database @param filterChain @param reqest @return
[ "get", "execute", "result", "from", "database" ]
53b031724a3fd1145f32b9a7b5c6fb8138d6a426
https://github.com/QNJR-GROUP/EasyTransaction/blob/53b031724a3fd1145f32b9a7b5c6fb8138d6a426/easytrans-core/src/main/java/com/yiqiniu/easytrans/idempotent/IdempotentHelper.java#L142-L168
131,774
QNJR-GROUP/EasyTransaction
easytrans-core/src/main/java/com/yiqiniu/easytrans/context/LogProcessContext.java
LogProcessContext.getFinalMasterTransStatus
public Boolean getFinalMasterTransStatus() { if(finalMasterTransStatus == null){ //check by logs first finalMasterTransStatus = checkTransStatusByLogs(); //then check by API if(finalMasterTransStatus == null){ finalMasterTransStatus = transStatusChecker.checkTransactionStatus(getLogCollecti...
java
public Boolean getFinalMasterTransStatus() { if(finalMasterTransStatus == null){ //check by logs first finalMasterTransStatus = checkTransStatusByLogs(); //then check by API if(finalMasterTransStatus == null){ finalMasterTransStatus = transStatusChecker.checkTransactionStatus(getLogCollecti...
[ "public", "Boolean", "getFinalMasterTransStatus", "(", ")", "{", "if", "(", "finalMasterTransStatus", "==", "null", ")", "{", "//check by logs first\r", "finalMasterTransStatus", "=", "checkTransStatusByLogs", "(", ")", ";", "//then check by API\r", "if", "(", "finalMas...
status true for commit,false for roll back,null for unknown @return
[ "status", "true", "for", "commit", "false", "for", "roll", "back", "null", "for", "unknown" ]
53b031724a3fd1145f32b9a7b5c6fb8138d6a426
https://github.com/QNJR-GROUP/EasyTransaction/blob/53b031724a3fd1145f32b9a7b5c6fb8138d6a426/easytrans-core/src/main/java/com/yiqiniu/easytrans/context/LogProcessContext.java#L145-L156
131,775
pravega/pravega
controller/src/main/java/io/pravega/controller/server/eventProcessor/requesthandlers/AutoScaleTask.java
AutoScaleTask.postScaleRequest
private CompletableFuture<Void> postScaleRequest(final AutoScaleEvent request, final List<Long> segments, final List<Map.Entry<Double, Double>> newRanges, final long requestId) { ScaleOpEvent event = new Sc...
java
private CompletableFuture<Void> postScaleRequest(final AutoScaleEvent request, final List<Long> segments, final List<Map.Entry<Double, Double>> newRanges, final long requestId) { ScaleOpEvent event = new Sc...
[ "private", "CompletableFuture", "<", "Void", ">", "postScaleRequest", "(", "final", "AutoScaleEvent", "request", ",", "final", "List", "<", "Long", ">", "segments", ",", "final", "List", "<", "Map", ".", "Entry", "<", "Double", ",", "Double", ">", ">", "ne...
Scale tasks exceptions are absorbed. @param request incoming request from request stream. @param segments segments to seal @param newRanges new ranges for segments to create @return CompletableFuture
[ "Scale", "tasks", "exceptions", "are", "absorbed", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/controller/src/main/java/io/pravega/controller/server/eventProcessor/requesthandlers/AutoScaleTask.java#L198-L210
131,776
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.await
public static <T> boolean await(CompletableFuture<T> f, long timeout) { Exceptions.handleInterrupted(() -> { try { f.get(timeout, TimeUnit.MILLISECONDS); } catch (TimeoutException | ExecutionException e) { // Not handled here. } }); ...
java
public static <T> boolean await(CompletableFuture<T> f, long timeout) { Exceptions.handleInterrupted(() -> { try { f.get(timeout, TimeUnit.MILLISECONDS); } catch (TimeoutException | ExecutionException e) { // Not handled here. } }); ...
[ "public", "static", "<", "T", ">", "boolean", "await", "(", "CompletableFuture", "<", "T", ">", "f", ",", "long", "timeout", ")", "{", "Exceptions", ".", "handleInterrupted", "(", "(", ")", "->", "{", "try", "{", "f", ".", "get", "(", "timeout", ",",...
Waits for the provided future to be complete, and returns true if it was successful, false if it failed or did not complete. @param timeout The maximum number of milliseconds to block @param f The future to wait for. @param <T> The Type of the future's result. @return True if the given CompletableFuture is c...
[ "Waits", "for", "the", "provided", "future", "to", "be", "complete", "and", "returns", "true", "if", "it", "was", "successful", "false", "if", "it", "failed", "or", "did", "not", "complete", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L65-L74
131,777
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.completeAfter
public static <T> void completeAfter(Supplier<CompletableFuture<? extends T>> futureSupplier, CompletableFuture<T> toComplete) { Preconditions.checkArgument(!toComplete.isDone(), "toComplete is already completed."); try { CompletableFuture<? extends T> f = futureSupplier.get(); ...
java
public static <T> void completeAfter(Supplier<CompletableFuture<? extends T>> futureSupplier, CompletableFuture<T> toComplete) { Preconditions.checkArgument(!toComplete.isDone(), "toComplete is already completed."); try { CompletableFuture<? extends T> f = futureSupplier.get(); ...
[ "public", "static", "<", "T", ">", "void", "completeAfter", "(", "Supplier", "<", "CompletableFuture", "<", "?", "extends", "T", ">", ">", "futureSupplier", ",", "CompletableFuture", "<", "T", ">", "toComplete", ")", "{", "Preconditions", ".", "checkArgument",...
Given a Supplier returning a Future, completes another future either with the result of the first future, in case of normal completion, or exceptionally with the exception of the first future. @param futureSupplier A Supplier returning a Future to listen to. @param toComplete A CompletableFuture that has not yet b...
[ "Given", "a", "Supplier", "returning", "a", "Future", "completes", "another", "future", "either", "with", "the", "result", "of", "the", "first", "future", "in", "case", "of", "normal", "completion", "or", "exceptionally", "with", "the", "exception", "of", "the...
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L85-L98
131,778
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.isSuccessful
public static <T> boolean isSuccessful(CompletableFuture<T> f) { return f.isDone() && !f.isCompletedExceptionally() && !f.isCancelled(); }
java
public static <T> boolean isSuccessful(CompletableFuture<T> f) { return f.isDone() && !f.isCompletedExceptionally() && !f.isCancelled(); }
[ "public", "static", "<", "T", ">", "boolean", "isSuccessful", "(", "CompletableFuture", "<", "T", ">", "f", ")", "{", "return", "f", ".", "isDone", "(", ")", "&&", "!", "f", ".", "isCompletedExceptionally", "(", ")", "&&", "!", "f", ".", "isCancelled",...
Returns true if the future is done and successful. @param f The future to inspect. @param <T> The Type of the future's result. @return True if the given CompletableFuture has completed successfully.
[ "Returns", "true", "if", "the", "future", "is", "done", "and", "successful", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L107-L109
131,779
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.getException
public static <T> Throwable getException(CompletableFuture<T> future) { try { future.getNow(null); return null; } catch (Exception e) { return Exceptions.unwrap(e); } }
java
public static <T> Throwable getException(CompletableFuture<T> future) { try { future.getNow(null); return null; } catch (Exception e) { return Exceptions.unwrap(e); } }
[ "public", "static", "<", "T", ">", "Throwable", "getException", "(", "CompletableFuture", "<", "T", ">", "future", ")", "{", "try", "{", "future", ".", "getNow", "(", "null", ")", ";", "return", "null", ";", "}", "catch", "(", "Exception", "e", ")", ...
If the future has failed returns the exception that caused it. Otherwise returns null. @param <T> The Type of the future's result. @param future The future to inspect. @return null or the exception that caused the Future to fail.
[ "If", "the", "future", "has", "failed", "returns", "the", "exception", "that", "caused", "it", ".", "Otherwise", "returns", "null", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L118-L125
131,780
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.getAndHandleExceptions
public static <ResultT, ExceptionT extends Exception> ResultT getAndHandleExceptions(Future<ResultT> future, Function<Throwable, ExceptionT> exceptionConstructor) throws ExceptionT { Preconditions.checkNotNull(exceptionCons...
java
public static <ResultT, ExceptionT extends Exception> ResultT getAndHandleExceptions(Future<ResultT> future, Function<Throwable, ExceptionT> exceptionConstructor) throws ExceptionT { Preconditions.checkNotNull(exceptionCons...
[ "public", "static", "<", "ResultT", ",", "ExceptionT", "extends", "Exception", ">", "ResultT", "getAndHandleExceptions", "(", "Future", "<", "ResultT", ">", "future", ",", "Function", "<", "Throwable", ",", "ExceptionT", ">", "exceptionConstructor", ")", "throws",...
Calls get on the provided future, handling interrupted, and transforming the executionException into an exception of the type whose constructor is provided. @param future The future whose result is wanted @param exceptionConstructor This can be any function that either transforms an exception i.e. Passin...
[ "Calls", "get", "on", "the", "provided", "future", "handling", "interrupted", "and", "transforming", "the", "executionException", "into", "an", "exception", "of", "the", "type", "whose", "constructor", "is", "provided", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L174-L187
131,781
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.failedFuture
public static <T> CompletableFuture<T> failedFuture(Throwable exception) { CompletableFuture<T> result = new CompletableFuture<>(); result.completeExceptionally(exception); return result; }
java
public static <T> CompletableFuture<T> failedFuture(Throwable exception) { CompletableFuture<T> result = new CompletableFuture<>(); result.completeExceptionally(exception); return result; }
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "T", ">", "failedFuture", "(", "Throwable", "exception", ")", "{", "CompletableFuture", "<", "T", ">", "result", "=", "new", "CompletableFuture", "<>", "(", ")", ";", "result", ".", "completeExcept...
Creates a new CompletableFuture that is failed with the given exception. @param exception The exception to fail the CompletableFuture. @param <T> The Type of the future's result. @return A CompletableFuture that fails with the given exception.
[ "Creates", "a", "new", "CompletableFuture", "that", "is", "failed", "with", "the", "given", "exception", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L224-L228
131,782
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.exceptionListener
public static <T> void exceptionListener(CompletableFuture<T> completableFuture, Consumer<Throwable> exceptionListener) { completableFuture.whenComplete((r, ex) -> { if (ex != null) { Callbacks.invokeSafely(exceptionListener, ex, null); } }); }
java
public static <T> void exceptionListener(CompletableFuture<T> completableFuture, Consumer<Throwable> exceptionListener) { completableFuture.whenComplete((r, ex) -> { if (ex != null) { Callbacks.invokeSafely(exceptionListener, ex, null); } }); }
[ "public", "static", "<", "T", ">", "void", "exceptionListener", "(", "CompletableFuture", "<", "T", ">", "completableFuture", ",", "Consumer", "<", "Throwable", ">", "exceptionListener", ")", "{", "completableFuture", ".", "whenComplete", "(", "(", "r", ",", "...
Registers an exception listener to the given CompletableFuture. @param completableFuture The Future to register to. @param exceptionListener The Listener to register. @param <T> The Type of the future's result.
[ "Registers", "an", "exception", "listener", "to", "the", "given", "CompletableFuture", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L237-L243
131,783
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.exceptionListener
@SuppressWarnings("unchecked") public static <T, E extends Throwable> void exceptionListener(CompletableFuture<T> completableFuture, Class<E> exceptionClass, Consumer<E> exceptionListener) { completableFuture.whenComplete((r, ex) -> { if (ex != null && exceptionClass.isAssignableFrom(ex.getClass...
java
@SuppressWarnings("unchecked") public static <T, E extends Throwable> void exceptionListener(CompletableFuture<T> completableFuture, Class<E> exceptionClass, Consumer<E> exceptionListener) { completableFuture.whenComplete((r, ex) -> { if (ex != null && exceptionClass.isAssignableFrom(ex.getClass...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "<", "T", ",", "E", "extends", "Throwable", ">", "void", "exceptionListener", "(", "CompletableFuture", "<", "T", ">", "completableFuture", ",", "Class", "<", "E", ">", "exceptionClass", "...
Registers an exception listener to the given CompletableFuture for a particular type of exception. @param completableFuture The Future to register to. @param exceptionClass The type of exception to listen to. @param exceptionListener The Listener to register. @param <T> The Type of the future's result...
[ "Registers", "an", "exception", "listener", "to", "the", "given", "CompletableFuture", "for", "a", "particular", "type", "of", "exception", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L254-L261
131,784
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.toVoid
public static <T> CompletableFuture<Void> toVoid(CompletableFuture<T> future) { return future.thenAccept(Callbacks::doNothing); }
java
public static <T> CompletableFuture<Void> toVoid(CompletableFuture<T> future) { return future.thenAccept(Callbacks::doNothing); }
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "Void", ">", "toVoid", "(", "CompletableFuture", "<", "T", ">", "future", ")", "{", "return", "future", ".", "thenAccept", "(", "Callbacks", "::", "doNothing", ")", ";", "}" ]
Returns a CompletableFuture that will end when the given future ends, but discards its result. If the given future fails, the returned future will fail with the same exception. @param future The CompletableFuture to attach to. @param <T> The type of the input's future result. @return A CompletableFuture that will c...
[ "Returns", "a", "CompletableFuture", "that", "will", "end", "when", "the", "given", "future", "ends", "but", "discards", "its", "result", ".", "If", "the", "given", "future", "fails", "the", "returned", "future", "will", "fail", "with", "the", "same", "excep...
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L341-L343
131,785
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.filter
public static <T> CompletableFuture<List<T>> filter(List<T> input, Function<T, CompletableFuture<Boolean>> predicate) { Preconditions.checkNotNull(input); val allFutures = input.stream().collect(Collectors.toMap(key -> key, predicate::apply)); return Futures .allOf(allFutures.va...
java
public static <T> CompletableFuture<List<T>> filter(List<T> input, Function<T, CompletableFuture<Boolean>> predicate) { Preconditions.checkNotNull(input); val allFutures = input.stream().collect(Collectors.toMap(key -> key, predicate::apply)); return Futures .allOf(allFutures.va...
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "List", "<", "T", ">", ">", "filter", "(", "List", "<", "T", ">", "input", ",", "Function", "<", "T", ",", "CompletableFuture", "<", "Boolean", ">", ">", "predicate", ")", "{", "Preconditions...
Filter that takes a predicate that evaluates in future and returns the filtered list that evaluates in future. @param input Input list. @param predicate Predicate that evaluates in the future. @param <T> Type parameter. @return List that evaluates in future.
[ "Filter", "that", "takes", "a", "predicate", "that", "evaluates", "in", "future", "and", "returns", "the", "filtered", "list", "that", "evaluates", "in", "future", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L444-L456
131,786
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.delayedFuture
public static CompletableFuture<Void> delayedFuture(Duration delay, ScheduledExecutorService executorService) { CompletableFuture<Void> result = new CompletableFuture<>(); if (delay.toMillis() == 0) { // Zero delay; no need to bother with scheduling a task in the future. result.c...
java
public static CompletableFuture<Void> delayedFuture(Duration delay, ScheduledExecutorService executorService) { CompletableFuture<Void> result = new CompletableFuture<>(); if (delay.toMillis() == 0) { // Zero delay; no need to bother with scheduling a task in the future. result.c...
[ "public", "static", "CompletableFuture", "<", "Void", ">", "delayedFuture", "(", "Duration", "delay", ",", "ScheduledExecutorService", "executorService", ")", "{", "CompletableFuture", "<", "Void", ">", "result", "=", "new", "CompletableFuture", "<>", "(", ")", ";...
Creates a CompletableFuture that will do nothing and complete after a specified delay, without using a thread during the delay. @param delay The duration of the delay (how much to wait until completing the Future). @param executorService An ExecutorService that will be used to complete the Future on. @return...
[ "Creates", "a", "CompletableFuture", "that", "will", "do", "nothing", "and", "complete", "after", "a", "specified", "delay", "without", "using", "a", "thread", "during", "the", "delay", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L510-L521
131,787
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.delayedFuture
public static <T> CompletableFuture<T> delayedFuture(final Supplier<CompletableFuture<T>> task, final long delay, final ScheduledExecutorService executorService) { return delayedFuture(Duration.ofMi...
java
public static <T> CompletableFuture<T> delayedFuture(final Supplier<CompletableFuture<T>> task, final long delay, final ScheduledExecutorService executorService) { return delayedFuture(Duration.ofMi...
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "T", ">", "delayedFuture", "(", "final", "Supplier", "<", "CompletableFuture", "<", "T", ">", ">", "task", ",", "final", "long", "delay", ",", "final", "ScheduledExecutorService", "executorService", ...
Executes the asynchronous task after the specified delay. @param task Asynchronous task. @param delay Delay in milliseconds. @param executorService Executor on which to execute the task. @param <T> Type parameter. @return A CompletableFuture that will be completed with the result of th...
[ "Executes", "the", "asynchronous", "task", "after", "the", "specified", "delay", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L532-L537
131,788
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.delayedTask
public static <T> CompletableFuture<T> delayedTask(final Supplier<T> task, final Duration delay, final ScheduledExecutorService executorService) { CompletableFuture<T> result = new CompletableFuture<>()...
java
public static <T> CompletableFuture<T> delayedTask(final Supplier<T> task, final Duration delay, final ScheduledExecutorService executorService) { CompletableFuture<T> result = new CompletableFuture<>()...
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "T", ">", "delayedTask", "(", "final", "Supplier", "<", "T", ">", "task", ",", "final", "Duration", "delay", ",", "final", "ScheduledExecutorService", "executorService", ")", "{", "CompletableFuture", ...
Executes the given task after the specified delay. @param task Asynchronous task. @param delay Delay. @param executorService Executor on which to execute the task. @param <T> Type parameter. @return A CompletableFuture that will be completed with the result of the given task, or comple...
[ "Executes", "the", "given", "task", "after", "the", "specified", "delay", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L549-L557
131,789
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.loop
public static <T> CompletableFuture<Void> loop(Iterable<T> iterable, Function<T, CompletableFuture<Boolean>> loopBody, Executor executor) { Iterator<T> iterator = iterable.iterator(); AtomicBoolean canContinue = new AtomicBoolean(true); return loop( () -> iterator.hasNext() && ca...
java
public static <T> CompletableFuture<Void> loop(Iterable<T> iterable, Function<T, CompletableFuture<Boolean>> loopBody, Executor executor) { Iterator<T> iterator = iterable.iterator(); AtomicBoolean canContinue = new AtomicBoolean(true); return loop( () -> iterator.hasNext() && ca...
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "Void", ">", "loop", "(", "Iterable", "<", "T", ">", "iterable", ",", "Function", "<", "T", ",", "CompletableFuture", "<", "Boolean", ">", ">", "loopBody", ",", "Executor", "executor", ")", "{"...
Executes a loop using CompletableFutures over the given Iterable, processing each item in order, without overlap, using the given Executor for task execution. @param iterable An Iterable instance to loop over. @param loopBody A Function that, when applied to an element in the given iterable, returns a CompletableFutur...
[ "Executes", "a", "loop", "using", "CompletableFutures", "over", "the", "given", "Iterable", "processing", "each", "item", "in", "order", "without", "overlap", "using", "the", "given", "Executor", "for", "task", "execution", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L596-L603
131,790
pravega/pravega
common/src/main/java/io/pravega/common/concurrent/Futures.java
Futures.doWhileLoop
public static <T> CompletableFuture<Void> doWhileLoop(Supplier<CompletableFuture<T>> loopBody, Predicate<T> condition, Executor executor) { CompletableFuture<Void> result = new CompletableFuture<>(); // We implement the do-while loop using a regular loop, but we execute one iteration before we create t...
java
public static <T> CompletableFuture<Void> doWhileLoop(Supplier<CompletableFuture<T>> loopBody, Predicate<T> condition, Executor executor) { CompletableFuture<Void> result = new CompletableFuture<>(); // We implement the do-while loop using a regular loop, but we execute one iteration before we create t...
[ "public", "static", "<", "T", ">", "CompletableFuture", "<", "Void", ">", "doWhileLoop", "(", "Supplier", "<", "CompletableFuture", "<", "T", ">", ">", "loopBody", ",", "Predicate", "<", "T", ">", "condition", ",", "Executor", "executor", ")", "{", "Comple...
Executes a code fragment returning a CompletableFutures while a condition on the returned value is satisfied. @param condition Predicate that indicates whether to proceed with the loop or not. @param loopBody A Supplier that returns a CompletableFuture which represents the body of the loop. This supplier is invoked e...
[ "Executes", "a", "code", "fragment", "returning", "a", "CompletableFutures", "while", "a", "condition", "on", "the", "returned", "value", "is", "satisfied", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/concurrent/Futures.java#L652-L672
131,791
pravega/pravega
client/src/main/java/io/pravega/client/stream/impl/Pinger.java
Pinger.pingTransactions
private void pingTransactions() { log.info("Start sending transaction pings."); txnList.stream().forEach(uuid -> { try { log.debug("Sending ping request for txn ID: {} with lease: {}", uuid, txnLeaseMillis); controller.pingTransaction(stream, uuid, txnLeaseMil...
java
private void pingTransactions() { log.info("Start sending transaction pings."); txnList.stream().forEach(uuid -> { try { log.debug("Sending ping request for txn ID: {} with lease: {}", uuid, txnLeaseMillis); controller.pingTransaction(stream, uuid, txnLeaseMil...
[ "private", "void", "pingTransactions", "(", ")", "{", "log", ".", "info", "(", "\"Start sending transaction pings.\"", ")", ";", "txnList", ".", "stream", "(", ")", ".", "forEach", "(", "uuid", "->", "{", "try", "{", "log", ".", "debug", "(", "\"Sending pi...
Ping all the transactions present in the list. Controller client performs retries in case of a failures. On a failure the particular transaction it is removed from the ping list.
[ "Ping", "all", "the", "transactions", "present", "in", "the", "list", ".", "Controller", "client", "performs", "retries", "in", "case", "of", "a", "failures", ".", "On", "a", "failure", "the", "particular", "transaction", "it", "is", "removed", "from", "the"...
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/client/src/main/java/io/pravega/client/stream/impl/Pinger.java#L90-L106
131,792
pravega/pravega
segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java
RollingSegmentHandle.refresh
synchronized void refresh(RollingSegmentHandle source) { Preconditions.checkArgument(source.getSegmentName().equals(this.getSegmentName()), "SegmentName mismatch."); if (this.readOnly == source.readOnly) { // Update the header handle, but only if both this handle and the source one have the ...
java
synchronized void refresh(RollingSegmentHandle source) { Preconditions.checkArgument(source.getSegmentName().equals(this.getSegmentName()), "SegmentName mismatch."); if (this.readOnly == source.readOnly) { // Update the header handle, but only if both this handle and the source one have the ...
[ "synchronized", "void", "refresh", "(", "RollingSegmentHandle", "source", ")", "{", "Preconditions", ".", "checkArgument", "(", "source", ".", "getSegmentName", "(", ")", ".", "equals", "(", "this", ".", "getSegmentName", "(", ")", ")", ",", "\"SegmentName misma...
Updates the contents of this handle with information from the given one. @param source The RollingSegmentHandle to update from.
[ "Updates", "the", "contents", "of", "this", "handle", "with", "information", "from", "the", "given", "one", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java#L91-L107
131,793
pravega/pravega
segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java
RollingSegmentHandle.markSealed
synchronized void markSealed() { if (!this.sealed) { this.sealed = true; this.segmentChunks = Collections.unmodifiableList(this.segmentChunks); this.activeChunkHandle = null; } }
java
synchronized void markSealed() { if (!this.sealed) { this.sealed = true; this.segmentChunks = Collections.unmodifiableList(this.segmentChunks); this.activeChunkHandle = null; } }
[ "synchronized", "void", "markSealed", "(", ")", "{", "if", "(", "!", "this", ".", "sealed", ")", "{", "this", ".", "sealed", "=", "true", ";", "this", ".", "segmentChunks", "=", "Collections", ".", "unmodifiableList", "(", "this", ".", "segmentChunks", "...
Records the fact that the Segment represented by this Handle has been sealed.
[ "Records", "the", "fact", "that", "the", "Segment", "represented", "by", "this", "Handle", "has", "been", "sealed", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java#L121-L127
131,794
pravega/pravega
segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java
RollingSegmentHandle.addChunk
synchronized void addChunk(SegmentChunk segmentChunk, SegmentHandle activeChunkHandle) { Preconditions.checkState(!this.sealed, "Cannot add SegmentChunks for a Sealed Handle."); if (this.segmentChunks.size() > 0) { long expectedOffset = this.segmentChunks.get(this.segmentChunks.size() - 1).g...
java
synchronized void addChunk(SegmentChunk segmentChunk, SegmentHandle activeChunkHandle) { Preconditions.checkState(!this.sealed, "Cannot add SegmentChunks for a Sealed Handle."); if (this.segmentChunks.size() > 0) { long expectedOffset = this.segmentChunks.get(this.segmentChunks.size() - 1).g...
[ "synchronized", "void", "addChunk", "(", "SegmentChunk", "segmentChunk", ",", "SegmentHandle", "activeChunkHandle", ")", "{", "Preconditions", ".", "checkState", "(", "!", "this", ".", "sealed", ",", "\"Cannot add SegmentChunks for a Sealed Handle.\"", ")", ";", "if", ...
Adds a new SegmentChunk. @param segmentChunk The SegmentChunk to add. This SegmentChunk must be in continuity of any existing SegmentChunks. @param activeChunkHandle The newly added SegmentChunk's write handle.
[ "Adds", "a", "new", "SegmentChunk", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java#L179-L194
131,795
pravega/pravega
segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java
RollingSegmentHandle.addChunks
synchronized void addChunks(List<SegmentChunk> segmentChunks) { Preconditions.checkState(!this.sealed, "Cannot add SegmentChunks for a Sealed Handle."); long expectedOffset = 0; if (this.segmentChunks.size() > 0) { expectedOffset = this.segmentChunks.get(this.segmentChunks.size() - 1...
java
synchronized void addChunks(List<SegmentChunk> segmentChunks) { Preconditions.checkState(!this.sealed, "Cannot add SegmentChunks for a Sealed Handle."); long expectedOffset = 0; if (this.segmentChunks.size() > 0) { expectedOffset = this.segmentChunks.get(this.segmentChunks.size() - 1...
[ "synchronized", "void", "addChunks", "(", "List", "<", "SegmentChunk", ">", "segmentChunks", ")", "{", "Preconditions", ".", "checkState", "(", "!", "this", ".", "sealed", ",", "\"Cannot add SegmentChunks for a Sealed Handle.\"", ")", ";", "long", "expectedOffset", ...
Adds multiple SegmentChunks. @param segmentChunks The SegmentChunks to add. These SegmentChunks must be in continuity of any existing SegmentChunks.
[ "Adds", "multiple", "SegmentChunks", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java#L201-L218
131,796
pravega/pravega
segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java
RollingSegmentHandle.setActiveChunkHandle
synchronized void setActiveChunkHandle(SegmentHandle handle) { Preconditions.checkArgument(handle == null || !handle.isReadOnly(), "Active SegmentChunk handle cannot be readonly."); SegmentChunk last = lastChunk(); Preconditions.checkState(last != null, "Cannot set an Active SegmentChunk handle ...
java
synchronized void setActiveChunkHandle(SegmentHandle handle) { Preconditions.checkArgument(handle == null || !handle.isReadOnly(), "Active SegmentChunk handle cannot be readonly."); SegmentChunk last = lastChunk(); Preconditions.checkState(last != null, "Cannot set an Active SegmentChunk handle ...
[ "synchronized", "void", "setActiveChunkHandle", "(", "SegmentHandle", "handle", ")", "{", "Preconditions", ".", "checkArgument", "(", "handle", "==", "null", "||", "!", "handle", ".", "isReadOnly", "(", ")", ",", "\"Active SegmentChunk handle cannot be readonly.\"", "...
Sets the Active SegmentChunk handle. @param handle The handle. Must not be read-only and for the last SegmentChunk.
[ "Sets", "the", "Active", "SegmentChunk", "handle", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/rolling/RollingSegmentHandle.java#L244-L251
131,797
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyIndex.java
ContainerKeyIndex.executeIfEmpty
<T> CompletableFuture<T> executeIfEmpty(DirectSegmentAccess segment, Supplier<CompletableFuture<T>> action, TimeoutTimer timer) { return this.recoveryTracker.waitIfNeeded(segment, () -> this.conditionalUpdateProcessor.addWithFilter( conditionKey -> conditionKey.getKey() == segment.getSegmentId()...
java
<T> CompletableFuture<T> executeIfEmpty(DirectSegmentAccess segment, Supplier<CompletableFuture<T>> action, TimeoutTimer timer) { return this.recoveryTracker.waitIfNeeded(segment, () -> this.conditionalUpdateProcessor.addWithFilter( conditionKey -> conditionKey.getKey() == segment.getSegmentId()...
[ "<", "T", ">", "CompletableFuture", "<", "T", ">", "executeIfEmpty", "(", "DirectSegmentAccess", "segment", ",", "Supplier", "<", "CompletableFuture", "<", "T", ">", ">", "action", ",", "TimeoutTimer", "timer", ")", "{", "return", "this", ".", "recoveryTracker...
Executes the given action only if the Segment is empty. This is a conditional operation that will execute serially after all currently executing conditional updates on the given Segment have completed. Any subsequent conditional updates on the given Segment will be blocked until this action completes executing. Uncond...
[ "Executes", "the", "given", "action", "only", "if", "the", "Segment", "is", "empty", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyIndex.java#L135-L148
131,798
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyIndex.java
ContainerKeyIndex.getBucketOffsets
CompletableFuture<Map<UUID, Long>> getBucketOffsets(DirectSegmentAccess segment, Collection<UUID> hashes, TimeoutTimer timer) { Exceptions.checkNotClosed(this.closed.get(), this); if (hashes.isEmpty()) { // Nothing to search. return CompletableFuture.completedFuture(Collections....
java
CompletableFuture<Map<UUID, Long>> getBucketOffsets(DirectSegmentAccess segment, Collection<UUID> hashes, TimeoutTimer timer) { Exceptions.checkNotClosed(this.closed.get(), this); if (hashes.isEmpty()) { // Nothing to search. return CompletableFuture.completedFuture(Collections....
[ "CompletableFuture", "<", "Map", "<", "UUID", ",", "Long", ">", ">", "getBucketOffsets", "(", "DirectSegmentAccess", "segment", ",", "Collection", "<", "UUID", ">", "hashes", ",", "TimeoutTimer", "timer", ")", "{", "Exceptions", ".", "checkNotClosed", "(", "th...
Finds the Last Bucket Offsets for the given KeyHashes. @param segment Segment to look up Bucket Offsets for. @param hashes A Collection of Key Hashes to identify the Buckets. @param timer Timer for the operation. @return A CompletableFuture that, when completed, will contain the sought Offsets indexed by their corr...
[ "Finds", "the", "Last", "Bucket", "Offsets", "for", "the", "given", "KeyHashes", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyIndex.java#L199-L248
131,799
pravega/pravega
segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyIndex.java
ContainerKeyIndex.update
CompletableFuture<List<Long>> update(DirectSegmentAccess segment, TableKeyBatch batch, Supplier<CompletableFuture<Long>> persist, TimeoutTimer timer) { Exceptions.checkNotClosed(this.closed.get(), this); if (batch.isConditional()) { // Conditional update. // Collect all Cache Ke...
java
CompletableFuture<List<Long>> update(DirectSegmentAccess segment, TableKeyBatch batch, Supplier<CompletableFuture<Long>> persist, TimeoutTimer timer) { Exceptions.checkNotClosed(this.closed.get(), this); if (batch.isConditional()) { // Conditional update. // Collect all Cache Ke...
[ "CompletableFuture", "<", "List", "<", "Long", ">", ">", "update", "(", "DirectSegmentAccess", "segment", ",", "TableKeyBatch", "batch", ",", "Supplier", "<", "CompletableFuture", "<", "Long", ">", ">", "persist", ",", "TimeoutTimer", "timer", ")", "{", "Excep...
Performs a Batch Update or Removal. If {@link TableKeyBatch#isConditional()} returns true, this will execute an atomic Conditional Update/Removal based on the condition items in the batch ({@link TableKeyBatch#getVersionedItems}. The entire TableKeyBatch will be conditioned on those items, including those items that d...
[ "Performs", "a", "Batch", "Update", "or", "Removal", "." ]
6e24df7470669b3956a07018f52b2c6b3c2a3503
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/segmentstore/server/src/main/java/io/pravega/segmentstore/server/tables/ContainerKeyIndex.java#L349-L371