Skip to content

Commit

Permalink
address further sonarcloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KochTobi committed Jan 22, 2025
1 parent 4e8e94e commit 5b0befc
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 226 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
import java.util.Objects;

/**
* TODO!
* <b>short description</b>
* Data describing a confounding variable in the database
*
* <p>detailed description</p>
*
* @since <version tag>
* @since 1.8.0
*/
@Entity
@Table(name = "experiments_datamanager_confounding_variables")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@
import jakarta.persistence.Table;

/**
* TODO!
* <b>short description</b>
* Data describing a confounding variable level in the database
*
* <p>detailed description</p>
*
* @since <version tag>
* @since 1.8.0
*/
@Entity
@Table(name = "confounding_variable_levels")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@
import org.springframework.security.access.prepost.PreAuthorize;

/**
* TODO!
* <b>short description</b>
* The repository of confounding variable levels
*
* <p>detailed description</p>
*
* @since <version tag>
* @since 1.8.0
*/
public interface ConfoundingVariableLevelRepository {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@
import org.springframework.security.access.prepost.PreAuthorize;

/**
* TODO!
* <b>short description</b>
* The repository of confounding variables
*
* <p>detailed description</p>
*
* @since <version tag>
* @since 1.8.0
*/
public interface ConfoundingVariableRepository {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Function;
Expand Down Expand Up @@ -49,39 +47,6 @@ public static MetadataConverter measurementConverter() {
return new MetadataConverter();
}

/**
* Generates a hit map, storing the number of matches of a defined set of String values (hit
* values), in a target of interest collection of String values.
* <p>
* The resulting map will contain the number of occurrences of every value in the hit values
* collection found in the target collection to investigate.
*
* @param target the collection of interest to search in
* @param hitValues a set of distinct values, that should be represented in the hit result map
* @return a hit result map, containing the number of occurrences of every hit value in the target
* String collection (0, if no target was found for a value).
* @since 1.4.0
*/
private static Map<String, Integer> countHits(Collection<String> target, Set<String> hitValues,
String... ignoredProperties) {
Map<String, Integer> hits = new HashMap<>();
for (String t : hitValues) {
hits.put(t, 0);
}
for (String s : target) {
if (hitValues.contains(s)) {
var currentHit = hits.get(s);
hits.put(s, ++currentHit);
}
}
for (String ignoredProperty : ignoredProperties) {
if (hits.containsKey((ignoredProperty))) {
hits.remove(ignoredProperty);
}
}
return hits;
}

@Override
public List<MeasurementMetadata> convertRegister(ParsingResult parsingResult)
throws UnknownMetadataTypeException, MissingSampleIdException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private static void setAutoWidth(Sheet sheet) {
@Override
public byte[] getContent() {
try (Workbook workbook = new XSSFWorkbook();
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();) {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) {

CellStyle readOnlyHeaderStyle = XLSXTemplateHelper.createReadOnlyHeaderCellStyle(workbook);
CellStyle boldStyle = createBoldCellStyle(workbook);
Expand Down

This file was deleted.

0 comments on commit 5b0befc

Please sign in to comment.