]> source.dussan.org Git - sonarqube.git/commitdiff
persist tests in db - SONAR-6255
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Wed, 22 Apr 2015 08:53:04 +0000 (10:53 +0200)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Tue, 28 Apr 2015 10:22:45 +0000 (12:22 +0200)
29 files changed:
server/sonar-server-benchmarks/src/test/java/org/sonar/server/benchmark/SourceDbBenchmarkTest.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistFileSourcesStep.java
server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistTestsStep.java [new file with mode: 0644]
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryData.java
server/sonar-server/src/main/java/org/sonar/server/source/db/FileSourceDao.java
server/sonar-server/src/main/java/org/sonar/server/source/index/SourceFileResultSetIterator.java
server/sonar-server/src/test/java/org/sonar/server/batch/ProjectRepositoryLoaderMediumTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistFileSourcesStepTest.java
server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistTestsStepTest.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/db/migrations/v51/FeedFileSourcesBinaryDataTest.java
server/sonar-server/src/test/java/org/sonar/server/source/db/FileSourceDaoTest.java
server/sonar-server/src/test/java/org/sonar/server/source/db/FileSourceTesting.java
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/912_add_file_sources_data_type.rb
sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/Constants.java
sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/input/BatchInput.java
sonar-batch-protocol/src/main/gen-java/org/sonar/batch/protocol/output/BatchReport.java
sonar-batch-protocol/src/main/gen-java/org/sonar/server/source/db/FileSourceDb.java
sonar-batch-protocol/src/main/protobuf/file_source_db.proto
sonar-batch-protocol/src/main/protobuf/file_source_test_db.proto [deleted file]
sonar-batch-protocol/src/test/java/org/sonar/batch/protocol/output/BatchReportReaderTest.java
sonar-core/src/main/java/org/sonar/core/computation/db/AnalysisReportDto.java
sonar-core/src/main/java/org/sonar/core/source/db/FileSourceDto.java
sonar-core/src/main/java/org/sonar/core/source/db/FileSourceMapper.java
sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
sonar-core/src/main/resources/org/sonar/core/source/db/FileSourceMapper.xml
sonar-core/src/test/java/org/sonar/core/purge/PurgeDaoTest.java
sonar-core/src/test/java/org/sonar/core/source/db/FileSourceDtoTest.java [new file with mode: 0644]
sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources-result.xml
sonar-core/src/test/resources/org/sonar/core/purge/PurgeDaoTest/delete_file_sources_of_disabled_resources.xml

index 3b2b858d2515db3e14416c5b31eca4a04fb4de95..eee51ea78309c3e4795d5c806abd2c8708599485 100644 (file)
@@ -139,6 +139,6 @@ public class SourceDbBenchmarkTest {
         .addAllDuplication(Arrays.asList(19, 33, 141))
         .build());
     }
-    return FileSourceDto.encodeData(dataBuilder.build());
+    return FileSourceDto.encodeSourceData(dataBuilder.build());
   }
 }
index 3fd73396f5ffdcca13ac5697037a9d5fa9126a42..d416bb753454c81f5b91bcbacc06c4074a3c3691 100644 (file)
@@ -20,6 +20,7 @@
 
 package org.sonar.server.computation.step;
 
+import com.google.common.collect.ImmutableMap;
 import org.apache.commons.codec.digest.DigestUtils;
 import org.apache.commons.io.Charsets;
 import org.apache.commons.io.FileUtils;
@@ -35,6 +36,7 @@ import org.sonar.batch.protocol.output.BatchReportReader;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.persistence.MyBatis;
 import org.sonar.core.source.db.FileSourceDto;
+import org.sonar.core.source.db.FileSourceDto.Type;
 import org.sonar.server.computation.ComputationContext;
 import org.sonar.server.computation.source.ComputeFileSourceData;
 import org.sonar.server.computation.source.CoverageLineReader;
@@ -76,13 +78,14 @@ public class PersistFileSourcesStep implements ComputationStep {
     DbSession session = dbClient.openSession(false);
     try {
       final Map<String, FileSourceDto> previousFileSourcesByUuid = new HashMap<>();
-      session.select("org.sonar.core.source.db.FileSourceMapper.selectHashesForProject", context.getProject().uuid(), new ResultHandler() {
-        @Override
-        public void handleResult(ResultContext context) {
-          FileSourceDto dto = (FileSourceDto) context.getResultObject();
-          previousFileSourcesByUuid.put(dto.getFileUuid(), dto);
-        }
-      });
+      session.select("org.sonar.core.source.db.FileSourceMapper.selectHashesForProject", ImmutableMap.of("projectUuid", context.getProject().uuid(), "dataType", Type.SOURCE),
+        new ResultHandler() {
+          @Override
+          public void handleResult(ResultContext context) {
+            FileSourceDto dto = (FileSourceDto) context.getResultObject();
+            previousFileSourcesByUuid.put(dto.getFileUuid(), dto);
+          }
+        });
 
       recursivelyProcessComponent(new FileSourcesContext(session, context, previousFileSourcesByUuid), rootComponentRef);
     } finally {
@@ -124,7 +127,7 @@ public class PersistFileSourcesStep implements ComputationStep {
   private void persistSource(FileSourcesContext fileSourcesContext, ComputeFileSourceData.Data fileSourceData, BatchReport.Component component) {
     FileSourceDb.Data fileData = fileSourceData.getFileSourceData();
 
-    byte[] data = FileSourceDto.encodeData(fileData);
+    byte[] data = FileSourceDto.encodeSourceData(fileData);
     String dataHash = DigestUtils.md5Hex(data);
     String srcHash = fileSourceData.getSrcHash();
     String lineHashes = fileSourceData.getLineHashes();
@@ -134,6 +137,7 @@ public class PersistFileSourcesStep implements ComputationStep {
       FileSourceDto dto = new FileSourceDto()
         .setProjectUuid(fileSourcesContext.context.getProject().uuid())
         .setFileUuid(component.getUuid())
+        .setDataType(Type.SOURCE)
         .setBinaryData(data)
         .setSrcHash(srcHash)
         .setDataHash(dataHash)
@@ -152,7 +156,7 @@ public class PersistFileSourcesStep implements ComputationStep {
           .setDataHash(dataHash)
           .setSrcHash(srcHash)
           .setLineHashes(lineHashes);
-        // Optimization only change updated at when updating binary data to avoid unecessary indexation by E/S
+        // Optimization only change updated at when updating binary data to avoid unnecessary indexation by E/S
         if (binaryDataUpdated) {
           previousDto.setUpdatedAt(system2.now());
         }
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistTestsStep.java b/server/sonar-server/src/main/java/org/sonar/server/computation/step/PersistTestsStep.java
new file mode 100644 (file)
index 0000000..9ff1a51
--- /dev/null
@@ -0,0 +1,214 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.sonar.server.computation.step;
+
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.cache.CacheLoader;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ListMultimap;
+import org.apache.ibatis.session.ResultContext;
+import org.apache.ibatis.session.ResultHandler;
+import org.sonar.api.resources.Qualifiers;
+import org.sonar.api.utils.System2;
+import org.sonar.batch.protocol.output.BatchReport;
+import org.sonar.batch.protocol.output.BatchReportReader;
+import org.sonar.core.persistence.DbSession;
+import org.sonar.core.persistence.MyBatis;
+import org.sonar.core.source.db.FileSourceDto;
+import org.sonar.core.source.db.FileSourceDto.Type;
+import org.sonar.server.computation.ComputationContext;
+import org.sonar.server.computation.source.ReportIterator;
+import org.sonar.server.db.DbClient;
+import org.sonar.server.source.db.FileSourceDb;
+
+import javax.annotation.CheckForNull;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ExecutionException;
+
+public class PersistTestsStep implements ComputationStep {
+
+  private final DbClient dbClient;
+  private final System2 system;
+
+  public PersistTestsStep(DbClient dbClient, System2 system) {
+    this.dbClient = dbClient;
+    this.system = system;
+  }
+
+  @Override
+  public String[] supportedProjectQualifiers() {
+    return new String[] {Qualifiers.PROJECT};
+  }
+
+  @Override
+  public void execute(ComputationContext computationContext) {
+    DbSession session = dbClient.openSession(true);
+    try {
+      int rootComponentRef = computationContext.getReportMetadata().getRootComponentRef();
+      TestContext context = new TestContext(computationContext, session);
+
+      recursivelyProcessComponent(context, rootComponentRef);
+      session.commit();
+    } finally {
+      MyBatis.closeQuietly(session);
+    }
+  }
+
+  private void recursivelyProcessComponent(TestContext context, int componentRef) {
+    BatchReportReader reportReader = context.reader;
+    BatchReport.Component component = reportReader.readComponent(componentRef);
+    if (component.getIsTest() && reportReader.readTests(componentRef) != null) {
+      persistTestResults(component, context);
+    }
+
+    for (Integer childRef : component.getChildRefList()) {
+      recursivelyProcessComponent(context, childRef);
+    }
+  }
+
+  private void persistTestResults(BatchReport.Component component, TestContext context) {
+    ListMultimap<String, FileSourceDb.Test.CoveredFile> coveredFilesByName = loadCoverageDetails(component.getRef(), context);
+    List<FileSourceDb.Test> tests = buildDbTests(component, context, coveredFilesByName);
+
+    FileSourceDto existingDto = context.existingFileSourcesByUuid.get(component.getUuid());
+    long now = system.now();
+    if (existingDto != null) {
+      // update
+      existingDto
+        .setTestData(tests)
+        .setUpdatedAt(now);
+      dbClient.fileSourceDao().update(context.session, existingDto);
+    } else {
+      // insert
+      FileSourceDto newDto = new FileSourceDto()
+        .setTestData(tests)
+        .setFileUuid(component.getUuid())
+        .setProjectUuid(context.context.getProject().uuid())
+        .setDataType(Type.TEST)
+        .setCreatedAt(now)
+        .setUpdatedAt(now);
+      dbClient.fileSourceDao().insert(context.session, newDto);
+    }
+  }
+
+  private List<FileSourceDb.Test> buildDbTests(BatchReport.Component component, TestContext context, ListMultimap<String, FileSourceDb.Test.CoveredFile> coveredFilesByName) {
+    List<FileSourceDb.Test> tests = new ArrayList<>();
+    ReportIterator<BatchReport.Test> testIterator = new ReportIterator<>(context.reader.readTests(component.getRef()), BatchReport.Test.PARSER);
+    while (testIterator.hasNext()) {
+      BatchReport.Test batchTest = testIterator.next();
+      FileSourceDb.Test.Builder dbTest = FileSourceDb.Test.newBuilder();
+      dbTest.setType(batchTest.getType());
+      dbTest.setName(batchTest.getName());
+      if (batchTest.hasStacktrace()) {
+        dbTest.setStacktrace(batchTest.getStacktrace());
+      }
+      if (batchTest.hasStatus()) {
+        dbTest.setStatus(batchTest.getStatus());
+      }
+      if (batchTest.hasMsg()) {
+        dbTest.setMsg(batchTest.getMsg());
+      }
+      if (batchTest.hasExecutionTimeMs()) {
+        dbTest.setExecutionTimeMs(batchTest.getExecutionTimeMs());
+      }
+      List<FileSourceDb.Test.CoveredFile> coveredFiles = coveredFilesByName == null ? null : coveredFilesByName.get(batchTest.getName());
+      if (coveredFiles != null) {
+        dbTest.addAllCoveredFile(coveredFiles);
+      }
+      tests.add(dbTest.build());
+    }
+
+    return tests;
+  }
+
+  @CheckForNull
+  private ListMultimap<String, FileSourceDb.Test.CoveredFile> loadCoverageDetails(int testFileRef, TestContext context) {
+    File coverageDetailsFile = context.reader.readCoverageDetails(testFileRef);
+    if (coverageDetailsFile == null) {
+      return null;
+    }
+
+    ListMultimap<String, FileSourceDb.Test.CoveredFile> nameToCoveredFiles = ArrayListMultimap.create();
+    ReportIterator<BatchReport.CoverageDetail> coverageIterator = new ReportIterator<>(coverageDetailsFile, BatchReport.CoverageDetail.PARSER);
+    while (coverageIterator.hasNext()) {
+      BatchReport.CoverageDetail batchCoverageDetail = coverageIterator.next();
+      for (BatchReport.CoverageDetail.CoveredFile batchCoveredFile : batchCoverageDetail.getCoveredFileList()) {
+        FileSourceDb.Test.CoveredFile.Builder dbCoveredFile = FileSourceDb.Test.CoveredFile.newBuilder()
+          .setFileUuid(context.getUuid(batchCoveredFile.getFileRef()))
+          .addAllCoveredLine(batchCoveredFile.getCoveredLineList());
+        nameToCoveredFiles.put(batchCoverageDetail.getTestName(), dbCoveredFile.build());
+      }
+    }
+    return nameToCoveredFiles;
+  }
+
+  @Override
+  public String getDescription() {
+    return "Persist tests";
+  }
+
+  private static class TestContext {
+    final DbSession session;
+    final ComputationContext context;
+    final BatchReportReader reader;
+    final Cache<Integer, String> componentRefToUuidCache;
+    final Map<String, FileSourceDto> existingFileSourcesByUuid;
+
+    TestContext(ComputationContext context, DbSession session) {
+      this.session = session;
+      this.context = context;
+      this.reader = context.getReportReader();
+      this.componentRefToUuidCache = CacheBuilder.newBuilder()
+        .maximumSize(500_000)
+        .build(
+          new CacheLoader<Integer, String>() {
+            public String load(Integer key) {
+              return reader.readComponent(key).getUuid();
+            }
+          });
+      existingFileSourcesByUuid = new HashMap<>();
+      session.select("org.sonar.core.source.db.FileSourceMapper.selectHashesForProject",
+        ImmutableMap.of("projectUuid", context.getProject().uuid(), "dataType", Type.TEST),
+        new ResultHandler() {
+          @Override
+          public void handleResult(ResultContext context) {
+            FileSourceDto dto = (FileSourceDto) context.getResultObject();
+            existingFileSourcesByUuid.put(dto.getFileUuid(), dto);
+          }
+        });
+    }
+
+    public String getUuid(int fileRef) {
+      try {
+        return componentRefToUuidCache.get(fileRef);
+      } catch (ExecutionException e) {
+        throw new IllegalStateException(String.format("Error while retrieving uuid of component file ref '%d'", fileRef));
+      }
+    }
+  }
+}
index 381b7c67d84d9cd04adcceefd499767e68cef577..88b1b255f53f5c400f119cbf13ebbed93ba25075 100644 (file)
@@ -147,7 +147,7 @@ public class FeedFileSourcesBinaryData extends BaseDataChange {
           line++;
         }
       }
-      return FileSourceDto.encodeData(dataBuilder.build());
+      return FileSourceDto.encodeSourceData(dataBuilder.build());
     } catch (Exception e) {
       throw new IllegalStateException("Invalid FILE_SOURCES.DATA on row with ID " + fileSourceId + ": " + data, e);
     } finally {
index d19556f3ec1b6840a375f5a88dd2ddef64c505fc..8f7f06868a725d32b0a33fe53d9c13d3876f7385 100644 (file)
@@ -20,9 +20,6 @@
 
 package org.sonar.server.source.db;
 
-import org.sonar.core.source.db.FileSourceDto;
-import org.sonar.core.source.db.FileSourceMapper;
-
 import com.google.common.base.Function;
 import org.apache.commons.dbutils.DbUtils;
 import org.apache.commons.io.IOUtils;
@@ -30,6 +27,9 @@ import org.sonar.api.ServerComponent;
 import org.sonar.core.persistence.DaoComponent;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.persistence.MyBatis;
+import org.sonar.core.source.db.FileSourceDto;
+import org.sonar.core.source.db.FileSourceDto.Type;
+import org.sonar.core.source.db.FileSourceMapper;
 
 import javax.annotation.CheckForNull;
 
@@ -49,11 +49,20 @@ public class FileSourceDao implements ServerComponent, DaoComponent {
   }
 
   @CheckForNull
-  public FileSourceDto select(String fileUuid) {
+  public FileSourceDto selectSource(String fileUuid) {
+    DbSession session = mybatis.openSession(false);
+    try {
+      return mapper(session).select(fileUuid, Type.SOURCE);
+    } finally {
+      MyBatis.closeQuietly(session);
+    }
+  }
+
+  @CheckForNull
+  public FileSourceDto selectTest(String fileUuid) {
     DbSession session = mybatis.openSession(false);
     try {
-      FileSourceMapper mapper = session.getMapper(FileSourceMapper.class);
-      return mapper.select(fileUuid);
+      return mapper(session).select(fileUuid, Type.TEST);
     } finally {
       MyBatis.closeQuietly(session);
     }
@@ -114,7 +123,7 @@ public class FileSourceDao implements ServerComponent, DaoComponent {
   }
 
   public void insert(DbSession session, FileSourceDto dto) {
-    session.getMapper(FileSourceMapper.class).insert(dto);
+    mapper(session).insert(dto);
   }
 
   public void update(FileSourceDto dto) {
@@ -128,11 +137,14 @@ public class FileSourceDao implements ServerComponent, DaoComponent {
   }
 
   public void update(DbSession session, FileSourceDto dto) {
-    session.getMapper(FileSourceMapper.class).update(dto);
+    mapper(session).update(dto);
   }
 
   public void updateDateWhenUpdatedDateIsZero(DbSession session, String projectUuid, long updateDate) {
-    session.getMapper(FileSourceMapper.class).updateDateWhenUpdatedDateIsZero(projectUuid, updateDate);
+    mapper(session).updateDateWhenUpdatedDateIsZero(projectUuid, updateDate);
   }
 
+  private FileSourceMapper mapper(DbSession session) {
+    return session.getMapper(FileSourceMapper.class);
+  }
 }
index 5403a6b9d547bc667279ca58e90901a026d78b66..6c14cd997d1e181d4047b68b323f1bd47041c245 100644 (file)
@@ -24,6 +24,7 @@ import org.apache.commons.lang.StringUtils;
 import org.elasticsearch.action.update.UpdateRequest;
 import org.sonar.api.utils.text.JsonWriter;
 import org.sonar.core.source.db.FileSourceDto;
+import org.sonar.core.source.db.FileSourceDto.Type;
 import org.sonar.server.db.DbClient;
 import org.sonar.server.db.ResultSetIterator;
 import org.sonar.server.es.EsUtils;
@@ -82,9 +83,9 @@ public class SourceFileResultSetIterator extends ResultSetIterator<SourceFileRes
     "binary_data"
   };
 
-  private static final String SQL_ALL = "SELECT " + StringUtils.join(FIELDS, ",") + " FROM file_sources ";
-  private static final String AFTER_DATE_FILTER = "updated_at>? ";
-  private static final String PROJECT_FILTER = "project_uuid=? ";
+  private static final String SQL_ALL = String.format("SELECT %s FROM file_sources WHERE data_type='%s' ", StringUtils.join(FIELDS, ","), Type.SOURCE);
+  private static final String AFTER_DATE_FILTER = " AND updated_at>?";
+  private static final String PROJECT_FILTER = " AND project_uuid=?";
 
   public static SourceFileResultSetIterator create(DbClient dbClient, Connection connection, long afterDate, @Nullable String projectUuid) {
     try {
@@ -108,16 +109,10 @@ public class SourceFileResultSetIterator extends ResultSetIterator<SourceFileRes
   private static String createSQL(long afterDate, @Nullable String projectUuid) {
     String sql = SQL_ALL;
     if (afterDate > 0L || projectUuid != null) {
-      sql += "WHERE ";
-      boolean isFirst = true;
       if (afterDate > 0L) {
         sql += AFTER_DATE_FILTER;
-        isFirst = false;
       }
       if (projectUuid != null) {
-        if (!isFirst) {
-          sql += "AND ";
-        }
         sql += PROJECT_FILTER;
       }
     }
@@ -133,7 +128,7 @@ public class SourceFileResultSetIterator extends ResultSetIterator<SourceFileRes
     String projectUuid = rs.getString(1);
     String fileUuid = rs.getString(2);
     Date updatedAt = new Date(rs.getLong(3));
-    FileSourceDb.Data data = FileSourceDto.decodeData(rs.getBinaryStream(4));
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(rs.getBinaryStream(4));
     return toRow(projectUuid, fileUuid, updatedAt, data);
   }
 
index e51a2b1afcee0013c3d57e82638df9b186e766bd..b08ec9817bd1c7cf9cd18391c335cc5eb642fbc2 100644 (file)
@@ -838,7 +838,7 @@ public class ProjectRepositoryLoaderMediumTest {
     return new FileSourceDto()
       .setFileUuid(file.uuid())
       .setProjectUuid(file.projectUuid())
-      //.setData(",,,,,,,,,,,,,,,unchanged&#13;&#10;,,,,,,,,,,,,,,,content&#13;&#10;")
+      //.setSourceData(",,,,,,,,,,,,,,,unchanged&#13;&#10;,,,,,,,,,,,,,,,content&#13;&#10;")
       .setDataHash("0263047cd758c68c27683625f072f010")
       .setLineHashes("8d7b3d6b83c0a517eac07e1aac94b773")
       .setCreatedAt(System.currentTimeMillis())
index ce4b50c9fa10d06d8efa4cefe8da7e261ca9c352..f39c2511d5112da5a5016ed71d45a101babbd100 100644 (file)
@@ -38,6 +38,7 @@ import org.sonar.batch.protocol.output.FileStructure;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.persistence.DbTester;
 import org.sonar.core.source.db.FileSourceDto;
+import org.sonar.core.source.db.FileSourceDto.Type;
 import org.sonar.server.component.ComponentTesting;
 import org.sonar.server.computation.ComputationContext;
 import org.sonar.server.db.DbClient;
@@ -111,7 +112,7 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
     assertThat(fileSourceDto.getProjectUuid()).isEqualTo(PROJECT_UUID);
     assertThat(fileSourceDto.getFileUuid()).isEqualTo(FILE_UUID);
     assertThat(fileSourceDto.getBinaryData()).isNotEmpty();
@@ -120,7 +121,7 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     assertThat(fileSourceDto.getCreatedAt()).isEqualTo(now);
     assertThat(fileSourceDto.getUpdatedAt()).isEqualTo(now);
 
-    FileSourceDb.Data data = FileSourceDto.decodeData(fileSourceDto.getBinaryData());
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(fileSourceDto.getBinaryData());
     assertThat(data.getLinesCount()).isEqualTo(2);
     assertThat(data.getLines(0).getLine()).isEqualTo(1);
     assertThat(data.getLines(0).getSource()).isEqualTo("line1");
@@ -146,15 +147,15 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
       .setRef(FILE_REF)
       .setType(Constants.ComponentType.FILE)
       .setUuid(FILE_UUID)
-        // Lines is set to 3 but only 2 lines are read from the file -> the last lines should be added
+      // Lines is set to 3 but only 2 lines are read from the file -> the last lines should be added
       .setLines(3)
       .build());
 
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
-    FileSourceDb.Data data = FileSourceDto.decodeData(fileSourceDto.getBinaryData());
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(fileSourceDto.getBinaryData());
     assertThat(data.getLinesCount()).isEqualTo(3);
     assertThat(data.getLines(2).getLine()).isEqualTo(3);
     assertThat(data.getLines(2).getSource()).isEmpty();
@@ -167,7 +168,7 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select("FILE");
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource("FILE");
     assertThat(fileSourceDto.getLineHashes()).isEqualTo("137f72c3708c6bd0de00a0e5a69c699b\ne6251bcf1a7dc3ba5e7933e325bbe605");
     assertThat(fileSourceDto.getSrcHash()).isEqualTo("ee5a58024a155466b43bc559d953e018");
   }
@@ -189,8 +190,8 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
-    FileSourceDb.Data data = FileSourceDto.decodeData(fileSourceDto.getBinaryData());
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(fileSourceDto.getBinaryData());
 
     assertThat(data.getLinesList()).hasSize(1);
 
@@ -222,8 +223,8 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
-    FileSourceDb.Data data = FileSourceDto.decodeData(fileSourceDto.getBinaryData());
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(fileSourceDto.getBinaryData());
 
     assertThat(data.getLinesList()).hasSize(1);
 
@@ -237,19 +238,19 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     BatchReportWriter writer = initBasicReport(1);
 
     writer.writeComponentSyntaxHighlighting(FILE_REF, newArrayList(BatchReport.SyntaxHighlighting.newBuilder()
-        .setRange(BatchReport.Range.newBuilder()
-          .setStartLine(1).setEndLine(1)
-          .setStartOffset(2).setEndOffset(4)
-          .build())
-        .setType(Constants.HighlightingType.ANNOTATION)
-        .build()
-    ));
+      .setRange(BatchReport.Range.newBuilder()
+        .setStartLine(1).setEndLine(1)
+        .setStartOffset(2).setEndOffset(4)
+        .build())
+      .setType(Constants.HighlightingType.ANNOTATION)
+      .build()
+      ));
 
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
-    FileSourceDb.Data data = FileSourceDto.decodeData(fileSourceDto.getBinaryData());
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(fileSourceDto.getBinaryData());
 
     assertThat(data.getLinesList()).hasSize(1);
 
@@ -266,16 +267,16 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
           .setStartLine(1).setEndLine(1).setStartOffset(2).setEndOffset(4)
           .build())
         .addReference(BatchReport.Range.newBuilder()
-            .setStartLine(3).setEndLine(3).setStartOffset(1).setEndOffset(3)
-            .build()
+          .setStartLine(3).setEndLine(3).setStartOffset(1).setEndOffset(3)
+          .build()
         ).build()
-    ));
+      ));
 
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
-    FileSourceDb.Data data = FileSourceDto.decodeData(fileSourceDto.getBinaryData());
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(fileSourceDto.getBinaryData());
 
     assertThat(data.getLinesList()).hasSize(3);
 
@@ -306,8 +307,8 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
-    FileSourceDb.Data data = FileSourceDto.decodeData(fileSourceDto.getBinaryData());
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
+    FileSourceDb.Data data = FileSourceDto.decodeSourceData(fileSourceDto.getBinaryData());
 
     assertThat(data.getLinesList()).hasSize(1);
 
@@ -328,12 +329,12 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
       .setSrcHash(srcHash)
       .setLineHashes(lineHashes)
       .setDataHash(dataHash)
-      .setBinaryData(FileSourceDto.encodeData(FileSourceDb.Data.newBuilder()
+      .setSourceData(FileSourceDb.Data.newBuilder()
         .addLines(FileSourceDb.Line.newBuilder()
           .setLine(1)
           .setSource("line1")
           .build())
-        .build()))
+        .build())
       .setCreatedAt(past)
       .setUpdatedAt(past));
     session.commit();
@@ -344,7 +345,7 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
     assertThat(fileSourceDto.getSrcHash()).isEqualTo(srcHash);
     assertThat(fileSourceDto.getLineHashes()).isEqualTo(lineHashes);
     assertThat(fileSourceDto.getDataHash()).isEqualTo(dataHash);
@@ -359,15 +360,16 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     dbClient.fileSourceDao().insert(session, new FileSourceDto()
       .setProjectUuid(PROJECT_UUID)
       .setFileUuid(FILE_UUID)
+      .setDataType(Type.SOURCE)
       .setSrcHash("5b4bd9815cdb17b8ceae19eb1810c34c")
       .setLineHashes("6438c669e0d0de98e6929c2cc0fac474\n")
       .setDataHash("6cad150e3d065976c230cddc5a09efaa")
-      .setBinaryData(FileSourceDto.encodeData(FileSourceDb.Data.newBuilder()
+      .setSourceData(FileSourceDb.Data.newBuilder()
         .addLines(FileSourceDb.Line.newBuilder()
           .setLine(1)
           .setSource("old line")
           .build())
-        .build()))
+        .build())
       .setCreatedAt(past)
       .setUpdatedAt(past));
     session.commit();
@@ -377,7 +379,7 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
     assertThat(fileSourceDto.getCreatedAt()).isEqualTo(past);
     assertThat(fileSourceDto.getUpdatedAt()).isEqualTo(now);
   }
@@ -389,15 +391,16 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     dbClient.fileSourceDao().insert(session, new FileSourceDto()
       .setProjectUuid(PROJECT_UUID)
       .setFileUuid(FILE_UUID)
+      .setDataType(Type.SOURCE)
       // Source hash is missing, update will be made
       .setLineHashes("137f72c3708c6bd0de00a0e5a69c699b")
       .setDataHash("29f25900140c94db38035128cb6de6a2")
-      .setBinaryData(FileSourceDto.encodeData(FileSourceDb.Data.newBuilder()
+      .setSourceData(FileSourceDb.Data.newBuilder()
         .addLines(FileSourceDb.Line.newBuilder()
           .setLine(1)
           .setSource("line")
           .build())
-        .build()))
+        .build())
       .setCreatedAt(past)
       .setUpdatedAt(past));
     session.commit();
@@ -407,7 +410,7 @@ public class PersistFileSourcesStepTest extends BaseStepTest {
     sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
 
     assertThat(dbTester.countRowsOfTable("file_sources")).isEqualTo(1);
-    FileSourceDto fileSourceDto = dbClient.fileSourceDao().select(FILE_UUID);
+    FileSourceDto fileSourceDto = dbClient.fileSourceDao().selectSource(FILE_UUID);
     assertThat(fileSourceDto.getCreatedAt()).isEqualTo(past);
     // Updated at is not updated to not reindex the file source in E/S as the src hash is not indexed
     assertThat(fileSourceDto.getUpdatedAt()).isEqualTo(past);
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistTestsStepTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/step/PersistTestsStepTest.java
new file mode 100644 (file)
index 0000000..1d91b26
--- /dev/null
@@ -0,0 +1,310 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.sonar.server.computation.step;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.TemporaryFolder;
+import org.sonar.api.utils.System2;
+import org.sonar.batch.protocol.Constants;
+import org.sonar.batch.protocol.Constants.TestStatus;
+import org.sonar.batch.protocol.Constants.TestType;
+import org.sonar.batch.protocol.output.BatchReport;
+import org.sonar.batch.protocol.output.BatchReport.CoverageDetail;
+import org.sonar.batch.protocol.output.BatchReportReader;
+import org.sonar.batch.protocol.output.BatchReportWriter;
+import org.sonar.core.persistence.DbSession;
+import org.sonar.core.persistence.DbTester;
+import org.sonar.core.persistence.MyBatis;
+import org.sonar.core.source.db.FileSourceDto;
+import org.sonar.server.component.ComponentTesting;
+import org.sonar.server.computation.ComputationContext;
+import org.sonar.server.db.DbClient;
+import org.sonar.server.source.db.FileSourceDao;
+import org.sonar.server.source.db.FileSourceDb;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class PersistTestsStepTest extends BaseStepTest {
+  private static final String PROJECT_UUID = "PROJECT";
+  private static final int TEST_FILE_REF_1 = 3;
+  private static final int TEST_FILE_REF_2 = 4;
+  private static final int MAIN_FILE_REF_1 = 5;
+  private static final int MAIN_FILE_REF_2 = 6;
+  private static final String TEST_FILE_UUID_1 = "TEST-FILE-1";
+  private static final String TEST_FILE_UUID_2 = "TEST-FILE-2";
+  private static final String MAIN_FILE_UUID_1 = "MAIN-FILE-1";
+  private static final String MAIN_FILE_UUID_2 = "MAIN-FILE-2";
+
+  PersistTestsStep sut;
+
+  @Rule
+  public TemporaryFolder temp = new TemporaryFolder();
+
+  @ClassRule
+  public static DbTester db = new DbTester();
+
+  File reportDir;
+  DbSession session;
+  DbClient dbClient;
+  System2 system2;
+
+  long now = 123456789L;
+
+  @Before
+  public void setup() throws Exception {
+    db.truncateTables();
+    session = db.myBatis().openSession(false);
+    dbClient = new DbClient(db.database(), db.myBatis(), new FileSourceDao(db.myBatis()));
+    reportDir = temp.newFolder();
+
+    system2 = mock(System2.class);
+    when(system2.now()).thenReturn(now);
+    sut = new PersistTestsStep(dbClient, system2);
+
+    initBasicReport();
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    MyBatis.closeQuietly(session);
+
+  }
+
+  @Override
+  protected ComputationStep step() throws IOException {
+    return sut;
+  }
+
+  @Test
+  public void no_test_in_database_and_batch_report() throws Exception {
+    sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto()));
+
+    assertThat(dbClient.fileSourceDao().selectTest(TEST_FILE_UUID_1)).isNull();
+  }
+
+  @Test
+  public void insert_several_tests_in_a_report() throws Exception {
+    BatchReportWriter writer = new BatchReportWriter(reportDir);
+    List<BatchReport.Test> batchTests = Arrays.asList(
+      newTest(1), newTest(2)
+      );
+    writer.writeTests(TEST_FILE_REF_1, batchTests);
+    List<CoverageDetail> coverageDetails = Arrays.asList(
+      newCoverageDetail(1, MAIN_FILE_REF_1)
+      );
+    writer.writeCoverageDetails(TEST_FILE_REF_1, coverageDetails);
+
+    sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
+
+    FileSourceDto dto = dbClient.fileSourceDao().selectTest(TEST_FILE_UUID_1);
+    assertThat(dto.getCreatedAt()).isEqualTo(now);
+    assertThat(dto.getUpdatedAt()).isEqualTo(now);
+    assertThat(dto.getProjectUuid()).isEqualTo(PROJECT_UUID);
+    assertThat(dto.getFileUuid()).isEqualTo(TEST_FILE_UUID_1);
+    assertThat(dto.getTestData()).hasSize(2);
+
+    FileSourceDb.Test test1 = dto.getTestData().get(0);
+    assertThat(test1.getName()).isEqualTo("name#1");
+    assertThat(test1.getCoveredFileCount()).isEqualTo(1);
+    assertThat(test1.getCoveredFile(0).getFileUuid()).isEqualTo(MAIN_FILE_UUID_1);
+
+    FileSourceDb.Test test2 = dto.getTestData().get(1);
+    assertThat(test2.getName()).isEqualTo("name#2");
+    assertThat(test2.getCoveredFileList()).isEmpty();
+  }
+
+  @Test
+  public void insert_all_data_of_a_test() throws Exception {
+    BatchReportWriter writer = new BatchReportWriter(reportDir);
+    List<BatchReport.Test> batchTests = Arrays.asList(
+      newTest(1)
+    );
+    writer.writeTests(TEST_FILE_REF_1, batchTests);
+    List<CoverageDetail> coverageDetails = Arrays.asList(
+      newCoverageDetail(1, MAIN_FILE_REF_1)
+    );
+    writer.writeCoverageDetails(TEST_FILE_REF_1, coverageDetails);
+
+    sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
+
+    FileSourceDto dto = dbClient.fileSourceDao().selectTest(TEST_FILE_UUID_1);
+    assertThat(dto.getCreatedAt()).isEqualTo(now);
+    assertThat(dto.getUpdatedAt()).isEqualTo(now);
+    assertThat(dto.getProjectUuid()).isEqualTo(PROJECT_UUID);
+    assertThat(dto.getFileUuid()).isEqualTo(TEST_FILE_UUID_1);
+    assertThat(dto.getTestData()).hasSize(1);
+
+    FileSourceDb.Test test1 = dto.getTestData().get(0);
+    assertThat(test1.getName()).isEqualTo("name#1");
+    assertThat(test1.getMsg()).isEqualTo("message#1");
+    assertThat(test1.getStacktrace()).isEqualTo("stacktrace#1");
+    assertThat(test1.getStatus()).isEqualTo(TestStatus.FAILURE);
+    assertThat(test1.getType()).isEqualTo(TestType.UT);
+    assertThat(test1.getExecutionTimeMs()).isEqualTo(1_000);
+    assertThat(test1.getCoveredFileCount()).isEqualTo(1);
+    assertThat(test1.getCoveredFile(0).getCoveredLineList()).containsExactly(1, 2, 3);
+    assertThat(test1.getCoveredFile(0).getFileUuid()).isEqualTo(MAIN_FILE_UUID_1);
+  }
+
+  @Test
+  public void insert_tests_without_coverage_details() throws Exception {
+    BatchReportWriter writer = new BatchReportWriter(reportDir);
+    List<BatchReport.Test> batchTests = Arrays.asList(
+      newTest(1), newTest(2)
+      );
+    writer.writeTests(TEST_FILE_REF_1, batchTests);
+
+    sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
+
+    FileSourceDto dto = dbClient.fileSourceDao().selectTest(TEST_FILE_UUID_1);
+    assertThat(dto.getFileUuid()).isEqualTo(TEST_FILE_UUID_1);
+    List<FileSourceDb.Test> tests = dto.getTestData();
+    assertThat(tests).hasSize(2);
+    assertThat(tests.get(0).getCoveredFileList()).isEmpty();
+  }
+
+  @Test
+  public void update_one_test() throws Exception {
+    // ARRANGE
+    dbClient.fileSourceDao().insert(session, new FileSourceDto()
+      .setProjectUuid(PROJECT_UUID)
+      .setFileUuid(TEST_FILE_UUID_1)
+      .setTestData(Arrays.asList(newDbTest(1)))
+      .setCreatedAt(100_000)
+      .setUpdatedAt(100_000));
+    session.commit();
+    assertThat(dbClient.fileSourceDao().selectTest(TEST_FILE_UUID_1)).isNotNull();
+    BatchReportWriter writer = new BatchReportWriter(reportDir);
+    List<BatchReport.Test> batchTests = Arrays.asList(
+      newTest(1), newTest(2)
+      );
+    writer.writeTests(TEST_FILE_REF_1, batchTests);
+    List<CoverageDetail> coverageDetails = Arrays.asList(
+      newCoverageDetail(1, MAIN_FILE_REF_1)
+      );
+    writer.writeCoverageDetails(TEST_FILE_REF_1, coverageDetails);
+
+    // ACT
+    sut.execute(new ComputationContext(new BatchReportReader(reportDir), ComponentTesting.newProjectDto(PROJECT_UUID)));
+
+    // ASSERT
+    FileSourceDto dto = dbClient.fileSourceDao().selectTest(TEST_FILE_UUID_1);
+    assertThat(dto.getCreatedAt()).isEqualTo(100_000);
+    assertThat(dto.getUpdatedAt()).isEqualTo(now);
+    assertThat(dto.getTestData()).hasSize(2);
+
+    FileSourceDb.Test test = dto.getTestData().get(0);
+    assertThat(test.getName()).isEqualTo("name#1");
+    assertThat(test.getMsg()).isEqualTo("message#1");
+    assertThat(test.getCoveredFileCount()).isEqualTo(1);
+    assertThat(test.getCoveredFile(0).getCoveredLineList()).containsExactly(1, 2, 3);
+    assertThat(test.getCoveredFile(0).getFileUuid()).isEqualTo(MAIN_FILE_UUID_1);
+  }
+
+  private FileSourceDb.Test newDbTest(int id) {
+    return FileSourceDb.Test.newBuilder()
+      .setName("name#" + id)
+      .setType(TestType.IT)
+      .setStatus(TestStatus.ERROR)
+      .setStacktrace("old-stacktrace#" + id)
+      .setMsg("old-message#" + id)
+      .setExecutionTimeMs(123_456_789L)
+      .build();
+  }
+
+  private BatchReport.Test newTest(int id) {
+    return BatchReport.Test.newBuilder()
+      .setType(TestType.UT)
+      .setStatus(TestStatus.FAILURE)
+      .setName("name#" + id)
+      .setStacktrace("stacktrace#" + id)
+      .setMsg("message#" + id)
+      .setExecutionTimeMs(1_000)
+      .build();
+  }
+
+  private BatchReport.CoverageDetail newCoverageDetail(int id, int covered_file_ref) {
+    return CoverageDetail.newBuilder()
+      .setTestName("name#" + id)
+      .addCoveredFile(CoverageDetail.CoveredFile.newBuilder()
+        .addAllCoveredLine(Arrays.asList(1, 2, 3))
+        .setFileRef(covered_file_ref)
+        .build()
+      )
+      .build();
+  }
+
+  private BatchReportWriter initBasicReport() throws IOException {
+    BatchReportWriter writer = new BatchReportWriter(reportDir);
+    writer.writeMetadata(BatchReport.Metadata.newBuilder()
+      .setRootComponentRef(1)
+      .setProjectKey("PROJECT_KEY")
+      .build());
+
+    writer.writeComponent(BatchReport.Component.newBuilder()
+      .setRef(1)
+      .setType(Constants.ComponentType.PROJECT)
+      .setUuid(PROJECT_UUID)
+      .addChildRef(2)
+      .build());
+    writer.writeComponent(BatchReport.Component.newBuilder()
+      .setRef(2)
+      .setType(Constants.ComponentType.MODULE)
+      .setUuid("MODULE")
+      .addAllChildRef(Arrays.asList(TEST_FILE_REF_1, TEST_FILE_REF_2, MAIN_FILE_REF_1, MAIN_FILE_REF_2))
+      .build());
+    writer.writeComponent(BatchReport.Component.newBuilder()
+      .setRef(TEST_FILE_REF_1)
+      .setIsTest(true)
+      .setType(Constants.ComponentType.FILE)
+      .setUuid(TEST_FILE_UUID_1)
+      .build());
+    writer.writeComponent(BatchReport.Component.newBuilder()
+      .setRef(TEST_FILE_REF_2)
+      .setIsTest(true)
+      .setType(Constants.ComponentType.FILE)
+      .setUuid(TEST_FILE_UUID_2)
+      .build());
+    writer.writeComponent(BatchReport.Component.newBuilder()
+      .setRef(MAIN_FILE_REF_1)
+      .setType(Constants.ComponentType.FILE)
+      .setUuid(MAIN_FILE_UUID_1)
+      .build());
+    writer.writeComponent(BatchReport.Component.newBuilder()
+      .setRef(MAIN_FILE_REF_2)
+      .setType(Constants.ComponentType.FILE)
+      .setUuid(MAIN_FILE_UUID_2)
+      .build());
+
+    return writer;
+  }
+}
index 089507fc59707f2d0e391fd1b3eb6d23ccd51158..7496712e7b9b55591f1e3a06cf77cee0cdac160a 100644 (file)
@@ -89,7 +89,7 @@ public class FeedFileSourcesBinaryDataTest {
       rs = pstmt.executeQuery();
       rs.next();
       InputStream data = rs.getBinaryStream(1);
-      return FileSourceDto.decodeData(data);
+      return FileSourceDto.decodeSourceData(data);
     } finally {
       DbUtils.closeQuietly(rs);
       DbUtils.closeQuietly(pstmt);
index dbf2968ebddb96ab5908d42e12690384f386e3ed..7fe56d6dc38228add7e78e98d3b6a417e84cf334 100644 (file)
@@ -28,6 +28,7 @@ import org.junit.Test;
 import org.sonar.core.persistence.AbstractDaoTestCase;
 import org.sonar.core.persistence.DbSession;
 import org.sonar.core.source.db.FileSourceDto;
+import org.sonar.core.source.db.FileSourceDto.Type;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -39,12 +40,12 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
 
   DbSession session;
 
-  FileSourceDao dao;
+  FileSourceDao sut;
 
   @Before
   public void setUpTestData() {
     session = getMyBatis().openSession(false);
-    dao = new FileSourceDao(getMyBatis());
+    sut = new FileSourceDao(getMyBatis());
   }
 
   @After
@@ -56,7 +57,7 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
   public void select() throws Exception {
     setupData("shared");
 
-    FileSourceDto fileSourceDto = dao.select("FILE1_UUID");
+    FileSourceDto fileSourceDto = sut.selectSource("FILE1_UUID");
 
     assertThat(fileSourceDto.getBinaryData()).isNotEmpty();
     assertThat(fileSourceDto.getDataHash()).isEqualTo("hash");
@@ -64,7 +65,7 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
     assertThat(fileSourceDto.getFileUuid()).isEqualTo("FILE1_UUID");
     assertThat(fileSourceDto.getCreatedAt()).isEqualTo(1500000000000L);
     assertThat(fileSourceDto.getUpdatedAt()).isEqualTo(1500000000000L);
-    assertThat(fileSourceDto.getDataType()).isEqualTo(FileSourceDto.Type.SOURCE);
+    assertThat(fileSourceDto.getDataType()).isEqualTo(Type.SOURCE);
   }
 
   @Test
@@ -72,7 +73,7 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
     setupData("shared");
 
     InputStreamToStringFunction fn = new InputStreamToStringFunction();
-    dao.readDataStream("FILE1_UUID", fn);
+    sut.readDataStream("FILE1_UUID", fn);
 
     assertThat(fn.result).isNotEmpty();
   }
@@ -82,7 +83,7 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
     setupData("shared");
 
     ReaderToStringFunction fn = new ReaderToStringFunction();
-    dao.readLineHashesStream(session, "FILE1_UUID", fn);
+    sut.readLineHashesStream(session, "FILE1_UUID", fn);
 
     assertThat(fn.result).isEqualTo("ABC\\nDEF\\nGHI");
   }
@@ -92,7 +93,7 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
     setupData("shared");
 
     ReaderToStringFunction fn = new ReaderToStringFunction();
-    dao.readLineHashesStream(session, "unknown", fn);
+    sut.readLineHashesStream(session, "unknown", fn);
 
     assertThat(fn.result).isNull();
   }
@@ -101,14 +102,14 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
   public void insert() throws Exception {
     setupData("shared");
 
-    dao.insert(new FileSourceDto()
+    sut.insert(new FileSourceDto()
       .setProjectUuid("PRJ_UUID")
       .setFileUuid("FILE2_UUID")
       .setBinaryData("FILE2_BINARY_DATA".getBytes())
       .setDataHash("FILE2_DATA_HASH")
       .setLineHashes("LINE1_HASH\\nLINE2_HASH")
       .setSrcHash("FILE2_HASH")
-      .setDataType(FileSourceDto.Type.SOURCE)
+      .setDataType(Type.SOURCE)
       .setCreatedAt(1500000000000L)
       .setUpdatedAt(1500000000001L));
 
@@ -119,7 +120,7 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
   public void update() throws Exception {
     setupData("shared");
 
-    dao.update(new FileSourceDto()
+    sut.update(new FileSourceDto()
       .setId(101L)
       .setProjectUuid("PRJ_UUID")
       .setFileUuid("FILE1_UUID")
@@ -127,7 +128,7 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
       .setDataHash("NEW_DATA_HASH")
       .setSrcHash("NEW_FILE_HASH")
       .setLineHashes("NEW_LINE_HASHES")
-      .setDataType(FileSourceDto.Type.SOURCE)
+      .setDataType(Type.SOURCE)
       .setUpdatedAt(1500000000002L));
 
     checkTable("update", "file_sources", "project_uuid", "file_uuid", "data_hash", "line_hashes", "src_hash", "created_at", "updated_at", "data_type");
@@ -137,10 +138,11 @@ public class FileSourceDaoTest extends AbstractDaoTestCase {
   public void update_date_when_updated_date_is_zero() throws Exception {
     setupData("update_date_when_updated_date_is_zero");
 
-    dao.updateDateWhenUpdatedDateIsZero(session, "ABCD", 1500000000002L);
+    sut.updateDateWhenUpdatedDateIsZero(session, "ABCD", 1500000000002L);
     session.commit();
 
-    checkTable("update_date_when_updated_date_is_zero", "file_sources", "project_uuid", "file_uuid", "data_hash", "line_hashes", "src_hash", "created_at", "updated_at");
+    checkTable("update_date_when_updated_date_is_zero", "file_sources", "project_uuid", "file_uuid", "data_hash", "line_hashes", "src_hash", "created_at", "updated_at",
+      "data_type");
   }
 
   private static class ReaderToStringFunction implements Function<Reader, String> {
index c20e43fd199ba8dd16d31eb221df1cb8e45b8e5a..67b8c53c55dfdb859b8526b39e7f7ccd95c4003e 100644 (file)
@@ -36,7 +36,7 @@ public class FileSourceTesting {
   }
 
   public static void updateDataColumn(Connection connection, String fileUuid, FileSourceDb.Data data) throws SQLException {
-    updateDataColumn(connection, fileUuid, FileSourceDto.encodeData(data));
+    updateDataColumn(connection, fileUuid, FileSourceDto.encodeSourceData(data));
   }
 
   public static void updateDataColumn(Connection connection, String fileUuid, byte[] data) throws SQLException {
index 21da15f21112f3eaced71826682059f03707e182..0cf8ea5dc2a72ab037252f8793a112f0626bd81c 100644 (file)
@@ -26,6 +26,7 @@ class AddFileSourcesDataType < ActiveRecord::Migration
 
   def self.up
     add_column 'file_sources', 'data_type', :string, :limit => 20
+    change_column 'file_sources', 'data_hash', :string, :limit => 50, :null => true
     remove_index_quietly('file_sources_file_uuid_uniq')
     add_index 'file_sources', ['file_uuid', 'data_type'], :name => 'file_sources_uuid_type', :unique => true
   end
index b15daefa3f4a69e68c5254cee9c602e51092677d..63b0593d3dee0a15d306c2c4d1fee3be43dead5f 100644 (file)
@@ -811,13 +811,13 @@ public final class Constants {
       "\007SKIPPED\020\004B\034\n\030org.sonar.batch.protocolH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
-        public com.google.protobuf.ExtensionRegistry assignDescriptors(
-            com.google.protobuf.Descriptors.FileDescriptor root) {
-          descriptor = root;
-          return null;
-        }
-      };
+        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
+          public com.google.protobuf.ExtensionRegistry assignDescriptors(
+              com.google.protobuf.Descriptors.FileDescriptor root) {
+            descriptor = root;
+            return null;
+          }
+        };
     com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
index 6ecbcc83d312c5e7df763b982cde1cfea4e7e11f..464e4d9bb03ae66fc316470a2faf6dcc562a6e74 100644 (file)
@@ -8,10 +8,10 @@ public final class BatchInput {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistry registry) {
   }
-  public interface ServerIssueOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface ServerIssueOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:ServerIssue)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional string key = 1;
     /**
      * <code>optional string key = 1;</code>
      */
@@ -26,7 +26,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getKeyBytes();
 
-    // optional string module_key = 2;
     /**
      * <code>optional string module_key = 2;</code>
      */
@@ -41,7 +40,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getModuleKeyBytes();
 
-    // optional string path = 3;
     /**
      * <code>optional string path = 3;</code>
      */
@@ -56,7 +54,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getPathBytes();
 
-    // optional string rule_repository = 4;
     /**
      * <code>optional string rule_repository = 4;</code>
      */
@@ -71,7 +68,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getRuleRepositoryBytes();
 
-    // optional string rule_key = 5;
     /**
      * <code>optional string rule_key = 5;</code>
      */
@@ -86,7 +82,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getRuleKeyBytes();
 
-    // optional int32 line = 6;
     /**
      * <code>optional int32 line = 6;</code>
      */
@@ -96,7 +91,6 @@ public final class BatchInput {
      */
     int getLine();
 
-    // optional string msg = 7;
     /**
      * <code>optional string msg = 7;</code>
      */
@@ -111,7 +105,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getMsgBytes();
 
-    // optional .Severity severity = 8;
     /**
      * <code>optional .Severity severity = 8;</code>
      */
@@ -121,7 +114,6 @@ public final class BatchInput {
      */
     org.sonar.batch.protocol.Constants.Severity getSeverity();
 
-    // optional bool manual_severity = 9;
     /**
      * <code>optional bool manual_severity = 9;</code>
      */
@@ -131,7 +123,6 @@ public final class BatchInput {
      */
     boolean getManualSeverity();
 
-    // optional string resolution = 10;
     /**
      * <code>optional string resolution = 10;</code>
      */
@@ -146,7 +137,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getResolutionBytes();
 
-    // optional string status = 11;
     /**
      * <code>optional string status = 11;</code>
      */
@@ -161,7 +151,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getStatusBytes();
 
-    // optional string checksum = 12;
     /**
      * <code>optional string checksum = 12;</code>
      */
@@ -176,7 +165,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getChecksumBytes();
 
-    // optional string assignee_login = 13;
     /**
      * <code>optional string assignee_login = 13;</code>
      */
@@ -191,7 +179,6 @@ public final class BatchInput {
     com.google.protobuf.ByteString
         getAssigneeLoginBytes();
 
-    // optional int64 creation_date = 14;
     /**
      * <code>optional int64 creation_date = 14;</code>
      */
@@ -205,8 +192,9 @@ public final class BatchInput {
    * Protobuf type {@code ServerIssue}
    */
   public static final class ServerIssue extends
-      com.google.protobuf.GeneratedMessage
-      implements ServerIssueOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:ServerIssue)
+      ServerIssueOrBuilder {
     // Use ServerIssue.newBuilder() to construct.
     private ServerIssue(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -253,28 +241,33 @@ public final class BatchInput {
               break;
             }
             case 10: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000001;
-              key_ = input.readBytes();
+              key_ = bs;
               break;
             }
             case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              moduleKey_ = input.readBytes();
+              moduleKey_ = bs;
               break;
             }
             case 26: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000004;
-              path_ = input.readBytes();
+              path_ = bs;
               break;
             }
             case 34: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000008;
-              ruleRepository_ = input.readBytes();
+              ruleRepository_ = bs;
               break;
             }
             case 42: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000010;
-              ruleKey_ = input.readBytes();
+              ruleKey_ = bs;
               break;
             }
             case 48: {
@@ -283,8 +276,9 @@ public final class BatchInput {
               break;
             }
             case 58: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000040;
-              msg_ = input.readBytes();
+              msg_ = bs;
               break;
             }
             case 64: {
@@ -304,23 +298,27 @@ public final class BatchInput {
               break;
             }
             case 82: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000200;
-              resolution_ = input.readBytes();
+              resolution_ = bs;
               break;
             }
             case 90: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000400;
-              status_ = input.readBytes();
+              status_ = bs;
               break;
             }
             case 98: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000800;
-              checksum_ = input.readBytes();
+              checksum_ = bs;
               break;
             }
             case 106: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00001000;
-              assigneeLogin_ = input.readBytes();
+              assigneeLogin_ = bs;
               break;
             }
             case 112: {
@@ -368,7 +366,6 @@ public final class BatchInput {
     }
 
     private int bitField0_;
-    // optional string key = 1;
     public static final int KEY_FIELD_NUMBER = 1;
     private java.lang.Object key_;
     /**
@@ -411,7 +408,6 @@ public final class BatchInput {
       }
     }
 
-    // optional string module_key = 2;
     public static final int MODULE_KEY_FIELD_NUMBER = 2;
     private java.lang.Object moduleKey_;
     /**
@@ -454,7 +450,6 @@ public final class BatchInput {
       }
     }
 
-    // optional string path = 3;
     public static final int PATH_FIELD_NUMBER = 3;
     private java.lang.Object path_;
     /**
@@ -497,7 +492,6 @@ public final class BatchInput {
       }
     }
 
-    // optional string rule_repository = 4;
     public static final int RULE_REPOSITORY_FIELD_NUMBER = 4;
     private java.lang.Object ruleRepository_;
     /**
@@ -540,7 +534,6 @@ public final class BatchInput {
       }
     }
 
-    // optional string rule_key = 5;
     public static final int RULE_KEY_FIELD_NUMBER = 5;
     private java.lang.Object ruleKey_;
     /**
@@ -583,7 +576,6 @@ public final class BatchInput {
       }
     }
 
-    // optional int32 line = 6;
     public static final int LINE_FIELD_NUMBER = 6;
     private int line_;
     /**
@@ -599,7 +591,6 @@ public final class BatchInput {
       return line_;
     }
 
-    // optional string msg = 7;
     public static final int MSG_FIELD_NUMBER = 7;
     private java.lang.Object msg_;
     /**
@@ -642,7 +633,6 @@ public final class BatchInput {
       }
     }
 
-    // optional .Severity severity = 8;
     public static final int SEVERITY_FIELD_NUMBER = 8;
     private org.sonar.batch.protocol.Constants.Severity severity_;
     /**
@@ -658,7 +648,6 @@ public final class BatchInput {
       return severity_;
     }
 
-    // optional bool manual_severity = 9;
     public static final int MANUAL_SEVERITY_FIELD_NUMBER = 9;
     private boolean manualSeverity_;
     /**
@@ -674,7 +663,6 @@ public final class BatchInput {
       return manualSeverity_;
     }
 
-    // optional string resolution = 10;
     public static final int RESOLUTION_FIELD_NUMBER = 10;
     private java.lang.Object resolution_;
     /**
@@ -717,7 +705,6 @@ public final class BatchInput {
       }
     }
 
-    // optional string status = 11;
     public static final int STATUS_FIELD_NUMBER = 11;
     private java.lang.Object status_;
     /**
@@ -760,7 +747,6 @@ public final class BatchInput {
       }
     }
 
-    // optional string checksum = 12;
     public static final int CHECKSUM_FIELD_NUMBER = 12;
     private java.lang.Object checksum_;
     /**
@@ -803,7 +789,6 @@ public final class BatchInput {
       }
     }
 
-    // optional string assignee_login = 13;
     public static final int ASSIGNEE_LOGIN_FIELD_NUMBER = 13;
     private java.lang.Object assigneeLogin_;
     /**
@@ -846,7 +831,6 @@ public final class BatchInput {
       }
     }
 
-    // optional int64 creation_date = 14;
     public static final int CREATION_DATE_FIELD_NUMBER = 14;
     private long creationDate_;
     /**
@@ -881,7 +865,8 @@ public final class BatchInput {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -1079,8 +1064,9 @@ public final class BatchInput {
      * Protobuf type {@code ServerIssue}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.input.BatchInput.ServerIssueOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:ServerIssue)
+        org.sonar.batch.protocol.input.BatchInput.ServerIssueOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.input.BatchInput.internal_static_ServerIssue_descriptor;
@@ -1330,7 +1316,6 @@ public final class BatchInput {
       }
       private int bitField0_;
 
-      // optional string key = 1;
       private java.lang.Object key_ = "";
       /**
        * <code>optional string key = 1;</code>
@@ -1344,9 +1329,12 @@ public final class BatchInput {
       public java.lang.String getKey() {
         java.lang.Object ref = key_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          key_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            key_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1404,7 +1392,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string module_key = 2;
       private java.lang.Object moduleKey_ = "";
       /**
        * <code>optional string module_key = 2;</code>
@@ -1418,9 +1405,12 @@ public final class BatchInput {
       public java.lang.String getModuleKey() {
         java.lang.Object ref = moduleKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          moduleKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            moduleKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1478,7 +1468,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string path = 3;
       private java.lang.Object path_ = "";
       /**
        * <code>optional string path = 3;</code>
@@ -1492,9 +1481,12 @@ public final class BatchInput {
       public java.lang.String getPath() {
         java.lang.Object ref = path_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          path_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            path_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1552,7 +1544,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string rule_repository = 4;
       private java.lang.Object ruleRepository_ = "";
       /**
        * <code>optional string rule_repository = 4;</code>
@@ -1566,9 +1557,12 @@ public final class BatchInput {
       public java.lang.String getRuleRepository() {
         java.lang.Object ref = ruleRepository_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          ruleRepository_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            ruleRepository_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1626,7 +1620,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string rule_key = 5;
       private java.lang.Object ruleKey_ = "";
       /**
        * <code>optional string rule_key = 5;</code>
@@ -1640,9 +1633,12 @@ public final class BatchInput {
       public java.lang.String getRuleKey() {
         java.lang.Object ref = ruleKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          ruleKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            ruleKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1700,7 +1696,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional int32 line = 6;
       private int line_ ;
       /**
        * <code>optional int32 line = 6;</code>
@@ -1733,7 +1728,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string msg = 7;
       private java.lang.Object msg_ = "";
       /**
        * <code>optional string msg = 7;</code>
@@ -1747,9 +1741,12 @@ public final class BatchInput {
       public java.lang.String getMsg() {
         java.lang.Object ref = msg_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          msg_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            msg_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1807,7 +1804,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional .Severity severity = 8;
       private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO;
       /**
        * <code>optional .Severity severity = 8;</code>
@@ -1843,7 +1839,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional bool manual_severity = 9;
       private boolean manualSeverity_ ;
       /**
        * <code>optional bool manual_severity = 9;</code>
@@ -1876,7 +1871,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string resolution = 10;
       private java.lang.Object resolution_ = "";
       /**
        * <code>optional string resolution = 10;</code>
@@ -1890,9 +1884,12 @@ public final class BatchInput {
       public java.lang.String getResolution() {
         java.lang.Object ref = resolution_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          resolution_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            resolution_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1950,7 +1947,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string status = 11;
       private java.lang.Object status_ = "";
       /**
        * <code>optional string status = 11;</code>
@@ -1964,9 +1960,12 @@ public final class BatchInput {
       public java.lang.String getStatus() {
         java.lang.Object ref = status_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          status_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            status_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2024,7 +2023,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string checksum = 12;
       private java.lang.Object checksum_ = "";
       /**
        * <code>optional string checksum = 12;</code>
@@ -2038,9 +2036,12 @@ public final class BatchInput {
       public java.lang.String getChecksum() {
         java.lang.Object ref = checksum_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          checksum_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            checksum_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2098,7 +2099,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional string assignee_login = 13;
       private java.lang.Object assigneeLogin_ = "";
       /**
        * <code>optional string assignee_login = 13;</code>
@@ -2112,9 +2112,12 @@ public final class BatchInput {
       public java.lang.String getAssigneeLogin() {
         java.lang.Object ref = assigneeLogin_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          assigneeLogin_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            assigneeLogin_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2172,7 +2175,6 @@ public final class BatchInput {
         return this;
       }
 
-      // optional int64 creation_date = 14;
       private long creationDate_ ;
       /**
        * <code>optional int64 creation_date = 14;</code>
@@ -2216,7 +2218,7 @@ public final class BatchInput {
     // @@protoc_insertion_point(class_scope:ServerIssue)
   }
 
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_ServerIssue_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -2241,24 +2243,25 @@ public final class BatchInput {
       " \001(\003B\"\n\036org.sonar.batch.protocol.inputH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
-        public com.google.protobuf.ExtensionRegistry assignDescriptors(
-            com.google.protobuf.Descriptors.FileDescriptor root) {
-          descriptor = root;
-          internal_static_ServerIssue_descriptor =
-            getDescriptor().getMessageTypes().get(0);
-          internal_static_ServerIssue_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_ServerIssue_descriptor,
-              new java.lang.String[] { "Key", "ModuleKey", "Path", "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "ManualSeverity", "Resolution", "Status", "Checksum", "AssigneeLogin", "CreationDate", });
-          return null;
-        }
-      };
+        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
+          public com.google.protobuf.ExtensionRegistry assignDescriptors(
+              com.google.protobuf.Descriptors.FileDescriptor root) {
+            descriptor = root;
+            return null;
+          }
+        };
     com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
           org.sonar.batch.protocol.Constants.getDescriptor(),
         }, assigner);
+    internal_static_ServerIssue_descriptor =
+      getDescriptor().getMessageTypes().get(0);
+    internal_static_ServerIssue_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_ServerIssue_descriptor,
+        new java.lang.String[] { "Key", "ModuleKey", "Path", "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "ManualSeverity", "Resolution", "Status", "Checksum", "AssigneeLogin", "CreationDate", });
+    org.sonar.batch.protocol.Constants.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
index 16575053a29a494fa95d8c57b2638f7eda958e8d..c70067cdd982a8671133a3cdc732ab8eef5e8363 100644 (file)
@@ -8,10 +8,10 @@ public final class BatchReport {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistry registry) {
   }
-  public interface MetadataOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface MetadataOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Metadata)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int64 analysis_date = 1;
     /**
      * <code>optional int64 analysis_date = 1;</code>
      */
@@ -21,7 +21,6 @@ public final class BatchReport {
      */
     long getAnalysisDate();
 
-    // optional string project_key = 2;
     /**
      * <code>optional string project_key = 2;</code>
      */
@@ -36,7 +35,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getProjectKeyBytes();
 
-    // optional string branch = 6;
     /**
      * <code>optional string branch = 6;</code>
      */
@@ -51,7 +49,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getBranchBytes();
 
-    // optional int32 root_component_ref = 3;
     /**
      * <code>optional int32 root_component_ref = 3;</code>
      */
@@ -61,7 +58,6 @@ public final class BatchReport {
      */
     int getRootComponentRef();
 
-    // optional int64 snapshot_id = 4;
     /**
      * <code>optional int64 snapshot_id = 4;</code>
      *
@@ -79,7 +75,6 @@ public final class BatchReport {
      */
     long getSnapshotId();
 
-    // optional int32 deleted_components_count = 5;
     /**
      * <code>optional int32 deleted_components_count = 5;</code>
      */
@@ -93,8 +88,9 @@ public final class BatchReport {
    * Protobuf type {@code Metadata}
    */
   public static final class Metadata extends
-      com.google.protobuf.GeneratedMessage
-      implements MetadataOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Metadata)
+      MetadataOrBuilder {
     // Use Metadata.newBuilder() to construct.
     private Metadata(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -146,8 +142,9 @@ public final class BatchReport {
               break;
             }
             case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              projectKey_ = input.readBytes();
+              projectKey_ = bs;
               break;
             }
             case 24: {
@@ -166,8 +163,9 @@ public final class BatchReport {
               break;
             }
             case 50: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000004;
-              branch_ = input.readBytes();
+              branch_ = bs;
               break;
             }
           }
@@ -210,7 +208,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int64 analysis_date = 1;
     public static final int ANALYSIS_DATE_FIELD_NUMBER = 1;
     private long analysisDate_;
     /**
@@ -226,7 +223,6 @@ public final class BatchReport {
       return analysisDate_;
     }
 
-    // optional string project_key = 2;
     public static final int PROJECT_KEY_FIELD_NUMBER = 2;
     private java.lang.Object projectKey_;
     /**
@@ -269,7 +265,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string branch = 6;
     public static final int BRANCH_FIELD_NUMBER = 6;
     private java.lang.Object branch_;
     /**
@@ -312,7 +307,6 @@ public final class BatchReport {
       }
     }
 
-    // optional int32 root_component_ref = 3;
     public static final int ROOT_COMPONENT_REF_FIELD_NUMBER = 3;
     private int rootComponentRef_;
     /**
@@ -328,7 +322,6 @@ public final class BatchReport {
       return rootComponentRef_;
     }
 
-    // optional int64 snapshot_id = 4;
     public static final int SNAPSHOT_ID_FIELD_NUMBER = 4;
     private long snapshotId_;
     /**
@@ -352,7 +345,6 @@ public final class BatchReport {
       return snapshotId_;
     }
 
-    // optional int32 deleted_components_count = 5;
     public static final int DELETED_COMPONENTS_COUNT_FIELD_NUMBER = 5;
     private int deletedComponentsCount_;
     /**
@@ -379,7 +371,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -521,8 +514,9 @@ public final class BatchReport {
      * Protobuf type {@code Metadata}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.MetadataOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Metadata)
+        org.sonar.batch.protocol.output.BatchReport.MetadataOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Metadata_descriptor;
@@ -684,7 +678,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int64 analysis_date = 1;
       private long analysisDate_ ;
       /**
        * <code>optional int64 analysis_date = 1;</code>
@@ -717,7 +710,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string project_key = 2;
       private java.lang.Object projectKey_ = "";
       /**
        * <code>optional string project_key = 2;</code>
@@ -731,9 +723,12 @@ public final class BatchReport {
       public java.lang.String getProjectKey() {
         java.lang.Object ref = projectKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          projectKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            projectKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -791,7 +786,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string branch = 6;
       private java.lang.Object branch_ = "";
       /**
        * <code>optional string branch = 6;</code>
@@ -805,9 +799,12 @@ public final class BatchReport {
       public java.lang.String getBranch() {
         java.lang.Object ref = branch_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          branch_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            branch_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -865,7 +862,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 root_component_ref = 3;
       private int rootComponentRef_ ;
       /**
        * <code>optional int32 root_component_ref = 3;</code>
@@ -898,7 +894,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 snapshot_id = 4;
       private long snapshotId_ ;
       /**
        * <code>optional int64 snapshot_id = 4;</code>
@@ -947,7 +942,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 deleted_components_count = 5;
       private int deletedComponentsCount_ ;
       /**
        * <code>optional int32 deleted_components_count = 5;</code>
@@ -991,10 +985,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Metadata)
   }
 
-  public interface ComponentLinkOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface ComponentLinkOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:ComponentLink)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional .ComponentLinkType type = 1;
     /**
      * <code>optional .ComponentLinkType type = 1;</code>
      */
@@ -1004,7 +998,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.Constants.ComponentLinkType getType();
 
-    // optional string href = 2;
     /**
      * <code>optional string href = 2;</code>
      */
@@ -1023,8 +1016,9 @@ public final class BatchReport {
    * Protobuf type {@code ComponentLink}
    */
   public static final class ComponentLink extends
-      com.google.protobuf.GeneratedMessage
-      implements ComponentLinkOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:ComponentLink)
+      ComponentLinkOrBuilder {
     // Use ComponentLink.newBuilder() to construct.
     private ComponentLink(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -1082,8 +1076,9 @@ public final class BatchReport {
               break;
             }
             case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              href_ = input.readBytes();
+              href_ = bs;
               break;
             }
           }
@@ -1126,7 +1121,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional .ComponentLinkType type = 1;
     public static final int TYPE_FIELD_NUMBER = 1;
     private org.sonar.batch.protocol.Constants.ComponentLinkType type_;
     /**
@@ -1142,7 +1136,6 @@ public final class BatchReport {
       return type_;
     }
 
-    // optional string href = 2;
     public static final int HREF_FIELD_NUMBER = 2;
     private java.lang.Object href_;
     /**
@@ -1192,7 +1185,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -1306,8 +1300,9 @@ public final class BatchReport {
      * Protobuf type {@code ComponentLink}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:ComponentLink)
+        org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_ComponentLink_descriptor;
@@ -1431,7 +1426,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional .ComponentLinkType type = 1;
       private org.sonar.batch.protocol.Constants.ComponentLinkType type_ = org.sonar.batch.protocol.Constants.ComponentLinkType.HOME;
       /**
        * <code>optional .ComponentLinkType type = 1;</code>
@@ -1467,7 +1461,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string href = 2;
       private java.lang.Object href_ = "";
       /**
        * <code>optional string href = 2;</code>
@@ -1481,9 +1474,12 @@ public final class BatchReport {
       public java.lang.String getHref() {
         java.lang.Object ref = href_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          href_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            href_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1552,10 +1548,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:ComponentLink)
   }
 
-  public interface EventOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface EventOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Event)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 component_ref = 1;
     /**
      * <code>optional int32 component_ref = 1;</code>
      */
@@ -1565,7 +1561,6 @@ public final class BatchReport {
      */
     int getComponentRef();
 
-    // optional string name = 2;
     /**
      * <code>optional string name = 2;</code>
      */
@@ -1580,7 +1575,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getNameBytes();
 
-    // optional string description = 3;
     /**
      * <code>optional string description = 3;</code>
      */
@@ -1595,7 +1589,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getDescriptionBytes();
 
-    // optional .EventCategory category = 4;
     /**
      * <code>optional .EventCategory category = 4;</code>
      */
@@ -1605,7 +1598,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.Constants.EventCategory getCategory();
 
-    // optional string event_data = 5;
     /**
      * <code>optional string event_data = 5;</code>
      */
@@ -1628,8 +1620,9 @@ public final class BatchReport {
    * </pre>
    */
   public static final class Event extends
-      com.google.protobuf.GeneratedMessage
-      implements EventOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Event)
+      EventOrBuilder {
     // Use Event.newBuilder() to construct.
     private Event(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -1681,13 +1674,15 @@ public final class BatchReport {
               break;
             }
             case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              name_ = input.readBytes();
+              name_ = bs;
               break;
             }
             case 26: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000004;
-              description_ = input.readBytes();
+              description_ = bs;
               break;
             }
             case 32: {
@@ -1702,8 +1697,9 @@ public final class BatchReport {
               break;
             }
             case 42: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000010;
-              eventData_ = input.readBytes();
+              eventData_ = bs;
               break;
             }
           }
@@ -1746,7 +1742,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 component_ref = 1;
     public static final int COMPONENT_REF_FIELD_NUMBER = 1;
     private int componentRef_;
     /**
@@ -1762,7 +1757,6 @@ public final class BatchReport {
       return componentRef_;
     }
 
-    // optional string name = 2;
     public static final int NAME_FIELD_NUMBER = 2;
     private java.lang.Object name_;
     /**
@@ -1805,7 +1799,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string description = 3;
     public static final int DESCRIPTION_FIELD_NUMBER = 3;
     private java.lang.Object description_;
     /**
@@ -1848,7 +1841,6 @@ public final class BatchReport {
       }
     }
 
-    // optional .EventCategory category = 4;
     public static final int CATEGORY_FIELD_NUMBER = 4;
     private org.sonar.batch.protocol.Constants.EventCategory category_;
     /**
@@ -1864,7 +1856,6 @@ public final class BatchReport {
       return category_;
     }
 
-    // optional string event_data = 5;
     public static final int EVENT_DATA_FIELD_NUMBER = 5;
     private java.lang.Object eventData_;
     /**
@@ -1917,7 +1908,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -2056,8 +2048,9 @@ public final class BatchReport {
      * </pre>
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.EventOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Event)
+        org.sonar.batch.protocol.output.BatchReport.EventOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Event_descriptor;
@@ -2212,7 +2205,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 component_ref = 1;
       private int componentRef_ ;
       /**
        * <code>optional int32 component_ref = 1;</code>
@@ -2245,7 +2237,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string name = 2;
       private java.lang.Object name_ = "";
       /**
        * <code>optional string name = 2;</code>
@@ -2259,9 +2250,12 @@ public final class BatchReport {
       public java.lang.String getName() {
         java.lang.Object ref = name_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          name_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            name_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2319,7 +2313,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string description = 3;
       private java.lang.Object description_ = "";
       /**
        * <code>optional string description = 3;</code>
@@ -2333,9 +2326,12 @@ public final class BatchReport {
       public java.lang.String getDescription() {
         java.lang.Object ref = description_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          description_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            description_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2393,7 +2389,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional .EventCategory category = 4;
       private org.sonar.batch.protocol.Constants.EventCategory category_ = org.sonar.batch.protocol.Constants.EventCategory.ALERT;
       /**
        * <code>optional .EventCategory category = 4;</code>
@@ -2429,7 +2424,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string event_data = 5;
       private java.lang.Object eventData_ = "";
       /**
        * <code>optional string event_data = 5;</code>
@@ -2443,9 +2437,12 @@ public final class BatchReport {
       public java.lang.String getEventData() {
         java.lang.Object ref = eventData_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          eventData_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            eventData_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2514,10 +2511,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Event)
   }
 
-  public interface ComponentOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface ComponentOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Component)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 ref = 1;
     /**
      * <code>optional int32 ref = 1;</code>
      */
@@ -2527,7 +2524,6 @@ public final class BatchReport {
      */
     int getRef();
 
-    // optional string path = 2;
     /**
      * <code>optional string path = 2;</code>
      */
@@ -2542,7 +2538,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getPathBytes();
 
-    // optional string name = 3;
     /**
      * <code>optional string name = 3;</code>
      */
@@ -2557,7 +2552,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getNameBytes();
 
-    // optional .ComponentType type = 4;
     /**
      * <code>optional .ComponentType type = 4;</code>
      */
@@ -2567,7 +2561,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.Constants.ComponentType getType();
 
-    // optional bool is_test = 5;
     /**
      * <code>optional bool is_test = 5;</code>
      */
@@ -2577,7 +2570,6 @@ public final class BatchReport {
      */
     boolean getIsTest();
 
-    // optional string language = 6;
     /**
      * <code>optional string language = 6;</code>
      */
@@ -2592,7 +2584,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getLanguageBytes();
 
-    // repeated int32 child_ref = 7 [packed = true];
     /**
      * <code>repeated int32 child_ref = 7 [packed = true];</code>
      */
@@ -2606,7 +2597,6 @@ public final class BatchReport {
      */
     int getChildRef(int index);
 
-    // repeated .ComponentLink link = 10;
     /**
      * <code>repeated .ComponentLink link = 10;</code>
      */
@@ -2631,7 +2621,6 @@ public final class BatchReport {
     org.sonar.batch.protocol.output.BatchReport.ComponentLinkOrBuilder getLinkOrBuilder(
         int index);
 
-    // optional string version = 12;
     /**
      * <code>optional string version = 12;</code>
      *
@@ -2658,7 +2647,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getVersionBytes();
 
-    // optional string key = 14;
     /**
      * <code>optional string key = 14;</code>
      *
@@ -2685,7 +2673,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getKeyBytes();
 
-    // optional int32 lines = 15;
     /**
      * <code>optional int32 lines = 15;</code>
      *
@@ -2703,7 +2690,6 @@ public final class BatchReport {
      */
     int getLines();
 
-    // optional int64 id = 13;
     /**
      * <code>optional int64 id = 13;</code>
      *
@@ -2721,7 +2707,6 @@ public final class BatchReport {
      */
     long getId();
 
-    // optional int64 snapshot_id = 8;
     /**
      * <code>optional int64 snapshot_id = 8;</code>
      */
@@ -2731,7 +2716,6 @@ public final class BatchReport {
      */
     long getSnapshotId();
 
-    // optional string uuid = 9;
     /**
      * <code>optional string uuid = 9;</code>
      */
@@ -2746,7 +2730,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getUuidBytes();
 
-    // repeated .Event event = 11;
     /**
      * <code>repeated .Event event = 11;</code>
      */
@@ -2775,8 +2758,9 @@ public final class BatchReport {
    * Protobuf type {@code Component}
    */
   public static final class Component extends
-      com.google.protobuf.GeneratedMessage
-      implements ComponentOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Component)
+      ComponentOrBuilder {
     // Use Component.newBuilder() to construct.
     private Component(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -2828,13 +2812,15 @@ public final class BatchReport {
               break;
             }
             case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              path_ = input.readBytes();
+              path_ = bs;
               break;
             }
             case 26: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000004;
-              name_ = input.readBytes();
+              name_ = bs;
               break;
             }
             case 32: {
@@ -2854,8 +2840,9 @@ public final class BatchReport {
               break;
             }
             case 50: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000020;
-              language_ = input.readBytes();
+              language_ = bs;
               break;
             }
             case 56: {
@@ -2885,8 +2872,9 @@ public final class BatchReport {
               break;
             }
             case 74: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000800;
-              uuid_ = input.readBytes();
+              uuid_ = bs;
               break;
             }
             case 82: {
@@ -2906,8 +2894,9 @@ public final class BatchReport {
               break;
             }
             case 98: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000040;
-              version_ = input.readBytes();
+              version_ = bs;
               break;
             }
             case 104: {
@@ -2916,8 +2905,9 @@ public final class BatchReport {
               break;
             }
             case 114: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000080;
-              key_ = input.readBytes();
+              key_ = bs;
               break;
             }
             case 120: {
@@ -2974,7 +2964,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 ref = 1;
     public static final int REF_FIELD_NUMBER = 1;
     private int ref_;
     /**
@@ -2990,7 +2979,6 @@ public final class BatchReport {
       return ref_;
     }
 
-    // optional string path = 2;
     public static final int PATH_FIELD_NUMBER = 2;
     private java.lang.Object path_;
     /**
@@ -3033,7 +3021,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string name = 3;
     public static final int NAME_FIELD_NUMBER = 3;
     private java.lang.Object name_;
     /**
@@ -3076,7 +3063,6 @@ public final class BatchReport {
       }
     }
 
-    // optional .ComponentType type = 4;
     public static final int TYPE_FIELD_NUMBER = 4;
     private org.sonar.batch.protocol.Constants.ComponentType type_;
     /**
@@ -3092,7 +3078,6 @@ public final class BatchReport {
       return type_;
     }
 
-    // optional bool is_test = 5;
     public static final int IS_TEST_FIELD_NUMBER = 5;
     private boolean isTest_;
     /**
@@ -3108,7 +3093,6 @@ public final class BatchReport {
       return isTest_;
     }
 
-    // optional string language = 6;
     public static final int LANGUAGE_FIELD_NUMBER = 6;
     private java.lang.Object language_;
     /**
@@ -3151,7 +3135,6 @@ public final class BatchReport {
       }
     }
 
-    // repeated int32 child_ref = 7 [packed = true];
     public static final int CHILD_REF_FIELD_NUMBER = 7;
     private java.util.List<java.lang.Integer> childRef_;
     /**
@@ -3175,7 +3158,6 @@ public final class BatchReport {
     }
     private int childRefMemoizedSerializedSize = -1;
 
-    // repeated .ComponentLink link = 10;
     public static final int LINK_FIELD_NUMBER = 10;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.ComponentLink> link_;
     /**
@@ -3211,7 +3193,6 @@ public final class BatchReport {
       return link_.get(index);
     }
 
-    // optional string version = 12;
     public static final int VERSION_FIELD_NUMBER = 12;
     private java.lang.Object version_;
     /**
@@ -3266,7 +3247,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string key = 14;
     public static final int KEY_FIELD_NUMBER = 14;
     private java.lang.Object key_;
     /**
@@ -3321,7 +3301,6 @@ public final class BatchReport {
       }
     }
 
-    // optional int32 lines = 15;
     public static final int LINES_FIELD_NUMBER = 15;
     private int lines_;
     /**
@@ -3345,7 +3324,6 @@ public final class BatchReport {
       return lines_;
     }
 
-    // optional int64 id = 13;
     public static final int ID_FIELD_NUMBER = 13;
     private long id_;
     /**
@@ -3369,7 +3347,6 @@ public final class BatchReport {
       return id_;
     }
 
-    // optional int64 snapshot_id = 8;
     public static final int SNAPSHOT_ID_FIELD_NUMBER = 8;
     private long snapshotId_;
     /**
@@ -3385,7 +3362,6 @@ public final class BatchReport {
       return snapshotId_;
     }
 
-    // optional string uuid = 9;
     public static final int UUID_FIELD_NUMBER = 9;
     private java.lang.Object uuid_;
     /**
@@ -3428,7 +3404,6 @@ public final class BatchReport {
       }
     }
 
-    // repeated .Event event = 11;
     public static final int EVENT_FIELD_NUMBER = 11;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.Event> event_;
     /**
@@ -3484,7 +3459,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -3703,8 +3679,9 @@ public final class BatchReport {
      * Protobuf type {@code Component}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Component)
+        org.sonar.batch.protocol.output.BatchReport.ComponentOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Component_descriptor;
@@ -4029,7 +4006,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 ref = 1;
       private int ref_ ;
       /**
        * <code>optional int32 ref = 1;</code>
@@ -4062,7 +4038,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string path = 2;
       private java.lang.Object path_ = "";
       /**
        * <code>optional string path = 2;</code>
@@ -4076,9 +4051,12 @@ public final class BatchReport {
       public java.lang.String getPath() {
         java.lang.Object ref = path_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          path_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            path_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -4136,7 +4114,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string name = 3;
       private java.lang.Object name_ = "";
       /**
        * <code>optional string name = 3;</code>
@@ -4150,9 +4127,12 @@ public final class BatchReport {
       public java.lang.String getName() {
         java.lang.Object ref = name_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          name_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            name_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -4210,7 +4190,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional .ComponentType type = 4;
       private org.sonar.batch.protocol.Constants.ComponentType type_ = org.sonar.batch.protocol.Constants.ComponentType.PROJECT;
       /**
        * <code>optional .ComponentType type = 4;</code>
@@ -4246,7 +4225,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool is_test = 5;
       private boolean isTest_ ;
       /**
        * <code>optional bool is_test = 5;</code>
@@ -4279,7 +4257,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string language = 6;
       private java.lang.Object language_ = "";
       /**
        * <code>optional string language = 6;</code>
@@ -4293,9 +4270,12 @@ public final class BatchReport {
       public java.lang.String getLanguage() {
         java.lang.Object ref = language_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          language_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            language_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -4353,7 +4333,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated int32 child_ref = 7 [packed = true];
       private java.util.List<java.lang.Integer> childRef_ = java.util.Collections.emptyList();
       private void ensureChildRefIsMutable() {
         if (!((bitField0_ & 0x00000040) == 0x00000040)) {
@@ -4405,7 +4384,8 @@ public final class BatchReport {
       public Builder addAllChildRef(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureChildRefIsMutable();
-        super.addAll(values, childRef_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, childRef_);
         onChanged();
         return this;
       }
@@ -4419,7 +4399,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .ComponentLink link = 10;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.ComponentLink> link_ =
         java.util.Collections.emptyList();
       private void ensureLinkIsMutable() {
@@ -4561,7 +4540,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.ComponentLink> values) {
         if (linkBuilder_ == null) {
           ensureLinkIsMutable();
-          super.addAll(values, link_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, link_);
           onChanged();
         } else {
           linkBuilder_.addAllMessages(values);
@@ -4659,7 +4639,6 @@ public final class BatchReport {
         return linkBuilder_;
       }
 
-      // optional string version = 12;
       private java.lang.Object version_ = "";
       /**
        * <code>optional string version = 12;</code>
@@ -4681,9 +4660,12 @@ public final class BatchReport {
       public java.lang.String getVersion() {
         java.lang.Object ref = version_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          version_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            version_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -4757,7 +4739,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string key = 14;
       private java.lang.Object key_ = "";
       /**
        * <code>optional string key = 14;</code>
@@ -4779,9 +4760,12 @@ public final class BatchReport {
       public java.lang.String getKey() {
         java.lang.Object ref = key_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          key_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            key_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -4855,7 +4839,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 lines = 15;
       private int lines_ ;
       /**
        * <code>optional int32 lines = 15;</code>
@@ -4904,7 +4887,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 id = 13;
       private long id_ ;
       /**
        * <code>optional int64 id = 13;</code>
@@ -4953,7 +4935,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 snapshot_id = 8;
       private long snapshotId_ ;
       /**
        * <code>optional int64 snapshot_id = 8;</code>
@@ -4986,7 +4967,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string uuid = 9;
       private java.lang.Object uuid_ = "";
       /**
        * <code>optional string uuid = 9;</code>
@@ -5000,9 +4980,12 @@ public final class BatchReport {
       public java.lang.String getUuid() {
         java.lang.Object ref = uuid_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          uuid_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            uuid_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -5060,7 +5043,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .Event event = 11;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Event> event_ =
         java.util.Collections.emptyList();
       private void ensureEventIsMutable() {
@@ -5202,7 +5184,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Event> values) {
         if (eventBuilder_ == null) {
           ensureEventIsMutable();
-          super.addAll(values, event_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, event_);
           onChanged();
         } else {
           eventBuilder_.addAllMessages(values);
@@ -5311,10 +5294,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Component)
   }
 
-  public interface MeasureOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface MeasureOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Measure)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional .MeasureValueType value_type = 1;
     /**
      * <code>optional .MeasureValueType value_type = 1;</code>
      */
@@ -5324,7 +5307,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.Constants.MeasureValueType getValueType();
 
-    // optional bool boolean_value = 2;
     /**
      * <code>optional bool boolean_value = 2;</code>
      *
@@ -5342,7 +5324,6 @@ public final class BatchReport {
      */
     boolean getBooleanValue();
 
-    // optional int32 int_value = 3;
     /**
      * <code>optional int32 int_value = 3;</code>
      */
@@ -5352,7 +5333,6 @@ public final class BatchReport {
      */
     int getIntValue();
 
-    // optional int64 long_value = 4;
     /**
      * <code>optional int64 long_value = 4;</code>
      */
@@ -5362,7 +5342,6 @@ public final class BatchReport {
      */
     long getLongValue();
 
-    // optional double double_value = 5;
     /**
      * <code>optional double double_value = 5;</code>
      */
@@ -5372,7 +5351,6 @@ public final class BatchReport {
      */
     double getDoubleValue();
 
-    // optional string string_value = 6;
     /**
      * <code>optional string string_value = 6;</code>
      */
@@ -5387,7 +5365,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getStringValueBytes();
 
-    // optional string metric_key = 7;
     /**
      * <code>optional string metric_key = 7;</code>
      */
@@ -5402,7 +5379,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getMetricKeyBytes();
 
-    // optional string description = 9;
     /**
      * <code>optional string description = 9;</code>
      *
@@ -5429,7 +5405,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getDescriptionBytes();
 
-    // optional string rule_key = 10;
     /**
      * <code>optional string rule_key = 10;</code>
      */
@@ -5444,7 +5419,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getRuleKeyBytes();
 
-    // optional .Severity severity = 11;
     /**
      * <code>optional .Severity severity = 11;</code>
      */
@@ -5454,7 +5428,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.Constants.Severity getSeverity();
 
-    // optional string alert_status = 12;
     /**
      * <code>optional string alert_status = 12;</code>
      */
@@ -5469,7 +5442,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getAlertStatusBytes();
 
-    // optional string alert_text = 13;
     /**
      * <code>optional string alert_text = 13;</code>
      */
@@ -5484,7 +5456,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getAlertTextBytes();
 
-    // optional double variation_value_1 = 14;
     /**
      * <code>optional double variation_value_1 = 14;</code>
      */
@@ -5494,7 +5465,6 @@ public final class BatchReport {
      */
     double getVariationValue1();
 
-    // optional double variation_value_2 = 15;
     /**
      * <code>optional double variation_value_2 = 15;</code>
      */
@@ -5504,7 +5474,6 @@ public final class BatchReport {
      */
     double getVariationValue2();
 
-    // optional double variation_value_3 = 16;
     /**
      * <code>optional double variation_value_3 = 16;</code>
      */
@@ -5514,7 +5483,6 @@ public final class BatchReport {
      */
     double getVariationValue3();
 
-    // optional double variation_value_4 = 17;
     /**
      * <code>optional double variation_value_4 = 17;</code>
      */
@@ -5524,7 +5492,6 @@ public final class BatchReport {
      */
     double getVariationValue4();
 
-    // optional double variation_value_5 = 18;
     /**
      * <code>optional double variation_value_5 = 18;</code>
      */
@@ -5534,7 +5501,6 @@ public final class BatchReport {
      */
     double getVariationValue5();
 
-    // optional int32 characteric_id = 19;
     /**
      * <code>optional int32 characteric_id = 19;</code>
      */
@@ -5544,7 +5510,6 @@ public final class BatchReport {
      */
     int getCharactericId();
 
-    // optional int32 person_id = 20;
     /**
      * <code>optional int32 person_id = 20;</code>
      */
@@ -5558,8 +5523,9 @@ public final class BatchReport {
    * Protobuf type {@code Measure}
    */
   public static final class Measure extends
-      com.google.protobuf.GeneratedMessage
-      implements MeasureOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Measure)
+      MeasureOrBuilder {
     // Use Measure.newBuilder() to construct.
     private Measure(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -5637,23 +5603,27 @@ public final class BatchReport {
               break;
             }
             case 50: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000020;
-              stringValue_ = input.readBytes();
+              stringValue_ = bs;
               break;
             }
             case 58: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000040;
-              metricKey_ = input.readBytes();
+              metricKey_ = bs;
               break;
             }
             case 74: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000080;
-              description_ = input.readBytes();
+              description_ = bs;
               break;
             }
             case 82: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000100;
-              ruleKey_ = input.readBytes();
+              ruleKey_ = bs;
               break;
             }
             case 88: {
@@ -5668,13 +5638,15 @@ public final class BatchReport {
               break;
             }
             case 98: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000400;
-              alertStatus_ = input.readBytes();
+              alertStatus_ = bs;
               break;
             }
             case 106: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000800;
-              alertText_ = input.readBytes();
+              alertText_ = bs;
               break;
             }
             case 113: {
@@ -5752,7 +5724,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional .MeasureValueType value_type = 1;
     public static final int VALUE_TYPE_FIELD_NUMBER = 1;
     private org.sonar.batch.protocol.Constants.MeasureValueType valueType_;
     /**
@@ -5768,7 +5739,6 @@ public final class BatchReport {
       return valueType_;
     }
 
-    // optional bool boolean_value = 2;
     public static final int BOOLEAN_VALUE_FIELD_NUMBER = 2;
     private boolean booleanValue_;
     /**
@@ -5792,7 +5762,6 @@ public final class BatchReport {
       return booleanValue_;
     }
 
-    // optional int32 int_value = 3;
     public static final int INT_VALUE_FIELD_NUMBER = 3;
     private int intValue_;
     /**
@@ -5808,7 +5777,6 @@ public final class BatchReport {
       return intValue_;
     }
 
-    // optional int64 long_value = 4;
     public static final int LONG_VALUE_FIELD_NUMBER = 4;
     private long longValue_;
     /**
@@ -5824,7 +5792,6 @@ public final class BatchReport {
       return longValue_;
     }
 
-    // optional double double_value = 5;
     public static final int DOUBLE_VALUE_FIELD_NUMBER = 5;
     private double doubleValue_;
     /**
@@ -5840,7 +5807,6 @@ public final class BatchReport {
       return doubleValue_;
     }
 
-    // optional string string_value = 6;
     public static final int STRING_VALUE_FIELD_NUMBER = 6;
     private java.lang.Object stringValue_;
     /**
@@ -5883,7 +5849,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string metric_key = 7;
     public static final int METRIC_KEY_FIELD_NUMBER = 7;
     private java.lang.Object metricKey_;
     /**
@@ -5926,7 +5891,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string description = 9;
     public static final int DESCRIPTION_FIELD_NUMBER = 9;
     private java.lang.Object description_;
     /**
@@ -5981,7 +5945,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string rule_key = 10;
     public static final int RULE_KEY_FIELD_NUMBER = 10;
     private java.lang.Object ruleKey_;
     /**
@@ -6024,7 +5987,6 @@ public final class BatchReport {
       }
     }
 
-    // optional .Severity severity = 11;
     public static final int SEVERITY_FIELD_NUMBER = 11;
     private org.sonar.batch.protocol.Constants.Severity severity_;
     /**
@@ -6040,7 +6002,6 @@ public final class BatchReport {
       return severity_;
     }
 
-    // optional string alert_status = 12;
     public static final int ALERT_STATUS_FIELD_NUMBER = 12;
     private java.lang.Object alertStatus_;
     /**
@@ -6083,7 +6044,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string alert_text = 13;
     public static final int ALERT_TEXT_FIELD_NUMBER = 13;
     private java.lang.Object alertText_;
     /**
@@ -6126,7 +6086,6 @@ public final class BatchReport {
       }
     }
 
-    // optional double variation_value_1 = 14;
     public static final int VARIATION_VALUE_1_FIELD_NUMBER = 14;
     private double variationValue1_;
     /**
@@ -6142,7 +6101,6 @@ public final class BatchReport {
       return variationValue1_;
     }
 
-    // optional double variation_value_2 = 15;
     public static final int VARIATION_VALUE_2_FIELD_NUMBER = 15;
     private double variationValue2_;
     /**
@@ -6158,7 +6116,6 @@ public final class BatchReport {
       return variationValue2_;
     }
 
-    // optional double variation_value_3 = 16;
     public static final int VARIATION_VALUE_3_FIELD_NUMBER = 16;
     private double variationValue3_;
     /**
@@ -6174,7 +6131,6 @@ public final class BatchReport {
       return variationValue3_;
     }
 
-    // optional double variation_value_4 = 17;
     public static final int VARIATION_VALUE_4_FIELD_NUMBER = 17;
     private double variationValue4_;
     /**
@@ -6190,7 +6146,6 @@ public final class BatchReport {
       return variationValue4_;
     }
 
-    // optional double variation_value_5 = 18;
     public static final int VARIATION_VALUE_5_FIELD_NUMBER = 18;
     private double variationValue5_;
     /**
@@ -6206,7 +6161,6 @@ public final class BatchReport {
       return variationValue5_;
     }
 
-    // optional int32 characteric_id = 19;
     public static final int CHARACTERIC_ID_FIELD_NUMBER = 19;
     private int charactericId_;
     /**
@@ -6222,7 +6176,6 @@ public final class BatchReport {
       return charactericId_;
     }
 
-    // optional int32 person_id = 20;
     public static final int PERSON_ID_FIELD_NUMBER = 20;
     private int personId_;
     /**
@@ -6262,7 +6215,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -6495,8 +6449,9 @@ public final class BatchReport {
      * Protobuf type {@code Measure}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Measure)
+        org.sonar.batch.protocol.output.BatchReport.MeasureOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Measure_descriptor;
@@ -6783,7 +6738,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional .MeasureValueType value_type = 1;
       private org.sonar.batch.protocol.Constants.MeasureValueType valueType_ = org.sonar.batch.protocol.Constants.MeasureValueType.INT;
       /**
        * <code>optional .MeasureValueType value_type = 1;</code>
@@ -6819,7 +6773,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool boolean_value = 2;
       private boolean booleanValue_ ;
       /**
        * <code>optional bool boolean_value = 2;</code>
@@ -6868,7 +6821,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 int_value = 3;
       private int intValue_ ;
       /**
        * <code>optional int32 int_value = 3;</code>
@@ -6901,7 +6853,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 long_value = 4;
       private long longValue_ ;
       /**
        * <code>optional int64 long_value = 4;</code>
@@ -6934,7 +6885,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional double double_value = 5;
       private double doubleValue_ ;
       /**
        * <code>optional double double_value = 5;</code>
@@ -6967,7 +6917,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string string_value = 6;
       private java.lang.Object stringValue_ = "";
       /**
        * <code>optional string string_value = 6;</code>
@@ -6981,9 +6930,12 @@ public final class BatchReport {
       public java.lang.String getStringValue() {
         java.lang.Object ref = stringValue_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          stringValue_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            stringValue_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -7041,7 +6993,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string metric_key = 7;
       private java.lang.Object metricKey_ = "";
       /**
        * <code>optional string metric_key = 7;</code>
@@ -7055,9 +7006,12 @@ public final class BatchReport {
       public java.lang.String getMetricKey() {
         java.lang.Object ref = metricKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          metricKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            metricKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -7115,7 +7069,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string description = 9;
       private java.lang.Object description_ = "";
       /**
        * <code>optional string description = 9;</code>
@@ -7137,9 +7090,12 @@ public final class BatchReport {
       public java.lang.String getDescription() {
         java.lang.Object ref = description_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          description_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            description_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -7213,7 +7169,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string rule_key = 10;
       private java.lang.Object ruleKey_ = "";
       /**
        * <code>optional string rule_key = 10;</code>
@@ -7227,9 +7182,12 @@ public final class BatchReport {
       public java.lang.String getRuleKey() {
         java.lang.Object ref = ruleKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          ruleKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            ruleKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -7287,7 +7245,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional .Severity severity = 11;
       private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO;
       /**
        * <code>optional .Severity severity = 11;</code>
@@ -7323,7 +7280,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string alert_status = 12;
       private java.lang.Object alertStatus_ = "";
       /**
        * <code>optional string alert_status = 12;</code>
@@ -7337,9 +7293,12 @@ public final class BatchReport {
       public java.lang.String getAlertStatus() {
         java.lang.Object ref = alertStatus_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          alertStatus_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            alertStatus_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -7397,7 +7356,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string alert_text = 13;
       private java.lang.Object alertText_ = "";
       /**
        * <code>optional string alert_text = 13;</code>
@@ -7411,9 +7369,12 @@ public final class BatchReport {
       public java.lang.String getAlertText() {
         java.lang.Object ref = alertText_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          alertText_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            alertText_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -7471,7 +7432,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional double variation_value_1 = 14;
       private double variationValue1_ ;
       /**
        * <code>optional double variation_value_1 = 14;</code>
@@ -7504,7 +7464,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional double variation_value_2 = 15;
       private double variationValue2_ ;
       /**
        * <code>optional double variation_value_2 = 15;</code>
@@ -7537,7 +7496,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional double variation_value_3 = 16;
       private double variationValue3_ ;
       /**
        * <code>optional double variation_value_3 = 16;</code>
@@ -7570,7 +7528,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional double variation_value_4 = 17;
       private double variationValue4_ ;
       /**
        * <code>optional double variation_value_4 = 17;</code>
@@ -7603,7 +7560,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional double variation_value_5 = 18;
       private double variationValue5_ ;
       /**
        * <code>optional double variation_value_5 = 18;</code>
@@ -7636,7 +7592,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 characteric_id = 19;
       private int charactericId_ ;
       /**
        * <code>optional int32 characteric_id = 19;</code>
@@ -7669,7 +7624,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 person_id = 20;
       private int personId_ ;
       /**
        * <code>optional int32 person_id = 20;</code>
@@ -7713,10 +7667,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Measure)
   }
 
-  public interface MeasuresOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface MeasuresOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Measures)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 component_ref = 1;
     /**
      * <code>optional int32 component_ref = 1;</code>
      */
@@ -7726,7 +7680,6 @@ public final class BatchReport {
      */
     int getComponentRef();
 
-    // repeated .Measure measure = 2;
     /**
      * <code>repeated .Measure measure = 2;</code>
      */
@@ -7755,8 +7708,9 @@ public final class BatchReport {
    * Protobuf type {@code Measures}
    */
   public static final class Measures extends
-      com.google.protobuf.GeneratedMessage
-      implements MeasuresOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Measures)
+      MeasuresOrBuilder {
     // Use Measures.newBuilder() to construct.
     private Measures(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -7858,7 +7812,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 component_ref = 1;
     public static final int COMPONENT_REF_FIELD_NUMBER = 1;
     private int componentRef_;
     /**
@@ -7874,7 +7827,6 @@ public final class BatchReport {
       return componentRef_;
     }
 
-    // repeated .Measure measure = 2;
     public static final int MEASURE_FIELD_NUMBER = 2;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.Measure> measure_;
     /**
@@ -7917,7 +7869,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -8031,8 +7984,9 @@ public final class BatchReport {
      * Protobuf type {@code Measures}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.MeasuresOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Measures)
+        org.sonar.batch.protocol.output.BatchReport.MeasuresOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Measures_descriptor;
@@ -8187,7 +8141,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 component_ref = 1;
       private int componentRef_ ;
       /**
        * <code>optional int32 component_ref = 1;</code>
@@ -8220,7 +8173,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .Measure measure = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Measure> measure_ =
         java.util.Collections.emptyList();
       private void ensureMeasureIsMutable() {
@@ -8362,7 +8314,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Measure> values) {
         if (measureBuilder_ == null) {
           ensureMeasureIsMutable();
-          super.addAll(values, measure_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, measure_);
           onChanged();
         } else {
           measureBuilder_.addAllMessages(values);
@@ -8471,10 +8424,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Measures)
   }
 
-  public interface IssueOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface IssueOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Issue)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional string rule_repository = 1;
     /**
      * <code>optional string rule_repository = 1;</code>
      */
@@ -8489,7 +8442,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getRuleRepositoryBytes();
 
-    // optional string rule_key = 2;
     /**
      * <code>optional string rule_key = 2;</code>
      */
@@ -8504,7 +8456,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getRuleKeyBytes();
 
-    // optional int32 line = 3;
     /**
      * <code>optional int32 line = 3;</code>
      */
@@ -8514,7 +8465,6 @@ public final class BatchReport {
      */
     int getLine();
 
-    // optional string msg = 4;
     /**
      * <code>optional string msg = 4;</code>
      */
@@ -8529,7 +8479,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getMsgBytes();
 
-    // optional .Severity severity = 5;
     /**
      * <code>optional .Severity severity = 5;</code>
      */
@@ -8539,12 +8488,11 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.Constants.Severity getSeverity();
 
-    // repeated string tag = 6;
     /**
      * <code>repeated string tag = 6;</code>
      */
-    java.util.List<java.lang.String>
-    getTagList();
+    com.google.protobuf.ProtocolStringList
+        getTagList();
     /**
      * <code>repeated string tag = 6;</code>
      */
@@ -8559,7 +8507,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getTagBytes(int index);
 
-    // optional double effort_to_fix = 7;
     /**
      * <code>optional double effort_to_fix = 7;</code>
      *
@@ -8577,7 +8524,6 @@ public final class BatchReport {
      */
     double getEffortToFix();
 
-    // optional bool is_new = 8;
     /**
      * <code>optional bool is_new = 8;</code>
      */
@@ -8587,7 +8533,6 @@ public final class BatchReport {
      */
     boolean getIsNew();
 
-    // optional string uuid = 9;
     /**
      * <code>optional string uuid = 9;</code>
      */
@@ -8602,7 +8547,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getUuidBytes();
 
-    // optional int64 debt_in_minutes = 10;
     /**
      * <code>optional int64 debt_in_minutes = 10;</code>
      */
@@ -8612,7 +8556,6 @@ public final class BatchReport {
      */
     long getDebtInMinutes();
 
-    // optional string resolution = 11;
     /**
      * <code>optional string resolution = 11;</code>
      */
@@ -8627,7 +8570,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getResolutionBytes();
 
-    // optional string status = 12;
     /**
      * <code>optional string status = 12;</code>
      */
@@ -8642,7 +8584,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getStatusBytes();
 
-    // optional string checksum = 13;
     /**
      * <code>optional string checksum = 13;</code>
      */
@@ -8657,7 +8598,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getChecksumBytes();
 
-    // optional bool manual_severity = 14;
     /**
      * <code>optional bool manual_severity = 14;</code>
      */
@@ -8667,7 +8607,6 @@ public final class BatchReport {
      */
     boolean getManualSeverity();
 
-    // optional string reporter = 15;
     /**
      * <code>optional string reporter = 15;</code>
      */
@@ -8682,7 +8621,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getReporterBytes();
 
-    // optional string assignee = 16;
     /**
      * <code>optional string assignee = 16;</code>
      */
@@ -8697,7 +8635,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getAssigneeBytes();
 
-    // optional string action_plan_key = 17;
     /**
      * <code>optional string action_plan_key = 17;</code>
      */
@@ -8712,7 +8649,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getActionPlanKeyBytes();
 
-    // optional string attributes = 18;
     /**
      * <code>optional string attributes = 18;</code>
      */
@@ -8727,7 +8663,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getAttributesBytes();
 
-    // optional string author_login = 19;
     /**
      * <code>optional string author_login = 19;</code>
      */
@@ -8742,7 +8677,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getAuthorLoginBytes();
 
-    // optional int64 creation_date = 20;
     /**
      * <code>optional int64 creation_date = 20;</code>
      */
@@ -8752,7 +8686,6 @@ public final class BatchReport {
      */
     long getCreationDate();
 
-    // optional int64 close_date = 21;
     /**
      * <code>optional int64 close_date = 21;</code>
      */
@@ -8762,7 +8695,6 @@ public final class BatchReport {
      */
     long getCloseDate();
 
-    // optional int64 update_date = 22;
     /**
      * <code>optional int64 update_date = 22;</code>
      */
@@ -8772,7 +8704,6 @@ public final class BatchReport {
      */
     long getUpdateDate();
 
-    // optional int64 selected_at = 23;
     /**
      * <code>optional int64 selected_at = 23;</code>
      */
@@ -8782,7 +8713,6 @@ public final class BatchReport {
      */
     long getSelectedAt();
 
-    // optional string diff_fields = 24;
     /**
      * <code>optional string diff_fields = 24;</code>
      */
@@ -8797,7 +8727,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getDiffFieldsBytes();
 
-    // optional bool is_changed = 25;
     /**
      * <code>optional bool is_changed = 25;</code>
      */
@@ -8807,7 +8736,6 @@ public final class BatchReport {
      */
     boolean getIsChanged();
 
-    // optional bool must_send_notification = 26;
     /**
      * <code>optional bool must_send_notification = 26;</code>
      */
@@ -8821,8 +8749,9 @@ public final class BatchReport {
    * Protobuf type {@code Issue}
    */
   public static final class Issue extends
-      com.google.protobuf.GeneratedMessage
-      implements IssueOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Issue)
+      IssueOrBuilder {
     // Use Issue.newBuilder() to construct.
     private Issue(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -8869,13 +8798,15 @@ public final class BatchReport {
               break;
             }
             case 10: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000001;
-              ruleRepository_ = input.readBytes();
+              ruleRepository_ = bs;
               break;
             }
             case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              ruleKey_ = input.readBytes();
+              ruleKey_ = bs;
               break;
             }
             case 24: {
@@ -8884,8 +8815,9 @@ public final class BatchReport {
               break;
             }
             case 34: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000008;
-              msg_ = input.readBytes();
+              msg_ = bs;
               break;
             }
             case 40: {
@@ -8900,11 +8832,12 @@ public final class BatchReport {
               break;
             }
             case 50: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
                 tag_ = new com.google.protobuf.LazyStringArrayList();
                 mutable_bitField0_ |= 0x00000020;
               }
-              tag_.add(input.readBytes());
+              tag_.add(bs);
               break;
             }
             case 57: {
@@ -8918,8 +8851,9 @@ public final class BatchReport {
               break;
             }
             case 74: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000080;
-              uuid_ = input.readBytes();
+              uuid_ = bs;
               break;
             }
             case 80: {
@@ -8928,18 +8862,21 @@ public final class BatchReport {
               break;
             }
             case 90: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000200;
-              resolution_ = input.readBytes();
+              resolution_ = bs;
               break;
             }
             case 98: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000400;
-              status_ = input.readBytes();
+              status_ = bs;
               break;
             }
             case 106: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000800;
-              checksum_ = input.readBytes();
+              checksum_ = bs;
               break;
             }
             case 112: {
@@ -8948,28 +8885,33 @@ public final class BatchReport {
               break;
             }
             case 122: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00002000;
-              reporter_ = input.readBytes();
+              reporter_ = bs;
               break;
             }
             case 130: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00004000;
-              assignee_ = input.readBytes();
+              assignee_ = bs;
               break;
             }
             case 138: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00008000;
-              actionPlanKey_ = input.readBytes();
+              actionPlanKey_ = bs;
               break;
             }
             case 146: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00010000;
-              attributes_ = input.readBytes();
+              attributes_ = bs;
               break;
             }
             case 154: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00020000;
-              authorLogin_ = input.readBytes();
+              authorLogin_ = bs;
               break;
             }
             case 160: {
@@ -8993,8 +8935,9 @@ public final class BatchReport {
               break;
             }
             case 194: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00400000;
-              diffFields_ = input.readBytes();
+              diffFields_ = bs;
               break;
             }
             case 200: {
@@ -9016,7 +8959,7 @@ public final class BatchReport {
             e.getMessage()).setUnfinishedMessage(this);
       } finally {
         if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
-          tag_ = new com.google.protobuf.UnmodifiableLazyStringList(tag_);
+          tag_ = tag_.getUnmodifiableView();
         }
         this.unknownFields = unknownFields.build();
         makeExtensionsImmutable();
@@ -9050,7 +8993,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional string rule_repository = 1;
     public static final int RULE_REPOSITORY_FIELD_NUMBER = 1;
     private java.lang.Object ruleRepository_;
     /**
@@ -9093,7 +9035,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string rule_key = 2;
     public static final int RULE_KEY_FIELD_NUMBER = 2;
     private java.lang.Object ruleKey_;
     /**
@@ -9136,7 +9077,6 @@ public final class BatchReport {
       }
     }
 
-    // optional int32 line = 3;
     public static final int LINE_FIELD_NUMBER = 3;
     private int line_;
     /**
@@ -9152,7 +9092,6 @@ public final class BatchReport {
       return line_;
     }
 
-    // optional string msg = 4;
     public static final int MSG_FIELD_NUMBER = 4;
     private java.lang.Object msg_;
     /**
@@ -9195,7 +9134,6 @@ public final class BatchReport {
       }
     }
 
-    // optional .Severity severity = 5;
     public static final int SEVERITY_FIELD_NUMBER = 5;
     private org.sonar.batch.protocol.Constants.Severity severity_;
     /**
@@ -9211,13 +9149,12 @@ public final class BatchReport {
       return severity_;
     }
 
-    // repeated string tag = 6;
     public static final int TAG_FIELD_NUMBER = 6;
     private com.google.protobuf.LazyStringList tag_;
     /**
      * <code>repeated string tag = 6;</code>
      */
-    public java.util.List<java.lang.String>
+    public com.google.protobuf.ProtocolStringList
         getTagList() {
       return tag_;
     }
@@ -9241,7 +9178,6 @@ public final class BatchReport {
       return tag_.getByteString(index);
     }
 
-    // optional double effort_to_fix = 7;
     public static final int EFFORT_TO_FIX_FIELD_NUMBER = 7;
     private double effortToFix_;
     /**
@@ -9265,7 +9201,6 @@ public final class BatchReport {
       return effortToFix_;
     }
 
-    // optional bool is_new = 8;
     public static final int IS_NEW_FIELD_NUMBER = 8;
     private boolean isNew_;
     /**
@@ -9281,7 +9216,6 @@ public final class BatchReport {
       return isNew_;
     }
 
-    // optional string uuid = 9;
     public static final int UUID_FIELD_NUMBER = 9;
     private java.lang.Object uuid_;
     /**
@@ -9324,7 +9258,6 @@ public final class BatchReport {
       }
     }
 
-    // optional int64 debt_in_minutes = 10;
     public static final int DEBT_IN_MINUTES_FIELD_NUMBER = 10;
     private long debtInMinutes_;
     /**
@@ -9340,7 +9273,6 @@ public final class BatchReport {
       return debtInMinutes_;
     }
 
-    // optional string resolution = 11;
     public static final int RESOLUTION_FIELD_NUMBER = 11;
     private java.lang.Object resolution_;
     /**
@@ -9383,7 +9315,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string status = 12;
     public static final int STATUS_FIELD_NUMBER = 12;
     private java.lang.Object status_;
     /**
@@ -9426,7 +9357,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string checksum = 13;
     public static final int CHECKSUM_FIELD_NUMBER = 13;
     private java.lang.Object checksum_;
     /**
@@ -9469,7 +9399,6 @@ public final class BatchReport {
       }
     }
 
-    // optional bool manual_severity = 14;
     public static final int MANUAL_SEVERITY_FIELD_NUMBER = 14;
     private boolean manualSeverity_;
     /**
@@ -9485,7 +9414,6 @@ public final class BatchReport {
       return manualSeverity_;
     }
 
-    // optional string reporter = 15;
     public static final int REPORTER_FIELD_NUMBER = 15;
     private java.lang.Object reporter_;
     /**
@@ -9528,7 +9456,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string assignee = 16;
     public static final int ASSIGNEE_FIELD_NUMBER = 16;
     private java.lang.Object assignee_;
     /**
@@ -9571,7 +9498,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string action_plan_key = 17;
     public static final int ACTION_PLAN_KEY_FIELD_NUMBER = 17;
     private java.lang.Object actionPlanKey_;
     /**
@@ -9614,7 +9540,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string attributes = 18;
     public static final int ATTRIBUTES_FIELD_NUMBER = 18;
     private java.lang.Object attributes_;
     /**
@@ -9657,7 +9582,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string author_login = 19;
     public static final int AUTHOR_LOGIN_FIELD_NUMBER = 19;
     private java.lang.Object authorLogin_;
     /**
@@ -9700,7 +9624,6 @@ public final class BatchReport {
       }
     }
 
-    // optional int64 creation_date = 20;
     public static final int CREATION_DATE_FIELD_NUMBER = 20;
     private long creationDate_;
     /**
@@ -9716,7 +9639,6 @@ public final class BatchReport {
       return creationDate_;
     }
 
-    // optional int64 close_date = 21;
     public static final int CLOSE_DATE_FIELD_NUMBER = 21;
     private long closeDate_;
     /**
@@ -9732,7 +9654,6 @@ public final class BatchReport {
       return closeDate_;
     }
 
-    // optional int64 update_date = 22;
     public static final int UPDATE_DATE_FIELD_NUMBER = 22;
     private long updateDate_;
     /**
@@ -9748,7 +9669,6 @@ public final class BatchReport {
       return updateDate_;
     }
 
-    // optional int64 selected_at = 23;
     public static final int SELECTED_AT_FIELD_NUMBER = 23;
     private long selectedAt_;
     /**
@@ -9764,7 +9684,6 @@ public final class BatchReport {
       return selectedAt_;
     }
 
-    // optional string diff_fields = 24;
     public static final int DIFF_FIELDS_FIELD_NUMBER = 24;
     private java.lang.Object diffFields_;
     /**
@@ -9807,7 +9726,6 @@ public final class BatchReport {
       }
     }
 
-    // optional bool is_changed = 25;
     public static final int IS_CHANGED_FIELD_NUMBER = 25;
     private boolean isChanged_;
     /**
@@ -9823,7 +9741,6 @@ public final class BatchReport {
       return isChanged_;
     }
 
-    // optional bool must_send_notification = 26;
     public static final int MUST_SEND_NOTIFICATION_FIELD_NUMBER = 26;
     private boolean mustSendNotification_;
     /**
@@ -9870,7 +9787,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -10157,8 +10075,9 @@ public final class BatchReport {
      * Protobuf type {@code Issue}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Issue)
+        org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Issue_descriptor;
@@ -10292,8 +10211,7 @@ public final class BatchReport {
         }
         result.severity_ = severity_;
         if (((bitField0_ & 0x00000020) == 0x00000020)) {
-          tag_ = new com.google.protobuf.UnmodifiableLazyStringList(
-              tag_);
+          tag_ = tag_.getUnmodifiableView();
           bitField0_ = (bitField0_ & ~0x00000020);
         }
         result.tag_ = tag_;
@@ -10531,7 +10449,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional string rule_repository = 1;
       private java.lang.Object ruleRepository_ = "";
       /**
        * <code>optional string rule_repository = 1;</code>
@@ -10545,9 +10462,12 @@ public final class BatchReport {
       public java.lang.String getRuleRepository() {
         java.lang.Object ref = ruleRepository_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          ruleRepository_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            ruleRepository_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -10605,7 +10525,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string rule_key = 2;
       private java.lang.Object ruleKey_ = "";
       /**
        * <code>optional string rule_key = 2;</code>
@@ -10619,9 +10538,12 @@ public final class BatchReport {
       public java.lang.String getRuleKey() {
         java.lang.Object ref = ruleKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          ruleKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            ruleKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -10679,7 +10601,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 line = 3;
       private int line_ ;
       /**
        * <code>optional int32 line = 3;</code>
@@ -10712,7 +10633,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string msg = 4;
       private java.lang.Object msg_ = "";
       /**
        * <code>optional string msg = 4;</code>
@@ -10726,9 +10646,12 @@ public final class BatchReport {
       public java.lang.String getMsg() {
         java.lang.Object ref = msg_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          msg_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            msg_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -10786,7 +10709,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional .Severity severity = 5;
       private org.sonar.batch.protocol.Constants.Severity severity_ = org.sonar.batch.protocol.Constants.Severity.INFO;
       /**
        * <code>optional .Severity severity = 5;</code>
@@ -10822,7 +10744,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated string tag = 6;
       private com.google.protobuf.LazyStringList tag_ = com.google.protobuf.LazyStringArrayList.EMPTY;
       private void ensureTagIsMutable() {
         if (!((bitField0_ & 0x00000020) == 0x00000020)) {
@@ -10833,9 +10754,9 @@ public final class BatchReport {
       /**
        * <code>repeated string tag = 6;</code>
        */
-      public java.util.List<java.lang.String>
+      public com.google.protobuf.ProtocolStringList
           getTagList() {
-        return java.util.Collections.unmodifiableList(tag_);
+        return tag_.getUnmodifiableView();
       }
       /**
        * <code>repeated string tag = 6;</code>
@@ -10888,7 +10809,8 @@ public final class BatchReport {
       public Builder addAllTag(
           java.lang.Iterable<java.lang.String> values) {
         ensureTagIsMutable();
-        super.addAll(values, tag_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, tag_);
         onChanged();
         return this;
       }
@@ -10915,7 +10837,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional double effort_to_fix = 7;
       private double effortToFix_ ;
       /**
        * <code>optional double effort_to_fix = 7;</code>
@@ -10964,7 +10885,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool is_new = 8;
       private boolean isNew_ ;
       /**
        * <code>optional bool is_new = 8;</code>
@@ -10997,7 +10917,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string uuid = 9;
       private java.lang.Object uuid_ = "";
       /**
        * <code>optional string uuid = 9;</code>
@@ -11011,9 +10930,12 @@ public final class BatchReport {
       public java.lang.String getUuid() {
         java.lang.Object ref = uuid_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          uuid_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            uuid_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11071,7 +10993,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 debt_in_minutes = 10;
       private long debtInMinutes_ ;
       /**
        * <code>optional int64 debt_in_minutes = 10;</code>
@@ -11104,7 +11025,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string resolution = 11;
       private java.lang.Object resolution_ = "";
       /**
        * <code>optional string resolution = 11;</code>
@@ -11118,9 +11038,12 @@ public final class BatchReport {
       public java.lang.String getResolution() {
         java.lang.Object ref = resolution_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          resolution_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            resolution_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11178,7 +11101,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string status = 12;
       private java.lang.Object status_ = "";
       /**
        * <code>optional string status = 12;</code>
@@ -11192,9 +11114,12 @@ public final class BatchReport {
       public java.lang.String getStatus() {
         java.lang.Object ref = status_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          status_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            status_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11252,7 +11177,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string checksum = 13;
       private java.lang.Object checksum_ = "";
       /**
        * <code>optional string checksum = 13;</code>
@@ -11266,9 +11190,12 @@ public final class BatchReport {
       public java.lang.String getChecksum() {
         java.lang.Object ref = checksum_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          checksum_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            checksum_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11326,7 +11253,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool manual_severity = 14;
       private boolean manualSeverity_ ;
       /**
        * <code>optional bool manual_severity = 14;</code>
@@ -11359,7 +11285,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string reporter = 15;
       private java.lang.Object reporter_ = "";
       /**
        * <code>optional string reporter = 15;</code>
@@ -11373,9 +11298,12 @@ public final class BatchReport {
       public java.lang.String getReporter() {
         java.lang.Object ref = reporter_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          reporter_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            reporter_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11433,7 +11361,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string assignee = 16;
       private java.lang.Object assignee_ = "";
       /**
        * <code>optional string assignee = 16;</code>
@@ -11447,9 +11374,12 @@ public final class BatchReport {
       public java.lang.String getAssignee() {
         java.lang.Object ref = assignee_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          assignee_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            assignee_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11507,7 +11437,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string action_plan_key = 17;
       private java.lang.Object actionPlanKey_ = "";
       /**
        * <code>optional string action_plan_key = 17;</code>
@@ -11521,9 +11450,12 @@ public final class BatchReport {
       public java.lang.String getActionPlanKey() {
         java.lang.Object ref = actionPlanKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          actionPlanKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            actionPlanKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11581,7 +11513,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string attributes = 18;
       private java.lang.Object attributes_ = "";
       /**
        * <code>optional string attributes = 18;</code>
@@ -11595,9 +11526,12 @@ public final class BatchReport {
       public java.lang.String getAttributes() {
         java.lang.Object ref = attributes_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          attributes_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            attributes_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11655,7 +11589,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string author_login = 19;
       private java.lang.Object authorLogin_ = "";
       /**
        * <code>optional string author_login = 19;</code>
@@ -11669,9 +11602,12 @@ public final class BatchReport {
       public java.lang.String getAuthorLogin() {
         java.lang.Object ref = authorLogin_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          authorLogin_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            authorLogin_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11729,7 +11665,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 creation_date = 20;
       private long creationDate_ ;
       /**
        * <code>optional int64 creation_date = 20;</code>
@@ -11762,7 +11697,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 close_date = 21;
       private long closeDate_ ;
       /**
        * <code>optional int64 close_date = 21;</code>
@@ -11795,7 +11729,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 update_date = 22;
       private long updateDate_ ;
       /**
        * <code>optional int64 update_date = 22;</code>
@@ -11828,7 +11761,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 selected_at = 23;
       private long selectedAt_ ;
       /**
        * <code>optional int64 selected_at = 23;</code>
@@ -11861,7 +11793,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string diff_fields = 24;
       private java.lang.Object diffFields_ = "";
       /**
        * <code>optional string diff_fields = 24;</code>
@@ -11875,9 +11806,12 @@ public final class BatchReport {
       public java.lang.String getDiffFields() {
         java.lang.Object ref = diffFields_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          diffFields_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            diffFields_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -11935,7 +11869,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool is_changed = 25;
       private boolean isChanged_ ;
       /**
        * <code>optional bool is_changed = 25;</code>
@@ -11968,7 +11901,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool must_send_notification = 26;
       private boolean mustSendNotification_ ;
       /**
        * <code>optional bool must_send_notification = 26;</code>
@@ -12012,10 +11944,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Issue)
   }
 
-  public interface IssuesOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface IssuesOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Issues)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 component_ref = 1;
     /**
      * <code>optional int32 component_ref = 1;</code>
      */
@@ -12025,7 +11957,6 @@ public final class BatchReport {
      */
     int getComponentRef();
 
-    // repeated .Issue issue = 2;
     /**
      * <code>repeated .Issue issue = 2;</code>
      */
@@ -12050,7 +11981,6 @@ public final class BatchReport {
     org.sonar.batch.protocol.output.BatchReport.IssueOrBuilder getIssueOrBuilder(
         int index);
 
-    // optional string component_uuid = 3;
     /**
      * <code>optional string component_uuid = 3;</code>
      *
@@ -12081,8 +12011,9 @@ public final class BatchReport {
    * Protobuf type {@code Issues}
    */
   public static final class Issues extends
-      com.google.protobuf.GeneratedMessage
-      implements IssuesOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Issues)
+      IssuesOrBuilder {
     // Use Issues.newBuilder() to construct.
     private Issues(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -12142,8 +12073,9 @@ public final class BatchReport {
               break;
             }
             case 26: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              componentUuid_ = input.readBytes();
+              componentUuid_ = bs;
               break;
             }
           }
@@ -12189,7 +12121,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 component_ref = 1;
     public static final int COMPONENT_REF_FIELD_NUMBER = 1;
     private int componentRef_;
     /**
@@ -12205,7 +12136,6 @@ public final class BatchReport {
       return componentRef_;
     }
 
-    // repeated .Issue issue = 2;
     public static final int ISSUE_FIELD_NUMBER = 2;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.Issue> issue_;
     /**
@@ -12241,7 +12171,6 @@ public final class BatchReport {
       return issue_.get(index);
     }
 
-    // optional string component_uuid = 3;
     public static final int COMPONENT_UUID_FIELD_NUMBER = 3;
     private java.lang.Object componentUuid_;
     /**
@@ -12304,7 +12233,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -12425,8 +12355,9 @@ public final class BatchReport {
      * Protobuf type {@code Issues}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.IssuesOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Issues)
+        org.sonar.batch.protocol.output.BatchReport.IssuesOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Issues_descriptor;
@@ -12592,7 +12523,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 component_ref = 1;
       private int componentRef_ ;
       /**
        * <code>optional int32 component_ref = 1;</code>
@@ -12625,7 +12555,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .Issue issue = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Issue> issue_ =
         java.util.Collections.emptyList();
       private void ensureIssueIsMutable() {
@@ -12767,7 +12696,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Issue> values) {
         if (issueBuilder_ == null) {
           ensureIssueIsMutable();
-          super.addAll(values, issue_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, issue_);
           onChanged();
         } else {
           issueBuilder_.addAllMessages(values);
@@ -12865,7 +12795,6 @@ public final class BatchReport {
         return issueBuilder_;
       }
 
-      // optional string component_uuid = 3;
       private java.lang.Object componentUuid_ = "";
       /**
        * <code>optional string component_uuid = 3;</code>
@@ -12887,9 +12816,12 @@ public final class BatchReport {
       public java.lang.String getComponentUuid() {
         java.lang.Object ref = componentUuid_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          componentUuid_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            componentUuid_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -12974,10 +12906,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Issues)
   }
 
-  public interface ChangesetsOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface ChangesetsOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Changesets)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 component_ref = 1;
     /**
      * <code>optional int32 component_ref = 1;</code>
      */
@@ -12987,7 +12919,6 @@ public final class BatchReport {
      */
     int getComponentRef();
 
-    // repeated .Changesets.Changeset changeset = 2;
     /**
      * <code>repeated .Changesets.Changeset changeset = 2;</code>
      */
@@ -13012,7 +12943,6 @@ public final class BatchReport {
     org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder getChangesetOrBuilder(
         int index);
 
-    // repeated int32 changesetIndexByLine = 3 [packed = true];
     /**
      * <code>repeated int32 changesetIndexByLine = 3 [packed = true];</code>
      *
@@ -13042,8 +12972,9 @@ public final class BatchReport {
    * Protobuf type {@code Changesets}
    */
   public static final class Changesets extends
-      com.google.protobuf.GeneratedMessage
-      implements ChangesetsOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Changesets)
+      ChangesetsOrBuilder {
     // Use Changesets.newBuilder() to construct.
     private Changesets(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -13168,10 +13099,10 @@ public final class BatchReport {
       return PARSER;
     }
 
-    public interface ChangesetOrBuilder
-        extends com.google.protobuf.MessageOrBuilder {
+    public interface ChangesetOrBuilder extends
+        // @@protoc_insertion_point(interface_extends:Changesets.Changeset)
+        com.google.protobuf.MessageOrBuilder {
 
-      // optional string revision = 1;
       /**
        * <code>optional string revision = 1;</code>
        */
@@ -13186,7 +13117,6 @@ public final class BatchReport {
       com.google.protobuf.ByteString
           getRevisionBytes();
 
-      // optional string author = 2;
       /**
        * <code>optional string author = 2;</code>
        */
@@ -13201,7 +13131,6 @@ public final class BatchReport {
       com.google.protobuf.ByteString
           getAuthorBytes();
 
-      // optional int64 date = 3;
       /**
        * <code>optional int64 date = 3;</code>
        */
@@ -13215,8 +13144,9 @@ public final class BatchReport {
      * Protobuf type {@code Changesets.Changeset}
      */
     public static final class Changeset extends
-        com.google.protobuf.GeneratedMessage
-        implements ChangesetOrBuilder {
+        com.google.protobuf.GeneratedMessage implements
+        // @@protoc_insertion_point(message_implements:Changesets.Changeset)
+        ChangesetOrBuilder {
       // Use Changeset.newBuilder() to construct.
       private Changeset(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
         super(builder);
@@ -13263,13 +13193,15 @@ public final class BatchReport {
                 break;
               }
               case 10: {
+                com.google.protobuf.ByteString bs = input.readBytes();
                 bitField0_ |= 0x00000001;
-                revision_ = input.readBytes();
+                revision_ = bs;
                 break;
               }
               case 18: {
+                com.google.protobuf.ByteString bs = input.readBytes();
                 bitField0_ |= 0x00000002;
-                author_ = input.readBytes();
+                author_ = bs;
                 break;
               }
               case 24: {
@@ -13317,7 +13249,6 @@ public final class BatchReport {
       }
 
       private int bitField0_;
-      // optional string revision = 1;
       public static final int REVISION_FIELD_NUMBER = 1;
       private java.lang.Object revision_;
       /**
@@ -13360,7 +13291,6 @@ public final class BatchReport {
         }
       }
 
-      // optional string author = 2;
       public static final int AUTHOR_FIELD_NUMBER = 2;
       private java.lang.Object author_;
       /**
@@ -13403,7 +13333,6 @@ public final class BatchReport {
         }
       }
 
-      // optional int64 date = 3;
       public static final int DATE_FIELD_NUMBER = 3;
       private long date_;
       /**
@@ -13427,7 +13356,8 @@ public final class BatchReport {
       private byte memoizedIsInitialized = -1;
       public final boolean isInitialized() {
         byte isInitialized = memoizedIsInitialized;
-        if (isInitialized != -1) return isInitialized == 1;
+        if (isInitialized == 1) return true;
+        if (isInitialized == 0) return false;
 
         memoizedIsInitialized = 1;
         return true;
@@ -13548,8 +13478,9 @@ public final class BatchReport {
        * Protobuf type {@code Changesets.Changeset}
        */
       public static final class Builder extends
-          com.google.protobuf.GeneratedMessage.Builder<Builder>
-         implements org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder {
+          com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+          // @@protoc_insertion_point(builder_implements:Changesets.Changeset)
+          org.sonar.batch.protocol.output.BatchReport.Changesets.ChangesetOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_Changeset_descriptor;
@@ -13684,7 +13615,6 @@ public final class BatchReport {
         }
         private int bitField0_;
 
-        // optional string revision = 1;
         private java.lang.Object revision_ = "";
         /**
          * <code>optional string revision = 1;</code>
@@ -13698,9 +13628,12 @@ public final class BatchReport {
         public java.lang.String getRevision() {
           java.lang.Object ref = revision_;
           if (!(ref instanceof java.lang.String)) {
-            java.lang.String s = ((com.google.protobuf.ByteString) ref)
-                .toStringUtf8();
-            revision_ = s;
+            com.google.protobuf.ByteString bs =
+                (com.google.protobuf.ByteString) ref;
+            java.lang.String s = bs.toStringUtf8();
+            if (bs.isValidUtf8()) {
+              revision_ = s;
+            }
             return s;
           } else {
             return (java.lang.String) ref;
@@ -13758,7 +13691,6 @@ public final class BatchReport {
           return this;
         }
 
-        // optional string author = 2;
         private java.lang.Object author_ = "";
         /**
          * <code>optional string author = 2;</code>
@@ -13772,9 +13704,12 @@ public final class BatchReport {
         public java.lang.String getAuthor() {
           java.lang.Object ref = author_;
           if (!(ref instanceof java.lang.String)) {
-            java.lang.String s = ((com.google.protobuf.ByteString) ref)
-                .toStringUtf8();
-            author_ = s;
+            com.google.protobuf.ByteString bs =
+                (com.google.protobuf.ByteString) ref;
+            java.lang.String s = bs.toStringUtf8();
+            if (bs.isValidUtf8()) {
+              author_ = s;
+            }
             return s;
           } else {
             return (java.lang.String) ref;
@@ -13832,7 +13767,6 @@ public final class BatchReport {
           return this;
         }
 
-        // optional int64 date = 3;
         private long date_ ;
         /**
          * <code>optional int64 date = 3;</code>
@@ -13877,7 +13811,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 component_ref = 1;
     public static final int COMPONENT_REF_FIELD_NUMBER = 1;
     private int componentRef_;
     /**
@@ -13893,7 +13826,6 @@ public final class BatchReport {
       return componentRef_;
     }
 
-    // repeated .Changesets.Changeset changeset = 2;
     public static final int CHANGESET_FIELD_NUMBER = 2;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset> changeset_;
     /**
@@ -13929,7 +13861,6 @@ public final class BatchReport {
       return changeset_.get(index);
     }
 
-    // repeated int32 changesetIndexByLine = 3 [packed = true];
     public static final int CHANGESETINDEXBYLINE_FIELD_NUMBER = 3;
     private java.util.List<java.lang.Integer> changesetIndexByLine_;
     /**
@@ -13973,7 +13904,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -14108,8 +14040,9 @@ public final class BatchReport {
      * Protobuf type {@code Changesets}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.ChangesetsOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Changesets)
+        org.sonar.batch.protocol.output.BatchReport.ChangesetsOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Changesets_descriptor;
@@ -14281,7 +14214,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 component_ref = 1;
       private int componentRef_ ;
       /**
        * <code>optional int32 component_ref = 1;</code>
@@ -14314,7 +14246,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .Changesets.Changeset changeset = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset> changeset_ =
         java.util.Collections.emptyList();
       private void ensureChangesetIsMutable() {
@@ -14456,7 +14387,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Changesets.Changeset> values) {
         if (changesetBuilder_ == null) {
           ensureChangesetIsMutable();
-          super.addAll(values, changeset_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, changeset_);
           onChanged();
         } else {
           changesetBuilder_.addAllMessages(values);
@@ -14554,7 +14486,6 @@ public final class BatchReport {
         return changesetBuilder_;
       }
 
-      // repeated int32 changesetIndexByLine = 3 [packed = true];
       private java.util.List<java.lang.Integer> changesetIndexByLine_ = java.util.Collections.emptyList();
       private void ensureChangesetIndexByLineIsMutable() {
         if (!((bitField0_ & 0x00000004) == 0x00000004)) {
@@ -14630,7 +14561,8 @@ public final class BatchReport {
       public Builder addAllChangesetIndexByLine(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureChangesetIndexByLineIsMutable();
-        super.addAll(values, changesetIndexByLine_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, changesetIndexByLine_);
         onChanged();
         return this;
       }
@@ -14659,10 +14591,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Changesets)
   }
 
-  public interface DuplicateOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface DuplicateOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Duplicate)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 other_file_ref = 1;
     /**
      * <code>optional int32 other_file_ref = 1;</code>
      *
@@ -14680,7 +14612,6 @@ public final class BatchReport {
      */
     int getOtherFileRef();
 
-    // optional .Range range = 2;
     /**
      * <code>optional .Range range = 2;</code>
      */
@@ -14694,7 +14625,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder();
 
-    // optional string other_file_key = 3;
     /**
      * <code>optional string other_file_key = 3;</code>
      *
@@ -14725,8 +14655,9 @@ public final class BatchReport {
    * Protobuf type {@code Duplicate}
    */
   public static final class Duplicate extends
-      com.google.protobuf.GeneratedMessage
-      implements DuplicateOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Duplicate)
+      DuplicateOrBuilder {
     // Use Duplicate.newBuilder() to construct.
     private Duplicate(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -14791,8 +14722,9 @@ public final class BatchReport {
               break;
             }
             case 26: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000004;
-              otherFileKey_ = input.readBytes();
+              otherFileKey_ = bs;
               break;
             }
           }
@@ -14835,7 +14767,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 other_file_ref = 1;
     public static final int OTHER_FILE_REF_FIELD_NUMBER = 1;
     private int otherFileRef_;
     /**
@@ -14859,7 +14790,6 @@ public final class BatchReport {
       return otherFileRef_;
     }
 
-    // optional .Range range = 2;
     public static final int RANGE_FIELD_NUMBER = 2;
     private org.sonar.batch.protocol.output.BatchReport.Range range_;
     /**
@@ -14881,7 +14811,6 @@ public final class BatchReport {
       return range_;
     }
 
-    // optional string other_file_key = 3;
     public static final int OTHER_FILE_KEY_FIELD_NUMBER = 3;
     private java.lang.Object otherFileKey_;
     /**
@@ -14944,7 +14873,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -15065,8 +14995,9 @@ public final class BatchReport {
      * Protobuf type {@code Duplicate}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Duplicate)
+        org.sonar.batch.protocol.output.BatchReport.DuplicateOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplicate_descriptor;
@@ -15208,7 +15139,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 other_file_ref = 1;
       private int otherFileRef_ ;
       /**
        * <code>optional int32 other_file_ref = 1;</code>
@@ -15257,7 +15187,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional .Range range = 2;
       private org.sonar.batch.protocol.output.BatchReport.Range range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance();
       private com.google.protobuf.SingleFieldBuilder<
           org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> rangeBuilder_;
@@ -15366,7 +15295,7 @@ public final class BatchReport {
         if (rangeBuilder_ == null) {
           rangeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>(
-                  range_,
+                  getRange(),
                   getParentForChildren(),
                   isClean());
           range_ = null;
@@ -15374,7 +15303,6 @@ public final class BatchReport {
         return rangeBuilder_;
       }
 
-      // optional string other_file_key = 3;
       private java.lang.Object otherFileKey_ = "";
       /**
        * <code>optional string other_file_key = 3;</code>
@@ -15396,9 +15324,12 @@ public final class BatchReport {
       public java.lang.String getOtherFileKey() {
         java.lang.Object ref = otherFileKey_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          otherFileKey_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            otherFileKey_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -15483,10 +15414,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Duplicate)
   }
 
-  public interface DuplicationOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface DuplicationOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Duplication)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional .Range origin_position = 1;
     /**
      * <code>optional .Range origin_position = 1;</code>
      *
@@ -15512,7 +15443,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getOriginPositionOrBuilder();
 
-    // repeated .Duplicate duplicate = 2;
     /**
      * <code>repeated .Duplicate duplicate = 2;</code>
      */
@@ -15541,8 +15471,9 @@ public final class BatchReport {
    * Protobuf type {@code Duplication}
    */
   public static final class Duplication extends
-      com.google.protobuf.GeneratedMessage
-      implements DuplicationOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Duplication)
+      DuplicationOrBuilder {
     // Use Duplication.newBuilder() to construct.
     private Duplication(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -15652,7 +15583,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional .Range origin_position = 1;
     public static final int ORIGIN_POSITION_FIELD_NUMBER = 1;
     private org.sonar.batch.protocol.output.BatchReport.Range originPosition_;
     /**
@@ -15686,7 +15616,6 @@ public final class BatchReport {
       return originPosition_;
     }
 
-    // repeated .Duplicate duplicate = 2;
     public static final int DUPLICATE_FIELD_NUMBER = 2;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.Duplicate> duplicate_;
     /**
@@ -15729,7 +15658,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -15843,8 +15773,9 @@ public final class BatchReport {
      * Protobuf type {@code Duplication}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Duplication)
+        org.sonar.batch.protocol.output.BatchReport.DuplicationOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplication_descriptor;
@@ -16008,7 +15939,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional .Range origin_position = 1;
       private org.sonar.batch.protocol.output.BatchReport.Range originPosition_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance();
       private com.google.protobuf.SingleFieldBuilder<
           org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> originPositionBuilder_;
@@ -16153,7 +16083,7 @@ public final class BatchReport {
         if (originPositionBuilder_ == null) {
           originPositionBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>(
-                  originPosition_,
+                  getOriginPosition(),
                   getParentForChildren(),
                   isClean());
           originPosition_ = null;
@@ -16161,7 +16091,6 @@ public final class BatchReport {
         return originPositionBuilder_;
       }
 
-      // repeated .Duplicate duplicate = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Duplicate> duplicate_ =
         java.util.Collections.emptyList();
       private void ensureDuplicateIsMutable() {
@@ -16303,7 +16232,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Duplicate> values) {
         if (duplicateBuilder_ == null) {
           ensureDuplicateIsMutable();
-          super.addAll(values, duplicate_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, duplicate_);
           onChanged();
         } else {
           duplicateBuilder_.addAllMessages(values);
@@ -16412,10 +16342,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Duplication)
   }
 
-  public interface DuplicationsOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface DuplicationsOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Duplications)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 component_ref = 1;
     /**
      * <code>optional int32 component_ref = 1;</code>
      */
@@ -16425,7 +16355,6 @@ public final class BatchReport {
      */
     int getComponentRef();
 
-    // repeated .Duplication duplication = 2;
     /**
      * <code>repeated .Duplication duplication = 2;</code>
      */
@@ -16454,8 +16383,9 @@ public final class BatchReport {
    * Protobuf type {@code Duplications}
    */
   public static final class Duplications extends
-      com.google.protobuf.GeneratedMessage
-      implements DuplicationsOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Duplications)
+      DuplicationsOrBuilder {
     // Use Duplications.newBuilder() to construct.
     private Duplications(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -16557,7 +16487,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 component_ref = 1;
     public static final int COMPONENT_REF_FIELD_NUMBER = 1;
     private int componentRef_;
     /**
@@ -16573,7 +16502,6 @@ public final class BatchReport {
       return componentRef_;
     }
 
-    // repeated .Duplication duplication = 2;
     public static final int DUPLICATION_FIELD_NUMBER = 2;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.Duplication> duplication_;
     /**
@@ -16616,7 +16544,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -16730,8 +16659,9 @@ public final class BatchReport {
      * Protobuf type {@code Duplications}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.DuplicationsOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Duplications)
+        org.sonar.batch.protocol.output.BatchReport.DuplicationsOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Duplications_descriptor;
@@ -16886,7 +16816,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 component_ref = 1;
       private int componentRef_ ;
       /**
        * <code>optional int32 component_ref = 1;</code>
@@ -16919,7 +16848,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .Duplication duplication = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Duplication> duplication_ =
         java.util.Collections.emptyList();
       private void ensureDuplicationIsMutable() {
@@ -17061,7 +16989,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Duplication> values) {
         if (duplicationBuilder_ == null) {
           ensureDuplicationIsMutable();
-          super.addAll(values, duplication_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, duplication_);
           onChanged();
         } else {
           duplicationBuilder_.addAllMessages(values);
@@ -17170,10 +17099,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Duplications)
   }
 
-  public interface RangeOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface RangeOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Range)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 start_line = 1;
     /**
      * <code>optional int32 start_line = 1;</code>
      *
@@ -17191,7 +17120,6 @@ public final class BatchReport {
      */
     int getStartLine();
 
-    // optional int32 end_line = 2;
     /**
      * <code>optional int32 end_line = 2;</code>
      *
@@ -17209,7 +17137,6 @@ public final class BatchReport {
      */
     int getEndLine();
 
-    // optional int32 start_offset = 3;
     /**
      * <code>optional int32 start_offset = 3;</code>
      *
@@ -17227,7 +17154,6 @@ public final class BatchReport {
      */
     int getStartOffset();
 
-    // optional int32 end_offset = 4;
     /**
      * <code>optional int32 end_offset = 4;</code>
      *
@@ -17253,8 +17179,9 @@ public final class BatchReport {
    * </pre>
    */
   public static final class Range extends
-      com.google.protobuf.GeneratedMessage
-      implements RangeOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Range)
+      RangeOrBuilder {
     // Use Range.newBuilder() to construct.
     private Range(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -17360,7 +17287,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 start_line = 1;
     public static final int START_LINE_FIELD_NUMBER = 1;
     private int startLine_;
     /**
@@ -17384,7 +17310,6 @@ public final class BatchReport {
       return startLine_;
     }
 
-    // optional int32 end_line = 2;
     public static final int END_LINE_FIELD_NUMBER = 2;
     private int endLine_;
     /**
@@ -17408,7 +17333,6 @@ public final class BatchReport {
       return endLine_;
     }
 
-    // optional int32 start_offset = 3;
     public static final int START_OFFSET_FIELD_NUMBER = 3;
     private int startOffset_;
     /**
@@ -17432,7 +17356,6 @@ public final class BatchReport {
       return startOffset_;
     }
 
-    // optional int32 end_offset = 4;
     public static final int END_OFFSET_FIELD_NUMBER = 4;
     private int endOffset_;
     /**
@@ -17465,7 +17388,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -17597,8 +17521,9 @@ public final class BatchReport {
      * </pre>
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Range)
+        org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Range_descriptor;
@@ -17738,7 +17663,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 start_line = 1;
       private int startLine_ ;
       /**
        * <code>optional int32 start_line = 1;</code>
@@ -17787,7 +17711,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 end_line = 2;
       private int endLine_ ;
       /**
        * <code>optional int32 end_line = 2;</code>
@@ -17836,7 +17759,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 start_offset = 3;
       private int startOffset_ ;
       /**
        * <code>optional int32 start_offset = 3;</code>
@@ -17885,7 +17807,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 end_offset = 4;
       private int endOffset_ ;
       /**
        * <code>optional int32 end_offset = 4;</code>
@@ -17945,10 +17866,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Range)
   }
 
-  public interface SymbolsOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface SymbolsOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Symbols)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 file_ref = 1;
     /**
      * <code>optional int32 file_ref = 1;</code>
      */
@@ -17958,7 +17879,6 @@ public final class BatchReport {
      */
     int getFileRef();
 
-    // repeated .Symbols.Symbol symbol = 2;
     /**
      * <code>repeated .Symbols.Symbol symbol = 2;</code>
      */
@@ -17987,8 +17907,9 @@ public final class BatchReport {
    * Protobuf type {@code Symbols}
    */
   public static final class Symbols extends
-      com.google.protobuf.GeneratedMessage
-      implements SymbolsOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Symbols)
+      SymbolsOrBuilder {
     // Use Symbols.newBuilder() to construct.
     private Symbols(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -18089,10 +18010,10 @@ public final class BatchReport {
       return PARSER;
     }
 
-    public interface SymbolOrBuilder
-        extends com.google.protobuf.MessageOrBuilder {
+    public interface SymbolOrBuilder extends
+        // @@protoc_insertion_point(interface_extends:Symbols.Symbol)
+        com.google.protobuf.MessageOrBuilder {
 
-      // optional .Range declaration = 1;
       /**
        * <code>optional .Range declaration = 1;</code>
        */
@@ -18106,7 +18027,6 @@ public final class BatchReport {
        */
       org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getDeclarationOrBuilder();
 
-      // repeated .Range reference = 2;
       /**
        * <code>repeated .Range reference = 2;</code>
        */
@@ -18135,8 +18055,9 @@ public final class BatchReport {
      * Protobuf type {@code Symbols.Symbol}
      */
     public static final class Symbol extends
-        com.google.protobuf.GeneratedMessage
-        implements SymbolOrBuilder {
+        com.google.protobuf.GeneratedMessage implements
+        // @@protoc_insertion_point(message_implements:Symbols.Symbol)
+        SymbolOrBuilder {
       // Use Symbol.newBuilder() to construct.
       private Symbol(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
         super(builder);
@@ -18246,7 +18167,6 @@ public final class BatchReport {
       }
 
       private int bitField0_;
-      // optional .Range declaration = 1;
       public static final int DECLARATION_FIELD_NUMBER = 1;
       private org.sonar.batch.protocol.output.BatchReport.Range declaration_;
       /**
@@ -18268,7 +18188,6 @@ public final class BatchReport {
         return declaration_;
       }
 
-      // repeated .Range reference = 2;
       public static final int REFERENCE_FIELD_NUMBER = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Range> reference_;
       /**
@@ -18311,7 +18230,8 @@ public final class BatchReport {
       private byte memoizedIsInitialized = -1;
       public final boolean isInitialized() {
         byte isInitialized = memoizedIsInitialized;
-        if (isInitialized != -1) return isInitialized == 1;
+        if (isInitialized == 1) return true;
+        if (isInitialized == 0) return false;
 
         memoizedIsInitialized = 1;
         return true;
@@ -18425,8 +18345,9 @@ public final class BatchReport {
        * Protobuf type {@code Symbols.Symbol}
        */
       public static final class Builder extends
-          com.google.protobuf.GeneratedMessage.Builder<Builder>
-         implements org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder {
+          com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+          // @@protoc_insertion_point(builder_implements:Symbols.Symbol)
+          org.sonar.batch.protocol.output.BatchReport.Symbols.SymbolOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_Symbol_descriptor;
@@ -18590,7 +18511,6 @@ public final class BatchReport {
         }
         private int bitField0_;
 
-        // optional .Range declaration = 1;
         private org.sonar.batch.protocol.output.BatchReport.Range declaration_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance();
         private com.google.protobuf.SingleFieldBuilder<
             org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> declarationBuilder_;
@@ -18699,7 +18619,7 @@ public final class BatchReport {
           if (declarationBuilder_ == null) {
             declarationBuilder_ = new com.google.protobuf.SingleFieldBuilder<
                 org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>(
-                    declaration_,
+                    getDeclaration(),
                     getParentForChildren(),
                     isClean());
             declaration_ = null;
@@ -18707,7 +18627,6 @@ public final class BatchReport {
           return declarationBuilder_;
         }
 
-        // repeated .Range reference = 2;
         private java.util.List<org.sonar.batch.protocol.output.BatchReport.Range> reference_ =
           java.util.Collections.emptyList();
         private void ensureReferenceIsMutable() {
@@ -18849,7 +18768,8 @@ public final class BatchReport {
             java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Range> values) {
           if (referenceBuilder_ == null) {
             ensureReferenceIsMutable();
-            super.addAll(values, reference_);
+            com.google.protobuf.AbstractMessageLite.Builder.addAll(
+                values, reference_);
             onChanged();
           } else {
             referenceBuilder_.addAllMessages(values);
@@ -18959,7 +18879,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 file_ref = 1;
     public static final int FILE_REF_FIELD_NUMBER = 1;
     private int fileRef_;
     /**
@@ -18975,7 +18894,6 @@ public final class BatchReport {
       return fileRef_;
     }
 
-    // repeated .Symbols.Symbol symbol = 2;
     public static final int SYMBOL_FIELD_NUMBER = 2;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol> symbol_;
     /**
@@ -19018,7 +18936,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -19132,8 +19051,9 @@ public final class BatchReport {
      * Protobuf type {@code Symbols}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.SymbolsOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Symbols)
+        org.sonar.batch.protocol.output.BatchReport.SymbolsOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Symbols_descriptor;
@@ -19288,7 +19208,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 file_ref = 1;
       private int fileRef_ ;
       /**
        * <code>optional int32 file_ref = 1;</code>
@@ -19321,7 +19240,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .Symbols.Symbol symbol = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol> symbol_ =
         java.util.Collections.emptyList();
       private void ensureSymbolIsMutable() {
@@ -19463,7 +19381,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.Symbols.Symbol> values) {
         if (symbolBuilder_ == null) {
           ensureSymbolIsMutable();
-          super.addAll(values, symbol_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, symbol_);
           onChanged();
         } else {
           symbolBuilder_.addAllMessages(values);
@@ -19572,10 +19491,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Symbols)
   }
 
-  public interface CoverageOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface CoverageOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Coverage)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 line = 1;
     /**
      * <code>optional int32 line = 1;</code>
      */
@@ -19585,7 +19504,6 @@ public final class BatchReport {
      */
     int getLine();
 
-    // optional int32 conditions = 2;
     /**
      * <code>optional int32 conditions = 2;</code>
      *
@@ -19603,7 +19521,6 @@ public final class BatchReport {
      */
     int getConditions();
 
-    // optional bool ut_hits = 3;
     /**
      * <code>optional bool ut_hits = 3;</code>
      */
@@ -19613,7 +19530,6 @@ public final class BatchReport {
      */
     boolean getUtHits();
 
-    // optional bool it_hits = 4;
     /**
      * <code>optional bool it_hits = 4;</code>
      */
@@ -19623,7 +19539,6 @@ public final class BatchReport {
      */
     boolean getItHits();
 
-    // optional int32 ut_covered_conditions = 5;
     /**
      * <code>optional int32 ut_covered_conditions = 5;</code>
      */
@@ -19633,7 +19548,6 @@ public final class BatchReport {
      */
     int getUtCoveredConditions();
 
-    // optional int32 it_covered_conditions = 6;
     /**
      * <code>optional int32 it_covered_conditions = 6;</code>
      */
@@ -19643,7 +19557,6 @@ public final class BatchReport {
      */
     int getItCoveredConditions();
 
-    // optional int32 overall_covered_conditions = 7;
     /**
      * <code>optional int32 overall_covered_conditions = 7;</code>
      */
@@ -19662,8 +19575,9 @@ public final class BatchReport {
    * </pre>
    */
   public static final class Coverage extends
-      com.google.protobuf.GeneratedMessage
-      implements CoverageOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Coverage)
+      CoverageOrBuilder {
     // Use Coverage.newBuilder() to construct.
     private Coverage(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -19784,7 +19698,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 line = 1;
     public static final int LINE_FIELD_NUMBER = 1;
     private int line_;
     /**
@@ -19800,7 +19713,6 @@ public final class BatchReport {
       return line_;
     }
 
-    // optional int32 conditions = 2;
     public static final int CONDITIONS_FIELD_NUMBER = 2;
     private int conditions_;
     /**
@@ -19824,7 +19736,6 @@ public final class BatchReport {
       return conditions_;
     }
 
-    // optional bool ut_hits = 3;
     public static final int UT_HITS_FIELD_NUMBER = 3;
     private boolean utHits_;
     /**
@@ -19840,7 +19751,6 @@ public final class BatchReport {
       return utHits_;
     }
 
-    // optional bool it_hits = 4;
     public static final int IT_HITS_FIELD_NUMBER = 4;
     private boolean itHits_;
     /**
@@ -19856,7 +19766,6 @@ public final class BatchReport {
       return itHits_;
     }
 
-    // optional int32 ut_covered_conditions = 5;
     public static final int UT_COVERED_CONDITIONS_FIELD_NUMBER = 5;
     private int utCoveredConditions_;
     /**
@@ -19872,7 +19781,6 @@ public final class BatchReport {
       return utCoveredConditions_;
     }
 
-    // optional int32 it_covered_conditions = 6;
     public static final int IT_COVERED_CONDITIONS_FIELD_NUMBER = 6;
     private int itCoveredConditions_;
     /**
@@ -19888,7 +19796,6 @@ public final class BatchReport {
       return itCoveredConditions_;
     }
 
-    // optional int32 overall_covered_conditions = 7;
     public static final int OVERALL_COVERED_CONDITIONS_FIELD_NUMBER = 7;
     private int overallCoveredConditions_;
     /**
@@ -19916,7 +19823,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -20070,8 +19978,9 @@ public final class BatchReport {
      * </pre>
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.CoverageOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Coverage)
+        org.sonar.batch.protocol.output.BatchReport.CoverageOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Coverage_descriptor;
@@ -20238,7 +20147,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 line = 1;
       private int line_ ;
       /**
        * <code>optional int32 line = 1;</code>
@@ -20271,7 +20179,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 conditions = 2;
       private int conditions_ ;
       /**
        * <code>optional int32 conditions = 2;</code>
@@ -20320,7 +20227,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool ut_hits = 3;
       private boolean utHits_ ;
       /**
        * <code>optional bool ut_hits = 3;</code>
@@ -20353,7 +20259,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional bool it_hits = 4;
       private boolean itHits_ ;
       /**
        * <code>optional bool it_hits = 4;</code>
@@ -20386,7 +20291,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 ut_covered_conditions = 5;
       private int utCoveredConditions_ ;
       /**
        * <code>optional int32 ut_covered_conditions = 5;</code>
@@ -20419,7 +20323,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 it_covered_conditions = 6;
       private int itCoveredConditions_ ;
       /**
        * <code>optional int32 it_covered_conditions = 6;</code>
@@ -20452,7 +20355,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 overall_covered_conditions = 7;
       private int overallCoveredConditions_ ;
       /**
        * <code>optional int32 overall_covered_conditions = 7;</code>
@@ -20496,10 +20398,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Coverage)
   }
 
-  public interface SyntaxHighlightingOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface SyntaxHighlightingOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:SyntaxHighlighting)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional .Range range = 1;
     /**
      * <code>optional .Range range = 1;</code>
      */
@@ -20513,7 +20415,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder getRangeOrBuilder();
 
-    // optional .HighlightingType type = 2;
     /**
      * <code>optional .HighlightingType type = 2;</code>
      */
@@ -20532,8 +20433,9 @@ public final class BatchReport {
    * </pre>
    */
   public static final class SyntaxHighlighting extends
-      com.google.protobuf.GeneratedMessage
-      implements SyntaxHighlightingOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:SyntaxHighlighting)
+      SyntaxHighlightingOrBuilder {
     // Use SyntaxHighlighting.newBuilder() to construct.
     private SyntaxHighlighting(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -20643,7 +20545,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional .Range range = 1;
     public static final int RANGE_FIELD_NUMBER = 1;
     private org.sonar.batch.protocol.output.BatchReport.Range range_;
     /**
@@ -20665,7 +20566,6 @@ public final class BatchReport {
       return range_;
     }
 
-    // optional .HighlightingType type = 2;
     public static final int TYPE_FIELD_NUMBER = 2;
     private org.sonar.batch.protocol.Constants.HighlightingType type_;
     /**
@@ -20688,7 +20588,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -20807,8 +20708,9 @@ public final class BatchReport {
      * </pre>
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.SyntaxHighlightingOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:SyntaxHighlighting)
+        org.sonar.batch.protocol.output.BatchReport.SyntaxHighlightingOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_SyntaxHighlighting_descriptor;
@@ -20939,7 +20841,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional .Range range = 1;
       private org.sonar.batch.protocol.output.BatchReport.Range range_ = org.sonar.batch.protocol.output.BatchReport.Range.getDefaultInstance();
       private com.google.protobuf.SingleFieldBuilder<
           org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder> rangeBuilder_;
@@ -21048,7 +20949,7 @@ public final class BatchReport {
         if (rangeBuilder_ == null) {
           rangeBuilder_ = new com.google.protobuf.SingleFieldBuilder<
               org.sonar.batch.protocol.output.BatchReport.Range, org.sonar.batch.protocol.output.BatchReport.Range.Builder, org.sonar.batch.protocol.output.BatchReport.RangeOrBuilder>(
-                  range_,
+                  getRange(),
                   getParentForChildren(),
                   isClean());
           range_ = null;
@@ -21056,7 +20957,6 @@ public final class BatchReport {
         return rangeBuilder_;
       }
 
-      // optional .HighlightingType type = 2;
       private org.sonar.batch.protocol.Constants.HighlightingType type_ = org.sonar.batch.protocol.Constants.HighlightingType.ANNOTATION;
       /**
        * <code>optional .HighlightingType type = 2;</code>
@@ -21103,10 +21003,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:SyntaxHighlighting)
   }
 
-  public interface TestOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface TestOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Test)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional string name = 1;
     /**
      * <code>optional string name = 1;</code>
      */
@@ -21121,7 +21021,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getNameBytes();
 
-    // optional .TestStatus status = 2;
     /**
      * <code>optional .TestStatus status = 2;</code>
      */
@@ -21131,7 +21030,6 @@ public final class BatchReport {
      */
     org.sonar.batch.protocol.Constants.TestStatus getStatus();
 
-    // optional int64 duration_in_ms = 3;
     /**
      * <code>optional int64 duration_in_ms = 3;</code>
      */
@@ -21141,7 +21039,6 @@ public final class BatchReport {
      */
     long getDurationInMs();
 
-    // optional string stacktrace = 4;
     /**
      * <code>optional string stacktrace = 4;</code>
      */
@@ -21156,7 +21053,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getStacktraceBytes();
 
-    // optional string msg = 5;
     /**
      * <code>optional string msg = 5;</code>
      */
@@ -21175,8 +21071,9 @@ public final class BatchReport {
    * Protobuf type {@code Test}
    */
   public static final class Test extends
-      com.google.protobuf.GeneratedMessage
-      implements TestOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Test)
+      TestOrBuilder {
     // Use Test.newBuilder() to construct.
     private Test(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -21223,8 +21120,9 @@ public final class BatchReport {
               break;
             }
             case 10: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000001;
-              name_ = input.readBytes();
+              name_ = bs;
               break;
             }
             case 16: {
@@ -21244,13 +21142,15 @@ public final class BatchReport {
               break;
             }
             case 34: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000008;
-              stacktrace_ = input.readBytes();
+              stacktrace_ = bs;
               break;
             }
             case 42: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000010;
-              msg_ = input.readBytes();
+              msg_ = bs;
               break;
             }
           }
@@ -21293,7 +21193,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional string name = 1;
     public static final int NAME_FIELD_NUMBER = 1;
     private java.lang.Object name_;
     /**
@@ -21336,7 +21235,6 @@ public final class BatchReport {
       }
     }
 
-    // optional .TestStatus status = 2;
     public static final int STATUS_FIELD_NUMBER = 2;
     private org.sonar.batch.protocol.Constants.TestStatus status_;
     /**
@@ -21352,7 +21250,6 @@ public final class BatchReport {
       return status_;
     }
 
-    // optional int64 duration_in_ms = 3;
     public static final int DURATION_IN_MS_FIELD_NUMBER = 3;
     private long durationInMs_;
     /**
@@ -21368,7 +21265,6 @@ public final class BatchReport {
       return durationInMs_;
     }
 
-    // optional string stacktrace = 4;
     public static final int STACKTRACE_FIELD_NUMBER = 4;
     private java.lang.Object stacktrace_;
     /**
@@ -21411,7 +21307,6 @@ public final class BatchReport {
       }
     }
 
-    // optional string msg = 5;
     public static final int MSG_FIELD_NUMBER = 5;
     private java.lang.Object msg_;
     /**
@@ -21464,7 +21359,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -21599,8 +21495,9 @@ public final class BatchReport {
      * Protobuf type {@code Test}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.TestOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Test)
+        org.sonar.batch.protocol.output.BatchReport.TestOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_Test_descriptor;
@@ -21755,7 +21652,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional string name = 1;
       private java.lang.Object name_ = "";
       /**
        * <code>optional string name = 1;</code>
@@ -21769,9 +21665,12 @@ public final class BatchReport {
       public java.lang.String getName() {
         java.lang.Object ref = name_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          name_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            name_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -21829,7 +21728,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional .TestStatus status = 2;
       private org.sonar.batch.protocol.Constants.TestStatus status_ = org.sonar.batch.protocol.Constants.TestStatus.OK;
       /**
        * <code>optional .TestStatus status = 2;</code>
@@ -21865,7 +21763,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int64 duration_in_ms = 3;
       private long durationInMs_ ;
       /**
        * <code>optional int64 duration_in_ms = 3;</code>
@@ -21898,7 +21795,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string stacktrace = 4;
       private java.lang.Object stacktrace_ = "";
       /**
        * <code>optional string stacktrace = 4;</code>
@@ -21912,9 +21808,12 @@ public final class BatchReport {
       public java.lang.String getStacktrace() {
         java.lang.Object ref = stacktrace_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          stacktrace_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            stacktrace_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -21972,7 +21871,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional string msg = 5;
       private java.lang.Object msg_ = "";
       /**
        * <code>optional string msg = 5;</code>
@@ -21986,9 +21884,12 @@ public final class BatchReport {
       public java.lang.String getMsg() {
         java.lang.Object ref = msg_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          msg_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            msg_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -22057,10 +21958,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:Test)
   }
 
-  public interface CoverageDetailOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface CoverageDetailOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:CoverageDetail)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional string test_name = 1;
     /**
      * <code>optional string test_name = 1;</code>
      */
@@ -22075,7 +21976,6 @@ public final class BatchReport {
     com.google.protobuf.ByteString
         getTestNameBytes();
 
-    // repeated .CoverageDetail.CoveredFile covered_file = 2;
     /**
      * <code>repeated .CoverageDetail.CoveredFile covered_file = 2;</code>
      */
@@ -22104,8 +22004,9 @@ public final class BatchReport {
    * Protobuf type {@code CoverageDetail}
    */
   public static final class CoverageDetail extends
-      com.google.protobuf.GeneratedMessage
-      implements CoverageDetailOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:CoverageDetail)
+      CoverageDetailOrBuilder {
     // Use CoverageDetail.newBuilder() to construct.
     private CoverageDetail(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -22152,8 +22053,9 @@ public final class BatchReport {
               break;
             }
             case 10: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000001;
-              testName_ = input.readBytes();
+              testName_ = bs;
               break;
             }
             case 18: {
@@ -22206,10 +22108,10 @@ public final class BatchReport {
       return PARSER;
     }
 
-    public interface CoveredFileOrBuilder
-        extends com.google.protobuf.MessageOrBuilder {
+    public interface CoveredFileOrBuilder extends
+        // @@protoc_insertion_point(interface_extends:CoverageDetail.CoveredFile)
+        com.google.protobuf.MessageOrBuilder {
 
-      // optional int32 file_ref = 1;
       /**
        * <code>optional int32 file_ref = 1;</code>
        */
@@ -22219,7 +22121,6 @@ public final class BatchReport {
        */
       int getFileRef();
 
-      // repeated int32 covered_line = 2 [packed = true];
       /**
        * <code>repeated int32 covered_line = 2 [packed = true];</code>
        */
@@ -22237,8 +22138,9 @@ public final class BatchReport {
      * Protobuf type {@code CoverageDetail.CoveredFile}
      */
     public static final class CoveredFile extends
-        com.google.protobuf.GeneratedMessage
-        implements CoveredFileOrBuilder {
+        com.google.protobuf.GeneratedMessage implements
+        // @@protoc_insertion_point(message_implements:CoverageDetail.CoveredFile)
+        CoveredFileOrBuilder {
       // Use CoveredFile.newBuilder() to construct.
       private CoveredFile(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
         super(builder);
@@ -22353,7 +22255,6 @@ public final class BatchReport {
       }
 
       private int bitField0_;
-      // optional int32 file_ref = 1;
       public static final int FILE_REF_FIELD_NUMBER = 1;
       private int fileRef_;
       /**
@@ -22369,7 +22270,6 @@ public final class BatchReport {
         return fileRef_;
       }
 
-      // repeated int32 covered_line = 2 [packed = true];
       public static final int COVERED_LINE_FIELD_NUMBER = 2;
       private java.util.List<java.lang.Integer> coveredLine_;
       /**
@@ -22400,7 +22300,8 @@ public final class BatchReport {
       private byte memoizedIsInitialized = -1;
       public final boolean isInitialized() {
         byte isInitialized = memoizedIsInitialized;
-        if (isInitialized != -1) return isInitialized == 1;
+        if (isInitialized == 1) return true;
+        if (isInitialized == 0) return false;
 
         memoizedIsInitialized = 1;
         return true;
@@ -22528,8 +22429,9 @@ public final class BatchReport {
        * Protobuf type {@code CoverageDetail.CoveredFile}
        */
       public static final class Builder extends
-          com.google.protobuf.GeneratedMessage.Builder<Builder>
-         implements org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFileOrBuilder {
+          com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+          // @@protoc_insertion_point(builder_implements:CoverageDetail.CoveredFile)
+          org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFileOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.sonar.batch.protocol.output.BatchReport.internal_static_CoverageDetail_CoveredFile_descriptor;
@@ -22659,7 +22561,6 @@ public final class BatchReport {
         }
         private int bitField0_;
 
-        // optional int32 file_ref = 1;
         private int fileRef_ ;
         /**
          * <code>optional int32 file_ref = 1;</code>
@@ -22692,7 +22593,6 @@ public final class BatchReport {
           return this;
         }
 
-        // repeated int32 covered_line = 2 [packed = true];
         private java.util.List<java.lang.Integer> coveredLine_ = java.util.Collections.emptyList();
         private void ensureCoveredLineIsMutable() {
           if (!((bitField0_ & 0x00000002) == 0x00000002)) {
@@ -22744,7 +22644,8 @@ public final class BatchReport {
         public Builder addAllCoveredLine(
             java.lang.Iterable<? extends java.lang.Integer> values) {
           ensureCoveredLineIsMutable();
-          super.addAll(values, coveredLine_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, coveredLine_);
           onChanged();
           return this;
         }
@@ -22770,7 +22671,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional string test_name = 1;
     public static final int TEST_NAME_FIELD_NUMBER = 1;
     private java.lang.Object testName_;
     /**
@@ -22813,7 +22713,6 @@ public final class BatchReport {
       }
     }
 
-    // repeated .CoverageDetail.CoveredFile covered_file = 2;
     public static final int COVERED_FILE_FIELD_NUMBER = 2;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile> coveredFile_;
     /**
@@ -22856,7 +22755,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -22970,8 +22870,9 @@ public final class BatchReport {
      * Protobuf type {@code CoverageDetail}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.CoverageDetailOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:CoverageDetail)
+        org.sonar.batch.protocol.output.BatchReport.CoverageDetailOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_CoverageDetail_descriptor;
@@ -23128,7 +23029,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional string test_name = 1;
       private java.lang.Object testName_ = "";
       /**
        * <code>optional string test_name = 1;</code>
@@ -23142,9 +23042,12 @@ public final class BatchReport {
       public java.lang.String getTestName() {
         java.lang.Object ref = testName_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          testName_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            testName_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -23202,7 +23105,6 @@ public final class BatchReport {
         return this;
       }
 
-      // repeated .CoverageDetail.CoveredFile covered_file = 2;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile> coveredFile_ =
         java.util.Collections.emptyList();
       private void ensureCoveredFileIsMutable() {
@@ -23344,7 +23246,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.CoverageDetail.CoveredFile> values) {
         if (coveredFileBuilder_ == null) {
           ensureCoveredFileIsMutable();
-          super.addAll(values, coveredFile_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, coveredFile_);
           onChanged();
         } else {
           coveredFileBuilder_.addAllMessages(values);
@@ -23453,10 +23356,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:CoverageDetail)
   }
 
-  public interface FileDependencyOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface FileDependencyOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:FileDependency)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 to_file_ref = 1;
     /**
      * <code>optional int32 to_file_ref = 1;</code>
      */
@@ -23466,7 +23369,6 @@ public final class BatchReport {
      */
     int getToFileRef();
 
-    // optional int32 weight = 2;
     /**
      * <code>optional int32 weight = 2;</code>
      */
@@ -23480,8 +23382,9 @@ public final class BatchReport {
    * Protobuf type {@code FileDependency}
    */
   public static final class FileDependency extends
-      com.google.protobuf.GeneratedMessage
-      implements FileDependencyOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:FileDependency)
+      FileDependencyOrBuilder {
     // Use FileDependency.newBuilder() to construct.
     private FileDependency(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -23577,7 +23480,6 @@ public final class BatchReport {
     }
 
     private int bitField0_;
-    // optional int32 to_file_ref = 1;
     public static final int TO_FILE_REF_FIELD_NUMBER = 1;
     private int toFileRef_;
     /**
@@ -23593,7 +23495,6 @@ public final class BatchReport {
       return toFileRef_;
     }
 
-    // optional int32 weight = 2;
     public static final int WEIGHT_FIELD_NUMBER = 2;
     private int weight_;
     /**
@@ -23616,7 +23517,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -23730,8 +23632,9 @@ public final class BatchReport {
      * Protobuf type {@code FileDependency}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.FileDependencyOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:FileDependency)
+        org.sonar.batch.protocol.output.BatchReport.FileDependencyOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_FileDependency_descriptor;
@@ -23853,7 +23756,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // optional int32 to_file_ref = 1;
       private int toFileRef_ ;
       /**
        * <code>optional int32 to_file_ref = 1;</code>
@@ -23886,7 +23788,6 @@ public final class BatchReport {
         return this;
       }
 
-      // optional int32 weight = 2;
       private int weight_ ;
       /**
        * <code>optional int32 weight = 2;</code>
@@ -23930,10 +23831,10 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:FileDependency)
   }
 
-  public interface ModuleDependenciesOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface ModuleDependenciesOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:ModuleDependencies)
+      com.google.protobuf.MessageOrBuilder {
 
-    // repeated .ModuleDependencies.ModuleDependency dep = 1;
     /**
      * <code>repeated .ModuleDependencies.ModuleDependency dep = 1;</code>
      */
@@ -23962,8 +23863,9 @@ public final class BatchReport {
    * Protobuf type {@code ModuleDependencies}
    */
   public static final class ModuleDependencies extends
-      com.google.protobuf.GeneratedMessage
-      implements ModuleDependenciesOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:ModuleDependencies)
+      ModuleDependenciesOrBuilder {
     // Use ModuleDependencies.newBuilder() to construct.
     private ModuleDependencies(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -24059,10 +23961,10 @@ public final class BatchReport {
       return PARSER;
     }
 
-    public interface ModuleDependencyOrBuilder
-        extends com.google.protobuf.MessageOrBuilder {
+    public interface ModuleDependencyOrBuilder extends
+        // @@protoc_insertion_point(interface_extends:ModuleDependencies.ModuleDependency)
+        com.google.protobuf.MessageOrBuilder {
 
-      // optional string key = 1;
       /**
        * <code>optional string key = 1;</code>
        */
@@ -24077,7 +23979,6 @@ public final class BatchReport {
       com.google.protobuf.ByteString
           getKeyBytes();
 
-      // optional string version = 2;
       /**
        * <code>optional string version = 2;</code>
        */
@@ -24092,7 +23993,6 @@ public final class BatchReport {
       com.google.protobuf.ByteString
           getVersionBytes();
 
-      // optional string scope = 3;
       /**
        * <code>optional string scope = 3;</code>
        */
@@ -24107,7 +24007,6 @@ public final class BatchReport {
       com.google.protobuf.ByteString
           getScopeBytes();
 
-      // repeated .ModuleDependencies.ModuleDependency child = 4;
       /**
        * <code>repeated .ModuleDependencies.ModuleDependency child = 4;</code>
        */
@@ -24136,8 +24035,9 @@ public final class BatchReport {
      * Protobuf type {@code ModuleDependencies.ModuleDependency}
      */
     public static final class ModuleDependency extends
-        com.google.protobuf.GeneratedMessage
-        implements ModuleDependencyOrBuilder {
+        com.google.protobuf.GeneratedMessage implements
+        // @@protoc_insertion_point(message_implements:ModuleDependencies.ModuleDependency)
+        ModuleDependencyOrBuilder {
       // Use ModuleDependency.newBuilder() to construct.
       private ModuleDependency(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
         super(builder);
@@ -24184,18 +24084,21 @@ public final class BatchReport {
                 break;
               }
               case 10: {
+                com.google.protobuf.ByteString bs = input.readBytes();
                 bitField0_ |= 0x00000001;
-                key_ = input.readBytes();
+                key_ = bs;
                 break;
               }
               case 18: {
+                com.google.protobuf.ByteString bs = input.readBytes();
                 bitField0_ |= 0x00000002;
-                version_ = input.readBytes();
+                version_ = bs;
                 break;
               }
               case 26: {
+                com.google.protobuf.ByteString bs = input.readBytes();
                 bitField0_ |= 0x00000004;
-                scope_ = input.readBytes();
+                scope_ = bs;
                 break;
               }
               case 34: {
@@ -24249,7 +24152,6 @@ public final class BatchReport {
       }
 
       private int bitField0_;
-      // optional string key = 1;
       public static final int KEY_FIELD_NUMBER = 1;
       private java.lang.Object key_;
       /**
@@ -24292,7 +24194,6 @@ public final class BatchReport {
         }
       }
 
-      // optional string version = 2;
       public static final int VERSION_FIELD_NUMBER = 2;
       private java.lang.Object version_;
       /**
@@ -24335,7 +24236,6 @@ public final class BatchReport {
         }
       }
 
-      // optional string scope = 3;
       public static final int SCOPE_FIELD_NUMBER = 3;
       private java.lang.Object scope_;
       /**
@@ -24378,7 +24278,6 @@ public final class BatchReport {
         }
       }
 
-      // repeated .ModuleDependencies.ModuleDependency child = 4;
       public static final int CHILD_FIELD_NUMBER = 4;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependency> child_;
       /**
@@ -24423,7 +24322,8 @@ public final class BatchReport {
       private byte memoizedIsInitialized = -1;
       public final boolean isInitialized() {
         byte isInitialized = memoizedIsInitialized;
-        if (isInitialized != -1) return isInitialized == 1;
+        if (isInitialized == 1) return true;
+        if (isInitialized == 0) return false;
 
         memoizedIsInitialized = 1;
         return true;
@@ -24551,8 +24451,9 @@ public final class BatchReport {
        * Protobuf type {@code ModuleDependencies.ModuleDependency}
        */
       public static final class Builder extends
-          com.google.protobuf.GeneratedMessage.Builder<Builder>
-         implements org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependencyOrBuilder {
+          com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+          // @@protoc_insertion_point(builder_implements:ModuleDependencies.ModuleDependency)
+          org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependencyOrBuilder {
         public static final com.google.protobuf.Descriptors.Descriptor
             getDescriptor() {
           return org.sonar.batch.protocol.output.BatchReport.internal_static_ModuleDependencies_ModuleDependency_descriptor;
@@ -24731,7 +24632,6 @@ public final class BatchReport {
         }
         private int bitField0_;
 
-        // optional string key = 1;
         private java.lang.Object key_ = "";
         /**
          * <code>optional string key = 1;</code>
@@ -24745,9 +24645,12 @@ public final class BatchReport {
         public java.lang.String getKey() {
           java.lang.Object ref = key_;
           if (!(ref instanceof java.lang.String)) {
-            java.lang.String s = ((com.google.protobuf.ByteString) ref)
-                .toStringUtf8();
-            key_ = s;
+            com.google.protobuf.ByteString bs =
+                (com.google.protobuf.ByteString) ref;
+            java.lang.String s = bs.toStringUtf8();
+            if (bs.isValidUtf8()) {
+              key_ = s;
+            }
             return s;
           } else {
             return (java.lang.String) ref;
@@ -24805,7 +24708,6 @@ public final class BatchReport {
           return this;
         }
 
-        // optional string version = 2;
         private java.lang.Object version_ = "";
         /**
          * <code>optional string version = 2;</code>
@@ -24819,9 +24721,12 @@ public final class BatchReport {
         public java.lang.String getVersion() {
           java.lang.Object ref = version_;
           if (!(ref instanceof java.lang.String)) {
-            java.lang.String s = ((com.google.protobuf.ByteString) ref)
-                .toStringUtf8();
-            version_ = s;
+            com.google.protobuf.ByteString bs =
+                (com.google.protobuf.ByteString) ref;
+            java.lang.String s = bs.toStringUtf8();
+            if (bs.isValidUtf8()) {
+              version_ = s;
+            }
             return s;
           } else {
             return (java.lang.String) ref;
@@ -24879,7 +24784,6 @@ public final class BatchReport {
           return this;
         }
 
-        // optional string scope = 3;
         private java.lang.Object scope_ = "";
         /**
          * <code>optional string scope = 3;</code>
@@ -24893,9 +24797,12 @@ public final class BatchReport {
         public java.lang.String getScope() {
           java.lang.Object ref = scope_;
           if (!(ref instanceof java.lang.String)) {
-            java.lang.String s = ((com.google.protobuf.ByteString) ref)
-                .toStringUtf8();
-            scope_ = s;
+            com.google.protobuf.ByteString bs =
+                (com.google.protobuf.ByteString) ref;
+            java.lang.String s = bs.toStringUtf8();
+            if (bs.isValidUtf8()) {
+              scope_ = s;
+            }
             return s;
           } else {
             return (java.lang.String) ref;
@@ -24953,7 +24860,6 @@ public final class BatchReport {
           return this;
         }
 
-        // repeated .ModuleDependencies.ModuleDependency child = 4;
         private java.util.List<org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependency> child_ =
           java.util.Collections.emptyList();
         private void ensureChildIsMutable() {
@@ -25095,7 +25001,8 @@ public final class BatchReport {
             java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependency> values) {
           if (childBuilder_ == null) {
             ensureChildIsMutable();
-            super.addAll(values, child_);
+            com.google.protobuf.AbstractMessageLite.Builder.addAll(
+                values, child_);
             onChanged();
           } else {
             childBuilder_.addAllMessages(values);
@@ -25204,7 +25111,6 @@ public final class BatchReport {
       // @@protoc_insertion_point(class_scope:ModuleDependencies.ModuleDependency)
     }
 
-    // repeated .ModuleDependencies.ModuleDependency dep = 1;
     public static final int DEP_FIELD_NUMBER = 1;
     private java.util.List<org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependency> dep_;
     /**
@@ -25246,7 +25152,8 @@ public final class BatchReport {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -25353,8 +25260,9 @@ public final class BatchReport {
      * Protobuf type {@code ModuleDependencies}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.batch.protocol.output.BatchReport.ModuleDependenciesOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:ModuleDependencies)
+        org.sonar.batch.protocol.output.BatchReport.ModuleDependenciesOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.batch.protocol.output.BatchReport.internal_static_ModuleDependencies_descriptor;
@@ -25498,7 +25406,6 @@ public final class BatchReport {
       }
       private int bitField0_;
 
-      // repeated .ModuleDependencies.ModuleDependency dep = 1;
       private java.util.List<org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependency> dep_ =
         java.util.Collections.emptyList();
       private void ensureDepIsMutable() {
@@ -25640,7 +25547,8 @@ public final class BatchReport {
           java.lang.Iterable<? extends org.sonar.batch.protocol.output.BatchReport.ModuleDependencies.ModuleDependency> values) {
         if (depBuilder_ == null) {
           ensureDepIsMutable();
-          super.addAll(values, dep_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, dep_);
           onChanged();
         } else {
           depBuilder_.addAllMessages(values);
@@ -25749,122 +25657,122 @@ public final class BatchReport {
     // @@protoc_insertion_point(class_scope:ModuleDependencies)
   }
 
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Metadata_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Metadata_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_ComponentLink_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_ComponentLink_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Event_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Event_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Component_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Component_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Measure_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Measure_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Measures_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Measures_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Issue_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Issue_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Issues_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Issues_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Changesets_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Changesets_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Changesets_Changeset_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Changesets_Changeset_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Duplicate_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Duplicate_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Duplication_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Duplication_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Duplications_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Duplications_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Range_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Range_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Symbols_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Symbols_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Symbols_Symbol_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Symbols_Symbol_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Coverage_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Coverage_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_SyntaxHighlighting_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_SyntaxHighlighting_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_Test_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_Test_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_CoverageDetail_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_CoverageDetail_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_CoverageDetail_CoveredFile_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_CoverageDetail_CoveredFile_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_FileDependency_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_FileDependency_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_ModuleDependencies_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
       internal_static_ModuleDependencies_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
+  private static final com.google.protobuf.Descriptors.Descriptor
     internal_static_ModuleDependencies_ModuleDependency_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -25961,162 +25869,163 @@ public final class BatchReport {
       "ncyB#\n\037org.sonar.batch.protocol.outputH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
-        public com.google.protobuf.ExtensionRegistry assignDescriptors(
-            com.google.protobuf.Descriptors.FileDescriptor root) {
-          descriptor = root;
-          internal_static_Metadata_descriptor =
-            getDescriptor().getMessageTypes().get(0);
-          internal_static_Metadata_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Metadata_descriptor,
-              new java.lang.String[] { "AnalysisDate", "ProjectKey", "Branch", "RootComponentRef", "SnapshotId", "DeletedComponentsCount", });
-          internal_static_ComponentLink_descriptor =
-            getDescriptor().getMessageTypes().get(1);
-          internal_static_ComponentLink_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_ComponentLink_descriptor,
-              new java.lang.String[] { "Type", "Href", });
-          internal_static_Event_descriptor =
-            getDescriptor().getMessageTypes().get(2);
-          internal_static_Event_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Event_descriptor,
-              new java.lang.String[] { "ComponentRef", "Name", "Description", "Category", "EventData", });
-          internal_static_Component_descriptor =
-            getDescriptor().getMessageTypes().get(3);
-          internal_static_Component_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Component_descriptor,
-              new java.lang.String[] { "Ref", "Path", "Name", "Type", "IsTest", "Language", "ChildRef", "Link", "Version", "Key", "Lines", "Id", "SnapshotId", "Uuid", "Event", });
-          internal_static_Measure_descriptor =
-            getDescriptor().getMessageTypes().get(4);
-          internal_static_Measure_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Measure_descriptor,
-              new java.lang.String[] { "ValueType", "BooleanValue", "IntValue", "LongValue", "DoubleValue", "StringValue", "MetricKey", "Description", "RuleKey", "Severity", "AlertStatus", "AlertText", "VariationValue1", "VariationValue2", "VariationValue3", "VariationValue4", "VariationValue5", "CharactericId", "PersonId", });
-          internal_static_Measures_descriptor =
-            getDescriptor().getMessageTypes().get(5);
-          internal_static_Measures_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Measures_descriptor,
-              new java.lang.String[] { "ComponentRef", "Measure", });
-          internal_static_Issue_descriptor =
-            getDescriptor().getMessageTypes().get(6);
-          internal_static_Issue_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Issue_descriptor,
-              new java.lang.String[] { "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "Tag", "EffortToFix", "IsNew", "Uuid", "DebtInMinutes", "Resolution", "Status", "Checksum", "ManualSeverity", "Reporter", "Assignee", "ActionPlanKey", "Attributes", "AuthorLogin", "CreationDate", "CloseDate", "UpdateDate", "SelectedAt", "DiffFields", "IsChanged", "MustSendNotification", });
-          internal_static_Issues_descriptor =
-            getDescriptor().getMessageTypes().get(7);
-          internal_static_Issues_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Issues_descriptor,
-              new java.lang.String[] { "ComponentRef", "Issue", "ComponentUuid", });
-          internal_static_Changesets_descriptor =
-            getDescriptor().getMessageTypes().get(8);
-          internal_static_Changesets_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Changesets_descriptor,
-              new java.lang.String[] { "ComponentRef", "Changeset", "ChangesetIndexByLine", });
-          internal_static_Changesets_Changeset_descriptor =
-            internal_static_Changesets_descriptor.getNestedTypes().get(0);
-          internal_static_Changesets_Changeset_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Changesets_Changeset_descriptor,
-              new java.lang.String[] { "Revision", "Author", "Date", });
-          internal_static_Duplicate_descriptor =
-            getDescriptor().getMessageTypes().get(9);
-          internal_static_Duplicate_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Duplicate_descriptor,
-              new java.lang.String[] { "OtherFileRef", "Range", "OtherFileKey", });
-          internal_static_Duplication_descriptor =
-            getDescriptor().getMessageTypes().get(10);
-          internal_static_Duplication_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Duplication_descriptor,
-              new java.lang.String[] { "OriginPosition", "Duplicate", });
-          internal_static_Duplications_descriptor =
-            getDescriptor().getMessageTypes().get(11);
-          internal_static_Duplications_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Duplications_descriptor,
-              new java.lang.String[] { "ComponentRef", "Duplication", });
-          internal_static_Range_descriptor =
-            getDescriptor().getMessageTypes().get(12);
-          internal_static_Range_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Range_descriptor,
-              new java.lang.String[] { "StartLine", "EndLine", "StartOffset", "EndOffset", });
-          internal_static_Symbols_descriptor =
-            getDescriptor().getMessageTypes().get(13);
-          internal_static_Symbols_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Symbols_descriptor,
-              new java.lang.String[] { "FileRef", "Symbol", });
-          internal_static_Symbols_Symbol_descriptor =
-            internal_static_Symbols_descriptor.getNestedTypes().get(0);
-          internal_static_Symbols_Symbol_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Symbols_Symbol_descriptor,
-              new java.lang.String[] { "Declaration", "Reference", });
-          internal_static_Coverage_descriptor =
-            getDescriptor().getMessageTypes().get(14);
-          internal_static_Coverage_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Coverage_descriptor,
-              new java.lang.String[] { "Line", "Conditions", "UtHits", "ItHits", "UtCoveredConditions", "ItCoveredConditions", "OverallCoveredConditions", });
-          internal_static_SyntaxHighlighting_descriptor =
-            getDescriptor().getMessageTypes().get(15);
-          internal_static_SyntaxHighlighting_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_SyntaxHighlighting_descriptor,
-              new java.lang.String[] { "Range", "Type", });
-          internal_static_Test_descriptor =
-            getDescriptor().getMessageTypes().get(16);
-          internal_static_Test_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_Test_descriptor,
-              new java.lang.String[] { "Name", "Status", "DurationInMs", "Stacktrace", "Msg", });
-          internal_static_CoverageDetail_descriptor =
-            getDescriptor().getMessageTypes().get(17);
-          internal_static_CoverageDetail_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_CoverageDetail_descriptor,
-              new java.lang.String[] { "TestName", "CoveredFile", });
-          internal_static_CoverageDetail_CoveredFile_descriptor =
-            internal_static_CoverageDetail_descriptor.getNestedTypes().get(0);
-          internal_static_CoverageDetail_CoveredFile_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_CoverageDetail_CoveredFile_descriptor,
-              new java.lang.String[] { "FileRef", "CoveredLine", });
-          internal_static_FileDependency_descriptor =
-            getDescriptor().getMessageTypes().get(18);
-          internal_static_FileDependency_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_FileDependency_descriptor,
-              new java.lang.String[] { "ToFileRef", "Weight", });
-          internal_static_ModuleDependencies_descriptor =
-            getDescriptor().getMessageTypes().get(19);
-          internal_static_ModuleDependencies_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_ModuleDependencies_descriptor,
-              new java.lang.String[] { "Dep", });
-          internal_static_ModuleDependencies_ModuleDependency_descriptor =
-            internal_static_ModuleDependencies_descriptor.getNestedTypes().get(0);
-          internal_static_ModuleDependencies_ModuleDependency_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_ModuleDependencies_ModuleDependency_descriptor,
-              new java.lang.String[] { "Key", "Version", "Scope", "Child", });
-          return null;
-        }
-      };
+        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
+          public com.google.protobuf.ExtensionRegistry assignDescriptors(
+              com.google.protobuf.Descriptors.FileDescriptor root) {
+            descriptor = root;
+            return null;
+          }
+        };
     com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
           org.sonar.batch.protocol.Constants.getDescriptor(),
         }, assigner);
+    internal_static_Metadata_descriptor =
+      getDescriptor().getMessageTypes().get(0);
+    internal_static_Metadata_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Metadata_descriptor,
+        new java.lang.String[] { "AnalysisDate", "ProjectKey", "Branch", "RootComponentRef", "SnapshotId", "DeletedComponentsCount", });
+    internal_static_ComponentLink_descriptor =
+      getDescriptor().getMessageTypes().get(1);
+    internal_static_ComponentLink_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_ComponentLink_descriptor,
+        new java.lang.String[] { "Type", "Href", });
+    internal_static_Event_descriptor =
+      getDescriptor().getMessageTypes().get(2);
+    internal_static_Event_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Event_descriptor,
+        new java.lang.String[] { "ComponentRef", "Name", "Description", "Category", "EventData", });
+    internal_static_Component_descriptor =
+      getDescriptor().getMessageTypes().get(3);
+    internal_static_Component_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Component_descriptor,
+        new java.lang.String[] { "Ref", "Path", "Name", "Type", "IsTest", "Language", "ChildRef", "Link", "Version", "Key", "Lines", "Id", "SnapshotId", "Uuid", "Event", });
+    internal_static_Measure_descriptor =
+      getDescriptor().getMessageTypes().get(4);
+    internal_static_Measure_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Measure_descriptor,
+        new java.lang.String[] { "ValueType", "BooleanValue", "IntValue", "LongValue", "DoubleValue", "StringValue", "MetricKey", "Description", "RuleKey", "Severity", "AlertStatus", "AlertText", "VariationValue1", "VariationValue2", "VariationValue3", "VariationValue4", "VariationValue5", "CharactericId", "PersonId", });
+    internal_static_Measures_descriptor =
+      getDescriptor().getMessageTypes().get(5);
+    internal_static_Measures_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Measures_descriptor,
+        new java.lang.String[] { "ComponentRef", "Measure", });
+    internal_static_Issue_descriptor =
+      getDescriptor().getMessageTypes().get(6);
+    internal_static_Issue_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Issue_descriptor,
+        new java.lang.String[] { "RuleRepository", "RuleKey", "Line", "Msg", "Severity", "Tag", "EffortToFix", "IsNew", "Uuid", "DebtInMinutes", "Resolution", "Status", "Checksum", "ManualSeverity", "Reporter", "Assignee", "ActionPlanKey", "Attributes", "AuthorLogin", "CreationDate", "CloseDate", "UpdateDate", "SelectedAt", "DiffFields", "IsChanged", "MustSendNotification", });
+    internal_static_Issues_descriptor =
+      getDescriptor().getMessageTypes().get(7);
+    internal_static_Issues_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Issues_descriptor,
+        new java.lang.String[] { "ComponentRef", "Issue", "ComponentUuid", });
+    internal_static_Changesets_descriptor =
+      getDescriptor().getMessageTypes().get(8);
+    internal_static_Changesets_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Changesets_descriptor,
+        new java.lang.String[] { "ComponentRef", "Changeset", "ChangesetIndexByLine", });
+    internal_static_Changesets_Changeset_descriptor =
+      internal_static_Changesets_descriptor.getNestedTypes().get(0);
+    internal_static_Changesets_Changeset_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Changesets_Changeset_descriptor,
+        new java.lang.String[] { "Revision", "Author", "Date", });
+    internal_static_Duplicate_descriptor =
+      getDescriptor().getMessageTypes().get(9);
+    internal_static_Duplicate_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Duplicate_descriptor,
+        new java.lang.String[] { "OtherFileRef", "Range", "OtherFileKey", });
+    internal_static_Duplication_descriptor =
+      getDescriptor().getMessageTypes().get(10);
+    internal_static_Duplication_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Duplication_descriptor,
+        new java.lang.String[] { "OriginPosition", "Duplicate", });
+    internal_static_Duplications_descriptor =
+      getDescriptor().getMessageTypes().get(11);
+    internal_static_Duplications_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Duplications_descriptor,
+        new java.lang.String[] { "ComponentRef", "Duplication", });
+    internal_static_Range_descriptor =
+      getDescriptor().getMessageTypes().get(12);
+    internal_static_Range_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Range_descriptor,
+        new java.lang.String[] { "StartLine", "EndLine", "StartOffset", "EndOffset", });
+    internal_static_Symbols_descriptor =
+      getDescriptor().getMessageTypes().get(13);
+    internal_static_Symbols_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Symbols_descriptor,
+        new java.lang.String[] { "FileRef", "Symbol", });
+    internal_static_Symbols_Symbol_descriptor =
+      internal_static_Symbols_descriptor.getNestedTypes().get(0);
+    internal_static_Symbols_Symbol_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Symbols_Symbol_descriptor,
+        new java.lang.String[] { "Declaration", "Reference", });
+    internal_static_Coverage_descriptor =
+      getDescriptor().getMessageTypes().get(14);
+    internal_static_Coverage_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Coverage_descriptor,
+        new java.lang.String[] { "Line", "Conditions", "UtHits", "ItHits", "UtCoveredConditions", "ItCoveredConditions", "OverallCoveredConditions", });
+    internal_static_SyntaxHighlighting_descriptor =
+      getDescriptor().getMessageTypes().get(15);
+    internal_static_SyntaxHighlighting_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_SyntaxHighlighting_descriptor,
+        new java.lang.String[] { "Range", "Type", });
+    internal_static_Test_descriptor =
+      getDescriptor().getMessageTypes().get(16);
+    internal_static_Test_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_Test_descriptor,
+        new java.lang.String[] { "Name", "Status", "DurationInMs", "Stacktrace", "Msg", });
+    internal_static_CoverageDetail_descriptor =
+      getDescriptor().getMessageTypes().get(17);
+    internal_static_CoverageDetail_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_CoverageDetail_descriptor,
+        new java.lang.String[] { "TestName", "CoveredFile", });
+    internal_static_CoverageDetail_CoveredFile_descriptor =
+      internal_static_CoverageDetail_descriptor.getNestedTypes().get(0);
+    internal_static_CoverageDetail_CoveredFile_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_CoverageDetail_CoveredFile_descriptor,
+        new java.lang.String[] { "FileRef", "CoveredLine", });
+    internal_static_FileDependency_descriptor =
+      getDescriptor().getMessageTypes().get(18);
+    internal_static_FileDependency_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_FileDependency_descriptor,
+        new java.lang.String[] { "ToFileRef", "Weight", });
+    internal_static_ModuleDependencies_descriptor =
+      getDescriptor().getMessageTypes().get(19);
+    internal_static_ModuleDependencies_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_ModuleDependencies_descriptor,
+        new java.lang.String[] { "Dep", });
+    internal_static_ModuleDependencies_ModuleDependency_descriptor =
+      internal_static_ModuleDependencies_descriptor.getNestedTypes().get(0);
+    internal_static_ModuleDependencies_ModuleDependency_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_ModuleDependencies_ModuleDependency_descriptor,
+        new java.lang.String[] { "Key", "Version", "Scope", "Child", });
+    org.sonar.batch.protocol.Constants.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
index 6603bc8ef050390476a04f3c3e9b77f04bd95c40..f05dc4f03417f4140042b37c7ad966a196d9d21d 100644 (file)
@@ -8,10 +8,10 @@ public final class FileSourceDb {
   public static void registerAllExtensions(
       com.google.protobuf.ExtensionRegistry registry) {
   }
-  public interface LineOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface LineOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Line)
+      com.google.protobuf.MessageOrBuilder {
 
-    // optional int32 line = 1;
     /**
      * <code>optional int32 line = 1;</code>
      */
@@ -21,7 +21,6 @@ public final class FileSourceDb {
      */
     int getLine();
 
-    // optional string source = 2;
     /**
      * <code>optional string source = 2;</code>
      */
@@ -36,7 +35,6 @@ public final class FileSourceDb {
     com.google.protobuf.ByteString
         getSourceBytes();
 
-    // optional string scm_revision = 3;
     /**
      * <code>optional string scm_revision = 3;</code>
      *
@@ -63,7 +61,6 @@ public final class FileSourceDb {
     com.google.protobuf.ByteString
         getScmRevisionBytes();
 
-    // optional string scm_author = 4;
     /**
      * <code>optional string scm_author = 4;</code>
      */
@@ -78,7 +75,6 @@ public final class FileSourceDb {
     com.google.protobuf.ByteString
         getScmAuthorBytes();
 
-    // optional int64 scm_date = 5;
     /**
      * <code>optional int64 scm_date = 5;</code>
      */
@@ -88,7 +84,6 @@ public final class FileSourceDb {
      */
     long getScmDate();
 
-    // optional int32 ut_line_hits = 6;
     /**
      * <code>optional int32 ut_line_hits = 6;</code>
      *
@@ -106,7 +101,6 @@ public final class FileSourceDb {
      */
     int getUtLineHits();
 
-    // optional int32 ut_conditions = 7;
     /**
      * <code>optional int32 ut_conditions = 7;</code>
      */
@@ -116,7 +110,6 @@ public final class FileSourceDb {
      */
     int getUtConditions();
 
-    // optional int32 ut_covered_conditions = 8;
     /**
      * <code>optional int32 ut_covered_conditions = 8;</code>
      */
@@ -126,7 +119,6 @@ public final class FileSourceDb {
      */
     int getUtCoveredConditions();
 
-    // optional int32 it_line_hits = 9;
     /**
      * <code>optional int32 it_line_hits = 9;</code>
      *
@@ -144,7 +136,6 @@ public final class FileSourceDb {
      */
     int getItLineHits();
 
-    // optional int32 it_conditions = 10;
     /**
      * <code>optional int32 it_conditions = 10;</code>
      */
@@ -154,7 +145,6 @@ public final class FileSourceDb {
      */
     int getItConditions();
 
-    // optional int32 it_covered_conditions = 11;
     /**
      * <code>optional int32 it_covered_conditions = 11;</code>
      */
@@ -164,7 +154,6 @@ public final class FileSourceDb {
      */
     int getItCoveredConditions();
 
-    // optional int32 overall_line_hits = 12;
     /**
      * <code>optional int32 overall_line_hits = 12;</code>
      *
@@ -182,7 +171,6 @@ public final class FileSourceDb {
      */
     int getOverallLineHits();
 
-    // optional int32 overall_conditions = 13;
     /**
      * <code>optional int32 overall_conditions = 13;</code>
      */
@@ -192,7 +180,6 @@ public final class FileSourceDb {
      */
     int getOverallConditions();
 
-    // optional int32 overall_covered_conditions = 14;
     /**
      * <code>optional int32 overall_covered_conditions = 14;</code>
      */
@@ -202,7 +189,6 @@ public final class FileSourceDb {
      */
     int getOverallCoveredConditions();
 
-    // optional string highlighting = 15;
     /**
      * <code>optional string highlighting = 15;</code>
      */
@@ -217,7 +203,6 @@ public final class FileSourceDb {
     com.google.protobuf.ByteString
         getHighlightingBytes();
 
-    // optional string symbols = 16;
     /**
      * <code>optional string symbols = 16;</code>
      */
@@ -232,7 +217,6 @@ public final class FileSourceDb {
     com.google.protobuf.ByteString
         getSymbolsBytes();
 
-    // repeated int32 duplication = 17 [packed = true];
     /**
      * <code>repeated int32 duplication = 17 [packed = true];</code>
      */
@@ -250,8 +234,9 @@ public final class FileSourceDb {
    * Protobuf type {@code org.sonar.server.source.db.Line}
    */
   public static final class Line extends
-      com.google.protobuf.GeneratedMessage
-      implements LineOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Line)
+      LineOrBuilder {
     // Use Line.newBuilder() to construct.
     private Line(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -303,18 +288,21 @@ public final class FileSourceDb {
               break;
             }
             case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000002;
-              source_ = input.readBytes();
+              source_ = bs;
               break;
             }
             case 26: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000004;
-              scmRevision_ = input.readBytes();
+              scmRevision_ = bs;
               break;
             }
             case 34: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00000008;
-              scmAuthor_ = input.readBytes();
+              scmAuthor_ = bs;
               break;
             }
             case 40: {
@@ -368,13 +356,15 @@ public final class FileSourceDb {
               break;
             }
             case 122: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00004000;
-              highlighting_ = input.readBytes();
+              highlighting_ = bs;
               break;
             }
             case 130: {
+              com.google.protobuf.ByteString bs = input.readBytes();
               bitField0_ |= 0x00008000;
-              symbols_ = input.readBytes();
+              symbols_ = bs;
               break;
             }
             case 136: {
@@ -441,7 +431,6 @@ public final class FileSourceDb {
     }
 
     private int bitField0_;
-    // optional int32 line = 1;
     public static final int LINE_FIELD_NUMBER = 1;
     private int line_;
     /**
@@ -457,7 +446,6 @@ public final class FileSourceDb {
       return line_;
     }
 
-    // optional string source = 2;
     public static final int SOURCE_FIELD_NUMBER = 2;
     private java.lang.Object source_;
     /**
@@ -500,7 +488,6 @@ public final class FileSourceDb {
       }
     }
 
-    // optional string scm_revision = 3;
     public static final int SCM_REVISION_FIELD_NUMBER = 3;
     private java.lang.Object scmRevision_;
     /**
@@ -555,7 +542,6 @@ public final class FileSourceDb {
       }
     }
 
-    // optional string scm_author = 4;
     public static final int SCM_AUTHOR_FIELD_NUMBER = 4;
     private java.lang.Object scmAuthor_;
     /**
@@ -598,7 +584,6 @@ public final class FileSourceDb {
       }
     }
 
-    // optional int64 scm_date = 5;
     public static final int SCM_DATE_FIELD_NUMBER = 5;
     private long scmDate_;
     /**
@@ -614,7 +599,6 @@ public final class FileSourceDb {
       return scmDate_;
     }
 
-    // optional int32 ut_line_hits = 6;
     public static final int UT_LINE_HITS_FIELD_NUMBER = 6;
     private int utLineHits_;
     /**
@@ -638,7 +622,6 @@ public final class FileSourceDb {
       return utLineHits_;
     }
 
-    // optional int32 ut_conditions = 7;
     public static final int UT_CONDITIONS_FIELD_NUMBER = 7;
     private int utConditions_;
     /**
@@ -654,7 +637,6 @@ public final class FileSourceDb {
       return utConditions_;
     }
 
-    // optional int32 ut_covered_conditions = 8;
     public static final int UT_COVERED_CONDITIONS_FIELD_NUMBER = 8;
     private int utCoveredConditions_;
     /**
@@ -670,7 +652,6 @@ public final class FileSourceDb {
       return utCoveredConditions_;
     }
 
-    // optional int32 it_line_hits = 9;
     public static final int IT_LINE_HITS_FIELD_NUMBER = 9;
     private int itLineHits_;
     /**
@@ -694,7 +675,6 @@ public final class FileSourceDb {
       return itLineHits_;
     }
 
-    // optional int32 it_conditions = 10;
     public static final int IT_CONDITIONS_FIELD_NUMBER = 10;
     private int itConditions_;
     /**
@@ -710,7 +690,6 @@ public final class FileSourceDb {
       return itConditions_;
     }
 
-    // optional int32 it_covered_conditions = 11;
     public static final int IT_COVERED_CONDITIONS_FIELD_NUMBER = 11;
     private int itCoveredConditions_;
     /**
@@ -726,7 +705,6 @@ public final class FileSourceDb {
       return itCoveredConditions_;
     }
 
-    // optional int32 overall_line_hits = 12;
     public static final int OVERALL_LINE_HITS_FIELD_NUMBER = 12;
     private int overallLineHits_;
     /**
@@ -750,7 +728,6 @@ public final class FileSourceDb {
       return overallLineHits_;
     }
 
-    // optional int32 overall_conditions = 13;
     public static final int OVERALL_CONDITIONS_FIELD_NUMBER = 13;
     private int overallConditions_;
     /**
@@ -766,7 +743,6 @@ public final class FileSourceDb {
       return overallConditions_;
     }
 
-    // optional int32 overall_covered_conditions = 14;
     public static final int OVERALL_COVERED_CONDITIONS_FIELD_NUMBER = 14;
     private int overallCoveredConditions_;
     /**
@@ -782,7 +758,6 @@ public final class FileSourceDb {
       return overallCoveredConditions_;
     }
 
-    // optional string highlighting = 15;
     public static final int HIGHLIGHTING_FIELD_NUMBER = 15;
     private java.lang.Object highlighting_;
     /**
@@ -825,7 +800,6 @@ public final class FileSourceDb {
       }
     }
 
-    // optional string symbols = 16;
     public static final int SYMBOLS_FIELD_NUMBER = 16;
     private java.lang.Object symbols_;
     /**
@@ -868,7 +842,6 @@ public final class FileSourceDb {
       }
     }
 
-    // repeated int32 duplication = 17 [packed = true];
     public static final int DUPLICATION_FIELD_NUMBER = 17;
     private java.util.List<java.lang.Integer> duplication_;
     /**
@@ -914,7 +887,8 @@ public final class FileSourceDb {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -1147,8 +1121,9 @@ public final class FileSourceDb {
      * Protobuf type {@code org.sonar.server.source.db.Line}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.server.source.db.FileSourceDb.LineOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Line)
+        org.sonar.server.source.db.FileSourceDb.LineOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Line_descriptor;
@@ -1423,7 +1398,6 @@ public final class FileSourceDb {
       }
       private int bitField0_;
 
-      // optional int32 line = 1;
       private int line_ ;
       /**
        * <code>optional int32 line = 1;</code>
@@ -1456,7 +1430,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional string source = 2;
       private java.lang.Object source_ = "";
       /**
        * <code>optional string source = 2;</code>
@@ -1470,9 +1443,12 @@ public final class FileSourceDb {
       public java.lang.String getSource() {
         java.lang.Object ref = source_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          source_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            source_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1530,7 +1506,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional string scm_revision = 3;
       private java.lang.Object scmRevision_ = "";
       /**
        * <code>optional string scm_revision = 3;</code>
@@ -1552,9 +1527,12 @@ public final class FileSourceDb {
       public java.lang.String getScmRevision() {
         java.lang.Object ref = scmRevision_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          scmRevision_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            scmRevision_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1628,7 +1606,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional string scm_author = 4;
       private java.lang.Object scmAuthor_ = "";
       /**
        * <code>optional string scm_author = 4;</code>
@@ -1642,9 +1619,12 @@ public final class FileSourceDb {
       public java.lang.String getScmAuthor() {
         java.lang.Object ref = scmAuthor_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          scmAuthor_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            scmAuthor_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -1702,7 +1682,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int64 scm_date = 5;
       private long scmDate_ ;
       /**
        * <code>optional int64 scm_date = 5;</code>
@@ -1735,7 +1714,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 ut_line_hits = 6;
       private int utLineHits_ ;
       /**
        * <code>optional int32 ut_line_hits = 6;</code>
@@ -1784,7 +1762,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 ut_conditions = 7;
       private int utConditions_ ;
       /**
        * <code>optional int32 ut_conditions = 7;</code>
@@ -1817,7 +1794,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 ut_covered_conditions = 8;
       private int utCoveredConditions_ ;
       /**
        * <code>optional int32 ut_covered_conditions = 8;</code>
@@ -1850,7 +1826,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 it_line_hits = 9;
       private int itLineHits_ ;
       /**
        * <code>optional int32 it_line_hits = 9;</code>
@@ -1899,7 +1874,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 it_conditions = 10;
       private int itConditions_ ;
       /**
        * <code>optional int32 it_conditions = 10;</code>
@@ -1932,7 +1906,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 it_covered_conditions = 11;
       private int itCoveredConditions_ ;
       /**
        * <code>optional int32 it_covered_conditions = 11;</code>
@@ -1965,7 +1938,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 overall_line_hits = 12;
       private int overallLineHits_ ;
       /**
        * <code>optional int32 overall_line_hits = 12;</code>
@@ -2014,7 +1986,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 overall_conditions = 13;
       private int overallConditions_ ;
       /**
        * <code>optional int32 overall_conditions = 13;</code>
@@ -2047,7 +2018,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional int32 overall_covered_conditions = 14;
       private int overallCoveredConditions_ ;
       /**
        * <code>optional int32 overall_covered_conditions = 14;</code>
@@ -2080,7 +2050,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional string highlighting = 15;
       private java.lang.Object highlighting_ = "";
       /**
        * <code>optional string highlighting = 15;</code>
@@ -2094,9 +2063,12 @@ public final class FileSourceDb {
       public java.lang.String getHighlighting() {
         java.lang.Object ref = highlighting_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          highlighting_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            highlighting_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2154,7 +2126,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // optional string symbols = 16;
       private java.lang.Object symbols_ = "";
       /**
        * <code>optional string symbols = 16;</code>
@@ -2168,9 +2139,12 @@ public final class FileSourceDb {
       public java.lang.String getSymbols() {
         java.lang.Object ref = symbols_;
         if (!(ref instanceof java.lang.String)) {
-          java.lang.String s = ((com.google.protobuf.ByteString) ref)
-              .toStringUtf8();
-          symbols_ = s;
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            symbols_ = s;
+          }
           return s;
         } else {
           return (java.lang.String) ref;
@@ -2228,7 +2202,6 @@ public final class FileSourceDb {
         return this;
       }
 
-      // repeated int32 duplication = 17 [packed = true];
       private java.util.List<java.lang.Integer> duplication_ = java.util.Collections.emptyList();
       private void ensureDuplicationIsMutable() {
         if (!((bitField0_ & 0x00010000) == 0x00010000)) {
@@ -2280,7 +2253,8 @@ public final class FileSourceDb {
       public Builder addAllDuplication(
           java.lang.Iterable<? extends java.lang.Integer> values) {
         ensureDuplicationIsMutable();
-        super.addAll(values, duplication_);
+        com.google.protobuf.AbstractMessageLite.Builder.addAll(
+            values, duplication_);
         onChanged();
         return this;
       }
@@ -2305,10 +2279,10 @@ public final class FileSourceDb {
     // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Line)
   }
 
-  public interface DataOrBuilder
-      extends com.google.protobuf.MessageOrBuilder {
+  public interface DataOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Data)
+      com.google.protobuf.MessageOrBuilder {
 
-    // repeated .org.sonar.server.source.db.Line lines = 1;
     /**
      * <code>repeated .org.sonar.server.source.db.Line lines = 1;</code>
      */
@@ -2337,8 +2311,9 @@ public final class FileSourceDb {
    * Protobuf type {@code org.sonar.server.source.db.Data}
    */
   public static final class Data extends
-      com.google.protobuf.GeneratedMessage
-      implements DataOrBuilder {
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Data)
+      DataOrBuilder {
     // Use Data.newBuilder() to construct.
     private Data(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
       super(builder);
@@ -2434,7 +2409,6 @@ public final class FileSourceDb {
       return PARSER;
     }
 
-    // repeated .org.sonar.server.source.db.Line lines = 1;
     public static final int LINES_FIELD_NUMBER = 1;
     private java.util.List<org.sonar.server.source.db.FileSourceDb.Line> lines_;
     /**
@@ -2476,7 +2450,8 @@ public final class FileSourceDb {
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
       byte isInitialized = memoizedIsInitialized;
-      if (isInitialized != -1) return isInitialized == 1;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
 
       memoizedIsInitialized = 1;
       return true;
@@ -2583,8 +2558,9 @@ public final class FileSourceDb {
      * Protobuf type {@code org.sonar.server.source.db.Data}
      */
     public static final class Builder extends
-        com.google.protobuf.GeneratedMessage.Builder<Builder>
-       implements org.sonar.server.source.db.FileSourceDb.DataOrBuilder {
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Data)
+        org.sonar.server.source.db.FileSourceDb.DataOrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Data_descriptor;
@@ -2728,7 +2704,6 @@ public final class FileSourceDb {
       }
       private int bitField0_;
 
-      // repeated .org.sonar.server.source.db.Line lines = 1;
       private java.util.List<org.sonar.server.source.db.FileSourceDb.Line> lines_ =
         java.util.Collections.emptyList();
       private void ensureLinesIsMutable() {
@@ -2870,7 +2845,8 @@ public final class FileSourceDb {
           java.lang.Iterable<? extends org.sonar.server.source.db.FileSourceDb.Line> values) {
         if (linesBuilder_ == null) {
           ensureLinesIsMutable();
-          super.addAll(values, lines_);
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, lines_);
           onChanged();
         } else {
           linesBuilder_.addAllMessages(values);
@@ -2979,63 +2955,2050 @@ public final class FileSourceDb {
     // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Data)
   }
 
-  private static com.google.protobuf.Descriptors.Descriptor
-    internal_static_org_sonar_server_source_db_Line_descriptor;
-  private static
-    com.google.protobuf.GeneratedMessage.FieldAccessorTable
-      internal_static_org_sonar_server_source_db_Line_fieldAccessorTable;
-  private static com.google.protobuf.Descriptors.Descriptor
-    internal_static_org_sonar_server_source_db_Data_descriptor;
-  private static
-    com.google.protobuf.GeneratedMessage.FieldAccessorTable
-      internal_static_org_sonar_server_source_db_Data_fieldAccessorTable;
+  public interface TestOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Test)
+      com.google.protobuf.MessageOrBuilder {
 
-  public static com.google.protobuf.Descriptors.FileDescriptor
-      getDescriptor() {
-    return descriptor;
+    /**
+     * <code>optional string name = 2;</code>
+     */
+    boolean hasName();
+    /**
+     * <code>optional string name = 2;</code>
+     */
+    java.lang.String getName();
+    /**
+     * <code>optional string name = 2;</code>
+     */
+    com.google.protobuf.ByteString
+        getNameBytes();
+
+    /**
+     * <code>optional .TestStatus status = 3;</code>
+     */
+    boolean hasStatus();
+    /**
+     * <code>optional .TestStatus status = 3;</code>
+     */
+    org.sonar.batch.protocol.Constants.TestStatus getStatus();
+
+    /**
+     * <code>optional int64 execution_time_ms = 4;</code>
+     */
+    boolean hasExecutionTimeMs();
+    /**
+     * <code>optional int64 execution_time_ms = 4;</code>
+     */
+    long getExecutionTimeMs();
+
+    /**
+     * <code>optional string stacktrace = 5;</code>
+     */
+    boolean hasStacktrace();
+    /**
+     * <code>optional string stacktrace = 5;</code>
+     */
+    java.lang.String getStacktrace();
+    /**
+     * <code>optional string stacktrace = 5;</code>
+     */
+    com.google.protobuf.ByteString
+        getStacktraceBytes();
+
+    /**
+     * <code>optional string msg = 6;</code>
+     */
+    boolean hasMsg();
+    /**
+     * <code>optional string msg = 6;</code>
+     */
+    java.lang.String getMsg();
+    /**
+     * <code>optional string msg = 6;</code>
+     */
+    com.google.protobuf.ByteString
+        getMsgBytes();
+
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    java.util.List<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile> 
+        getCoveredFileList();
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    org.sonar.server.source.db.FileSourceDb.Test.CoveredFile getCoveredFile(int index);
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    int getCoveredFileCount();
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    java.util.List<? extends org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder> 
+        getCoveredFileOrBuilderList();
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder getCoveredFileOrBuilder(
+        int index);
   }
-  private static com.google.protobuf.Descriptors.FileDescriptor
-      descriptor;
-  static {
-    java.lang.String[] descriptorData = {
-      "\n\024file_source_db.proto\022\032org.sonar.server" +
-      ".source.db\"\223\003\n\004Line\022\014\n\004line\030\001 \001(\005\022\016\n\006sou" +
-      "rce\030\002 \001(\t\022\024\n\014scm_revision\030\003 \001(\t\022\022\n\nscm_a" +
-      "uthor\030\004 \001(\t\022\020\n\010scm_date\030\005 \001(\003\022\024\n\014ut_line" +
-      "_hits\030\006 \001(\005\022\025\n\rut_conditions\030\007 \001(\005\022\035\n\025ut" +
-      "_covered_conditions\030\010 \001(\005\022\024\n\014it_line_hit" +
-      "s\030\t \001(\005\022\025\n\rit_conditions\030\n \001(\005\022\035\n\025it_cov" +
-      "ered_conditions\030\013 \001(\005\022\031\n\021overall_line_hi" +
-      "ts\030\014 \001(\005\022\032\n\022overall_conditions\030\r \001(\005\022\"\n\032" +
-      "overall_covered_conditions\030\016 \001(\005\022\024\n\014high",
-      "lighting\030\017 \001(\t\022\017\n\007symbols\030\020 \001(\t\022\027\n\013dupli" +
-      "cation\030\021 \003(\005B\002\020\001\"7\n\004Data\022/\n\005lines\030\001 \003(\0132" +
-      " .org.sonar.server.source.db.LineB\002H\001"
+  /**
+   * Protobuf type {@code org.sonar.server.source.db.Test}
+   */
+  public static final class Test extends
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Test)
+      TestOrBuilder {
+    // Use Test.newBuilder() to construct.
+    private Test(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private Test(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final Test defaultInstance;
+    public static Test getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    public Test getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private Test(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00000001;
+              name_ = bs;
+              break;
+            }
+            case 24: {
+              int rawValue = input.readEnum();
+              org.sonar.batch.protocol.Constants.TestStatus value = org.sonar.batch.protocol.Constants.TestStatus.valueOf(rawValue);
+              if (value == null) {
+                unknownFields.mergeVarintField(3, rawValue);
+              } else {
+                bitField0_ |= 0x00000002;
+                status_ = value;
+              }
+              break;
+            }
+            case 32: {
+              bitField0_ |= 0x00000004;
+              executionTimeMs_ = input.readInt64();
+              break;
+            }
+            case 42: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00000008;
+              stacktrace_ = bs;
+              break;
+            }
+            case 50: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+              bitField0_ |= 0x00000010;
+              msg_ = bs;
+              break;
+            }
+            case 58: {
+              if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+                coveredFile_ = new java.util.ArrayList<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile>();
+                mutable_bitField0_ |= 0x00000020;
+              }
+              coveredFile_.add(input.readMessage(org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.PARSER, extensionRegistry));
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
+          coveredFile_ = java.util.Collections.unmodifiableList(coveredFile_);
+        }
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_descriptor;
+    }
+
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.sonar.server.source.db.FileSourceDb.Test.class, org.sonar.server.source.db.FileSourceDb.Test.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<Test> PARSER =
+        new com.google.protobuf.AbstractParser<Test>() {
+      public Test parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Test(input, extensionRegistry);
+      }
     };
-    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
-      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
-        public com.google.protobuf.ExtensionRegistry assignDescriptors(
-            com.google.protobuf.Descriptors.FileDescriptor root) {
-          descriptor = root;
-          internal_static_org_sonar_server_source_db_Line_descriptor =
-            getDescriptor().getMessageTypes().get(0);
-          internal_static_org_sonar_server_source_db_Line_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_org_sonar_server_source_db_Line_descriptor,
-              new java.lang.String[] { "Line", "Source", "ScmRevision", "ScmAuthor", "ScmDate", "UtLineHits", "UtConditions", "UtCoveredConditions", "ItLineHits", "ItConditions", "ItCoveredConditions", "OverallLineHits", "OverallConditions", "OverallCoveredConditions", "Highlighting", "Symbols", "Duplication", });
-          internal_static_org_sonar_server_source_db_Data_descriptor =
-            getDescriptor().getMessageTypes().get(1);
-          internal_static_org_sonar_server_source_db_Data_fieldAccessorTable = new
-            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
-              internal_static_org_sonar_server_source_db_Data_descriptor,
-              new java.lang.String[] { "Lines", });
-          return null;
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Test> getParserForType() {
+      return PARSER;
+    }
+
+    public interface CoveredFileOrBuilder extends
+        // @@protoc_insertion_point(interface_extends:org.sonar.server.source.db.Test.CoveredFile)
+        com.google.protobuf.MessageOrBuilder {
+
+      /**
+       * <code>optional string file_uuid = 1;</code>
+       */
+      boolean hasFileUuid();
+      /**
+       * <code>optional string file_uuid = 1;</code>
+       */
+      java.lang.String getFileUuid();
+      /**
+       * <code>optional string file_uuid = 1;</code>
+       */
+      com.google.protobuf.ByteString
+          getFileUuidBytes();
+
+      /**
+       * <code>repeated int32 covered_line = 2 [packed = true];</code>
+       */
+      java.util.List<java.lang.Integer> getCoveredLineList();
+      /**
+       * <code>repeated int32 covered_line = 2 [packed = true];</code>
+       */
+      int getCoveredLineCount();
+      /**
+       * <code>repeated int32 covered_line = 2 [packed = true];</code>
+       */
+      int getCoveredLine(int index);
+    }
+    /**
+     * Protobuf type {@code org.sonar.server.source.db.Test.CoveredFile}
+     */
+    public static final class CoveredFile extends
+        com.google.protobuf.GeneratedMessage implements
+        // @@protoc_insertion_point(message_implements:org.sonar.server.source.db.Test.CoveredFile)
+        CoveredFileOrBuilder {
+      // Use CoveredFile.newBuilder() to construct.
+      private CoveredFile(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+        super(builder);
+        this.unknownFields = builder.getUnknownFields();
+      }
+      private CoveredFile(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+      private static final CoveredFile defaultInstance;
+      public static CoveredFile getDefaultInstance() {
+        return defaultInstance;
+      }
+
+      public CoveredFile getDefaultInstanceForType() {
+        return defaultInstance;
+      }
+
+      private final com.google.protobuf.UnknownFieldSet unknownFields;
+      @java.lang.Override
+      public final com.google.protobuf.UnknownFieldSet
+          getUnknownFields() {
+        return this.unknownFields;
+      }
+      private CoveredFile(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        initFields();
+        int mutable_bitField0_ = 0;
+        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+            com.google.protobuf.UnknownFieldSet.newBuilder();
+        try {
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              default: {
+                if (!parseUnknownField(input, unknownFields,
+                                       extensionRegistry, tag)) {
+                  done = true;
+                }
+                break;
+              }
+              case 10: {
+                com.google.protobuf.ByteString bs = input.readBytes();
+                bitField0_ |= 0x00000001;
+                fileUuid_ = bs;
+                break;
+              }
+              case 16: {
+                if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+                  coveredLine_ = new java.util.ArrayList<java.lang.Integer>();
+                  mutable_bitField0_ |= 0x00000002;
+                }
+                coveredLine_.add(input.readInt32());
+                break;
+              }
+              case 18: {
+                int length = input.readRawVarint32();
+                int limit = input.pushLimit(length);
+                if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
+                  coveredLine_ = new java.util.ArrayList<java.lang.Integer>();
+                  mutable_bitField0_ |= 0x00000002;
+                }
+                while (input.getBytesUntilLimit() > 0) {
+                  coveredLine_.add(input.readInt32());
+                }
+                input.popLimit(limit);
+                break;
+              }
+            }
+          }
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          throw e.setUnfinishedMessage(this);
+        } catch (java.io.IOException e) {
+          throw new com.google.protobuf.InvalidProtocolBufferException(
+              e.getMessage()).setUnfinishedMessage(this);
+        } finally {
+          if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
+            coveredLine_ = java.util.Collections.unmodifiableList(coveredLine_);
+          }
+          this.unknownFields = unknownFields.build();
+          makeExtensionsImmutable();
+        }
+      }
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_CoveredFile_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.class, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder.class);
+      }
+
+      public static com.google.protobuf.Parser<CoveredFile> PARSER =
+          new com.google.protobuf.AbstractParser<CoveredFile>() {
+        public CoveredFile parsePartialFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws com.google.protobuf.InvalidProtocolBufferException {
+          return new CoveredFile(input, extensionRegistry);
         }
       };
+
+      @java.lang.Override
+      public com.google.protobuf.Parser<CoveredFile> getParserForType() {
+        return PARSER;
+      }
+
+      private int bitField0_;
+      public static final int FILE_UUID_FIELD_NUMBER = 1;
+      private java.lang.Object fileUuid_;
+      /**
+       * <code>optional string file_uuid = 1;</code>
+       */
+      public boolean hasFileUuid() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>optional string file_uuid = 1;</code>
+       */
+      public java.lang.String getFileUuid() {
+        java.lang.Object ref = fileUuid_;
+        if (ref instanceof java.lang.String) {
+          return (java.lang.String) ref;
+        } else {
+          com.google.protobuf.ByteString bs = 
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            fileUuid_ = s;
+          }
+          return s;
+        }
+      }
+      /**
+       * <code>optional string file_uuid = 1;</code>
+       */
+      public com.google.protobuf.ByteString
+          getFileUuidBytes() {
+        java.lang.Object ref = fileUuid_;
+        if (ref instanceof java.lang.String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          fileUuid_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+
+      public static final int COVERED_LINE_FIELD_NUMBER = 2;
+      private java.util.List<java.lang.Integer> coveredLine_;
+      /**
+       * <code>repeated int32 covered_line = 2 [packed = true];</code>
+       */
+      public java.util.List<java.lang.Integer>
+          getCoveredLineList() {
+        return coveredLine_;
+      }
+      /**
+       * <code>repeated int32 covered_line = 2 [packed = true];</code>
+       */
+      public int getCoveredLineCount() {
+        return coveredLine_.size();
+      }
+      /**
+       * <code>repeated int32 covered_line = 2 [packed = true];</code>
+       */
+      public int getCoveredLine(int index) {
+        return coveredLine_.get(index);
+      }
+      private int coveredLineMemoizedSerializedSize = -1;
+
+      private void initFields() {
+        fileUuid_ = "";
+        coveredLine_ = java.util.Collections.emptyList();
+      }
+      private byte memoizedIsInitialized = -1;
+      public final boolean isInitialized() {
+        byte isInitialized = memoizedIsInitialized;
+        if (isInitialized == 1) return true;
+        if (isInitialized == 0) return false;
+
+        memoizedIsInitialized = 1;
+        return true;
+      }
+
+      public void writeTo(com.google.protobuf.CodedOutputStream output)
+                          throws java.io.IOException {
+        getSerializedSize();
+        if (((bitField0_ & 0x00000001) == 0x00000001)) {
+          output.writeBytes(1, getFileUuidBytes());
+        }
+        if (getCoveredLineList().size() > 0) {
+          output.writeRawVarint32(18);
+          output.writeRawVarint32(coveredLineMemoizedSerializedSize);
+        }
+        for (int i = 0; i < coveredLine_.size(); i++) {
+          output.writeInt32NoTag(coveredLine_.get(i));
+        }
+        getUnknownFields().writeTo(output);
+      }
+
+      private int memoizedSerializedSize = -1;
+      public int getSerializedSize() {
+        int size = memoizedSerializedSize;
+        if (size != -1) return size;
+
+        size = 0;
+        if (((bitField0_ & 0x00000001) == 0x00000001)) {
+          size += com.google.protobuf.CodedOutputStream
+            .computeBytesSize(1, getFileUuidBytes());
+        }
+        {
+          int dataSize = 0;
+          for (int i = 0; i < coveredLine_.size(); i++) {
+            dataSize += com.google.protobuf.CodedOutputStream
+              .computeInt32SizeNoTag(coveredLine_.get(i));
+          }
+          size += dataSize;
+          if (!getCoveredLineList().isEmpty()) {
+            size += 1;
+            size += com.google.protobuf.CodedOutputStream
+                .computeInt32SizeNoTag(dataSize);
+          }
+          coveredLineMemoizedSerializedSize = dataSize;
+        }
+        size += getUnknownFields().getSerializedSize();
+        memoizedSerializedSize = size;
+        return size;
+      }
+
+      private static final long serialVersionUID = 0L;
+      @java.lang.Override
+      protected java.lang.Object writeReplace()
+          throws java.io.ObjectStreamException {
+        return super.writeReplace();
+      }
+
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(
+          com.google.protobuf.ByteString data)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(
+          com.google.protobuf.ByteString data,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(byte[] data)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(
+          byte[] data,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return PARSER.parseFrom(data, extensionRegistry);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(java.io.InputStream input)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(
+          java.io.InputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input, extensionRegistry);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseDelimitedFrom(java.io.InputStream input)
+          throws java.io.IOException {
+        return PARSER.parseDelimitedFrom(input);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseDelimitedFrom(
+          java.io.InputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseDelimitedFrom(input, extensionRegistry);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(
+          com.google.protobuf.CodedInputStream input)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input);
+      }
+      public static org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parseFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        return PARSER.parseFrom(input, extensionRegistry);
+      }
+
+      public static Builder newBuilder() { return Builder.create(); }
+      public Builder newBuilderForType() { return newBuilder(); }
+      public static Builder newBuilder(org.sonar.server.source.db.FileSourceDb.Test.CoveredFile prototype) {
+        return newBuilder().mergeFrom(prototype);
+      }
+      public Builder toBuilder() { return newBuilder(this); }
+
+      @java.lang.Override
+      protected Builder newBuilderForType(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        Builder builder = new Builder(parent);
+        return builder;
+      }
+      /**
+       * Protobuf type {@code org.sonar.server.source.db.Test.CoveredFile}
+       */
+      public static final class Builder extends
+          com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+          // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Test.CoveredFile)
+          org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder {
+        public static final com.google.protobuf.Descriptors.Descriptor
+            getDescriptor() {
+          return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor;
+        }
+
+        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+            internalGetFieldAccessorTable() {
+          return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_CoveredFile_fieldAccessorTable
+              .ensureFieldAccessorsInitialized(
+                  org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.class, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder.class);
+        }
+
+        // Construct using org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.newBuilder()
+        private Builder() {
+          maybeForceBuilderInitialization();
+        }
+
+        private Builder(
+            com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+          super(parent);
+          maybeForceBuilderInitialization();
+        }
+        private void maybeForceBuilderInitialization() {
+          if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          }
+        }
+        private static Builder create() {
+          return new Builder();
+        }
+
+        public Builder clear() {
+          super.clear();
+          fileUuid_ = "";
+          bitField0_ = (bitField0_ & ~0x00000001);
+          coveredLine_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000002);
+          return this;
+        }
+
+        public Builder clone() {
+          return create().mergeFrom(buildPartial());
+        }
+
+        public com.google.protobuf.Descriptors.Descriptor
+            getDescriptorForType() {
+          return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor;
+        }
+
+        public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile getDefaultInstanceForType() {
+          return org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.getDefaultInstance();
+        }
+
+        public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile build() {
+          org.sonar.server.source.db.FileSourceDb.Test.CoveredFile result = buildPartial();
+          if (!result.isInitialized()) {
+            throw newUninitializedMessageException(result);
+          }
+          return result;
+        }
+
+        public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile buildPartial() {
+          org.sonar.server.source.db.FileSourceDb.Test.CoveredFile result = new org.sonar.server.source.db.FileSourceDb.Test.CoveredFile(this);
+          int from_bitField0_ = bitField0_;
+          int to_bitField0_ = 0;
+          if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+            to_bitField0_ |= 0x00000001;
+          }
+          result.fileUuid_ = fileUuid_;
+          if (((bitField0_ & 0x00000002) == 0x00000002)) {
+            coveredLine_ = java.util.Collections.unmodifiableList(coveredLine_);
+            bitField0_ = (bitField0_ & ~0x00000002);
+          }
+          result.coveredLine_ = coveredLine_;
+          result.bitField0_ = to_bitField0_;
+          onBuilt();
+          return result;
+        }
+
+        public Builder mergeFrom(com.google.protobuf.Message other) {
+          if (other instanceof org.sonar.server.source.db.FileSourceDb.Test.CoveredFile) {
+            return mergeFrom((org.sonar.server.source.db.FileSourceDb.Test.CoveredFile)other);
+          } else {
+            super.mergeFrom(other);
+            return this;
+          }
+        }
+
+        public Builder mergeFrom(org.sonar.server.source.db.FileSourceDb.Test.CoveredFile other) {
+          if (other == org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.getDefaultInstance()) return this;
+          if (other.hasFileUuid()) {
+            bitField0_ |= 0x00000001;
+            fileUuid_ = other.fileUuid_;
+            onChanged();
+          }
+          if (!other.coveredLine_.isEmpty()) {
+            if (coveredLine_.isEmpty()) {
+              coveredLine_ = other.coveredLine_;
+              bitField0_ = (bitField0_ & ~0x00000002);
+            } else {
+              ensureCoveredLineIsMutable();
+              coveredLine_.addAll(other.coveredLine_);
+            }
+            onChanged();
+          }
+          this.mergeUnknownFields(other.getUnknownFields());
+          return this;
+        }
+
+        public final boolean isInitialized() {
+          return true;
+        }
+
+        public Builder mergeFrom(
+            com.google.protobuf.CodedInputStream input,
+            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+            throws java.io.IOException {
+          org.sonar.server.source.db.FileSourceDb.Test.CoveredFile parsedMessage = null;
+          try {
+            parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            parsedMessage = (org.sonar.server.source.db.FileSourceDb.Test.CoveredFile) e.getUnfinishedMessage();
+            throw e;
+          } finally {
+            if (parsedMessage != null) {
+              mergeFrom(parsedMessage);
+            }
+          }
+          return this;
+        }
+        private int bitField0_;
+
+        private java.lang.Object fileUuid_ = "";
+        /**
+         * <code>optional string file_uuid = 1;</code>
+         */
+        public boolean hasFileUuid() {
+          return ((bitField0_ & 0x00000001) == 0x00000001);
+        }
+        /**
+         * <code>optional string file_uuid = 1;</code>
+         */
+        public java.lang.String getFileUuid() {
+          java.lang.Object ref = fileUuid_;
+          if (!(ref instanceof java.lang.String)) {
+            com.google.protobuf.ByteString bs =
+                (com.google.protobuf.ByteString) ref;
+            java.lang.String s = bs.toStringUtf8();
+            if (bs.isValidUtf8()) {
+              fileUuid_ = s;
+            }
+            return s;
+          } else {
+            return (java.lang.String) ref;
+          }
+        }
+        /**
+         * <code>optional string file_uuid = 1;</code>
+         */
+        public com.google.protobuf.ByteString
+            getFileUuidBytes() {
+          java.lang.Object ref = fileUuid_;
+          if (ref instanceof String) {
+            com.google.protobuf.ByteString b = 
+                com.google.protobuf.ByteString.copyFromUtf8(
+                    (java.lang.String) ref);
+            fileUuid_ = b;
+            return b;
+          } else {
+            return (com.google.protobuf.ByteString) ref;
+          }
+        }
+        /**
+         * <code>optional string file_uuid = 1;</code>
+         */
+        public Builder setFileUuid(
+            java.lang.String value) {
+          if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+          fileUuid_ = value;
+          onChanged();
+          return this;
+        }
+        /**
+         * <code>optional string file_uuid = 1;</code>
+         */
+        public Builder clearFileUuid() {
+          bitField0_ = (bitField0_ & ~0x00000001);
+          fileUuid_ = getDefaultInstance().getFileUuid();
+          onChanged();
+          return this;
+        }
+        /**
+         * <code>optional string file_uuid = 1;</code>
+         */
+        public Builder setFileUuidBytes(
+            com.google.protobuf.ByteString value) {
+          if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+          fileUuid_ = value;
+          onChanged();
+          return this;
+        }
+
+        private java.util.List<java.lang.Integer> coveredLine_ = java.util.Collections.emptyList();
+        private void ensureCoveredLineIsMutable() {
+          if (!((bitField0_ & 0x00000002) == 0x00000002)) {
+            coveredLine_ = new java.util.ArrayList<java.lang.Integer>(coveredLine_);
+            bitField0_ |= 0x00000002;
+           }
+        }
+        /**
+         * <code>repeated int32 covered_line = 2 [packed = true];</code>
+         */
+        public java.util.List<java.lang.Integer>
+            getCoveredLineList() {
+          return java.util.Collections.unmodifiableList(coveredLine_);
+        }
+        /**
+         * <code>repeated int32 covered_line = 2 [packed = true];</code>
+         */
+        public int getCoveredLineCount() {
+          return coveredLine_.size();
+        }
+        /**
+         * <code>repeated int32 covered_line = 2 [packed = true];</code>
+         */
+        public int getCoveredLine(int index) {
+          return coveredLine_.get(index);
+        }
+        /**
+         * <code>repeated int32 covered_line = 2 [packed = true];</code>
+         */
+        public Builder setCoveredLine(
+            int index, int value) {
+          ensureCoveredLineIsMutable();
+          coveredLine_.set(index, value);
+          onChanged();
+          return this;
+        }
+        /**
+         * <code>repeated int32 covered_line = 2 [packed = true];</code>
+         */
+        public Builder addCoveredLine(int value) {
+          ensureCoveredLineIsMutable();
+          coveredLine_.add(value);
+          onChanged();
+          return this;
+        }
+        /**
+         * <code>repeated int32 covered_line = 2 [packed = true];</code>
+         */
+        public Builder addAllCoveredLine(
+            java.lang.Iterable<? extends java.lang.Integer> values) {
+          ensureCoveredLineIsMutable();
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, coveredLine_);
+          onChanged();
+          return this;
+        }
+        /**
+         * <code>repeated int32 covered_line = 2 [packed = true];</code>
+         */
+        public Builder clearCoveredLine() {
+          coveredLine_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000002);
+          onChanged();
+          return this;
+        }
+
+        // @@protoc_insertion_point(builder_scope:org.sonar.server.source.db.Test.CoveredFile)
+      }
+
+      static {
+        defaultInstance = new CoveredFile(true);
+        defaultInstance.initFields();
+      }
+
+      // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Test.CoveredFile)
+    }
+
+    private int bitField0_;
+    public static final int NAME_FIELD_NUMBER = 2;
+    private java.lang.Object name_;
+    /**
+     * <code>optional string name = 2;</code>
+     */
+    public boolean hasName() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>optional string name = 2;</code>
+     */
+    public java.lang.String getName() {
+      java.lang.Object ref = name_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
+          name_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string name = 2;</code>
+     */
+    public com.google.protobuf.ByteString
+        getNameBytes() {
+      java.lang.Object ref = name_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        name_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int STATUS_FIELD_NUMBER = 3;
+    private org.sonar.batch.protocol.Constants.TestStatus status_;
+    /**
+     * <code>optional .TestStatus status = 3;</code>
+     */
+    public boolean hasStatus() {
+      return ((bitField0_ & 0x00000002) == 0x00000002);
+    }
+    /**
+     * <code>optional .TestStatus status = 3;</code>
+     */
+    public org.sonar.batch.protocol.Constants.TestStatus getStatus() {
+      return status_;
+    }
+
+    public static final int EXECUTION_TIME_MS_FIELD_NUMBER = 4;
+    private long executionTimeMs_;
+    /**
+     * <code>optional int64 execution_time_ms = 4;</code>
+     */
+    public boolean hasExecutionTimeMs() {
+      return ((bitField0_ & 0x00000004) == 0x00000004);
+    }
+    /**
+     * <code>optional int64 execution_time_ms = 4;</code>
+     */
+    public long getExecutionTimeMs() {
+      return executionTimeMs_;
+    }
+
+    public static final int STACKTRACE_FIELD_NUMBER = 5;
+    private java.lang.Object stacktrace_;
+    /**
+     * <code>optional string stacktrace = 5;</code>
+     */
+    public boolean hasStacktrace() {
+      return ((bitField0_ & 0x00000008) == 0x00000008);
+    }
+    /**
+     * <code>optional string stacktrace = 5;</code>
+     */
+    public java.lang.String getStacktrace() {
+      java.lang.Object ref = stacktrace_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
+          stacktrace_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string stacktrace = 5;</code>
+     */
+    public com.google.protobuf.ByteString
+        getStacktraceBytes() {
+      java.lang.Object ref = stacktrace_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        stacktrace_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int MSG_FIELD_NUMBER = 6;
+    private java.lang.Object msg_;
+    /**
+     * <code>optional string msg = 6;</code>
+     */
+    public boolean hasMsg() {
+      return ((bitField0_ & 0x00000010) == 0x00000010);
+    }
+    /**
+     * <code>optional string msg = 6;</code>
+     */
+    public java.lang.String getMsg() {
+      java.lang.Object ref = msg_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
+          msg_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string msg = 6;</code>
+     */
+    public com.google.protobuf.ByteString
+        getMsgBytes() {
+      java.lang.Object ref = msg_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        msg_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int COVERED_FILE_FIELD_NUMBER = 7;
+    private java.util.List<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile> coveredFile_;
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    public java.util.List<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile> getCoveredFileList() {
+      return coveredFile_;
+    }
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    public java.util.List<? extends org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder> 
+        getCoveredFileOrBuilderList() {
+      return coveredFile_;
+    }
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    public int getCoveredFileCount() {
+      return coveredFile_.size();
+    }
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile getCoveredFile(int index) {
+      return coveredFile_.get(index);
+    }
+    /**
+     * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+     */
+    public org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder getCoveredFileOrBuilder(
+        int index) {
+      return coveredFile_.get(index);
+    }
+
+    private void initFields() {
+      name_ = "";
+      status_ = org.sonar.batch.protocol.Constants.TestStatus.OK;
+      executionTimeMs_ = 0L;
+      stacktrace_ = "";
+      msg_ = "";
+      coveredFile_ = java.util.Collections.emptyList();
+    }
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeBytes(2, getNameBytes());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        output.writeEnum(3, status_.getNumber());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        output.writeInt64(4, executionTimeMs_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        output.writeBytes(5, getStacktraceBytes());
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        output.writeBytes(6, getMsgBytes());
+      }
+      for (int i = 0; i < coveredFile_.size(); i++) {
+        output.writeMessage(7, coveredFile_.get(i));
+      }
+      getUnknownFields().writeTo(output);
+    }
+
+    private int memoizedSerializedSize = -1;
+    public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(2, getNameBytes());
+      }
+      if (((bitField0_ & 0x00000002) == 0x00000002)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeEnumSize(3, status_.getNumber());
+      }
+      if (((bitField0_ & 0x00000004) == 0x00000004)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeInt64Size(4, executionTimeMs_);
+      }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(5, getStacktraceBytes());
+      }
+      if (((bitField0_ & 0x00000010) == 0x00000010)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(6, getMsgBytes());
+      }
+      for (int i = 0; i < coveredFile_.size(); i++) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(7, coveredFile_.get(i));
+      }
+      size += getUnknownFields().getSerializedSize();
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    @java.lang.Override
+    protected java.lang.Object writeReplace()
+        throws java.io.ObjectStreamException {
+      return super.writeReplace();
+    }
+
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.sonar.server.source.db.FileSourceDb.Test parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+
+    public static Builder newBuilder() { return Builder.create(); }
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.sonar.server.source.db.FileSourceDb.Test prototype) {
+      return newBuilder().mergeFrom(prototype);
+    }
+    public Builder toBuilder() { return newBuilder(this); }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code org.sonar.server.source.db.Test}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:org.sonar.server.source.db.Test)
+        org.sonar.server.source.db.FileSourceDb.TestOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.sonar.server.source.db.FileSourceDb.Test.class, org.sonar.server.source.db.FileSourceDb.Test.Builder.class);
+      }
+
+      // Construct using org.sonar.server.source.db.FileSourceDb.Test.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          getCoveredFileFieldBuilder();
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+
+      public Builder clear() {
+        super.clear();
+        name_ = "";
+        bitField0_ = (bitField0_ & ~0x00000001);
+        status_ = org.sonar.batch.protocol.Constants.TestStatus.OK;
+        bitField0_ = (bitField0_ & ~0x00000002);
+        executionTimeMs_ = 0L;
+        bitField0_ = (bitField0_ & ~0x00000004);
+        stacktrace_ = "";
+        bitField0_ = (bitField0_ & ~0x00000008);
+        msg_ = "";
+        bitField0_ = (bitField0_ & ~0x00000010);
+        if (coveredFileBuilder_ == null) {
+          coveredFile_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000020);
+        } else {
+          coveredFileBuilder_.clear();
+        }
+        return this;
+      }
+
+      public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.sonar.server.source.db.FileSourceDb.internal_static_org_sonar_server_source_db_Test_descriptor;
+      }
+
+      public org.sonar.server.source.db.FileSourceDb.Test getDefaultInstanceForType() {
+        return org.sonar.server.source.db.FileSourceDb.Test.getDefaultInstance();
+      }
+
+      public org.sonar.server.source.db.FileSourceDb.Test build() {
+        org.sonar.server.source.db.FileSourceDb.Test result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      public org.sonar.server.source.db.FileSourceDb.Test buildPartial() {
+        org.sonar.server.source.db.FileSourceDb.Test result = new org.sonar.server.source.db.FileSourceDb.Test(this);
+        int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.name_ = name_;
+        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
+          to_bitField0_ |= 0x00000002;
+        }
+        result.status_ = status_;
+        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
+          to_bitField0_ |= 0x00000004;
+        }
+        result.executionTimeMs_ = executionTimeMs_;
+        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+          to_bitField0_ |= 0x00000008;
+        }
+        result.stacktrace_ = stacktrace_;
+        if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
+          to_bitField0_ |= 0x00000010;
+        }
+        result.msg_ = msg_;
+        if (coveredFileBuilder_ == null) {
+          if (((bitField0_ & 0x00000020) == 0x00000020)) {
+            coveredFile_ = java.util.Collections.unmodifiableList(coveredFile_);
+            bitField0_ = (bitField0_ & ~0x00000020);
+          }
+          result.coveredFile_ = coveredFile_;
+        } else {
+          result.coveredFile_ = coveredFileBuilder_.build();
+        }
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.sonar.server.source.db.FileSourceDb.Test) {
+          return mergeFrom((org.sonar.server.source.db.FileSourceDb.Test)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.sonar.server.source.db.FileSourceDb.Test other) {
+        if (other == org.sonar.server.source.db.FileSourceDb.Test.getDefaultInstance()) return this;
+        if (other.hasName()) {
+          bitField0_ |= 0x00000001;
+          name_ = other.name_;
+          onChanged();
+        }
+        if (other.hasStatus()) {
+          setStatus(other.getStatus());
+        }
+        if (other.hasExecutionTimeMs()) {
+          setExecutionTimeMs(other.getExecutionTimeMs());
+        }
+        if (other.hasStacktrace()) {
+          bitField0_ |= 0x00000008;
+          stacktrace_ = other.stacktrace_;
+          onChanged();
+        }
+        if (other.hasMsg()) {
+          bitField0_ |= 0x00000010;
+          msg_ = other.msg_;
+          onChanged();
+        }
+        if (coveredFileBuilder_ == null) {
+          if (!other.coveredFile_.isEmpty()) {
+            if (coveredFile_.isEmpty()) {
+              coveredFile_ = other.coveredFile_;
+              bitField0_ = (bitField0_ & ~0x00000020);
+            } else {
+              ensureCoveredFileIsMutable();
+              coveredFile_.addAll(other.coveredFile_);
+            }
+            onChanged();
+          }
+        } else {
+          if (!other.coveredFile_.isEmpty()) {
+            if (coveredFileBuilder_.isEmpty()) {
+              coveredFileBuilder_.dispose();
+              coveredFileBuilder_ = null;
+              coveredFile_ = other.coveredFile_;
+              bitField0_ = (bitField0_ & ~0x00000020);
+              coveredFileBuilder_ = 
+                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+                   getCoveredFileFieldBuilder() : null;
+            } else {
+              coveredFileBuilder_.addAllMessages(other.coveredFile_);
+            }
+          }
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+
+      public final boolean isInitialized() {
+        return true;
+      }
+
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        org.sonar.server.source.db.FileSourceDb.Test parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.sonar.server.source.db.FileSourceDb.Test) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      private java.lang.Object name_ = "";
+      /**
+       * <code>optional string name = 2;</code>
+       */
+      public boolean hasName() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>optional string name = 2;</code>
+       */
+      public java.lang.String getName() {
+        java.lang.Object ref = name_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            name_ = s;
+          }
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string name = 2;</code>
+       */
+      public com.google.protobuf.ByteString
+          getNameBytes() {
+        java.lang.Object ref = name_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          name_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string name = 2;</code>
+       */
+      public Builder setName(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+        name_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string name = 2;</code>
+       */
+      public Builder clearName() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        name_ = getDefaultInstance().getName();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string name = 2;</code>
+       */
+      public Builder setNameBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+        name_ = value;
+        onChanged();
+        return this;
+      }
+
+      private org.sonar.batch.protocol.Constants.TestStatus status_ = org.sonar.batch.protocol.Constants.TestStatus.OK;
+      /**
+       * <code>optional .TestStatus status = 3;</code>
+       */
+      public boolean hasStatus() {
+        return ((bitField0_ & 0x00000002) == 0x00000002);
+      }
+      /**
+       * <code>optional .TestStatus status = 3;</code>
+       */
+      public org.sonar.batch.protocol.Constants.TestStatus getStatus() {
+        return status_;
+      }
+      /**
+       * <code>optional .TestStatus status = 3;</code>
+       */
+      public Builder setStatus(org.sonar.batch.protocol.Constants.TestStatus value) {
+        if (value == null) {
+          throw new NullPointerException();
+        }
+        bitField0_ |= 0x00000002;
+        status_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional .TestStatus status = 3;</code>
+       */
+      public Builder clearStatus() {
+        bitField0_ = (bitField0_ & ~0x00000002);
+        status_ = org.sonar.batch.protocol.Constants.TestStatus.OK;
+        onChanged();
+        return this;
+      }
+
+      private long executionTimeMs_ ;
+      /**
+       * <code>optional int64 execution_time_ms = 4;</code>
+       */
+      public boolean hasExecutionTimeMs() {
+        return ((bitField0_ & 0x00000004) == 0x00000004);
+      }
+      /**
+       * <code>optional int64 execution_time_ms = 4;</code>
+       */
+      public long getExecutionTimeMs() {
+        return executionTimeMs_;
+      }
+      /**
+       * <code>optional int64 execution_time_ms = 4;</code>
+       */
+      public Builder setExecutionTimeMs(long value) {
+        bitField0_ |= 0x00000004;
+        executionTimeMs_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional int64 execution_time_ms = 4;</code>
+       */
+      public Builder clearExecutionTimeMs() {
+        bitField0_ = (bitField0_ & ~0x00000004);
+        executionTimeMs_ = 0L;
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object stacktrace_ = "";
+      /**
+       * <code>optional string stacktrace = 5;</code>
+       */
+      public boolean hasStacktrace() {
+        return ((bitField0_ & 0x00000008) == 0x00000008);
+      }
+      /**
+       * <code>optional string stacktrace = 5;</code>
+       */
+      public java.lang.String getStacktrace() {
+        java.lang.Object ref = stacktrace_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            stacktrace_ = s;
+          }
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string stacktrace = 5;</code>
+       */
+      public com.google.protobuf.ByteString
+          getStacktraceBytes() {
+        java.lang.Object ref = stacktrace_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          stacktrace_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string stacktrace = 5;</code>
+       */
+      public Builder setStacktrace(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000008;
+        stacktrace_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string stacktrace = 5;</code>
+       */
+      public Builder clearStacktrace() {
+        bitField0_ = (bitField0_ & ~0x00000008);
+        stacktrace_ = getDefaultInstance().getStacktrace();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string stacktrace = 5;</code>
+       */
+      public Builder setStacktraceBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000008;
+        stacktrace_ = value;
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object msg_ = "";
+      /**
+       * <code>optional string msg = 6;</code>
+       */
+      public boolean hasMsg() {
+        return ((bitField0_ & 0x00000010) == 0x00000010);
+      }
+      /**
+       * <code>optional string msg = 6;</code>
+       */
+      public java.lang.String getMsg() {
+        java.lang.Object ref = msg_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            msg_ = s;
+          }
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string msg = 6;</code>
+       */
+      public com.google.protobuf.ByteString
+          getMsgBytes() {
+        java.lang.Object ref = msg_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          msg_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string msg = 6;</code>
+       */
+      public Builder setMsg(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000010;
+        msg_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string msg = 6;</code>
+       */
+      public Builder clearMsg() {
+        bitField0_ = (bitField0_ & ~0x00000010);
+        msg_ = getDefaultInstance().getMsg();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string msg = 6;</code>
+       */
+      public Builder setMsgBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000010;
+        msg_ = value;
+        onChanged();
+        return this;
+      }
+
+      private java.util.List<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile> coveredFile_ =
+        java.util.Collections.emptyList();
+      private void ensureCoveredFileIsMutable() {
+        if (!((bitField0_ & 0x00000020) == 0x00000020)) {
+          coveredFile_ = new java.util.ArrayList<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile>(coveredFile_);
+          bitField0_ |= 0x00000020;
+         }
+      }
+
+      private com.google.protobuf.RepeatedFieldBuilder<
+          org.sonar.server.source.db.FileSourceDb.Test.CoveredFile, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder, org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder> coveredFileBuilder_;
+
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public java.util.List<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile> getCoveredFileList() {
+        if (coveredFileBuilder_ == null) {
+          return java.util.Collections.unmodifiableList(coveredFile_);
+        } else {
+          return coveredFileBuilder_.getMessageList();
+        }
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public int getCoveredFileCount() {
+        if (coveredFileBuilder_ == null) {
+          return coveredFile_.size();
+        } else {
+          return coveredFileBuilder_.getCount();
+        }
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile getCoveredFile(int index) {
+        if (coveredFileBuilder_ == null) {
+          return coveredFile_.get(index);
+        } else {
+          return coveredFileBuilder_.getMessage(index);
+        }
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder setCoveredFile(
+          int index, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile value) {
+        if (coveredFileBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureCoveredFileIsMutable();
+          coveredFile_.set(index, value);
+          onChanged();
+        } else {
+          coveredFileBuilder_.setMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder setCoveredFile(
+          int index, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder builderForValue) {
+        if (coveredFileBuilder_ == null) {
+          ensureCoveredFileIsMutable();
+          coveredFile_.set(index, builderForValue.build());
+          onChanged();
+        } else {
+          coveredFileBuilder_.setMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder addCoveredFile(org.sonar.server.source.db.FileSourceDb.Test.CoveredFile value) {
+        if (coveredFileBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureCoveredFileIsMutable();
+          coveredFile_.add(value);
+          onChanged();
+        } else {
+          coveredFileBuilder_.addMessage(value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder addCoveredFile(
+          int index, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile value) {
+        if (coveredFileBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          ensureCoveredFileIsMutable();
+          coveredFile_.add(index, value);
+          onChanged();
+        } else {
+          coveredFileBuilder_.addMessage(index, value);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder addCoveredFile(
+          org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder builderForValue) {
+        if (coveredFileBuilder_ == null) {
+          ensureCoveredFileIsMutable();
+          coveredFile_.add(builderForValue.build());
+          onChanged();
+        } else {
+          coveredFileBuilder_.addMessage(builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder addCoveredFile(
+          int index, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder builderForValue) {
+        if (coveredFileBuilder_ == null) {
+          ensureCoveredFileIsMutable();
+          coveredFile_.add(index, builderForValue.build());
+          onChanged();
+        } else {
+          coveredFileBuilder_.addMessage(index, builderForValue.build());
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder addAllCoveredFile(
+          java.lang.Iterable<? extends org.sonar.server.source.db.FileSourceDb.Test.CoveredFile> values) {
+        if (coveredFileBuilder_ == null) {
+          ensureCoveredFileIsMutable();
+          com.google.protobuf.AbstractMessageLite.Builder.addAll(
+              values, coveredFile_);
+          onChanged();
+        } else {
+          coveredFileBuilder_.addAllMessages(values);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder clearCoveredFile() {
+        if (coveredFileBuilder_ == null) {
+          coveredFile_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000020);
+          onChanged();
+        } else {
+          coveredFileBuilder_.clear();
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public Builder removeCoveredFile(int index) {
+        if (coveredFileBuilder_ == null) {
+          ensureCoveredFileIsMutable();
+          coveredFile_.remove(index);
+          onChanged();
+        } else {
+          coveredFileBuilder_.remove(index);
+        }
+        return this;
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder getCoveredFileBuilder(
+          int index) {
+        return getCoveredFileFieldBuilder().getBuilder(index);
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder getCoveredFileOrBuilder(
+          int index) {
+        if (coveredFileBuilder_ == null) {
+          return coveredFile_.get(index);  } else {
+          return coveredFileBuilder_.getMessageOrBuilder(index);
+        }
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public java.util.List<? extends org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder> 
+           getCoveredFileOrBuilderList() {
+        if (coveredFileBuilder_ != null) {
+          return coveredFileBuilder_.getMessageOrBuilderList();
+        } else {
+          return java.util.Collections.unmodifiableList(coveredFile_);
+        }
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder addCoveredFileBuilder() {
+        return getCoveredFileFieldBuilder().addBuilder(
+            org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.getDefaultInstance());
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder addCoveredFileBuilder(
+          int index) {
+        return getCoveredFileFieldBuilder().addBuilder(
+            index, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.getDefaultInstance());
+      }
+      /**
+       * <code>repeated .org.sonar.server.source.db.Test.CoveredFile covered_file = 7;</code>
+       */
+      public java.util.List<org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder> 
+           getCoveredFileBuilderList() {
+        return getCoveredFileFieldBuilder().getBuilderList();
+      }
+      private com.google.protobuf.RepeatedFieldBuilder<
+          org.sonar.server.source.db.FileSourceDb.Test.CoveredFile, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder, org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder> 
+          getCoveredFileFieldBuilder() {
+        if (coveredFileBuilder_ == null) {
+          coveredFileBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
+              org.sonar.server.source.db.FileSourceDb.Test.CoveredFile, org.sonar.server.source.db.FileSourceDb.Test.CoveredFile.Builder, org.sonar.server.source.db.FileSourceDb.Test.CoveredFileOrBuilder>(
+                  coveredFile_,
+                  ((bitField0_ & 0x00000020) == 0x00000020),
+                  getParentForChildren(),
+                  isClean());
+          coveredFile_ = null;
+        }
+        return coveredFileBuilder_;
+      }
+
+      // @@protoc_insertion_point(builder_scope:org.sonar.server.source.db.Test)
+    }
+
+    static {
+      defaultInstance = new Test(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:org.sonar.server.source.db.Test)
+  }
+
+  private static final com.google.protobuf.Descriptors.Descriptor
+    internal_static_org_sonar_server_source_db_Line_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_org_sonar_server_source_db_Line_fieldAccessorTable;
+  private static final com.google.protobuf.Descriptors.Descriptor
+    internal_static_org_sonar_server_source_db_Data_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_org_sonar_server_source_db_Data_fieldAccessorTable;
+  private static final com.google.protobuf.Descriptors.Descriptor
+    internal_static_org_sonar_server_source_db_Test_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_org_sonar_server_source_db_Test_fieldAccessorTable;
+  private static final com.google.protobuf.Descriptors.Descriptor
+    internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_org_sonar_server_source_db_Test_CoveredFile_fieldAccessorTable;
+
+  public static com.google.protobuf.Descriptors.FileDescriptor
+      getDescriptor() {
+    return descriptor;
+  }
+  private static com.google.protobuf.Descriptors.FileDescriptor
+      descriptor;
+  static {
+    java.lang.String[] descriptorData = {
+      "\n\024file_source_db.proto\022\032org.sonar.server" +
+      ".source.db\032\017constants.proto\"\223\003\n\004Line\022\014\n\004" +
+      "line\030\001 \001(\005\022\016\n\006source\030\002 \001(\t\022\024\n\014scm_revisi" +
+      "on\030\003 \001(\t\022\022\n\nscm_author\030\004 \001(\t\022\020\n\010scm_date" +
+      "\030\005 \001(\003\022\024\n\014ut_line_hits\030\006 \001(\005\022\025\n\rut_condi" +
+      "tions\030\007 \001(\005\022\035\n\025ut_covered_conditions\030\010 \001" +
+      "(\005\022\024\n\014it_line_hits\030\t \001(\005\022\025\n\rit_condition" +
+      "s\030\n \001(\005\022\035\n\025it_covered_conditions\030\013 \001(\005\022\031" +
+      "\n\021overall_line_hits\030\014 \001(\005\022\032\n\022overall_con" +
+      "ditions\030\r \001(\005\022\"\n\032overall_covered_conditi",
+      "ons\030\016 \001(\005\022\024\n\014highlighting\030\017 \001(\t\022\017\n\007symbo" +
+      "ls\030\020 \001(\t\022\027\n\013duplication\030\021 \003(\005B\002\020\001\"7\n\004Dat" +
+      "a\022/\n\005lines\030\001 \003(\0132 .org.sonar.server.sour" +
+      "ce.db.Line\"\355\001\n\004Test\022\014\n\004name\030\002 \001(\t\022\033\n\006sta" +
+      "tus\030\003 \001(\0162\013.TestStatus\022\031\n\021execution_time" +
+      "_ms\030\004 \001(\003\022\022\n\nstacktrace\030\005 \001(\t\022\013\n\003msg\030\006 \001" +
+      "(\t\022B\n\014covered_file\030\007 \003(\0132,.org.sonar.ser" +
+      "ver.source.db.Test.CoveredFile\032:\n\013Covere" +
+      "dFile\022\021\n\tfile_uuid\030\001 \001(\t\022\030\n\014covered_line" +
+      "\030\002 \003(\005B\002\020\001B\002H\001"
+    };
+    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
+        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
+          public com.google.protobuf.ExtensionRegistry assignDescriptors(
+              com.google.protobuf.Descriptors.FileDescriptor root) {
+            descriptor = root;
+            return null;
+          }
+        };
     com.google.protobuf.Descriptors.FileDescriptor
       .internalBuildGeneratedFileFrom(descriptorData,
         new com.google.protobuf.Descriptors.FileDescriptor[] {
+          org.sonar.batch.protocol.Constants.getDescriptor(),
         }, assigner);
+    internal_static_org_sonar_server_source_db_Line_descriptor =
+      getDescriptor().getMessageTypes().get(0);
+    internal_static_org_sonar_server_source_db_Line_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_org_sonar_server_source_db_Line_descriptor,
+        new java.lang.String[] { "Line", "Source", "ScmRevision", "ScmAuthor", "ScmDate", "UtLineHits", "UtConditions", "UtCoveredConditions", "ItLineHits", "ItConditions", "ItCoveredConditions", "OverallLineHits", "OverallConditions", "OverallCoveredConditions", "Highlighting", "Symbols", "Duplication", });
+    internal_static_org_sonar_server_source_db_Data_descriptor =
+      getDescriptor().getMessageTypes().get(1);
+    internal_static_org_sonar_server_source_db_Data_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_org_sonar_server_source_db_Data_descriptor,
+        new java.lang.String[] { "Lines", });
+    internal_static_org_sonar_server_source_db_Test_descriptor =
+      getDescriptor().getMessageTypes().get(2);
+    internal_static_org_sonar_server_source_db_Test_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_org_sonar_server_source_db_Test_descriptor,
+        new java.lang.String[] { "Name", "Status", "ExecutionTimeMs", "Stacktrace", "Msg", "CoveredFile", });
+    internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor =
+      internal_static_org_sonar_server_source_db_Test_descriptor.getNestedTypes().get(0);
+    internal_static_org_sonar_server_source_db_Test_CoveredFile_fieldAccessorTable = new
+      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+        internal_static_org_sonar_server_source_db_Test_CoveredFile_descriptor,
+        new java.lang.String[] { "FileUuid", "CoveredLine", });
+    org.sonar.batch.protocol.Constants.getDescriptor();
   }
 
   // @@protoc_insertion_point(outer_class_scope)
index a0068fad2d752194a46c6134d29298df25bb720b..c28069157c15c4625cd566fa9d519af3d947a636 100644 (file)
@@ -36,6 +36,9 @@ Notes
 // are already in correct package
 
 package org.sonar.server.source.db;
+
+import "constants.proto";
+
 option optimize_for = SPEED;
 
 message Line {
@@ -64,9 +67,23 @@ message Line {
 
   optional string highlighting = 15;
   optional string symbols = 16;
-  repeated int32 duplication = 17 [packed=true];
+  repeated int32 duplication = 17 [packed = true];
 }
 
 message Data {
   repeated Line lines = 1;
 }
+
+message Test {
+  optional string name = 2;
+  optional TestStatus status = 3;
+  optional int64 execution_time_ms = 4;
+  optional string stacktrace = 5;
+  optional string msg = 6;
+  repeated CoveredFile covered_file = 7;
+
+  message CoveredFile {
+    optional string file_uuid = 1;
+    repeated int32 covered_line = 2 [packed = true];
+  }
+}
diff --git a/sonar-batch-protocol/src/main/protobuf/file_source_test_db.proto b/sonar-batch-protocol/src/main/protobuf/file_source_test_db.proto
deleted file mode 100644 (file)
index 4f3678b..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
-    SonarQube, open source software quality management tool.
-    Copyright (C) 2008-2015 SonarSource
-    mailto:contact AT sonarsource DOT com
-
-    SonarQube is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 3 of the License, or (at your option) any later version.
-
-    SonarQube is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public License
-    along with this program; if not, write to the Free Software Foundation,
-    Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-*/
-
-/*
-Notes
-
-  - "required" fields are not used as recommended by Google to keep forward-compatibility:
-    https://developers.google.com/protocol-buffers/docs/proto#simple
-
-  - the related Java files are not generated during build. Indeed the existing protoc maven
-    plugins require protobuf to be installed on boxes. That means that generated Java files
-    are updated and committed for each change (see src/main/gen-java).
-*/
-
-// structure of db column FILE_SOURCES.TEST_DATA
-
-// Temporarily in sonar-batch-protocol
-
-package org.sonar.server.source.db;
-
-option optimize_for = SPEED;
-
-message Test {
-  optional string uuid = 1;
-  optional string key = 2;
-  optional string method_name = 3;
-  optional string status = 4;
-  optional string test_message = 5;
-  optional string type = 6;
-  repeated CoverageBlock coverage_block = 7;
-
-  message CoverageBlock {
-    optional string uuid = 1;
-    //TODO TBE - should the key and long_name specified directly ?
-    optional string key = 2;
-    optional string long_name = 3;
-    repeated int32 lines = 4;
-    optional int32 nb_covered_lines = 5;
-  }
-}
-
-message Tests {
-  repeated Test test = 1;
-}
\ No newline at end of file
index 223e997950eec68b49b61a1d17d986e76ce42b69..6f6b32389fec5e412a25c634d6ffb68d19285362 100644 (file)
@@ -324,7 +324,7 @@ public class BatchReportReaderTest {
     BatchReportWriter writer = new BatchReportWriter(dir);
     writer.writeTests(1, Arrays.asList(
       BatchReport.Test.newBuilder()
-        .setDurationInMs(60_000)
+        .setExecutionTimeMs(60_000)
         .setStacktrace("stacktrace")
         .setMsg("message")
         .setStatus(Constants.TestStatus.OK)
@@ -332,7 +332,7 @@ public class BatchReportReaderTest {
 
     try (InputStream inputStream = FileUtils.openInputStream(sut.readTests(1))) {
       BatchReport.Test testResult = BatchReport.Test.PARSER.parseDelimitedFrom(inputStream);
-      assertThat(testResult.getDurationInMs()).isEqualTo(60_000);
+      assertThat(testResult.getExecutionTimeMs()).isEqualTo(60_000);
       assertThat(testResult.getStacktrace()).isEqualTo("stacktrace");
       assertThat(testResult.getMsg()).isEqualTo("message");
       assertThat(testResult.getStatus()).isEqualTo(Constants.TestStatus.OK);
index d290959407ebaeed6fd2d77309db059feb6e267e..83c7bb7bb5a08578f41d54c0835846774f800880 100644 (file)
@@ -128,7 +128,7 @@ public class AnalysisReportDto {
     return this;
   }
 
-  public static enum Status {
+  public enum Status {
     PENDING, WORKING, SUCCESS, FAILED, CANCELLED
   }
 }
index 3efeb1e1db6c0e7b9b9285deee6e0c097c2ac5e8..07df74fba0113849d96072f77302649bd78b4551 100644 (file)
@@ -23,6 +23,7 @@ import net.jpountz.lz4.LZ4BlockInputStream;
 import net.jpountz.lz4.LZ4BlockOutputStream;
 import org.apache.commons.io.IOUtils;
 import org.sonar.server.source.db.FileSourceDb;
+import org.sonar.server.source.db.FileSourceDb.Test;
 
 import javax.annotation.CheckForNull;
 import javax.annotation.Nullable;
@@ -31,6 +32,8 @@ import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
 
 public class FileSourceDto {
 
@@ -72,6 +75,7 @@ public class FileSourceDto {
     return this;
   }
 
+  @CheckForNull
   public String getDataHash() {
     return dataHash;
   }
@@ -84,34 +88,68 @@ public class FileSourceDto {
     return this;
   }
 
+  public static FileSourceDb.Data decodeSourceData(byte[] binaryData) {
+    // stream is always closed
+    return decodeSourceData(new ByteArrayInputStream(binaryData));
+  }
+
   /**
-   * Compressed value of serialized protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
+   * Decompress and deserialize content of column FILE_SOURCES.BINARY_DATA.
+   * The parameter "input" is always closed by this method.
    */
-  public byte[] getBinaryData() {
-    return binaryData;
+  public static FileSourceDb.Data decodeSourceData(InputStream binaryInput) {
+    LZ4BlockInputStream lz4Input = null;
+    try {
+      lz4Input = new LZ4BlockInputStream(binaryInput);
+      return FileSourceDb.Data.parseFrom(lz4Input);
+    } catch (IOException e) {
+      throw new IllegalStateException("Fail to decompress and deserialize source data", e);
+    } finally {
+      IOUtils.closeQuietly(lz4Input);
+    }
   }
 
   /**
-   * Compressed value of serialized protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
+   * Serialize and compress protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
+   * in the column BINARY_DATA.
    */
-  public FileSourceDb.Data getData() {
-    return decodeData(binaryData);
+  public static byte[] encodeSourceData(FileSourceDb.Data data) {
+    ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
+    LZ4BlockOutputStream compressedOutput = new LZ4BlockOutputStream(byteOutput);
+    try {
+      data.writeTo(compressedOutput);
+      compressedOutput.close();
+      return byteOutput.toByteArray();
+    } catch (IOException e) {
+      throw new IllegalStateException("Fail to serialize and compress source data", e);
+    } finally {
+      IOUtils.closeQuietly(compressedOutput);
+    }
   }
 
-  public static FileSourceDb.Data decodeData(byte[] binaryData) {
+  public static List<Test> decodeTestData(byte[] binaryData) {
     // stream is always closed
-    return decodeData(new ByteArrayInputStream(binaryData));
+    return decodeTestData(new ByteArrayInputStream(binaryData));
   }
 
   /**
    * Decompress and deserialize content of column FILE_SOURCES.BINARY_DATA.
    * The parameter "input" is always closed by this method.
    */
-  public static FileSourceDb.Data decodeData(InputStream binaryInput) {
+  public static List<Test> decodeTestData(InputStream binaryInput) {
     LZ4BlockInputStream lz4Input = null;
+    List<Test> tests = new ArrayList<>();
     try {
       lz4Input = new LZ4BlockInputStream(binaryInput);
-      return FileSourceDb.Data.parseFrom(lz4Input);
+
+      Test currentTest;
+      do {
+        currentTest = Test.parseDelimitedFrom(lz4Input);
+        if (currentTest != null) {
+          tests.add(currentTest);
+        }
+      } while (currentTest != null);
+      return tests;
     } catch (IOException e) {
       throw new IllegalStateException("Fail to decompress and deserialize source data", e);
     } finally {
@@ -119,37 +157,67 @@ public class FileSourceDto {
     }
   }
 
-  /**
-   * Set compressed value of the protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
-   */
-  public FileSourceDto setBinaryData(byte[] data) {
-    this.binaryData = data;
-    return this;
-  }
-
-  public FileSourceDto setData(FileSourceDb.Data data) {
-    this.binaryData = encodeData(data);
-    return this;
-  }
-
   /**
    * Serialize and compress protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
    * in the column BINARY_DATA.
    */
-  public static byte[] encodeData(FileSourceDb.Data data) {
+  public static byte[] encodeTestData(List<Test> tests) {
     ByteArrayOutputStream byteOutput = new ByteArrayOutputStream();
     LZ4BlockOutputStream compressedOutput = new LZ4BlockOutputStream(byteOutput);
     try {
-      data.writeTo(compressedOutput);
+      for (Test test : tests) {
+        test.writeDelimitedTo(compressedOutput);
+      }
       compressedOutput.close();
       return byteOutput.toByteArray();
     } catch (IOException e) {
-      throw new IllegalStateException("Fail to serialize and compress source data", e);
+      throw new IllegalStateException("Fail to serialize and compress source tests", e);
     } finally {
       IOUtils.closeQuietly(compressedOutput);
     }
   }
 
+  /**
+   * Compressed value of serialized protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
+   */
+  public byte[] getBinaryData() {
+    return binaryData;
+  }
+
+  /**
+   * Set compressed value of the protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
+   */
+  public FileSourceDto setBinaryData(byte[] data) {
+    this.binaryData = data;
+    return this;
+  }
+
+  /**
+   * Compressed value of serialized protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
+   */
+  public FileSourceDb.Data getSourceData() {
+    return decodeSourceData(binaryData);
+  }
+
+  public FileSourceDto setSourceData(FileSourceDb.Data data) {
+    this.dataType = Type.SOURCE;
+    this.binaryData = encodeSourceData(data);
+    return this;
+  }
+
+  /**
+   * Compressed value of serialized protobuf message {@link org.sonar.server.source.db.FileSourceDb.Data}
+   */
+  public List<Test> getTestData() {
+    return decodeTestData(binaryData);
+  }
+
+  public FileSourceDto setTestData(List<Test> data) {
+    this.dataType = Type.TEST;
+    this.binaryData = encodeTestData(data);
+    return this;
+  }
+
   @CheckForNull
   public String getLineHashes() {
     return lineHashes;
@@ -160,6 +228,7 @@ public class FileSourceDto {
     return this;
   }
 
+  @CheckForNull
   public String getSrcHash() {
     return srcHash;
   }
@@ -167,7 +236,7 @@ public class FileSourceDto {
   /**
    * Hash of file content. Value is computed by batch.
    */
-  public FileSourceDto setSrcHash(String srcHash) {
+  public FileSourceDto setSrcHash(@Nullable String srcHash) {
     this.srcHash = srcHash;
     return this;
   }
@@ -200,7 +269,7 @@ public class FileSourceDto {
   }
 
   public static class Type {
-    public final static String SOURCE = "SOURCE";
-    public final static String TEST = "TEST";
+    public static final String SOURCE = "SOURCE";
+    public static final String TEST = "TEST";
   }
 }
index 633e4d140ed30b6da1d4efeba466719b310b9920..027b2b02a165ddad4e73607a357f0e9ea65305b8 100644 (file)
@@ -28,17 +28,14 @@ import java.util.List;
 
 public interface FileSourceMapper {
 
-  List<FileSourceDto> selectHashesForProject(String projectUuid);
+  List<FileSourceDto> selectHashesForProject(@Param("projectUuid") String projectUuid, @Param("dataType") String dataType);
 
   @CheckForNull
-  FileSourceDto select(String fileUuid);
+  FileSourceDto select(@Param("fileUuid") String fileUuid, @Param("dataType") String dataType);
 
   void insert(FileSourceDto dto);
 
   void update(FileSourceDto dto);
 
   void updateDateWhenUpdatedDateIsZero(@Param("projectUuid") String projectUuid, @Param("date") Long updateDate);
-
-  @CheckForNull
-  String selectLineHashes(String fileUuid);
 }
index 5636c21f8895c48e091631078a23b65398849059..ade0db0a4a0cf10246d396450627e3200bf12305 100644 (file)
@@ -563,8 +563,8 @@ CREATE TABLE "FILE_SOURCES" (
   "LINE_HASHES" CLOB(2147483647),
   "BINARY_DATA" BLOB(167772150),
   "DATA_TYPE" VARCHAR(20),
-  "DATA_HASH" VARCHAR(50) NOT NULL,
-  "SRC_HASH" VARCHAR(50) NULL,
+  "DATA_HASH" VARCHAR(50),
+  "SRC_HASH" VARCHAR(50),
   "CREATED_AT" BIGINT NOT NULL,
   "UPDATED_AT" BIGINT NOT NULL
 );
index 383fe29178adc7a60896079a840edd3699f20933..290ab9f2d315071804aa466d44d5c9f74fdafd53 100644 (file)
@@ -4,34 +4,33 @@
 
 <mapper namespace="org.sonar.core.source.db.FileSourceMapper">
 
-  <select id="select" parameterType="string" resultType="org.sonar.core.source.db.FileSourceDto">
+  <select id="select" parameterType="map" resultType="org.sonar.core.source.db.FileSourceDto">
     SELECT id, project_uuid as projectUuid, file_uuid as fileUuid, created_at as createdAt, updated_at as updatedAt,
     binary_data as binaryData, line_hashes as lineHashes, data_hash as dataHash, src_hash as srcHash, data_type as dataType
     FROM file_sources
-    WHERE file_uuid = #{fileUuid}
+    WHERE file_uuid = #{fileUuid} and data_type = #{dataType}
   </select>
-  
-  <select id="selectHashesForProject" parameterType="string" resultType="org.sonar.core.source.db.FileSourceDto">
-    SELECT id, file_uuid as fileUuid, data_type as dataType, data_hash as dataHash, src_hash as srcHash, updated_at as updatedAt
+
+  <select id="selectHashesForProject" parameterType="map" resultType="org.sonar.core.source.db.FileSourceDto">
+    SELECT id, file_uuid as fileUuid, data_hash as dataHash, src_hash as srcHash, updated_at as updatedAt
     FROM file_sources
-    WHERE project_uuid = #{projectUuid}
+    WHERE project_uuid = #{projectUuid} and data_type=#{dataType}
   </select>
-  
+
   <insert id="insert" parameterType="org.sonar.core.source.db.FileSourceDto" useGeneratedKeys="false">
     INSERT INTO file_sources (project_uuid, file_uuid, created_at, updated_at, binary_data, line_hashes, data_hash, src_hash, data_type)
     VALUES (#{projectUuid,jdbcType=VARCHAR}, #{fileUuid,jdbcType=VARCHAR}, #{createdAt,jdbcType=BIGINT},
     #{updatedAt,jdbcType=BIGINT}, #{binaryData,jdbcType=BLOB}, #{lineHashes,jdbcType=CLOB},
     #{dataHash,jdbcType=VARCHAR}, #{srcHash,jdbcType=VARCHAR},#{dataType,jdbcType=VARCHAR})
   </insert>
-  
+
   <update id="update" parameterType="org.sonar.core.source.db.FileSourceDto" useGeneratedKeys="false">
     UPDATE file_sources SET
       updated_at = #{updatedAt,jdbcType=BIGINT},
       binary_data = #{binaryData,jdbcType=BLOB},
       line_hashes = #{lineHashes,jdbcType=CLOB},
       data_hash = #{dataHash,jdbcType=VARCHAR},
-      src_hash = #{srcHash,jdbcType=VARCHAR},
-      data_type = #{dataType,jdbcType=VARCHAR}
+      src_hash = #{srcHash,jdbcType=VARCHAR}
     WHERE id = #{id}
   </update>
 
     WHERE project_uuid = #{projectUuid}
       AND updated_at = 0
   </update>
-
-  <select id="selectLineHashes" parameterType="string" resultType="String">
-    SELECT line_hashes
-    FROM file_sources
-    WHERE file_uuid = #{fileUuid}
-  </select>
-
 </mapper>
 
index 0e57b5654e3eba9355affb8ce6d892d4f0c4c28e..b8bd2786135a2283b9cad0cfd365218d0f99ae26 100644 (file)
@@ -86,7 +86,6 @@ public class PurgeDaoTest extends AbstractDaoTestCase {
     return new PurgeConfiguration(new IdUuidPair(1L, "1"), new String[0], 30, system2);
   }
 
-
   @Test
   public void delete_file_sources_of_disabled_resources() {
     setupData("delete_file_sources_of_disabled_resources");
diff --git a/sonar-core/src/test/java/org/sonar/core/source/db/FileSourceDtoTest.java b/sonar-core/src/test/java/org/sonar/core/source/db/FileSourceDtoTest.java
new file mode 100644 (file)
index 0000000..4c35513
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ */
+
+package org.sonar.core.source.db;
+
+import org.junit.Test;
+import org.sonar.server.source.db.FileSourceDb;
+
+import java.util.Arrays;
+import java.util.List;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+public class FileSourceDtoTest {
+
+  @Test
+  public void encode_and_decode_test_data() throws Exception {
+    List<FileSourceDb.Test> tests = Arrays.asList(
+      FileSourceDb.Test.newBuilder()
+        .setName("name#1")
+        .build(),
+      FileSourceDb.Test.newBuilder()
+        .setName("name#2")
+        .build()
+      );
+
+    FileSourceDto sut = new FileSourceDto()
+      .setTestData(tests);
+
+    assertThat(sut.getTestData()).hasSize(2);
+    assertThat(sut.getTestData().get(0).getName()).isEqualTo("name#1");
+  }
+}
index 584b01091971aeab16550425e6f9e8111e196b07..6d5aea37b00f3aad68556222a27a0008064edad8 100644 (file)
@@ -2,4 +2,6 @@
 
   <file_sources id="2" project_uuid="ABCD" file_uuid="KLMN" binary_data="[null]" line_hashes="[null]" data_hash="321654988"
                 created_at="123456789" updated_at="123456789" src_hash="123456" data_type="SOURCE" />
+  <file_sources id="4" project_uuid="ABCD" file_uuid="KLMN" binary_data="[null]" line_hashes="[null]" data_hash="321654988"
+                created_at="123456789" updated_at="123456789" src_hash="123456" data_type="TEST" />
 </dataset>
index f9a5fcbb2aee7256e5eec85e33546ab58b0f929c..927b57d41c387554cbdcdd809c94a5d3aa9f8eb2 100644 (file)
@@ -76,4 +76,8 @@
                 created_at="123456789" updated_at="123456789" src_hash="12345" data_type="SOURCE" />
   <file_sources id="2" project_uuid="ABCD" file_uuid="KLMN" binary_data="[null]" line_hashes="[null]" data_hash="321654988"
                 created_at="123456789" updated_at="123456789" src_hash="123456" data_type="SOURCE" />
+  <file_sources id="3" project_uuid="ABCD" file_uuid="GHIJ" binary_data="[null]" line_hashes="[null]" data_hash="321654987"
+                created_at="123456789" updated_at="123456789" src_hash="12345" data_type="TEST" />
+  <file_sources id="4" project_uuid="ABCD" file_uuid="KLMN" binary_data="[null]" line_hashes="[null]" data_hash="321654988"
+                created_at="123456789" updated_at="123456789" src_hash="123456" data_type="TEST" />
 </dataset>