Package hudson.plugins.analysis.util

Examples of hudson.plugins.analysis.util.ContextHashCode.create()


                    Set<FileAnnotation> warnings = Sets.newHashSet();
                    warnings.addAll(result);
                    ContextHashCode hashCode = new ContextHashCode();
                    for (FileAnnotation duplication : warnings) {
                        String fullPath = getFullPath(duplication);
                        long value = hashCode.create(fullPath,
                                duplication.getPrimaryLineNumber(), defaultEncoding);
                        duplication.setContextHashCode(value * 31 + (((DuplicateCode)duplication).getNumberOfLines()));
                    }

                    return warnings;
View Full Code Here


    @Override
    public ParserResult invoke(final File workspace, final VirtualChannel channel) throws IOException {
        ContextHashCode contextHashCode = new ContextHashCode();
        for (FileAnnotation annotation : result.getAnnotations()) {
            try {
                annotation.setContextHashCode(contextHashCode.create(
                        annotation.getFileName(), annotation.getPrimaryLineNumber(), defaultEncoding));
            }
            catch (IOException exception) {
                // ignore and continue
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.