Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-11529

CE fails if the same duplicated text block is found twice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5
    • Component/s: Compute Engine
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      There is a regression that causes the CE to fail when trying to figure out which lines of a file contain a duplication.
      The error happens if the same text block (composed of start and end line) is found twice in the duplications of a file.

       at org.sonar.ce.task.projectanalysis.component.VisitException.rethrowOrWrap(VisitException.java:44)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:41)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitChildren(DepthTraversalTypeAwareCrawler.java:98)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:54)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitChildren(DepthTraversalTypeAwareCrawler.java:98)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:54)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitChildren(DepthTraversalTypeAwareCrawler.java:98)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:54)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)
              at org.sonar.ce.task.projectanalysis.source.PersistFileSourcesStep.execute(PersistFileSourcesStep.java:70)
              at org.sonar.ce.task.step.ComputationStepExecutor.executeStep(ComputationStepExecutor.java:77)
              at org.sonar.ce.task.step.ComputationStepExecutor.executeSteps(ComputationStepExecutor.java:69)
              at org.sonar.ce.task.step.ComputationStepExecutor.execute(ComputationStepExecutor.java:56)
              at org.sonar.ce.task.projectanalysis.taskprocessor.ReportTaskProcessor.process(ReportTaskProcessor.java:81)
              at org.sonar.ce.taskprocessor.CeWorkerImpl.executeTask(CeWorkerImpl.java:137)
              at org.sonar.ce.taskprocessor.CeWorkerImpl.findAndProcessTask(CeWorkerImpl.java:100)
              at org.sonar.ce.taskprocessor.CeWorkerImpl.withCustomizedThreadName(CeWorkerImpl.java:84)
              at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:76)
              at org.sonar.ce.taskprocessor.CeWorkerImpl.call(CeWorkerImpl.java:46)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
              at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.IllegalStateException: Cannot persist sources of org.ops4j.pax.logging:pax-logging-service:src/main/java/org/ops4j/pax/logging/util/OsgiUtil.java
              at org.sonar.ce.task.projectanalysis.source.PersistFileSourcesStep$FileSourceVisitor.visitFile(PersistFileSourcesStep.java:103)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitNode(DepthTraversalTypeAwareCrawler.java:79)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visitImpl(DepthTraversalTypeAwareCrawler.java:51)
              at org.sonar.ce.task.projectanalysis.component.DepthTraversalTypeAwareCrawler.visit(DepthTraversalTypeAwareCrawler.java:39)
              ... 27 common frames omitted
      Caused by: java.lang.IllegalStateException: Parallel processing is not supported
              at org.sonar.core.util.stream.MoreCollectors.lambda$mergeNotSupportedMerger$15(MoreCollectors.java:370)
              at java.util.HashMap.merge(HashMap.java:1254)
              at java.util.stream.Collectors.lambda$toMap$58(Collectors.java:1320)
              at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169)
              at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352)
              at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
              at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
              at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
              at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
              at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
              at org.sonar.ce.task.projectanalysis.source.linereader.DuplicationLineReader.createIndexOfDuplicatedTextBlocks(DuplicationLineReader.java:74)
              at org.sonar.ce.task.projectanalysis.source.linereader.DuplicationLineReader.<init>(DuplicationLineReader.java:48)
              at org.sonar.ce.task.projectanalysis.source.SourceLineReadersFactory.getLineReaders(SourceLineReadersFactory.java:85)
              at org.sonar.ce.task.projectanalysis.source.FileSourceDataComputer.compute(FileSourceDataComputer.java:47)
              at org.sonar.ce.task.projectanalysis.source.PersistFileSourcesStep$FileSourceVisitor.visitFile(PersistFileSourcesStep.java:100)
      

        Attachments

          Activity

            People

            Assignee:
            duarte.meneses Duarte Meneses
            Reporter:
            duarte.meneses Duarte Meneses
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: