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
159,700
eBay/parallec
src/main/java/io/parallec/core/util/PcErrorMsgUtils.java
PcErrorMsgUtils.replaceErrorMsg
public static String replaceErrorMsg(String origMsg) { String replaceMsg = origMsg; for (ERROR_TYPE errorType : ERROR_TYPE.values()) { if (origMsg == null) { replaceMsg = PcConstants.NA; return replaceMsg; } if (origMsg.contains(erro...
java
public static String replaceErrorMsg(String origMsg) { String replaceMsg = origMsg; for (ERROR_TYPE errorType : ERROR_TYPE.values()) { if (origMsg == null) { replaceMsg = PcConstants.NA; return replaceMsg; } if (origMsg.contains(erro...
[ "public", "static", "String", "replaceErrorMsg", "(", "String", "origMsg", ")", "{", "String", "replaceMsg", "=", "origMsg", ";", "for", "(", "ERROR_TYPE", "errorType", ":", "ERROR_TYPE", ".", "values", "(", ")", ")", "{", "if", "(", "origMsg", "==", "null...
Replace error msg. @param origMsg the orig msg @return the string
[ "Replace", "error", "msg", "." ]
1b4f1628f34fedfb06b24c33a5372d64d3df0952
https://github.com/eBay/parallec/blob/1b4f1628f34fedfb06b24c33a5372d64d3df0952/src/main/java/io/parallec/core/util/PcErrorMsgUtils.java#L53-L72
159,701
eBay/parallec
src/main/java/io/parallec/core/resources/AsyncHttpClientFactoryEmbed.java
AsyncHttpClientFactoryEmbed.disableCertificateVerification
private void disableCertificateVerification() throws KeyManagementException, NoSuchAlgorithmException { // Create a trust manager that does not validate certificate chains final TrustManager[] trustAllCerts = new TrustManager[] { new CustomTrustManager() }; // Install the all-trusti...
java
private void disableCertificateVerification() throws KeyManagementException, NoSuchAlgorithmException { // Create a trust manager that does not validate certificate chains final TrustManager[] trustAllCerts = new TrustManager[] { new CustomTrustManager() }; // Install the all-trusti...
[ "private", "void", "disableCertificateVerification", "(", ")", "throws", "KeyManagementException", ",", "NoSuchAlgorithmException", "{", "// Create a trust manager that does not validate certificate chains", "final", "TrustManager", "[", "]", "trustAllCerts", "=", "new", "TrustMa...
Disable certificate verification. @throws KeyManagementException the key management exception @throws NoSuchAlgorithmException the no such algorithm exception
[ "Disable", "certificate", "verification", "." ]
1b4f1628f34fedfb06b24c33a5372d64d3df0952
https://github.com/eBay/parallec/blob/1b4f1628f34fedfb06b24c33a5372d64d3df0952/src/main/java/io/parallec/core/resources/AsyncHttpClientFactoryEmbed.java#L128-L147
159,702
eBay/parallec
src/main/java/io/parallec/core/bean/HttpMeta.java
HttpMeta.replaceFullRequestContent
public static String replaceFullRequestContent( String requestContentTemplate, String replacementString) { return (requestContentTemplate.replace( PcConstants.COMMAND_VAR_DEFAULT_REQUEST_CONTENT, replacementString)); }
java
public static String replaceFullRequestContent( String requestContentTemplate, String replacementString) { return (requestContentTemplate.replace( PcConstants.COMMAND_VAR_DEFAULT_REQUEST_CONTENT, replacementString)); }
[ "public", "static", "String", "replaceFullRequestContent", "(", "String", "requestContentTemplate", ",", "String", "replacementString", ")", "{", "return", "(", "requestContentTemplate", ".", "replace", "(", "PcConstants", ".", "COMMAND_VAR_DEFAULT_REQUEST_CONTENT", ",", ...
Replace full request content. @param requestContentTemplate the request content template @param replacementString the replacement string @return the string
[ "Replace", "full", "request", "content", "." ]
1b4f1628f34fedfb06b24c33a5372d64d3df0952
https://github.com/eBay/parallec/blob/1b4f1628f34fedfb06b24c33a5372d64d3df0952/src/main/java/io/parallec/core/bean/HttpMeta.java#L249-L254
159,703
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/problemsummary/ProblemSummary.java
ProblemSummary.addFile
public void addFile(String description, FileModel fileModel) { Map<FileModel, ProblemFileSummary> files = addDescription(description); if (files.containsKey(fileModel)) { files.get(fileModel).addOccurrence(); } else { files.put(fileModel, new ProblemFileSumma...
java
public void addFile(String description, FileModel fileModel) { Map<FileModel, ProblemFileSummary> files = addDescription(description); if (files.containsKey(fileModel)) { files.get(fileModel).addOccurrence(); } else { files.put(fileModel, new ProblemFileSumma...
[ "public", "void", "addFile", "(", "String", "description", ",", "FileModel", "fileModel", ")", "{", "Map", "<", "FileModel", ",", "ProblemFileSummary", ">", "files", "=", "addDescription", "(", "description", ")", ";", "if", "(", "files", ".", "containsKey", ...
Adds a file with the provided description.
[ "Adds", "a", "file", "with", "the", "provided", "description", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/problemsummary/ProblemSummary.java#L144-L154
159,704
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/decompiler/ClassFilePreDecompilationScan.java
ClassFilePreDecompilationScan.shouldIgnore
private boolean shouldIgnore(String typeReference) { typeReference = typeReference.replace('/', '.').replace('\\', '.'); return JavaClassIgnoreResolver.singletonInstance().matches(typeReference); }
java
private boolean shouldIgnore(String typeReference) { typeReference = typeReference.replace('/', '.').replace('\\', '.'); return JavaClassIgnoreResolver.singletonInstance().matches(typeReference); }
[ "private", "boolean", "shouldIgnore", "(", "String", "typeReference", ")", "{", "typeReference", "=", "typeReference", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ".", "replace", "(", "'", "'", ",", "'", "'", ")", ";", "return", "JavaClassIgnoreRe...
This method is called on every reference that is in the .class file. @param typeReference @return
[ "This", "method", "is", "called", "on", "every", "reference", "that", "is", "in", "the", ".", "class", "file", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/decompiler/ClassFilePreDecompilationScan.java#L176-L180
159,705
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/config/classification/Classification.java
Classification.resolvePayload
@Override public FileModel resolvePayload(GraphRewrite event, EvaluationContext context, WindupVertexFrame payload) { checkVariableName(event, context); if (payload instanceof FileReferenceModel) { return ((FileReferenceModel) payload).getFile(); } if (payload...
java
@Override public FileModel resolvePayload(GraphRewrite event, EvaluationContext context, WindupVertexFrame payload) { checkVariableName(event, context); if (payload instanceof FileReferenceModel) { return ((FileReferenceModel) payload).getFile(); } if (payload...
[ "@", "Override", "public", "FileModel", "resolvePayload", "(", "GraphRewrite", "event", ",", "EvaluationContext", "context", ",", "WindupVertexFrame", "payload", ")", "{", "checkVariableName", "(", "event", ",", "context", ")", ";", "if", "(", "payload", "instance...
Set the payload to the fileModel of the given instance even though the variable is not directly referencing it. This is mainly to simplify the creation of the rule, when the FileModel itself is not being iterated but just a model referencing it.
[ "Set", "the", "payload", "to", "the", "fileModel", "of", "the", "given", "instance", "even", "though", "the", "variable", "is", "not", "directly", "referencing", "it", ".", "This", "is", "mainly", "to", "simplify", "the", "creation", "of", "the", "rule", "...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/config/classification/Classification.java#L102-L115
159,706
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/FreeMarkerOperation.java
FreeMarkerOperation.create
public static FreeMarkerOperation create(Furnace furnace, String templatePath, String outputFilename, String... varNames) { return new FreeMarkerOperation(furnace, templatePath, outputFilename, varNames); }
java
public static FreeMarkerOperation create(Furnace furnace, String templatePath, String outputFilename, String... varNames) { return new FreeMarkerOperation(furnace, templatePath, outputFilename, varNames); }
[ "public", "static", "FreeMarkerOperation", "create", "(", "Furnace", "furnace", ",", "String", "templatePath", ",", "String", "outputFilename", ",", "String", "...", "varNames", ")", "{", "return", "new", "FreeMarkerOperation", "(", "furnace", ",", "templatePath", ...
Create a FreeMarkerOperation with the provided furnace instance template path, and varNames. The variables in varNames will be provided to the template, and a new ReportModel will be created with these variables attached.
[ "Create", "a", "FreeMarkerOperation", "with", "the", "provided", "furnace", "instance", "template", "path", "and", "varNames", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/FreeMarkerOperation.java#L52-L56
159,707
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/operation/UnzipArchiveToOutputFolder.java
UnzipArchiveToOutputFolder.recurseAndAddFiles
private void recurseAndAddFiles(GraphRewrite event, EvaluationContext context, Path tempFolder, FileService fileService, ArchiveModel archiveModel, FileModel parentFileModel, boolean subArchivesOnly) { checkCancelled(event); int numberAdded = 0; ...
java
private void recurseAndAddFiles(GraphRewrite event, EvaluationContext context, Path tempFolder, FileService fileService, ArchiveModel archiveModel, FileModel parentFileModel, boolean subArchivesOnly) { checkCancelled(event); int numberAdded = 0; ...
[ "private", "void", "recurseAndAddFiles", "(", "GraphRewrite", "event", ",", "EvaluationContext", "context", ",", "Path", "tempFolder", ",", "FileService", "fileService", ",", "ArchiveModel", "archiveModel", ",", "FileModel", "parentFileModel", ",", "boolean", "subArchiv...
Recurses the given folder and adds references to these files to the graph as FileModels. We don't set the parent file model in the case of the initial children, as the direct parent is really the archive itself. For example for file "root.zip/pom.xml" - the parent for pom.xml is root.zip, not the directory temporary d...
[ "Recurses", "the", "given", "folder", "and", "adds", "references", "to", "these", "files", "to", "the", "graph", "as", "FileModels", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/operation/UnzipArchiveToOutputFolder.java#L158-L241
159,708
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/reporting/freemarker/RenderLinkDirective.java
RenderLinkDirective.renderAsLI
private void renderAsLI(Writer writer, ProjectModel project, Iterator<Link> links, boolean wrap) throws IOException { if (!links.hasNext()) return; if (wrap) writer.append("<ul>"); while (links.hasNext()) { Link link = links.next(); wr...
java
private void renderAsLI(Writer writer, ProjectModel project, Iterator<Link> links, boolean wrap) throws IOException { if (!links.hasNext()) return; if (wrap) writer.append("<ul>"); while (links.hasNext()) { Link link = links.next(); wr...
[ "private", "void", "renderAsLI", "(", "Writer", "writer", ",", "ProjectModel", "project", ",", "Iterator", "<", "Link", ">", "links", ",", "boolean", "wrap", ")", "throws", "IOException", "{", "if", "(", "!", "links", ".", "hasNext", "(", ")", ")", "retu...
Renders in LI tags, Wraps with UL tags optionally.
[ "Renders", "in", "LI", "tags", "Wraps", "with", "UL", "tags", "optionally", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/reporting/freemarker/RenderLinkDirective.java#L246-L262
159,709
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/rules/CreateApplicationReportIndexRuleProvider.java
CreateApplicationReportIndexRuleProvider.createApplicationReportIndex
private ApplicationReportIndexModel createApplicationReportIndex(GraphContext context, ProjectModel applicationProjectModel) { ApplicationReportIndexService applicationReportIndexService = new ApplicationReportIndexService(context); ApplicationReportIndexModel index = applicationRepo...
java
private ApplicationReportIndexModel createApplicationReportIndex(GraphContext context, ProjectModel applicationProjectModel) { ApplicationReportIndexService applicationReportIndexService = new ApplicationReportIndexService(context); ApplicationReportIndexModel index = applicationRepo...
[ "private", "ApplicationReportIndexModel", "createApplicationReportIndex", "(", "GraphContext", "context", ",", "ProjectModel", "applicationProjectModel", ")", "{", "ApplicationReportIndexService", "applicationReportIndexService", "=", "new", "ApplicationReportIndexService", "(", "c...
Create the index and associate it with all project models in the Application
[ "Create", "the", "index", "and", "associate", "it", "with", "all", "project", "models", "in", "the", "Application" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/rules/CreateApplicationReportIndexRuleProvider.java#L69-L78
159,710
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/rules/CreateApplicationReportIndexRuleProvider.java
CreateApplicationReportIndexRuleProvider.addAllProjectModels
private void addAllProjectModels(ApplicationReportIndexModel navIdx, ProjectModel projectModel) { navIdx.addProjectModel(projectModel); for (ProjectModel childProject : projectModel.getChildProjects()) { if (!Iterators.asSet(navIdx.getProjectModels()).contains(childProject)) ...
java
private void addAllProjectModels(ApplicationReportIndexModel navIdx, ProjectModel projectModel) { navIdx.addProjectModel(projectModel); for (ProjectModel childProject : projectModel.getChildProjects()) { if (!Iterators.asSet(navIdx.getProjectModels()).contains(childProject)) ...
[ "private", "void", "addAllProjectModels", "(", "ApplicationReportIndexModel", "navIdx", ",", "ProjectModel", "projectModel", ")", "{", "navIdx", ".", "addProjectModel", "(", "projectModel", ")", ";", "for", "(", "ProjectModel", "childProject", ":", "projectModel", "."...
Attach all project models within the application to the index. This will make it easy to navigate from the projectModel to the application index.
[ "Attach", "all", "project", "models", "within", "the", "application", "to", "the", "index", ".", "This", "will", "make", "it", "easy", "to", "navigate", "from", "the", "projectModel", "to", "the", "application", "index", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/rules/CreateApplicationReportIndexRuleProvider.java#L84-L92
159,711
windup/windup
utils/src/main/java/org/jboss/windup/util/ProgressEstimate.java
ProgressEstimate.getTimeRemainingInMillis
public long getTimeRemainingInMillis() { long batchTime = System.currentTimeMillis() - startTime; double timePerIteration = (double) batchTime / (double) worked.get(); return (long) (timePerIteration * (total - worked.get())); }
java
public long getTimeRemainingInMillis() { long batchTime = System.currentTimeMillis() - startTime; double timePerIteration = (double) batchTime / (double) worked.get(); return (long) (timePerIteration * (total - worked.get())); }
[ "public", "long", "getTimeRemainingInMillis", "(", ")", "{", "long", "batchTime", "=", "System", ".", "currentTimeMillis", "(", ")", "-", "startTime", ";", "double", "timePerIteration", "=", "(", "double", ")", "batchTime", "/", "(", "double", ")", "worked", ...
Gets the estimated time remaining in milliseconds based upon the total number of work units, the start time, and how many units have been done so far. This should not be called before any work units have been done.
[ "Gets", "the", "estimated", "time", "remaining", "in", "milliseconds", "based", "upon", "the", "total", "number", "of", "work", "units", "the", "start", "time", "and", "how", "many", "units", "have", "been", "done", "so", "far", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/ProgressEstimate.java#L55-L60
159,712
windup/windup
graph/api/src/main/java/org/jboss/windup/graph/service/ArchiveService.java
ArchiveService.getChildFile
public FileModel getChildFile(ArchiveModel archiveModel, String filePath) { filePath = FilenameUtils.separatorsToUnix(filePath); StringTokenizer stk = new StringTokenizer(filePath, "/"); FileModel currentFileModel = archiveModel; while (stk.hasMoreTokens() && currentFileModel != nul...
java
public FileModel getChildFile(ArchiveModel archiveModel, String filePath) { filePath = FilenameUtils.separatorsToUnix(filePath); StringTokenizer stk = new StringTokenizer(filePath, "/"); FileModel currentFileModel = archiveModel; while (stk.hasMoreTokens() && currentFileModel != nul...
[ "public", "FileModel", "getChildFile", "(", "ArchiveModel", "archiveModel", ",", "String", "filePath", ")", "{", "filePath", "=", "FilenameUtils", ".", "separatorsToUnix", "(", "filePath", ")", ";", "StringTokenizer", "stk", "=", "new", "StringTokenizer", "(", "fi...
Finds the file at the provided path within the archive. Eg, getChildFile(ArchiveModel, "/META-INF/MANIFEST.MF") will return a {@link FileModel} if a file named /META-INF/MANIFEST.MF exists within the archive @return Returns the located {@link FileModel} or null if no file with this path could be located
[ "Finds", "the", "file", "at", "the", "provided", "path", "within", "the", "archive", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/graph/api/src/main/java/org/jboss/windup/graph/service/ArchiveService.java#L50-L63
159,713
windup/windup
config/impl/src/main/java/org/jboss/windup/config/loader/RuleProviderSorter.java
RuleProviderSorter.sort
private void sort() { DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph = new DefaultDirectedWeightedGraph<>( DefaultEdge.class); for (RuleProvider provider : providers) { graph.addVertex(provider); } addProviderRelationships(grap...
java
private void sort() { DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph = new DefaultDirectedWeightedGraph<>( DefaultEdge.class); for (RuleProvider provider : providers) { graph.addVertex(provider); } addProviderRelationships(grap...
[ "private", "void", "sort", "(", ")", "{", "DefaultDirectedWeightedGraph", "<", "RuleProvider", ",", "DefaultEdge", ">", "graph", "=", "new", "DefaultDirectedWeightedGraph", "<>", "(", "DefaultEdge", ".", "class", ")", ";", "for", "(", "RuleProvider", "provider", ...
Perform the entire sort operation
[ "Perform", "the", "entire", "sort", "operation" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/impl/src/main/java/org/jboss/windup/config/loader/RuleProviderSorter.java#L85-L115
159,714
windup/windup
config/impl/src/main/java/org/jboss/windup/config/loader/RuleProviderSorter.java
RuleProviderSorter.checkForCycles
private void checkForCycles(DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph) { CycleDetector<RuleProvider, DefaultEdge> cycleDetector = new CycleDetector<>(graph); if (cycleDetector.detectCycles()) { // if we have cycles, then try to throw an exception with some us...
java
private void checkForCycles(DefaultDirectedWeightedGraph<RuleProvider, DefaultEdge> graph) { CycleDetector<RuleProvider, DefaultEdge> cycleDetector = new CycleDetector<>(graph); if (cycleDetector.detectCycles()) { // if we have cycles, then try to throw an exception with some us...
[ "private", "void", "checkForCycles", "(", "DefaultDirectedWeightedGraph", "<", "RuleProvider", ",", "DefaultEdge", ">", "graph", ")", "{", "CycleDetector", "<", "RuleProvider", ",", "DefaultEdge", ">", "cycleDetector", "=", "new", "CycleDetector", "<>", "(", "graph"...
Use the jgrapht cycle checker to detect any cycles in the provided dependency graph.
[ "Use", "the", "jgrapht", "cycle", "checker", "to", "detect", "any", "cycles", "in", "the", "provided", "dependency", "graph", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/impl/src/main/java/org/jboss/windup/config/loader/RuleProviderSorter.java#L267-L287
159,715
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/operation/RecurseDirectoryAndAddFiles.java
RecurseDirectoryAndAddFiles.recurseAndAddFiles
private void recurseAndAddFiles(GraphRewrite event, FileService fileService, WindupJavaConfigurationService javaConfigurationService, FileModel file) { if (javaConfigurationService.checkIfIgnored(event, file)) return; String filePath = file.getFilePath(); File fileReference = ne...
java
private void recurseAndAddFiles(GraphRewrite event, FileService fileService, WindupJavaConfigurationService javaConfigurationService, FileModel file) { if (javaConfigurationService.checkIfIgnored(event, file)) return; String filePath = file.getFilePath(); File fileReference = ne...
[ "private", "void", "recurseAndAddFiles", "(", "GraphRewrite", "event", ",", "FileService", "fileService", ",", "WindupJavaConfigurationService", "javaConfigurationService", ",", "FileModel", "file", ")", "{", "if", "(", "javaConfigurationService", ".", "checkIfIgnored", "...
Recurses the given folder and creates the FileModels vertices for the child files to the graph.
[ "Recurses", "the", "given", "folder", "and", "creates", "the", "FileModels", "vertices", "for", "the", "child", "files", "to", "the", "graph", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/operation/RecurseDirectoryAndAddFiles.java#L51-L81
159,716
windup/windup
utils/src/main/java/org/jboss/windup/util/Checks.java
Checks.checkFileOrDirectoryToBeRead
public static void checkFileOrDirectoryToBeRead(File fileOrDir, String fileDesc) { if (fileOrDir == null) throw new IllegalArgumentException(fileDesc + " must not be null."); if (!fileOrDir.exists()) throw new IllegalArgumentException(fileDesc + " does not exist: " + fileOrDi...
java
public static void checkFileOrDirectoryToBeRead(File fileOrDir, String fileDesc) { if (fileOrDir == null) throw new IllegalArgumentException(fileDesc + " must not be null."); if (!fileOrDir.exists()) throw new IllegalArgumentException(fileDesc + " does not exist: " + fileOrDi...
[ "public", "static", "void", "checkFileOrDirectoryToBeRead", "(", "File", "fileOrDir", ",", "String", "fileDesc", ")", "{", "if", "(", "fileOrDir", "==", "null", ")", "throw", "new", "IllegalArgumentException", "(", "fileDesc", "+", "\" must not be null.\"", ")", "...
Throws if the given file is null, is not a file or directory, or is an empty directory.
[ "Throws", "if", "the", "given", "file", "is", "null", "is", "not", "a", "file", "or", "directory", "or", "is", "an", "empty", "directory", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/Checks.java#L45-L58
159,717
windup/windup
utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java
FurnaceClasspathScanner.scan
public List<URL> scan(Predicate<String> filter) { List<URL> discoveredURLs = new ArrayList<>(128); // For each Forge addon... for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted())) { List<String> filteredResourcePaths = filterAddonResources(a...
java
public List<URL> scan(Predicate<String> filter) { List<URL> discoveredURLs = new ArrayList<>(128); // For each Forge addon... for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted())) { List<String> filteredResourcePaths = filterAddonResources(a...
[ "public", "List", "<", "URL", ">", "scan", "(", "Predicate", "<", "String", ">", "filter", ")", "{", "List", "<", "URL", ">", "discoveredURLs", "=", "new", "ArrayList", "<>", "(", "128", ")", ";", "// For each Forge addon...", "for", "(", "Addon", "addon...
Scans all Forge addons for files accepted by given filter.
[ "Scans", "all", "Forge", "addons", "for", "files", "accepted", "by", "given", "filter", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java#L76-L92
159,718
windup/windup
utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java
FurnaceClasspathScanner.scanClasses
public List<Class<?>> scanClasses(Predicate<String> filter) { List<Class<?>> discoveredClasses = new ArrayList<>(128); // For each Forge addon... for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted())) { List<String> discoveredFileNames = filt...
java
public List<Class<?>> scanClasses(Predicate<String> filter) { List<Class<?>> discoveredClasses = new ArrayList<>(128); // For each Forge addon... for (Addon addon : furnace.getAddonRegistry().getAddons(AddonFilters.allStarted())) { List<String> discoveredFileNames = filt...
[ "public", "List", "<", "Class", "<", "?", ">", ">", "scanClasses", "(", "Predicate", "<", "String", ">", "filter", ")", "{", "List", "<", "Class", "<", "?", ">", ">", "discoveredClasses", "=", "new", "ArrayList", "<>", "(", "128", ")", ";", "// For e...
Scans all Forge addons for classes accepted by given filter. TODO: Could be refactored - scan() is almost the same.
[ "Scans", "all", "Forge", "addons", "for", "classes", "accepted", "by", "given", "filter", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java#L99-L124
159,719
windup/windup
utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java
FurnaceClasspathScanner.filterAddonResources
public List<String> filterAddonResources(Addon addon, Predicate<String> filter) { List<String> discoveredFileNames = new ArrayList<>(); List<File> addonResources = addon.getRepository().getAddonResources(addon.getId()); for (File addonFile : addonResources) { if (addonFil...
java
public List<String> filterAddonResources(Addon addon, Predicate<String> filter) { List<String> discoveredFileNames = new ArrayList<>(); List<File> addonResources = addon.getRepository().getAddonResources(addon.getId()); for (File addonFile : addonResources) { if (addonFil...
[ "public", "List", "<", "String", ">", "filterAddonResources", "(", "Addon", "addon", ",", "Predicate", "<", "String", ">", "filter", ")", "{", "List", "<", "String", ">", "discoveredFileNames", "=", "new", "ArrayList", "<>", "(", ")", ";", "List", "<", "...
Returns a list of files in given addon passing given filter.
[ "Returns", "a", "list", "of", "files", "in", "given", "addon", "passing", "given", "filter", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java#L129-L141
159,720
windup/windup
utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java
FurnaceClasspathScanner.handleArchiveByFile
private void handleArchiveByFile(Predicate<String> filter, File archive, List<String> discoveredFiles) { try { try (ZipFile zip = new ZipFile(archive)) { Enumeration<? extends ZipEntry> entries = zip.entries(); while (entries.h...
java
private void handleArchiveByFile(Predicate<String> filter, File archive, List<String> discoveredFiles) { try { try (ZipFile zip = new ZipFile(archive)) { Enumeration<? extends ZipEntry> entries = zip.entries(); while (entries.h...
[ "private", "void", "handleArchiveByFile", "(", "Predicate", "<", "String", ">", "filter", ",", "File", "archive", ",", "List", "<", "String", ">", "discoveredFiles", ")", "{", "try", "{", "try", "(", "ZipFile", "zip", "=", "new", "ZipFile", "(", "archive",...
Scans given archive for files passing given filter, adds the results into given list.
[ "Scans", "given", "archive", "for", "files", "passing", "given", "filter", "adds", "the", "results", "into", "given", "list", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java#L146-L167
159,721
windup/windup
utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java
FurnaceClasspathScanner.handleDirectory
private void handleDirectory(final Predicate<String> filter, final File rootDir, final List<String> discoveredFiles) { try { new DirectoryWalker<String>() { private Path startDir; public void walk() throws IOException { ...
java
private void handleDirectory(final Predicate<String> filter, final File rootDir, final List<String> discoveredFiles) { try { new DirectoryWalker<String>() { private Path startDir; public void walk() throws IOException { ...
[ "private", "void", "handleDirectory", "(", "final", "Predicate", "<", "String", ">", "filter", ",", "final", "File", "rootDir", ",", "final", "List", "<", "String", ">", "discoveredFiles", ")", "{", "try", "{", "new", "DirectoryWalker", "<", "String", ">", ...
Scans given directory for files passing given filter, adds the results into given list.
[ "Scans", "given", "directory", "for", "files", "passing", "given", "filter", "adds", "the", "results", "into", "given", "list", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/furnace/FurnaceClasspathScanner.java#L172-L200
159,722
windup/windup
rules-java-project/addon/src/main/java/org/jboss/windup/project/condition/Project.java
Project.dependsOnArtifact
public static Project dependsOnArtifact(Artifact artifact) { Project project = new Project(); project.artifact = artifact; return project; }
java
public static Project dependsOnArtifact(Artifact artifact) { Project project = new Project(); project.artifact = artifact; return project; }
[ "public", "static", "Project", "dependsOnArtifact", "(", "Artifact", "artifact", ")", "{", "Project", "project", "=", "new", "Project", "(", ")", ";", "project", ".", "artifact", "=", "artifact", ";", "return", "project", ";", "}" ]
Specify the Artifact for which the condition should search for. @param artifact @return
[ "Specify", "the", "Artifact", "for", "which", "the", "condition", "should", "search", "for", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-project/addon/src/main/java/org/jboss/windup/project/condition/Project.java#L43-L48
159,723
windup/windup
utils/src/main/java/org/jboss/windup/util/Util.java
Util.getSingle
public static final <T> T getSingle( Iterable<T> it ) { if( ! it.iterator().hasNext() ) return null; final Iterator<T> iterator = it.iterator(); T o = iterator.next(); if(iterator.hasNext()) throw new IllegalStateException("Found multiple items in iterator over "...
java
public static final <T> T getSingle( Iterable<T> it ) { if( ! it.iterator().hasNext() ) return null; final Iterator<T> iterator = it.iterator(); T o = iterator.next(); if(iterator.hasNext()) throw new IllegalStateException("Found multiple items in iterator over "...
[ "public", "static", "final", "<", "T", ">", "T", "getSingle", "(", "Iterable", "<", "T", ">", "it", ")", "{", "if", "(", "!", "it", ".", "iterator", "(", ")", ".", "hasNext", "(", ")", ")", "return", "null", ";", "final", "Iterator", "<", "T", ...
Returns a single item from the Iterator. If there's none, returns null. If there are more, throws an IllegalStateException. @throws IllegalStateException
[ "Returns", "a", "single", "item", "from", "the", "Iterator", ".", "If", "there", "s", "none", "returns", "null", ".", "If", "there", "are", "more", "throws", "an", "IllegalStateException", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/Util.java#L24-L34
159,724
windup/windup
rules-xml/api/src/main/java/org/jboss/windup/rules/apps/xml/operation/xslt/XSLTTransformation.java
XSLTTransformation.perform
@Override public void perform(GraphRewrite event, EvaluationContext context) { checkVariableName(event, context); WindupVertexFrame payload = resolveVariable(event, getVariableName()); if (payload instanceof FileReferenceModel) { FileModel file = ((FileReferenceModel)...
java
@Override public void perform(GraphRewrite event, EvaluationContext context) { checkVariableName(event, context); WindupVertexFrame payload = resolveVariable(event, getVariableName()); if (payload instanceof FileReferenceModel) { FileModel file = ((FileReferenceModel)...
[ "@", "Override", "public", "void", "perform", "(", "GraphRewrite", "event", ",", "EvaluationContext", "context", ")", "{", "checkVariableName", "(", "event", ",", "context", ")", ";", "WindupVertexFrame", "payload", "=", "resolveVariable", "(", "event", ",", "ge...
Set the payload to the fileModel of the given instance even though the variable is not directly of it's type. This is mainly to simplify the creation of the rule, when the FileModel itself is not being iterated but just a model referencing it.
[ "Set", "the", "payload", "to", "the", "fileModel", "of", "the", "given", "instance", "even", "though", "the", "variable", "is", "not", "directly", "of", "it", "s", "type", ".", "This", "is", "mainly", "to", "simplify", "the", "creation", "of", "the", "ru...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-xml/api/src/main/java/org/jboss/windup/rules/apps/xml/operation/xslt/XSLTTransformation.java#L124-L139
159,725
windup/windup
rules-java-project/addon/src/main/java/org/jboss/windup/project/condition/ProjectFrom.java
ProjectFrom.dependsOnArtifact
public Project dependsOnArtifact(Artifact artifact) { Project project = new Project(); project.setArtifact(artifact); project.setInputVariablesName(inputVarName); return project; }
java
public Project dependsOnArtifact(Artifact artifact) { Project project = new Project(); project.setArtifact(artifact); project.setInputVariablesName(inputVarName); return project; }
[ "public", "Project", "dependsOnArtifact", "(", "Artifact", "artifact", ")", "{", "Project", "project", "=", "new", "Project", "(", ")", ";", "project", ".", "setArtifact", "(", "artifact", ")", ";", "project", ".", "setInputVariablesName", "(", "inputVarName", ...
Specify the artifact configuration to be searched for @param artifact configured artifact object @return
[ "Specify", "the", "artifact", "configuration", "to", "be", "searched", "for" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-project/addon/src/main/java/org/jboss/windup/project/condition/ProjectFrom.java#L21-L27
159,726
windup/windup
rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JmsDestinationService.java
JmsDestinationService.getTypeFromClass
public static JmsDestinationType getTypeFromClass(String aClass) { if (StringUtils.equals(aClass, "javax.jms.Queue") || StringUtils.equals(aClass, "javax.jms.QueueConnectionFactory")) { return JmsDestinationType.QUEUE; } else if (StringUtils.equals(aClass, "javax.jms.Topi...
java
public static JmsDestinationType getTypeFromClass(String aClass) { if (StringUtils.equals(aClass, "javax.jms.Queue") || StringUtils.equals(aClass, "javax.jms.QueueConnectionFactory")) { return JmsDestinationType.QUEUE; } else if (StringUtils.equals(aClass, "javax.jms.Topi...
[ "public", "static", "JmsDestinationType", "getTypeFromClass", "(", "String", "aClass", ")", "{", "if", "(", "StringUtils", ".", "equals", "(", "aClass", ",", "\"javax.jms.Queue\"", ")", "||", "StringUtils", ".", "equals", "(", "aClass", ",", "\"javax.jms.QueueConn...
Gets JmsDestinationType from java class name Returns null for unrecognized class
[ "Gets", "JmsDestinationType", "from", "java", "class", "name" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JmsDestinationService.java#L75-L89
159,727
windup/windup
config/api/src/main/java/org/jboss/windup/config/operation/iteration/AbstractIterationOperation.java
AbstractIterationOperation.checkVariableName
protected void checkVariableName(GraphRewrite event, EvaluationContext context) { if (variableName == null) { setVariableName(Iteration.getPayloadVariableName(event, context)); } }
java
protected void checkVariableName(GraphRewrite event, EvaluationContext context) { if (variableName == null) { setVariableName(Iteration.getPayloadVariableName(event, context)); } }
[ "protected", "void", "checkVariableName", "(", "GraphRewrite", "event", ",", "EvaluationContext", "context", ")", "{", "if", "(", "variableName", "==", "null", ")", "{", "setVariableName", "(", "Iteration", ".", "getPayloadVariableName", "(", "event", ",", "contex...
Check the variable name and if not set, set it with the singleton variable name being on the top of the stack.
[ "Check", "the", "variable", "name", "and", "if", "not", "set", "set", "it", "with", "the", "singleton", "variable", "name", "being", "on", "the", "top", "of", "the", "stack", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/operation/iteration/AbstractIterationOperation.java#L77-L83
159,728
windup/windup
java-ast/addon/src/main/java/org/jboss/windup/ast/java/ASTProcessor.java
ASTProcessor.analyze
public static List<ClassReference> analyze(WildcardImportResolver importResolver, Set<String> libraryPaths, Set<String> sourcePaths, Path sourceFile) { ASTParser parser = ASTParser.newParser(AST.JLS11); parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sour...
java
public static List<ClassReference> analyze(WildcardImportResolver importResolver, Set<String> libraryPaths, Set<String> sourcePaths, Path sourceFile) { ASTParser parser = ASTParser.newParser(AST.JLS11); parser.setEnvironment(libraryPaths.toArray(new String[libraryPaths.size()]), sour...
[ "public", "static", "List", "<", "ClassReference", ">", "analyze", "(", "WildcardImportResolver", "importResolver", ",", "Set", "<", "String", ">", "libraryPaths", ",", "Set", "<", "String", ">", "sourcePaths", ",", "Path", "sourceFile", ")", "{", "ASTParser", ...
Parses the provided file, using the given libraryPaths and sourcePaths as context. The libraries may be either jar files or references to directories containing class files. The sourcePaths must be a reference to the top level directory for sources (eg, for a file src/main/java/org/example/Foo.java, the source path wo...
[ "Parses", "the", "provided", "file", "using", "the", "given", "libraryPaths", "and", "sourcePaths", "as", "context", ".", "The", "libraries", "may", "be", "either", "jar", "files", "or", "references", "to", "directories", "containing", "class", "files", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/java-ast/addon/src/main/java/org/jboss/windup/ast/java/ASTProcessor.java#L41-L66
159,729
windup/windup
graph/api/src/main/java/org/jboss/windup/graph/GraphUtil.java
GraphUtil.vertexAsString
public static final String vertexAsString(Vertex vertex, int depth, String withEdgesOfLabel) { StringBuilder sb = new StringBuilder(); vertexAsString(vertex, depth, withEdgesOfLabel, sb, 0, new HashSet<>()); return sb.toString(); }
java
public static final String vertexAsString(Vertex vertex, int depth, String withEdgesOfLabel) { StringBuilder sb = new StringBuilder(); vertexAsString(vertex, depth, withEdgesOfLabel, sb, 0, new HashSet<>()); return sb.toString(); }
[ "public", "static", "final", "String", "vertexAsString", "(", "Vertex", "vertex", ",", "int", "depth", ",", "String", "withEdgesOfLabel", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "vertexAsString", "(", "vertex", ",", "depth"...
Formats a vertex using it's properties. Debugging purposes.
[ "Formats", "a", "vertex", "using", "it", "s", "properties", ".", "Debugging", "purposes", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/graph/api/src/main/java/org/jboss/windup/graph/GraphUtil.java#L21-L26
159,730
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenizationService.java
MavenizationService.normalizeDirName
private static String normalizeDirName(String name) { if(name == null) return null; return name.toLowerCase().replaceAll("[^a-zA-Z0-9]", "-"); }
java
private static String normalizeDirName(String name) { if(name == null) return null; return name.toLowerCase().replaceAll("[^a-zA-Z0-9]", "-"); }
[ "private", "static", "String", "normalizeDirName", "(", "String", "name", ")", "{", "if", "(", "name", "==", "null", ")", "return", "null", ";", "return", "name", ".", "toLowerCase", "(", ")", ".", "replaceAll", "(", "\"[^a-zA-Z0-9]\"", ",", "\"-\"", ")", ...
Normalizes the name so it can be used as Maven artifactId or groupId.
[ "Normalizes", "the", "name", "so", "it", "can", "be", "used", "as", "Maven", "artifactId", "or", "groupId", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenizationService.java#L249-L254
159,731
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenizationService.java
MavenizationService.guessPackaging
private static String guessPackaging(ProjectModel projectModel) { String projectType = projectModel.getProjectType(); if (projectType != null) return projectType; LOG.warning("WINDUP-983 getProjectType() returned null for: " + projectModel.getRootFileModel().getPrettyPath()); ...
java
private static String guessPackaging(ProjectModel projectModel) { String projectType = projectModel.getProjectType(); if (projectType != null) return projectType; LOG.warning("WINDUP-983 getProjectType() returned null for: " + projectModel.getRootFileModel().getPrettyPath()); ...
[ "private", "static", "String", "guessPackaging", "(", "ProjectModel", "projectModel", ")", "{", "String", "projectType", "=", "projectModel", ".", "getProjectType", "(", ")", ";", "if", "(", "projectType", "!=", "null", ")", "return", "projectType", ";", "LOG", ...
Tries to guess the packaging of the archive - whether it's an EAR, WAR, JAR. Maybe not needed as we can rely on the suffix?
[ "Tries", "to", "guess", "the", "packaging", "of", "the", "archive", "-", "whether", "it", "s", "an", "EAR", "WAR", "JAR", ".", "Maybe", "not", "needed", "as", "we", "can", "rely", "on", "the", "suffix?" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/MavenizationService.java#L260-L277
159,732
windup/windup
utils/src/main/java/org/jboss/windup/util/xml/XmlUtil.java
XmlUtil.xpathExists
public static boolean xpathExists(Node document, String xpathExpression, Map<String, String> namespaceMapping) throws XPathException, MarshallingException { Boolean result = (Boolean) executeXPath(document, xpathExpression, namespaceMapping, XPathConstants.BOOLEAN); return result != ...
java
public static boolean xpathExists(Node document, String xpathExpression, Map<String, String> namespaceMapping) throws XPathException, MarshallingException { Boolean result = (Boolean) executeXPath(document, xpathExpression, namespaceMapping, XPathConstants.BOOLEAN); return result != ...
[ "public", "static", "boolean", "xpathExists", "(", "Node", "document", ",", "String", "xpathExpression", ",", "Map", "<", "String", ",", "String", ">", "namespaceMapping", ")", "throws", "XPathException", ",", "MarshallingException", "{", "Boolean", "result", "=",...
Runs the given xpath and returns a boolean result.
[ "Runs", "the", "given", "xpath", "and", "returns", "a", "boolean", "result", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/xml/XmlUtil.java#L137-L142
159,733
windup/windup
utils/src/main/java/org/jboss/windup/util/xml/XmlUtil.java
XmlUtil.executeXPath
public static Object executeXPath(Node document, String xpathExpression, Map<String, String> namespaceMapping, QName result) throws XPathException, MarshallingException { NamespaceMapContext mapContext = new NamespaceMapContext(namespaceMapping); try { XPathFactor...
java
public static Object executeXPath(Node document, String xpathExpression, Map<String, String> namespaceMapping, QName result) throws XPathException, MarshallingException { NamespaceMapContext mapContext = new NamespaceMapContext(namespaceMapping); try { XPathFactor...
[ "public", "static", "Object", "executeXPath", "(", "Node", "document", ",", "String", "xpathExpression", ",", "Map", "<", "String", ",", "String", ">", "namespaceMapping", ",", "QName", "result", ")", "throws", "XPathException", ",", "MarshallingException", "{", ...
Executes the given xpath and returns the result with the type specified.
[ "Executes", "the", "given", "xpath", "and", "returns", "the", "result", "with", "the", "type", "specified", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/xml/XmlUtil.java#L173-L194
159,734
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/ModuleAnalysisHelper.java
ModuleAnalysisHelper.deriveGroupIdFromPackages
String deriveGroupIdFromPackages(ProjectModel projectModel) { Map<Object, Long> pkgsMap = new HashMap<>(); Set<String> pkgs = new HashSet<>(1000); GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(graphContext.getGraph()).V(projectModel); pkgsMap = pipeline.out(Pro...
java
String deriveGroupIdFromPackages(ProjectModel projectModel) { Map<Object, Long> pkgsMap = new HashMap<>(); Set<String> pkgs = new HashSet<>(1000); GraphTraversal<Vertex, Vertex> pipeline = new GraphTraversalSource(graphContext.getGraph()).V(projectModel); pkgsMap = pipeline.out(Pro...
[ "String", "deriveGroupIdFromPackages", "(", "ProjectModel", "projectModel", ")", "{", "Map", "<", "Object", ",", "Long", ">", "pkgsMap", "=", "new", "HashMap", "<>", "(", ")", ";", "Set", "<", "String", ">", "pkgs", "=", "new", "HashSet", "<>", "(", "100...
Counts the packages prefixes appearing in this project and if some of them make more than half of the total of existing packages, this prefix is returned. Otherwise, returns null. This is just a helper, it isn't something really hard-setting the package. It's something to use if the user didn't specify using --maveniz...
[ "Counts", "the", "packages", "prefixes", "appearing", "in", "this", "project", "and", "if", "some", "of", "them", "make", "more", "than", "half", "of", "the", "total", "of", "existing", "packages", "this", "prefix", "is", "returned", ".", "Otherwise", "retur...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/ModuleAnalysisHelper.java#L87-L117
159,735
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/JavaClass.java
JavaClass.at
@Override public JavaClassBuilderAt at(TypeReferenceLocation... locations) { if (locations != null) this.locations = Arrays.asList(locations); return this; }
java
@Override public JavaClassBuilderAt at(TypeReferenceLocation... locations) { if (locations != null) this.locations = Arrays.asList(locations); return this; }
[ "@", "Override", "public", "JavaClassBuilderAt", "at", "(", "TypeReferenceLocation", "...", "locations", ")", "{", "if", "(", "locations", "!=", "null", ")", "this", ".", "locations", "=", "Arrays", ".", "asList", "(", "locations", ")", ";", "return", "this"...
Only match if the TypeReference is at the specified location within the file.
[ "Only", "match", "if", "the", "TypeReference", "is", "at", "the", "specified", "location", "within", "the", "file", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/JavaClass.java#L135-L141
159,736
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/JavaClass.java
JavaClass.as
@Override public ConditionBuilder as(String variable) { Assert.notNull(variable, "Variable name must not be null."); this.setOutputVariablesName(variable); return this; }
java
@Override public ConditionBuilder as(String variable) { Assert.notNull(variable, "Variable name must not be null."); this.setOutputVariablesName(variable); return this; }
[ "@", "Override", "public", "ConditionBuilder", "as", "(", "String", "variable", ")", "{", "Assert", ".", "notNull", "(", "variable", ",", "\"Variable name must not be null.\"", ")", ";", "this", ".", "setOutputVariablesName", "(", "variable", ")", ";", "return", ...
Optionally specify the variable name to use for the output of this condition
[ "Optionally", "specify", "the", "variable", "name", "to", "use", "for", "the", "output", "of", "this", "condition" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/JavaClass.java#L146-L152
159,737
windup/windup
config/api/src/main/java/org/jboss/windup/config/condition/GraphCondition.java
GraphCondition.setResults
protected void setResults(GraphRewrite event, String variable, Iterable<? extends WindupVertexFrame> results) { Variables variables = Variables.instance(event); Iterable<? extends WindupVertexFrame> existingVariables = variables.findVariable(variable, 1); if (existingVariables != null) ...
java
protected void setResults(GraphRewrite event, String variable, Iterable<? extends WindupVertexFrame> results) { Variables variables = Variables.instance(event); Iterable<? extends WindupVertexFrame> existingVariables = variables.findVariable(variable, 1); if (existingVariables != null) ...
[ "protected", "void", "setResults", "(", "GraphRewrite", "event", ",", "String", "variable", ",", "Iterable", "<", "?", "extends", "WindupVertexFrame", ">", "results", ")", "{", "Variables", "variables", "=", "Variables", ".", "instance", "(", "event", ")", ";"...
This sets the variable with the given name to the given value. If there is already a variable with the same name in the top-most stack frame, we will combine them here. This helps in the case of multiple conditions tied together with "or" or "and".
[ "This", "sets", "the", "variable", "with", "the", "given", "name", "to", "the", "given", "value", ".", "If", "there", "is", "already", "a", "variable", "with", "the", "same", "name", "in", "the", "top", "-", "most", "stack", "frame", "we", "will", "com...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/condition/GraphCondition.java#L76-L88
159,738
windup/windup
config/api/src/main/java/org/jboss/windup/config/phase/RulePhaseFinder.java
RulePhaseFinder.loadPhases
private Map<String, Class<? extends RulePhase>> loadPhases() { Map<String, Class<? extends RulePhase>> phases; phases = new HashMap<>(); Furnace furnace = FurnaceHolder.getFurnace(); for (RulePhase phase : furnace.getAddonRegistry().getServices(RulePhase.class)) { ...
java
private Map<String, Class<? extends RulePhase>> loadPhases() { Map<String, Class<? extends RulePhase>> phases; phases = new HashMap<>(); Furnace furnace = FurnaceHolder.getFurnace(); for (RulePhase phase : furnace.getAddonRegistry().getServices(RulePhase.class)) { ...
[ "private", "Map", "<", "String", ",", "Class", "<", "?", "extends", "RulePhase", ">", ">", "loadPhases", "(", ")", "{", "Map", "<", "String", ",", "Class", "<", "?", "extends", "RulePhase", ">", ">", "phases", ";", "phases", "=", "new", "HashMap", "<...
Loads the currently known phases from Furnace to the map.
[ "Loads", "the", "currently", "known", "phases", "from", "Furnace", "to", "the", "map", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/phase/RulePhaseFinder.java#L42-L55
159,739
windup/windup
rules-base/api/src/main/java/org/jboss/windup/rules/files/condition/FileContent.java
FileContent.allInput
private void allInput(List<FileModel> vertices, GraphRewrite event, ParameterStore store) { if (StringUtils.isBlank(getInputVariablesName()) && this.filenamePattern == null) { FileService fileModelService = new FileService(event.getGraphContext()); for (FileModel fileModel : ...
java
private void allInput(List<FileModel> vertices, GraphRewrite event, ParameterStore store) { if (StringUtils.isBlank(getInputVariablesName()) && this.filenamePattern == null) { FileService fileModelService = new FileService(event.getGraphContext()); for (FileModel fileModel : ...
[ "private", "void", "allInput", "(", "List", "<", "FileModel", ">", "vertices", ",", "GraphRewrite", "event", ",", "ParameterStore", "store", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "getInputVariablesName", "(", ")", ")", "&&", "this", ".", ...
Generating the input vertices is quite complex. Therefore there are multiple methods that handles the input vertices based on the attribute specified in specific order. This method generates all the vertices if there is no other way how to handle the input.
[ "Generating", "the", "input", "vertices", "is", "quite", "complex", ".", "Therefore", "there", "are", "multiple", "methods", "that", "handles", "the", "input", "vertices", "based", "on", "the", "attribute", "specified", "in", "specific", "order", ".", "This", ...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-base/api/src/main/java/org/jboss/windup/rules/files/condition/FileContent.java#L330-L340
159,740
windup/windup
graph/api/src/main/java/org/jboss/windup/graph/service/GraphService.java
GraphService.getById
@Override public T getById(Object id) { return context.getFramed().getFramedVertex(this.type, id); }
java
@Override public T getById(Object id) { return context.getFramed().getFramedVertex(this.type, id); }
[ "@", "Override", "public", "T", "getById", "(", "Object", "id", ")", "{", "return", "context", ".", "getFramed", "(", ")", ".", "getFramedVertex", "(", "this", ".", "type", ",", "id", ")", ";", "}" ]
Returns the vertex with given ID framed into given interface.
[ "Returns", "the", "vertex", "with", "given", "ID", "framed", "into", "given", "interface", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/graph/api/src/main/java/org/jboss/windup/graph/service/GraphService.java#L187-L191
159,741
windup/windup
graph/api/src/main/java/org/jboss/windup/graph/service/GraphService.java
GraphService.addTypeToModel
public static <T extends WindupVertexFrame> T addTypeToModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type) { Vertex vertex = frame.getElement(); graphContext.getGraphTypeManager().addTypeToElement(type, vertex); return graphContext.getFramed().frameElement(vertex, type);...
java
public static <T extends WindupVertexFrame> T addTypeToModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type) { Vertex vertex = frame.getElement(); graphContext.getGraphTypeManager().addTypeToElement(type, vertex); return graphContext.getFramed().frameElement(vertex, type);...
[ "public", "static", "<", "T", "extends", "WindupVertexFrame", ">", "T", "addTypeToModel", "(", "GraphContext", "graphContext", ",", "WindupVertexFrame", "frame", ",", "Class", "<", "T", ">", "type", ")", "{", "Vertex", "vertex", "=", "frame", ".", "getElement"...
Adds the specified type to this frame, and returns a new object that implements this type.
[ "Adds", "the", "specified", "type", "to", "this", "frame", "and", "returns", "a", "new", "object", "that", "implements", "this", "type", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/graph/api/src/main/java/org/jboss/windup/graph/service/GraphService.java#L297-L302
159,742
windup/windup
graph/api/src/main/java/org/jboss/windup/graph/service/GraphService.java
GraphService.removeTypeFromModel
public static <T extends WindupVertexFrame> WindupVertexFrame removeTypeFromModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type) { Vertex vertex = frame.getElement(); graphContext.getGraphTypeManager().removeTypeFromElement(type, vertex); return graphContext.getFramed().f...
java
public static <T extends WindupVertexFrame> WindupVertexFrame removeTypeFromModel(GraphContext graphContext, WindupVertexFrame frame, Class<T> type) { Vertex vertex = frame.getElement(); graphContext.getGraphTypeManager().removeTypeFromElement(type, vertex); return graphContext.getFramed().f...
[ "public", "static", "<", "T", "extends", "WindupVertexFrame", ">", "WindupVertexFrame", "removeTypeFromModel", "(", "GraphContext", "graphContext", ",", "WindupVertexFrame", "frame", ",", "Class", "<", "T", ">", "type", ")", "{", "Vertex", "vertex", "=", "frame", ...
Removes the specified type from the frame.
[ "Removes", "the", "specified", "type", "from", "the", "frame", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/graph/api/src/main/java/org/jboss/windup/graph/service/GraphService.java#L307-L312
159,743
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/ClassificationServiceCache.java
ClassificationServiceCache.getCache
@SuppressWarnings("unchecked") private static synchronized Map<String, Boolean> getCache(GraphRewrite event) { Map<String, Boolean> result = (Map<String, Boolean>)event.getRewriteContext().get(ClassificationServiceCache.class); if (result == null) { result = Collections.synch...
java
@SuppressWarnings("unchecked") private static synchronized Map<String, Boolean> getCache(GraphRewrite event) { Map<String, Boolean> result = (Map<String, Boolean>)event.getRewriteContext().get(ClassificationServiceCache.class); if (result == null) { result = Collections.synch...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "synchronized", "Map", "<", "String", ",", "Boolean", ">", "getCache", "(", "GraphRewrite", "event", ")", "{", "Map", "<", "String", ",", "Boolean", ">", "result", "=", "(", "Map", "<...
Keep a cache of items files associated with classification in order to improve performance.
[ "Keep", "a", "cache", "of", "items", "files", "associated", "with", "classification", "in", "order", "to", "improve", "performance", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/ClassificationServiceCache.java#L25-L35
159,744
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/EffortReportService.java
EffortReportService.getEffortLevelDescription
public static String getEffortLevelDescription(Verbosity verbosity, int points) { EffortLevel level = EffortLevel.forPoints(points); switch (verbosity) { case ID: return level.name(); case VERBOSE: return level.getVerboseDescription(); case SH...
java
public static String getEffortLevelDescription(Verbosity verbosity, int points) { EffortLevel level = EffortLevel.forPoints(points); switch (verbosity) { case ID: return level.name(); case VERBOSE: return level.getVerboseDescription(); case SH...
[ "public", "static", "String", "getEffortLevelDescription", "(", "Verbosity", "verbosity", ",", "int", "points", ")", "{", "EffortLevel", "level", "=", "EffortLevel", ".", "forPoints", "(", "points", ")", ";", "switch", "(", "verbosity", ")", "{", "case", "ID",...
Returns the right string representation of the effort level based on given number of points.
[ "Returns", "the", "right", "string", "representation", "of", "the", "effort", "level", "based", "on", "given", "number", "of", "points", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/EffortReportService.java#L75-L89
159,745
windup/windup
exec/api/src/main/java/org/jboss/windup/exec/configuration/WindupConfiguration.java
WindupConfiguration.setOptionValue
public WindupConfiguration setOptionValue(String name, Object value) { configurationOptions.put(name, value); return this; }
java
public WindupConfiguration setOptionValue(String name, Object value) { configurationOptions.put(name, value); return this; }
[ "public", "WindupConfiguration", "setOptionValue", "(", "String", "name", ",", "Object", "value", ")", "{", "configurationOptions", ".", "put", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Sets a configuration option to the specified value.
[ "Sets", "a", "configuration", "option", "to", "the", "specified", "value", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/exec/api/src/main/java/org/jboss/windup/exec/configuration/WindupConfiguration.java#L108-L112
159,746
windup/windup
exec/api/src/main/java/org/jboss/windup/exec/configuration/WindupConfiguration.java
WindupConfiguration.getOptionValue
@SuppressWarnings("unchecked") public <T> T getOptionValue(String name) { return (T) configurationOptions.get(name); }
java
@SuppressWarnings("unchecked") public <T> T getOptionValue(String name) { return (T) configurationOptions.get(name); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getOptionValue", "(", "String", "name", ")", "{", "return", "(", "T", ")", "configurationOptions", ".", "get", "(", "name", ")", ";", "}" ]
Returns the configuration value with the specified name.
[ "Returns", "the", "configuration", "value", "with", "the", "specified", "name", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/exec/api/src/main/java/org/jboss/windup/exec/configuration/WindupConfiguration.java#L137-L141
159,747
windup/windup
config/api/src/main/java/org/jboss/windup/config/RuleSubset.java
RuleSubset.logTimeTakenByRuleProvider
private void logTimeTakenByRuleProvider(GraphContext graphContext, Context context, int ruleIndex, int timeTaken) { AbstractRuleProvider ruleProvider = (AbstractRuleProvider) context.get(RuleMetadataType.RULE_PROVIDER); if (ruleProvider == null) return; if (!timeTakenByProvider....
java
private void logTimeTakenByRuleProvider(GraphContext graphContext, Context context, int ruleIndex, int timeTaken) { AbstractRuleProvider ruleProvider = (AbstractRuleProvider) context.get(RuleMetadataType.RULE_PROVIDER); if (ruleProvider == null) return; if (!timeTakenByProvider....
[ "private", "void", "logTimeTakenByRuleProvider", "(", "GraphContext", "graphContext", ",", "Context", "context", ",", "int", "ruleIndex", ",", "int", "timeTaken", ")", "{", "AbstractRuleProvider", "ruleProvider", "=", "(", "AbstractRuleProvider", ")", "context", ".", ...
Logs the time taken by this rule, and attaches this to the total for the RuleProvider
[ "Logs", "the", "time", "taken", "by", "this", "rule", "and", "attaches", "this", "to", "the", "total", "for", "the", "RuleProvider" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/RuleSubset.java#L138-L162
159,748
windup/windup
config/api/src/main/java/org/jboss/windup/config/RuleSubset.java
RuleSubset.logTimeTakenByPhase
private void logTimeTakenByPhase(GraphContext graphContext, Class<? extends RulePhase> phase, int timeTaken) { if (!timeTakenByPhase.containsKey(phase)) { RulePhaseExecutionStatisticsModel model = new GraphService<>(graphContext, RulePhaseExecutionStatisticsModel....
java
private void logTimeTakenByPhase(GraphContext graphContext, Class<? extends RulePhase> phase, int timeTaken) { if (!timeTakenByPhase.containsKey(phase)) { RulePhaseExecutionStatisticsModel model = new GraphService<>(graphContext, RulePhaseExecutionStatisticsModel....
[ "private", "void", "logTimeTakenByPhase", "(", "GraphContext", "graphContext", ",", "Class", "<", "?", "extends", "RulePhase", ">", "phase", ",", "int", "timeTaken", ")", "{", "if", "(", "!", "timeTakenByPhase", ".", "containsKey", "(", "phase", ")", ")", "{...
Logs the time taken by this rule and adds this to the total time taken for this phase
[ "Logs", "the", "time", "taken", "by", "this", "rule", "and", "adds", "this", "to", "the", "total", "time", "taken", "for", "this", "phase" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/RuleSubset.java#L167-L186
159,749
windup/windup
rules-xml/api/src/main/java/org/jboss/windup/rules/apps/xml/condition/XmlFileXPathTransformer.java
XmlFileXPathTransformer.transformXPath
public static String transformXPath(String originalXPath) { // use a list to maintain the multiple joined xqueries (if there are multiple queries joined with the "|" operator) List<StringBuilder> compiledXPaths = new ArrayList<>(1); int frameIdx = -1; boolean inQuote = false; ...
java
public static String transformXPath(String originalXPath) { // use a list to maintain the multiple joined xqueries (if there are multiple queries joined with the "|" operator) List<StringBuilder> compiledXPaths = new ArrayList<>(1); int frameIdx = -1; boolean inQuote = false; ...
[ "public", "static", "String", "transformXPath", "(", "String", "originalXPath", ")", "{", "// use a list to maintain the multiple joined xqueries (if there are multiple queries joined with the \"|\" operator)", "List", "<", "StringBuilder", ">", "compiledXPaths", "=", "new", "Array...
Performs the conversion from standard XPath to xpath with parameterization support.
[ "Performs", "the", "conversion", "from", "standard", "XPath", "to", "xpath", "with", "parameterization", "support", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-xml/api/src/main/java/org/jboss/windup/rules/apps/xml/condition/XmlFileXPathTransformer.java#L20-L98
159,750
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.accept
@Override public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) { if (this.options.verbose) { this.out.println( Messages.bind(Messages.compilation_loadBinary, new String(binaryType.getName()))); // new Exception("TRACE BI...
java
@Override public void accept(IBinaryType binaryType, PackageBinding packageBinding, AccessRestriction accessRestriction) { if (this.options.verbose) { this.out.println( Messages.bind(Messages.compilation_loadBinary, new String(binaryType.getName()))); // new Exception("TRACE BI...
[ "@", "Override", "public", "void", "accept", "(", "IBinaryType", "binaryType", ",", "PackageBinding", "packageBinding", ",", "AccessRestriction", "accessRestriction", ")", "{", "if", "(", "this", ".", "options", ".", "verbose", ")", "{", "this", ".", "out", "....
Add an additional binary type
[ "Add", "an", "additional", "binary", "type" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L313-L323
159,751
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.accept
@Override public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) { // Switch the current policy and compilation result for this unit to the requested one. CompilationResult unitResult = new CompilationResult(sourceUnit, this.totalUnits, this.totalUnits, this...
java
@Override public void accept(ICompilationUnit sourceUnit, AccessRestriction accessRestriction) { // Switch the current policy and compilation result for this unit to the requested one. CompilationResult unitResult = new CompilationResult(sourceUnit, this.totalUnits, this.totalUnits, this...
[ "@", "Override", "public", "void", "accept", "(", "ICompilationUnit", "sourceUnit", ",", "AccessRestriction", "accessRestriction", ")", "{", "// Switch the current policy and compilation result for this unit to the requested one.", "CompilationResult", "unitResult", "=", "new", "...
Add an additional compilation unit into the loop -> build compilation unit declarations, their bindings and record their results.
[ "Add", "an", "additional", "compilation", "unit", "into", "the", "loop", "-", ">", "build", "compilation", "unit", "declarations", "their", "bindings", "and", "record", "their", "results", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L329-L368
159,752
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.accept
@Override public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) { this.problemReporter.abortDueToInternalError( Messages.bind(Messages.abort_againstSourceModel, new String[] { String.valueOf(sourceTypes[0].getName()), String.valueOf(sou...
java
@Override public void accept(ISourceType[] sourceTypes, PackageBinding packageBinding, AccessRestriction accessRestriction) { this.problemReporter.abortDueToInternalError( Messages.bind(Messages.abort_againstSourceModel, new String[] { String.valueOf(sourceTypes[0].getName()), String.valueOf(sou...
[ "@", "Override", "public", "void", "accept", "(", "ISourceType", "[", "]", "sourceTypes", ",", "PackageBinding", "packageBinding", ",", "AccessRestriction", "accessRestriction", ")", "{", "this", ".", "problemReporter", ".", "abortDueToInternalError", "(", "Messages",...
Add additional source types
[ "Add", "additional", "source", "types" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L373-L377
159,753
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.reportProgress
protected void reportProgress(String taskDecription) { if (this.progress != null) { if (this.progress.isCanceled()) { // Only AbortCompilation can stop the compiler cleanly. // We check cancellation again following the call to compile. throw new AbortC...
java
protected void reportProgress(String taskDecription) { if (this.progress != null) { if (this.progress.isCanceled()) { // Only AbortCompilation can stop the compiler cleanly. // We check cancellation again following the call to compile. throw new AbortC...
[ "protected", "void", "reportProgress", "(", "String", "taskDecription", ")", "{", "if", "(", "this", ".", "progress", "!=", "null", ")", "{", "if", "(", "this", ".", "progress", ".", "isCanceled", "(", ")", ")", "{", "// Only AbortCompilation can stop the comp...
Checks whether the compilation has been canceled and reports the given progress to the compiler progress.
[ "Checks", "whether", "the", "compilation", "has", "been", "canceled", "and", "reports", "the", "given", "progress", "to", "the", "compiler", "progress", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L414-L423
159,754
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.reportWorked
protected void reportWorked(int workIncrement, int currentUnitIndex) { if (this.progress != null) { if (this.progress.isCanceled()) { // Only AbortCompilation can stop the compiler cleanly. // We check cancellation again following the call to compile. ...
java
protected void reportWorked(int workIncrement, int currentUnitIndex) { if (this.progress != null) { if (this.progress.isCanceled()) { // Only AbortCompilation can stop the compiler cleanly. // We check cancellation again following the call to compile. ...
[ "protected", "void", "reportWorked", "(", "int", "workIncrement", ",", "int", "currentUnitIndex", ")", "{", "if", "(", "this", ".", "progress", "!=", "null", ")", "{", "if", "(", "this", ".", "progress", ".", "isCanceled", "(", ")", ")", "{", "// Only Ab...
Checks whether the compilation has been canceled and reports the given work increment to the compiler progress.
[ "Checks", "whether", "the", "compilation", "has", "been", "canceled", "and", "reports", "the", "given", "work", "increment", "to", "the", "compiler", "progress", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L428-L437
159,755
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.compile
private void compile(ICompilationUnit[] sourceUnits, boolean lastRound) { this.stats.startTime = System.currentTimeMillis(); try { // build and record parsed units reportProgress(Messages.compilation_beginningToCompile); if (this.options.complianceLevel >= ClassFileC...
java
private void compile(ICompilationUnit[] sourceUnits, boolean lastRound) { this.stats.startTime = System.currentTimeMillis(); try { // build and record parsed units reportProgress(Messages.compilation_beginningToCompile); if (this.options.complianceLevel >= ClassFileC...
[ "private", "void", "compile", "(", "ICompilationUnit", "[", "]", "sourceUnits", ",", "boolean", "lastRound", ")", "{", "this", ".", "stats", ".", "startTime", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "try", "{", "// build and record parsed units",...
General API -> compile each of supplied files -> recompile any required types for which we have an incomplete principle structure
[ "General", "API", "-", ">", "compile", "each", "of", "supplied", "files", "-", ">", "recompile", "any", "required", "types", "for", "which", "we", "have", "an", "incomplete", "principle", "structure" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L447-L502
159,756
windup/windup
forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java
Compiler.process
public void process(CompilationUnitDeclaration unit, int i) { this.lookupEnvironment.unitBeingCompleted = unit; long parseStart = System.currentTimeMillis(); this.parser.getMethodBodies(unit); long resolveStart = System.currentTimeMillis(); this.stats.parseTime += resolveStart ...
java
public void process(CompilationUnitDeclaration unit, int i) { this.lookupEnvironment.unitBeingCompleted = unit; long parseStart = System.currentTimeMillis(); this.parser.getMethodBodies(unit); long resolveStart = System.currentTimeMillis(); this.stats.parseTime += resolveStart ...
[ "public", "void", "process", "(", "CompilationUnitDeclaration", "unit", ",", "int", "i", ")", "{", "this", ".", "lookupEnvironment", ".", "unitBeingCompleted", "=", "unit", ";", "long", "parseStart", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "thi...
Process a compilation unit already parsed and build.
[ "Process", "a", "compilation", "unit", "already", "parsed", "and", "build", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/forks/jdt/src/main/java/org/eclipse/jdt/internal/compiler/Compiler.java#L888-L932
159,757
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagServiceHolder.java
TagServiceHolder.loadTagDefinitions
@PostConstruct public void loadTagDefinitions() { Map<Addon, List<URL>> addonToResourcesMap = scanner.scanForAddonMap(new FileExtensionFilter("tags.xml")); for (Map.Entry<Addon, List<URL>> entry : addonToResourcesMap.entrySet()) { for (URL resource : entry.getValue()) ...
java
@PostConstruct public void loadTagDefinitions() { Map<Addon, List<URL>> addonToResourcesMap = scanner.scanForAddonMap(new FileExtensionFilter("tags.xml")); for (Map.Entry<Addon, List<URL>> entry : addonToResourcesMap.entrySet()) { for (URL resource : entry.getValue()) ...
[ "@", "PostConstruct", "public", "void", "loadTagDefinitions", "(", ")", "{", "Map", "<", "Addon", ",", "List", "<", "URL", ">", ">", "addonToResourcesMap", "=", "scanner", ".", "scanForAddonMap", "(", "new", "FileExtensionFilter", "(", "\"tags.xml\"", ")", ")"...
Loads the tag definitions from the files with a ".tags.xml" suffix from the addons.
[ "Loads", "the", "tag", "definitions", "from", "the", "files", "with", "a", ".", "tags", ".", "xml", "suffix", "from", "the", "addons", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagServiceHolder.java#L44-L63
159,758
windup/windup
java-ast/addon/src/main/java/org/jboss/windup/ast/java/BatchASTProcessor.java
BatchASTProcessor.analyze
public static BatchASTFuture analyze(final BatchASTListener listener, final WildcardImportResolver importResolver, final Set<String> libraryPaths, final Set<String> sourcePaths, Set<Path> sourceFiles) { final String[] encodings = null; final String[] bindingKeys = ne...
java
public static BatchASTFuture analyze(final BatchASTListener listener, final WildcardImportResolver importResolver, final Set<String> libraryPaths, final Set<String> sourcePaths, Set<Path> sourceFiles) { final String[] encodings = null; final String[] bindingKeys = ne...
[ "public", "static", "BatchASTFuture", "analyze", "(", "final", "BatchASTListener", "listener", ",", "final", "WildcardImportResolver", "importResolver", ",", "final", "Set", "<", "String", ">", "libraryPaths", ",", "final", "Set", "<", "String", ">", "sourcePaths", ...
Process the given batch of files and pass the results back to the listener as each file is processed.
[ "Process", "the", "given", "batch", "of", "files", "and", "pass", "the", "results", "back", "to", "the", "listener", "as", "each", "file", "is", "processed", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/java-ast/addon/src/main/java/org/jboss/windup/ast/java/BatchASTProcessor.java#L34-L116
159,759
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/annotation/AnnotationTypeCondition.java
AnnotationTypeCondition.addCondition
public AnnotationTypeCondition addCondition(String element, AnnotationCondition condition) { this.conditions.put(element, condition); return this; }
java
public AnnotationTypeCondition addCondition(String element, AnnotationCondition condition) { this.conditions.put(element, condition); return this; }
[ "public", "AnnotationTypeCondition", "addCondition", "(", "String", "element", ",", "AnnotationCondition", "condition", ")", "{", "this", ".", "conditions", ".", "put", "(", "element", ",", "condition", ")", ";", "return", "this", ";", "}" ]
Adds another condition for an element within this annotation.
[ "Adds", "another", "condition", "for", "an", "element", "within", "this", "annotation", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/condition/annotation/AnnotationTypeCondition.java#L36-L40
159,760
windup/windup
decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java
ProcyonDecompiler.decompileClassFile
@Override public DecompilationResult decompileClassFile(Path rootDir, Path classFilePath, Path outputDir) throws DecompilationException { Checks.checkDirectoryToBeRead(rootDir.toFile(), "Classes root dir"); File classFile = classFilePath.toFile(); Checks.checkFileToBeRead...
java
@Override public DecompilationResult decompileClassFile(Path rootDir, Path classFilePath, Path outputDir) throws DecompilationException { Checks.checkDirectoryToBeRead(rootDir.toFile(), "Classes root dir"); File classFile = classFilePath.toFile(); Checks.checkFileToBeRead...
[ "@", "Override", "public", "DecompilationResult", "decompileClassFile", "(", "Path", "rootDir", ",", "Path", "classFilePath", ",", "Path", "outputDir", ")", "throws", "DecompilationException", "{", "Checks", ".", "checkDirectoryToBeRead", "(", "rootDir", ".", "toFile"...
Decompiles the given .class file and creates the specified output source file. @param classFilePath the .class file to be decompiled. @param outputDir The directory where decompiled .java files will be placed.
[ "Decompiles", "the", "given", ".", "class", "file", "and", "creates", "the", "specified", "output", "source", "file", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java#L225-L259
159,761
windup/windup
decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java
ProcyonDecompiler.refreshMetadataCache
private void refreshMetadataCache(final Queue<WindupMetadataSystem> metadataSystemCache, final DecompilerSettings settings) { metadataSystemCache.clear(); for (int i = 0; i < this.getNumberOfThreads(); i++) { metadataSystemCache.add(new NoRetryMetadataSystem(settings.getTypeLoade...
java
private void refreshMetadataCache(final Queue<WindupMetadataSystem> metadataSystemCache, final DecompilerSettings settings) { metadataSystemCache.clear(); for (int i = 0; i < this.getNumberOfThreads(); i++) { metadataSystemCache.add(new NoRetryMetadataSystem(settings.getTypeLoade...
[ "private", "void", "refreshMetadataCache", "(", "final", "Queue", "<", "WindupMetadataSystem", ">", "metadataSystemCache", ",", "final", "DecompilerSettings", "settings", ")", "{", "metadataSystemCache", ".", "clear", "(", ")", ";", "for", "(", "int", "i", "=", ...
The metadata cache can become huge over time. This simply flushes it periodically.
[ "The", "metadata", "cache", "can", "become", "huge", "over", "time", ".", "This", "simply", "flushes", "it", "periodically", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java#L522-L529
159,762
windup/windup
decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java
ProcyonDecompiler.decompileType
private File decompileType(final DecompilerSettings settings, final WindupMetadataSystem metadataSystem, final String typeName) throws IOException { log.fine("Decompiling " + typeName); final TypeReference type; // Hack to get around classes whose descriptors clash with primitive types. ...
java
private File decompileType(final DecompilerSettings settings, final WindupMetadataSystem metadataSystem, final String typeName) throws IOException { log.fine("Decompiling " + typeName); final TypeReference type; // Hack to get around classes whose descriptors clash with primitive types. ...
[ "private", "File", "decompileType", "(", "final", "DecompilerSettings", "settings", ",", "final", "WindupMetadataSystem", "metadataSystem", ",", "final", "String", "typeName", ")", "throws", "IOException", "{", "log", ".", "fine", "(", "\"Decompiling \"", "+", "type...
Decompiles a single type. @param metadataSystem @param typeName @return @throws IOException
[ "Decompiles", "a", "single", "type", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java#L598-L663
159,763
windup/windup
decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java
ProcyonDecompiler.getDefaultSettings
private DecompilerSettings getDefaultSettings(File outputDir) { DecompilerSettings settings = new DecompilerSettings(); procyonConf.setDecompilerSettings(settings); settings.setOutputDirectory(outputDir.getPath()); settings.setShowSyntheticMembers(false); settings.setForceExp...
java
private DecompilerSettings getDefaultSettings(File outputDir) { DecompilerSettings settings = new DecompilerSettings(); procyonConf.setDecompilerSettings(settings); settings.setOutputDirectory(outputDir.getPath()); settings.setShowSyntheticMembers(false); settings.setForceExp...
[ "private", "DecompilerSettings", "getDefaultSettings", "(", "File", "outputDir", ")", "{", "DecompilerSettings", "settings", "=", "new", "DecompilerSettings", "(", ")", ";", "procyonConf", ".", "setDecompilerSettings", "(", "settings", ")", ";", "settings", ".", "se...
Default settings set type loader to ClasspathTypeLoader if not set before.
[ "Default", "settings", "set", "type", "loader", "to", "ClasspathTypeLoader", "if", "not", "set", "before", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java#L668-L679
159,764
windup/windup
decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java
ProcyonDecompiler.loadJar
private JarFile loadJar(File archive) throws DecompilationException { try { return new JarFile(archive); } catch (IOException ex) { throw new DecompilationException("Can't load .jar: " + archive.getPath(), ex); } }
java
private JarFile loadJar(File archive) throws DecompilationException { try { return new JarFile(archive); } catch (IOException ex) { throw new DecompilationException("Can't load .jar: " + archive.getPath(), ex); } }
[ "private", "JarFile", "loadJar", "(", "File", "archive", ")", "throws", "DecompilationException", "{", "try", "{", "return", "new", "JarFile", "(", "archive", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "throw", "new", "DecompilationException",...
Opens the jar, wraps any IOException.
[ "Opens", "the", "jar", "wraps", "any", "IOException", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java#L684-L694
159,765
windup/windup
decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java
ProcyonDecompiler.createFileWriter
private static synchronized FileOutputWriter createFileWriter(final TypeDefinition type, final DecompilerSettings settings) throws IOException { final String outputDirectory = settings.getOutputDirectory(); final String fileName = type.getName() + settings.getLanguage().getFileExten...
java
private static synchronized FileOutputWriter createFileWriter(final TypeDefinition type, final DecompilerSettings settings) throws IOException { final String outputDirectory = settings.getOutputDirectory(); final String fileName = type.getName() + settings.getLanguage().getFileExten...
[ "private", "static", "synchronized", "FileOutputWriter", "createFileWriter", "(", "final", "TypeDefinition", "type", ",", "final", "DecompilerSettings", "settings", ")", "throws", "IOException", "{", "final", "String", "outputDirectory", "=", "settings", ".", "getOutput...
Constructs the path from FQCN, validates writability, and creates a writer.
[ "Constructs", "the", "path", "from", "FQCN", "validates", "writability", "and", "creates", "a", "writer", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/decompiler/impl-procyon/src/main/java/org/jboss/windup/decompiler/procyon/ProcyonDecompiler.java#L699-L725
159,766
windup/windup
bootstrap/src/main/java/org/jboss/windup/bootstrap/commands/AbstractListCommandWithoutFurnace.java
AbstractListCommandWithoutFurnace.printValuesSorted
protected static void printValuesSorted(String message, Set<String> values) { System.out.println(); System.out.println(message + ":"); List<String> sorted = new ArrayList<>(values); Collections.sort(sorted); for (String value : sorted) { System.out.println...
java
protected static void printValuesSorted(String message, Set<String> values) { System.out.println(); System.out.println(message + ":"); List<String> sorted = new ArrayList<>(values); Collections.sort(sorted); for (String value : sorted) { System.out.println...
[ "protected", "static", "void", "printValuesSorted", "(", "String", "message", ",", "Set", "<", "String", ">", "values", ")", "{", "System", ".", "out", ".", "println", "(", ")", ";", "System", ".", "out", ".", "println", "(", "message", "+", "\":\"", "...
Print the given values after displaying the provided message.
[ "Print", "the", "given", "values", "after", "displaying", "the", "provided", "message", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/bootstrap/src/main/java/org/jboss/windup/bootstrap/commands/AbstractListCommandWithoutFurnace.java#L16-L26
159,767
windup/windup
graph/api/src/main/java/org/jboss/windup/graph/GraphTypeManager.java
GraphTypeManager.getTypeValue
public static String getTypeValue(Class<? extends WindupFrame> clazz) { TypeValue typeValueAnnotation = clazz.getAnnotation(TypeValue.class); if (typeValueAnnotation == null) throw new IllegalArgumentException("Class " + clazz.getCanonicalName() + " lacks a @TypeValue annotation"); ...
java
public static String getTypeValue(Class<? extends WindupFrame> clazz) { TypeValue typeValueAnnotation = clazz.getAnnotation(TypeValue.class); if (typeValueAnnotation == null) throw new IllegalArgumentException("Class " + clazz.getCanonicalName() + " lacks a @TypeValue annotation"); ...
[ "public", "static", "String", "getTypeValue", "(", "Class", "<", "?", "extends", "WindupFrame", ">", "clazz", ")", "{", "TypeValue", "typeValueAnnotation", "=", "clazz", ".", "getAnnotation", "(", "TypeValue", ".", "class", ")", ";", "if", "(", "typeValueAnnot...
Returns the type discriminator value for given Frames model class, extracted from the @TypeValue annotation.
[ "Returns", "the", "type", "discriminator", "value", "for", "given", "Frames", "model", "class", "extracted", "from", "the" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/graph/api/src/main/java/org/jboss/windup/graph/GraphTypeManager.java#L59-L66
159,768
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/FreeMarkerUtil.java
FreeMarkerUtil.getDefaultFreemarkerConfiguration
public static Configuration getDefaultFreemarkerConfiguration() { freemarker.template.Configuration configuration = new freemarker.template.Configuration(Configuration.VERSION_2_3_26); DefaultObjectWrapperBuilder objectWrapperBuilder = new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_26); ...
java
public static Configuration getDefaultFreemarkerConfiguration() { freemarker.template.Configuration configuration = new freemarker.template.Configuration(Configuration.VERSION_2_3_26); DefaultObjectWrapperBuilder objectWrapperBuilder = new DefaultObjectWrapperBuilder(Configuration.VERSION_2_3_26); ...
[ "public", "static", "Configuration", "getDefaultFreemarkerConfiguration", "(", ")", "{", "freemarker", ".", "template", ".", "Configuration", "configuration", "=", "new", "freemarker", ".", "template", ".", "Configuration", "(", "Configuration", ".", "VERSION_2_3_26", ...
Gets the default configuration for Freemarker within Windup.
[ "Gets", "the", "default", "configuration", "for", "Freemarker", "within", "Windup", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/FreeMarkerUtil.java#L34-L46
159,769
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/FreeMarkerUtil.java
FreeMarkerUtil.findFreeMarkerContextVariables
public static Map<String, Object> findFreeMarkerContextVariables(Variables variables, String... varNames) { Map<String, Object> results = new HashMap<>(); for (String varName : varNames) { WindupVertexFrame payload = null; try { payload = ...
java
public static Map<String, Object> findFreeMarkerContextVariables(Variables variables, String... varNames) { Map<String, Object> results = new HashMap<>(); for (String varName : varNames) { WindupVertexFrame payload = null; try { payload = ...
[ "public", "static", "Map", "<", "String", ",", "Object", ">", "findFreeMarkerContextVariables", "(", "Variables", "variables", ",", "String", "...", "varNames", ")", "{", "Map", "<", "String", ",", "Object", ">", "results", "=", "new", "HashMap", "<>", "(", ...
Finds all variables in the context with the given names, and also attaches all WindupFreeMarkerMethods from all addons into the map. This allows external addons to extend the capabilities in the freemarker reporting system.
[ "Finds", "all", "variables", "in", "the", "context", "with", "the", "given", "names", "and", "also", "attaches", "all", "WindupFreeMarkerMethods", "from", "all", "addons", "into", "the", "map", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/freemarker/FreeMarkerUtil.java#L121-L151
159,770
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/ClassificationService.java
ClassificationService.attachLink
public ClassificationModel attachLink(ClassificationModel classificationModel, LinkModel linkModel) { for (LinkModel existing : classificationModel.getLinks()) { if (StringUtils.equals(existing.getLink(), linkModel.getLink())) { return classificationModel; ...
java
public ClassificationModel attachLink(ClassificationModel classificationModel, LinkModel linkModel) { for (LinkModel existing : classificationModel.getLinks()) { if (StringUtils.equals(existing.getLink(), linkModel.getLink())) { return classificationModel; ...
[ "public", "ClassificationModel", "attachLink", "(", "ClassificationModel", "classificationModel", ",", "LinkModel", "linkModel", ")", "{", "for", "(", "LinkModel", "existing", ":", "classificationModel", ".", "getLinks", "(", ")", ")", "{", "if", "(", "StringUtils",...
Attach the given link to the classification, while checking for duplicates.
[ "Attach", "the", "given", "link", "to", "the", "classification", "while", "checking", "for", "duplicates", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/ClassificationService.java#L317-L328
159,771
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/provider/DiscoverMavenProjectsRuleProvider.java
DiscoverMavenProjectsRuleProvider.getMavenStubProject
private MavenProjectModel getMavenStubProject(MavenProjectService mavenProjectService, String groupId, String artifactId, String version) { Iterable<MavenProjectModel> mavenProjectModels = mavenProjectService.findByGroupArtifactVersion(groupId, artifactId, version); if (!mavenProjectModels.iterator(...
java
private MavenProjectModel getMavenStubProject(MavenProjectService mavenProjectService, String groupId, String artifactId, String version) { Iterable<MavenProjectModel> mavenProjectModels = mavenProjectService.findByGroupArtifactVersion(groupId, artifactId, version); if (!mavenProjectModels.iterator(...
[ "private", "MavenProjectModel", "getMavenStubProject", "(", "MavenProjectService", "mavenProjectService", ",", "String", "groupId", ",", "String", "artifactId", ",", "String", "version", ")", "{", "Iterable", "<", "MavenProjectModel", ">", "mavenProjectModels", "=", "ma...
A Maven stub is a Maven Project for which we have found information, but the project has not yet been located within the input application. If we have found an application of the same GAV within the input app, we should fill out this stub instead of creating a new one.
[ "A", "Maven", "stub", "is", "a", "Maven", "Project", "for", "which", "we", "have", "found", "information", "but", "the", "project", "has", "not", "yet", "been", "located", "within", "the", "input", "application", ".", "If", "we", "have", "found", "an", "...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/java/scan/provider/DiscoverMavenProjectsRuleProvider.java#L401-L417
159,772
windup/windup
utils/src/main/java/org/jboss/windup/util/PathUtil.java
PathUtil.getRootFolderForSource
public static Path getRootFolderForSource(Path sourceFilePath, String packageName) { if (packageName == null || packageName.trim().isEmpty()) { return sourceFilePath.getParent(); } String[] packageNameComponents = packageName.split("\\."); Path currentPath = sourc...
java
public static Path getRootFolderForSource(Path sourceFilePath, String packageName) { if (packageName == null || packageName.trim().isEmpty()) { return sourceFilePath.getParent(); } String[] packageNameComponents = packageName.split("\\."); Path currentPath = sourc...
[ "public", "static", "Path", "getRootFolderForSource", "(", "Path", "sourceFilePath", ",", "String", "packageName", ")", "{", "if", "(", "packageName", "==", "null", "||", "packageName", ".", "trim", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "return", "...
Returns the root path for this source file, based upon the package name. For example, if path is "/project/src/main/java/org/example/Foo.java" and the package is "org.example", then this should return "/project/src/main/java". Returns null if the folder structure does not match the package name.
[ "Returns", "the", "root", "path", "for", "this", "source", "file", "based", "upon", "the", "package", "name", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/PathUtil.java#L213-L231
159,773
windup/windup
utils/src/main/java/org/jboss/windup/util/PathUtil.java
PathUtil.isInSubDirectory
public static boolean isInSubDirectory(File dir, File file) { if (file == null) return false; if (file.equals(dir)) return true; return isInSubDirectory(dir, file.getParentFile()); }
java
public static boolean isInSubDirectory(File dir, File file) { if (file == null) return false; if (file.equals(dir)) return true; return isInSubDirectory(dir, file.getParentFile()); }
[ "public", "static", "boolean", "isInSubDirectory", "(", "File", "dir", ",", "File", "file", ")", "{", "if", "(", "file", "==", "null", ")", "return", "false", ";", "if", "(", "file", ".", "equals", "(", "dir", ")", ")", "return", "true", ";", "return...
Returns true if "file" is a subfile or subdirectory of "dir". For example with the directory /path/to/a, the following return values would occur: /path/to/a/foo.txt - true /path/to/a/bar/zoo/boo/team.txt - true /path/to/b/foo.txt - false
[ "Returns", "true", "if", "file", "is", "a", "subfile", "or", "subdirectory", "of", "dir", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/PathUtil.java#L241-L250
159,774
windup/windup
utils/src/main/java/org/jboss/windup/util/PathUtil.java
PathUtil.createDirectory
public static void createDirectory(Path dir, String dirDesc) { try { Files.createDirectories(dir); } catch (IOException ex) { throw new WindupException("Error creating " + dirDesc + " folder: " + dir.toString() + " due to: " + ex.getMessage(), ex); ...
java
public static void createDirectory(Path dir, String dirDesc) { try { Files.createDirectories(dir); } catch (IOException ex) { throw new WindupException("Error creating " + dirDesc + " folder: " + dir.toString() + " due to: " + ex.getMessage(), ex); ...
[ "public", "static", "void", "createDirectory", "(", "Path", "dir", ",", "String", "dirDesc", ")", "{", "try", "{", "Files", ".", "createDirectories", "(", "dir", ")", ";", "}", "catch", "(", "IOException", "ex", ")", "{", "throw", "new", "WindupException",...
Creates the given directory. Fails if it already exists.
[ "Creates", "the", "given", "directory", ".", "Fails", "if", "it", "already", "exists", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/utils/src/main/java/org/jboss/windup/util/PathUtil.java#L264-L274
159,775
windup/windup
java-ast/addon/src/main/java/org/jboss/windup/ast/java/ReferenceResolvingVisitor.java
ReferenceResolvingVisitor.processType
private ClassReference processType(Type type, TypeReferenceLocation typeReferenceLocation, int lineNumber, int columnNumber, int length, String line) { if (type == null) return null; ITypeBinding resolveBinding = type.resolveBinding(); if (resolveBinding == null)...
java
private ClassReference processType(Type type, TypeReferenceLocation typeReferenceLocation, int lineNumber, int columnNumber, int length, String line) { if (type == null) return null; ITypeBinding resolveBinding = type.resolveBinding(); if (resolveBinding == null)...
[ "private", "ClassReference", "processType", "(", "Type", "type", ",", "TypeReferenceLocation", "typeReferenceLocation", ",", "int", "lineNumber", ",", "int", "columnNumber", ",", "int", "length", ",", "String", "line", ")", "{", "if", "(", "type", "==", "null", ...
The method determines if the type can be resolved and if not, will try to guess the qualified name using the information from the imports.
[ "The", "method", "determines", "if", "the", "type", "can", "be", "resolved", "and", "if", "not", "will", "try", "to", "guess", "the", "qualified", "name", "using", "the", "information", "from", "the", "imports", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/java-ast/addon/src/main/java/org/jboss/windup/ast/java/ReferenceResolvingVisitor.java#L299-L322
159,776
windup/windup
java-ast/addon/src/main/java/org/jboss/windup/ast/java/ReferenceResolvingVisitor.java
ReferenceResolvingVisitor.addAnnotationValues
private void addAnnotationValues(ClassReference annotatedReference, AnnotationClassReference typeRef, Annotation node) { Map<String, AnnotationValue> annotationValueMap = new HashMap<>(); if (node instanceof SingleMemberAnnotation) { SingleMemberAnnotation singleMemberAnnotation ...
java
private void addAnnotationValues(ClassReference annotatedReference, AnnotationClassReference typeRef, Annotation node) { Map<String, AnnotationValue> annotationValueMap = new HashMap<>(); if (node instanceof SingleMemberAnnotation) { SingleMemberAnnotation singleMemberAnnotation ...
[ "private", "void", "addAnnotationValues", "(", "ClassReference", "annotatedReference", ",", "AnnotationClassReference", "typeRef", ",", "Annotation", "node", ")", "{", "Map", "<", "String", ",", "AnnotationValue", ">", "annotationValueMap", "=", "new", "HashMap", "<>"...
Adds parameters contained in the annotation into the annotation type reference @param typeRef @param node
[ "Adds", "parameters", "contained", "in", "the", "annotation", "into", "the", "annotation", "type", "reference" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/java-ast/addon/src/main/java/org/jboss/windup/ast/java/ReferenceResolvingVisitor.java#L668-L690
159,777
windup/windup
java-ast/addon/src/main/java/org/jboss/windup/ast/java/ReferenceResolvingVisitor.java
ReferenceResolvingVisitor.visit
@Override public boolean visit(VariableDeclarationStatement node) { for (int i = 0; i < node.fragments().size(); ++i) { String nodeType = node.getType().toString(); VariableDeclarationFragment frag = (VariableDeclarationFragment) node.fragments().get(i); state...
java
@Override public boolean visit(VariableDeclarationStatement node) { for (int i = 0; i < node.fragments().size(); ++i) { String nodeType = node.getType().toString(); VariableDeclarationFragment frag = (VariableDeclarationFragment) node.fragments().get(i); state...
[ "@", "Override", "public", "boolean", "visit", "(", "VariableDeclarationStatement", "node", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "node", ".", "fragments", "(", ")", ".", "size", "(", ")", ";", "++", "i", ")", "{", "String", "n...
Declaration of the variable within a block
[ "Declaration", "of", "the", "variable", "within", "a", "block" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/java-ast/addon/src/main/java/org/jboss/windup/ast/java/ReferenceResolvingVisitor.java#L925-L940
159,778
windup/windup
config/api/src/main/java/org/jboss/windup/config/query/Query.java
Query.excludingType
@Override public QueryBuilderFind excludingType(final Class<? extends WindupVertexFrame> type) { pipelineCriteria.add(new QueryGremlinCriterion() { @Override public void query(GraphRewrite event, GraphTraversal<?, Vertex> pipeline) { pipeline.f...
java
@Override public QueryBuilderFind excludingType(final Class<? extends WindupVertexFrame> type) { pipelineCriteria.add(new QueryGremlinCriterion() { @Override public void query(GraphRewrite event, GraphTraversal<?, Vertex> pipeline) { pipeline.f...
[ "@", "Override", "public", "QueryBuilderFind", "excludingType", "(", "final", "Class", "<", "?", "extends", "WindupVertexFrame", ">", "type", ")", "{", "pipelineCriteria", ".", "add", "(", "new", "QueryGremlinCriterion", "(", ")", "{", "@", "Override", "public",...
Excludes Vertices that are of the provided type.
[ "Excludes", "Vertices", "that", "are", "of", "the", "provided", "type", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/query/Query.java#L71-L83
159,779
windup/windup
reporting/impl/src/main/java/org/jboss/windup/reporting/rules/rendering/CssJsResourceRenderingRuleProvider.java
CssJsResourceRenderingRuleProvider.addonDependsOnReporting
private boolean addonDependsOnReporting(Addon addon) { for (AddonDependency dep : addon.getDependencies()) { if (dep.getDependency().equals(this.addon)) { return true; } boolean subDep = addonDependsOnReporting(dep.getDependency()); ...
java
private boolean addonDependsOnReporting(Addon addon) { for (AddonDependency dep : addon.getDependencies()) { if (dep.getDependency().equals(this.addon)) { return true; } boolean subDep = addonDependsOnReporting(dep.getDependency()); ...
[ "private", "boolean", "addonDependsOnReporting", "(", "Addon", "addon", ")", "{", "for", "(", "AddonDependency", "dep", ":", "addon", ".", "getDependencies", "(", ")", ")", "{", "if", "(", "dep", ".", "getDependency", "(", ")", ".", "equals", "(", "this", ...
Returns true if the addon depends on reporting.
[ "Returns", "true", "if", "the", "addon", "depends", "on", "reporting", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/impl/src/main/java/org/jboss/windup/reporting/rules/rendering/CssJsResourceRenderingRuleProvider.java#L163-L178
159,780
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/TagGraphService.java
TagGraphService.getSingleParent
public static TagModel getSingleParent(TagModel tag) { final Iterator<TagModel> parents = tag.getDesignatedByTags().iterator(); if (!parents.hasNext()) throw new WindupException("Tag is not designated by any tags: " + tag); final TagModel maybeOnlyParent = parents.next(); ...
java
public static TagModel getSingleParent(TagModel tag) { final Iterator<TagModel> parents = tag.getDesignatedByTags().iterator(); if (!parents.hasNext()) throw new WindupException("Tag is not designated by any tags: " + tag); final TagModel maybeOnlyParent = parents.next(); ...
[ "public", "static", "TagModel", "getSingleParent", "(", "TagModel", "tag", ")", "{", "final", "Iterator", "<", "TagModel", ">", "parents", "=", "tag", ".", "getDesignatedByTags", "(", ")", ".", "iterator", "(", ")", ";", "if", "(", "!", "parents", ".", "...
Returns a single parent of the given tag. If there are multiple parents, throws a WindupException.
[ "Returns", "a", "single", "parent", "of", "the", "given", "tag", ".", "If", "there", "are", "multiple", "parents", "throws", "a", "WindupException", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/TagGraphService.java#L168-L183
159,781
windup/windup
config/api/src/main/java/org/jboss/windup/config/query/QueryTypeCriterion.java
QueryTypeCriterion.addPipeFor
public static GraphTraversal<Vertex, Vertex> addPipeFor(GraphTraversal<Vertex, Vertex> pipeline, Class<? extends WindupVertexFrame> clazz) { pipeline.has(WindupVertexFrame.TYPE_PROP, GraphTypeManager.getTypeValue(clazz)); return pipeline; }
java
public static GraphTraversal<Vertex, Vertex> addPipeFor(GraphTraversal<Vertex, Vertex> pipeline, Class<? extends WindupVertexFrame> clazz) { pipeline.has(WindupVertexFrame.TYPE_PROP, GraphTypeManager.getTypeValue(clazz)); return pipeline; }
[ "public", "static", "GraphTraversal", "<", "Vertex", ",", "Vertex", ">", "addPipeFor", "(", "GraphTraversal", "<", "Vertex", ",", "Vertex", ">", "pipeline", ",", "Class", "<", "?", "extends", "WindupVertexFrame", ">", "clazz", ")", "{", "pipeline", ".", "has...
Adds a criterion to given pipeline which filters out vertices representing given WindupVertexFrame.
[ "Adds", "a", "criterion", "to", "given", "pipeline", "which", "filters", "out", "vertices", "representing", "given", "WindupVertexFrame", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/query/QueryTypeCriterion.java#L35-L40
159,782
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/TagUtil.java
TagUtil.strictCheckMatchingTags
public static boolean strictCheckMatchingTags(Collection<String> tags, Set<String> includeTags, Set<String> excludeTags) { boolean includeTagsEnabled = !includeTags.isEmpty(); for (String tag : tags) { boolean isIncluded = includeTags.contains(tag); boolean isExclude...
java
public static boolean strictCheckMatchingTags(Collection<String> tags, Set<String> includeTags, Set<String> excludeTags) { boolean includeTagsEnabled = !includeTags.isEmpty(); for (String tag : tags) { boolean isIncluded = includeTags.contains(tag); boolean isExclude...
[ "public", "static", "boolean", "strictCheckMatchingTags", "(", "Collection", "<", "String", ">", "tags", ",", "Set", "<", "String", ">", "includeTags", ",", "Set", "<", "String", ">", "excludeTags", ")", "{", "boolean", "includeTagsEnabled", "=", "!", "include...
Returns true if - includeTags is not empty and tag is in includeTags - includeTags is empty and tag is not in excludeTags @param tags Hint tags @param includeTags Include tags @param excludeTags Exclude tags @return has tag match
[ "Returns", "true", "if", "-", "includeTags", "is", "not", "empty", "and", "tag", "is", "in", "includeTags", "-", "includeTags", "is", "empty", "and", "tag", "is", "not", "in", "excludeTags" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/TagUtil.java#L35-L51
159,783
windup/windup
bootstrap/src/main/java/org/jboss/windup/bootstrap/commands/windup/RunWindupCommand.java
RunWindupCommand.expandMultiAppInputDirs
private static List<Path> expandMultiAppInputDirs(List<Path> input) { List<Path> expanded = new LinkedList<>(); for (Path path : input) { if (Files.isRegularFile(path)) { expanded.add(path); continue; } if (!File...
java
private static List<Path> expandMultiAppInputDirs(List<Path> input) { List<Path> expanded = new LinkedList<>(); for (Path path : input) { if (Files.isRegularFile(path)) { expanded.add(path); continue; } if (!File...
[ "private", "static", "List", "<", "Path", ">", "expandMultiAppInputDirs", "(", "List", "<", "Path", ">", "input", ")", "{", "List", "<", "Path", ">", "expanded", "=", "new", "LinkedList", "<>", "(", ")", ";", "for", "(", "Path", "path", ":", "input", ...
Expands the directories from the given list and and returns a list of subfiles. Files from the original list are kept as is.
[ "Expands", "the", "directories", "from", "the", "given", "list", "and", "and", "returns", "a", "list", "of", "subfiles", ".", "Files", "from", "the", "original", "list", "are", "kept", "as", "is", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/bootstrap/src/main/java/org/jboss/windup/bootstrap/commands/windup/RunWindupCommand.java#L485-L522
159,784
windup/windup
config/api/src/main/java/org/jboss/windup/config/RuleUtils.java
RuleUtils.ruleToRuleContentsString
public static String ruleToRuleContentsString(Rule originalRule, int indentLevel) { if (originalRule instanceof Context && ((Context) originalRule).containsKey(RuleMetadataType.RULE_XML)) { return (String) ((Context) originalRule).get(RuleMetadataType.RULE_XML); } if (!(...
java
public static String ruleToRuleContentsString(Rule originalRule, int indentLevel) { if (originalRule instanceof Context && ((Context) originalRule).containsKey(RuleMetadataType.RULE_XML)) { return (String) ((Context) originalRule).get(RuleMetadataType.RULE_XML); } if (!(...
[ "public", "static", "String", "ruleToRuleContentsString", "(", "Rule", "originalRule", ",", "int", "indentLevel", ")", "{", "if", "(", "originalRule", "instanceof", "Context", "&&", "(", "(", "Context", ")", "originalRule", ")", ".", "containsKey", "(", "RuleMet...
Attempts to create a human-readable String representation of the provided rule.
[ "Attempts", "to", "create", "a", "human", "-", "readable", "String", "representation", "of", "the", "provided", "rule", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/RuleUtils.java#L54-L106
159,785
windup/windup
graph/impl/src/main/java/org/jboss/windup/graph/SetInPropertiesHandler.java
SetInPropertiesHandler.processMethod
@Override public <E> DynamicType.Builder<E> processMethod(final DynamicType.Builder<E> builder, final Method method, final Annotation annotation) { String methodName = method.getName(); if (ReflectionUtility.isGetMethod(method)) return createInterceptor(builder, method); else...
java
@Override public <E> DynamicType.Builder<E> processMethod(final DynamicType.Builder<E> builder, final Method method, final Annotation annotation) { String methodName = method.getName(); if (ReflectionUtility.isGetMethod(method)) return createInterceptor(builder, method); else...
[ "@", "Override", "public", "<", "E", ">", "DynamicType", ".", "Builder", "<", "E", ">", "processMethod", "(", "final", "DynamicType", ".", "Builder", "<", "E", ">", "builder", ",", "final", "Method", "method", ",", "final", "Annotation", "annotation", ")",...
The handling method.
[ "The", "handling", "method", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/graph/impl/src/main/java/org/jboss/windup/graph/SetInPropertiesHandler.java#L46-L61
159,786
windup/windup
rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JNDIResourceService.java
JNDIResourceService.associateTypeJndiResource
public void associateTypeJndiResource(JNDIResourceModel resource, String type) { if (type == null || resource == null) { return; } if (StringUtils.equals(type, "javax.sql.DataSource") && !(resource instanceof DataSourceModel)) { DataSourceModel ds = G...
java
public void associateTypeJndiResource(JNDIResourceModel resource, String type) { if (type == null || resource == null) { return; } if (StringUtils.equals(type, "javax.sql.DataSource") && !(resource instanceof DataSourceModel)) { DataSourceModel ds = G...
[ "public", "void", "associateTypeJndiResource", "(", "JNDIResourceModel", "resource", ",", "String", "type", ")", "{", "if", "(", "type", "==", "null", "||", "resource", "==", "null", ")", "{", "return", ";", "}", "if", "(", "StringUtils", ".", "equals", "(...
Associate a type with the given resource model.
[ "Associate", "a", "type", "with", "the", "given", "resource", "model", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-ee/addon/src/main/java/org/jboss/windup/rules/apps/javaee/service/JNDIResourceService.java#L54-L85
159,787
windup/windup
rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/FeatureBasedApiDependenciesDeducer.java
FeatureBasedApiDependenciesDeducer.addDeploymentTypeBasedDependencies
private boolean addDeploymentTypeBasedDependencies(ProjectModel projectModel, Pom modulePom) { if (projectModel.getProjectType() == null) return true; switch (projectModel.getProjectType()){ case "ear": break; case "war": modulePom....
java
private boolean addDeploymentTypeBasedDependencies(ProjectModel projectModel, Pom modulePom) { if (projectModel.getProjectType() == null) return true; switch (projectModel.getProjectType()){ case "ear": break; case "war": modulePom....
[ "private", "boolean", "addDeploymentTypeBasedDependencies", "(", "ProjectModel", "projectModel", ",", "Pom", "modulePom", ")", "{", "if", "(", "projectModel", ".", "getProjectType", "(", ")", "==", "null", ")", "return", "true", ";", "switch", "(", "projectModel",...
Adds the dependencies typical for particular deployment types. This is not accurate and doesn't cover the real needs of the project. Basically it's just to have "something" for the initial implementation.
[ "Adds", "the", "dependencies", "typical", "for", "particular", "deployment", "types", ".", "This", "is", "not", "accurate", "and", "doesn", "t", "cover", "the", "real", "needs", "of", "the", "project", ".", "Basically", "it", "s", "just", "to", "have", "so...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java/api/src/main/java/org/jboss/windup/rules/apps/mavenize/FeatureBasedApiDependenciesDeducer.java#L52-L72
159,788
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagService.java
TagService.readTags
public void readTags(InputStream tagsXML) { SAXParserFactory factory = SAXParserFactory.newInstance(); try { SAXParser saxParser = factory.newSAXParser(); saxParser.parse(tagsXML, new TagsSaxHandler(this)); } catch (ParserConfigurationException | SAXEx...
java
public void readTags(InputStream tagsXML) { SAXParserFactory factory = SAXParserFactory.newInstance(); try { SAXParser saxParser = factory.newSAXParser(); saxParser.parse(tagsXML, new TagsSaxHandler(this)); } catch (ParserConfigurationException | SAXEx...
[ "public", "void", "readTags", "(", "InputStream", "tagsXML", ")", "{", "SAXParserFactory", "factory", "=", "SAXParserFactory", ".", "newInstance", "(", ")", ";", "try", "{", "SAXParser", "saxParser", "=", "factory", ".", "newSAXParser", "(", ")", ";", "saxPars...
Read the tag structure from the provided stream.
[ "Read", "the", "tag", "structure", "from", "the", "provided", "stream", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagService.java#L37-L49
159,789
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagService.java
TagService.getPrimeTags
public List<Tag> getPrimeTags() { return this.definedTags.values().stream() .filter(Tag::isPrime) .collect(Collectors.toList()); }
java
public List<Tag> getPrimeTags() { return this.definedTags.values().stream() .filter(Tag::isPrime) .collect(Collectors.toList()); }
[ "public", "List", "<", "Tag", ">", "getPrimeTags", "(", ")", "{", "return", "this", ".", "definedTags", ".", "values", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "Tag", "::", "isPrime", ")", ".", "collect", "(", "Collectors", ".", "toList...
Gets all tags that are "prime" tags.
[ "Gets", "all", "tags", "that", "are", "prime", "tags", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagService.java#L54-L59
159,790
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagService.java
TagService.getRootTags
public List<Tag> getRootTags() { return this.definedTags.values().stream() .filter(Tag::isRoot) .collect(Collectors.toList()); }
java
public List<Tag> getRootTags() { return this.definedTags.values().stream() .filter(Tag::isRoot) .collect(Collectors.toList()); }
[ "public", "List", "<", "Tag", ">", "getRootTags", "(", ")", "{", "return", "this", ".", "definedTags", ".", "values", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "Tag", "::", "isRoot", ")", ".", "collect", "(", "Collectors", ".", "toList",...
Returns the tags that were root in the definition files. These serve as entry point shortcuts when browsing the graph. We could reduce this to just fewer as the root tags may be connected through parents="...".
[ "Returns", "the", "tags", "that", "were", "root", "in", "the", "definition", "files", ".", "These", "serve", "as", "entry", "point", "shortcuts", "when", "browsing", "the", "graph", ".", "We", "could", "reduce", "this", "to", "just", "fewer", "as", "the", ...
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagService.java#L65-L70
159,791
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagService.java
TagService.getAncestorTags
public Set<Tag> getAncestorTags(Tag tag) { Set<Tag> ancestors = new HashSet<>(); getAncestorTags(tag, ancestors); return ancestors; }
java
public Set<Tag> getAncestorTags(Tag tag) { Set<Tag> ancestors = new HashSet<>(); getAncestorTags(tag, ancestors); return ancestors; }
[ "public", "Set", "<", "Tag", ">", "getAncestorTags", "(", "Tag", "tag", ")", "{", "Set", "<", "Tag", ">", "ancestors", "=", "new", "HashSet", "<>", "(", ")", ";", "getAncestorTags", "(", "tag", ",", "ancestors", ")", ";", "return", "ancestors", ";", ...
Returns all tags that designate this tag. E.g., for "tesla-model3", this would return "car", "vehicle", "vendor-tesla" etc.
[ "Returns", "all", "tags", "that", "designate", "this", "tag", ".", "E", ".", "g", ".", "for", "tesla", "-", "model3", "this", "would", "return", "car", "vehicle", "vendor", "-", "tesla", "etc", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagService.java#L117-L122
159,792
windup/windup
config/api/src/main/java/org/jboss/windup/config/tags/TagService.java
TagService.writeTagsToJavaScript
public void writeTagsToJavaScript(Writer writer) throws IOException { writer.append("function fillTagService(tagService) {\n"); writer.append("\t// (name, isPrime, isPseudo, color), [parent tags]\n"); for (Tag tag : definedTags.values()) { writer.append("\ttagService.regi...
java
public void writeTagsToJavaScript(Writer writer) throws IOException { writer.append("function fillTagService(tagService) {\n"); writer.append("\t// (name, isPrime, isPseudo, color), [parent tags]\n"); for (Tag tag : definedTags.values()) { writer.append("\ttagService.regi...
[ "public", "void", "writeTagsToJavaScript", "(", "Writer", "writer", ")", "throws", "IOException", "{", "writer", ".", "append", "(", "\"function fillTagService(tagService) {\\n\"", ")", ";", "writer", ".", "append", "(", "\"\\t// (name, isPrime, isPseudo, color), [parent ta...
Writes the JavaScript code describing the tags as Tag classes to given writer.
[ "Writes", "the", "JavaScript", "code", "describing", "the", "tags", "as", "Tag", "classes", "to", "given", "writer", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/config/api/src/main/java/org/jboss/windup/config/tags/TagService.java#L223-L247
159,793
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/ReportService.java
ReportService.getReportDirectory
public Path getReportDirectory() { WindupConfigurationModel cfg = WindupConfigurationService.getConfigurationModel(getGraphContext()); Path path = cfg.getOutputPath().asFile().toPath().resolve(REPORTS_DIR); createDirectoryIfNeeded(path); return path.toAbsolutePath(); }
java
public Path getReportDirectory() { WindupConfigurationModel cfg = WindupConfigurationService.getConfigurationModel(getGraphContext()); Path path = cfg.getOutputPath().asFile().toPath().resolve(REPORTS_DIR); createDirectoryIfNeeded(path); return path.toAbsolutePath(); }
[ "public", "Path", "getReportDirectory", "(", ")", "{", "WindupConfigurationModel", "cfg", "=", "WindupConfigurationService", ".", "getConfigurationModel", "(", "getGraphContext", "(", ")", ")", ";", "Path", "path", "=", "cfg", ".", "getOutputPath", "(", ")", ".", ...
Returns the output directory for reporting.
[ "Returns", "the", "output", "directory", "for", "reporting", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/ReportService.java#L52-L58
159,794
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/ReportService.java
ReportService.getReportByName
@SuppressWarnings("unchecked") public <T extends ReportModel> T getReportByName(String name, Class<T> clazz) { WindupVertexFrame model = this.getUniqueByProperty(ReportModel.REPORT_NAME, name); try { return (T) model; } catch (ClassCastException ex) { ...
java
@SuppressWarnings("unchecked") public <T extends ReportModel> T getReportByName(String name, Class<T> clazz) { WindupVertexFrame model = this.getUniqueByProperty(ReportModel.REPORT_NAME, name); try { return (T) model; } catch (ClassCastException ex) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "ReportModel", ">", "T", "getReportByName", "(", "String", "name", ",", "Class", "<", "T", ">", "clazz", ")", "{", "WindupVertexFrame", "model", "=", "this", ".", "getUniqueBy...
Returns the ReportModel with given name.
[ "Returns", "the", "ReportModel", "with", "given", "name", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/ReportService.java#L79-L91
159,795
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/ReportService.java
ReportService.getUniqueFilename
public String getUniqueFilename(String baseFileName, String extension, boolean cleanBaseFileName, String... ancestorFolders) { if (cleanBaseFileName) { baseFileName = PathUtil.cleanFileName(baseFileName); } if (ancestorFolders != null) { Path pathToFi...
java
public String getUniqueFilename(String baseFileName, String extension, boolean cleanBaseFileName, String... ancestorFolders) { if (cleanBaseFileName) { baseFileName = PathUtil.cleanFileName(baseFileName); } if (ancestorFolders != null) { Path pathToFi...
[ "public", "String", "getUniqueFilename", "(", "String", "baseFileName", ",", "String", "extension", ",", "boolean", "cleanBaseFileName", ",", "String", "...", "ancestorFolders", ")", "{", "if", "(", "cleanBaseFileName", ")", "{", "baseFileName", "=", "PathUtil", "...
Returns a unique file name @param baseFileName the requested base name for the file @param extension the requested extension for the file @param cleanBaseFileName specify if the <code>baseFileName</code> has to be cleaned before being used (i.e. 'jboss-web' should not be cleaned to avoid '-' to become '_') @param ances...
[ "Returns", "a", "unique", "file", "name" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/ReportService.java#L109-L131
159,796
windup/windup
reporting/api/src/main/java/org/jboss/windup/reporting/service/TagSetService.java
TagSetService.getOrCreate
public TagSetModel getOrCreate(GraphRewrite event, Set<String> tags) { Map<Set<String>, Vertex> cache = getCache(event); Vertex vertex = cache.get(tags); if (vertex == null) { TagSetModel model = create(); model.setTags(tags); cache.put(tags, model...
java
public TagSetModel getOrCreate(GraphRewrite event, Set<String> tags) { Map<Set<String>, Vertex> cache = getCache(event); Vertex vertex = cache.get(tags); if (vertex == null) { TagSetModel model = create(); model.setTags(tags); cache.put(tags, model...
[ "public", "TagSetModel", "getOrCreate", "(", "GraphRewrite", "event", ",", "Set", "<", "String", ">", "tags", ")", "{", "Map", "<", "Set", "<", "String", ">", ",", "Vertex", ">", "cache", "=", "getCache", "(", "event", ")", ";", "Vertex", "vertex", "="...
This essentially ensures that we only store a single Vertex for each unique "Set" of tags.
[ "This", "essentially", "ensures", "that", "we", "only", "store", "a", "single", "Vertex", "for", "each", "unique", "Set", "of", "tags", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/api/src/main/java/org/jboss/windup/reporting/service/TagSetService.java#L43-L58
159,797
windup/windup
reporting/impl/src/main/java/org/jboss/windup/reporting/rules/generation/techreport/GetTechReportPunchCardStatsMethod.java
GetTechReportPunchCardStatsMethod.getAllApplications
private static Set<ProjectModel> getAllApplications(GraphContext graphContext) { Set<ProjectModel> apps = new HashSet<>(); Iterable<ProjectModel> appProjects = graphContext.findAll(ProjectModel.class); for (ProjectModel appProject : appProjects) apps.add(appProject); retu...
java
private static Set<ProjectModel> getAllApplications(GraphContext graphContext) { Set<ProjectModel> apps = new HashSet<>(); Iterable<ProjectModel> appProjects = graphContext.findAll(ProjectModel.class); for (ProjectModel appProject : appProjects) apps.add(appProject); retu...
[ "private", "static", "Set", "<", "ProjectModel", ">", "getAllApplications", "(", "GraphContext", "graphContext", ")", "{", "Set", "<", "ProjectModel", ">", "apps", "=", "new", "HashSet", "<>", "(", ")", ";", "Iterable", "<", "ProjectModel", ">", "appProjects",...
Returns all ApplicationProjectModels.
[ "Returns", "all", "ApplicationProjectModels", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/impl/src/main/java/org/jboss/windup/reporting/rules/generation/techreport/GetTechReportPunchCardStatsMethod.java#L191-L198
159,798
windup/windup
reporting/impl/src/main/java/org/jboss/windup/reporting/rules/generation/techreport/TechReportService.java
TechReportService.processPlaceLabels
private static TechReportPlacement processPlaceLabels(GraphContext graphContext, Set<String> tagNames) { TagGraphService tagService = new TagGraphService(graphContext); if (tagNames.size() < 3) throw new WindupException("There should always be exactly 3 placement labels - row, sector, c...
java
private static TechReportPlacement processPlaceLabels(GraphContext graphContext, Set<String> tagNames) { TagGraphService tagService = new TagGraphService(graphContext); if (tagNames.size() < 3) throw new WindupException("There should always be exactly 3 placement labels - row, sector, c...
[ "private", "static", "TechReportPlacement", "processPlaceLabels", "(", "GraphContext", "graphContext", ",", "Set", "<", "String", ">", "tagNames", ")", "{", "TagGraphService", "tagService", "=", "new", "TagGraphService", "(", "graphContext", ")", ";", "if", "(", "...
From three tagNames, if one is under sectorTag and one under rowTag, returns the remaining one, which is supposedly the a box label. Otherwise, returns null.
[ "From", "three", "tagNames", "if", "one", "is", "under", "sectorTag", "and", "one", "under", "rowTag", "returns", "the", "remaining", "one", "which", "is", "supposedly", "the", "a", "box", "label", ".", "Otherwise", "returns", "null", "." ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/reporting/impl/src/main/java/org/jboss/windup/reporting/rules/generation/techreport/TechReportService.java#L74-L124
159,799
windup/windup
rules-java-project/addon/src/main/java/org/jboss/windup/project/condition/Artifact.java
Artifact.withVersion
public static Artifact withVersion(Version v) { Artifact artifact = new Artifact(); artifact.version = v; return artifact; }
java
public static Artifact withVersion(Version v) { Artifact artifact = new Artifact(); artifact.version = v; return artifact; }
[ "public", "static", "Artifact", "withVersion", "(", "Version", "v", ")", "{", "Artifact", "artifact", "=", "new", "Artifact", "(", ")", ";", "artifact", ".", "version", "=", "v", ";", "return", "artifact", ";", "}" ]
Start with specifying the artifact version
[ "Start", "with", "specifying", "the", "artifact", "version" ]
6668f09e7f012d24a0b4212ada8809417225b2ad
https://github.com/windup/windup/blob/6668f09e7f012d24a0b4212ada8809417225b2ad/rules-java-project/addon/src/main/java/org/jboss/windup/project/condition/Artifact.java#L28-L33