<commit_before>package org.pdxfinder.transcommands;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.pdxfinder.admin.pojos.MappingEntity;
import org.pdxfinder.admin.zooma.Studies;
import org.pdxfinder.admin.zooma.ZoomaEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.jvm.hotspot.debugger.cdbg.LoadObject;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class ZoomaTransform {


    private ObjectMapper mapper = new ObjectMapper();
    private List<ZoomaEntity> zoomaEntities = new ArrayList<>();

    @Autowired
    DataTransformerService transformerService;

    public ZoomaTransform() {
    }


    public List<ZoomaEntity> transforMappingsForZooma(String knowledgBaseURL){

        Map<String, List<Map>> dMappingRow = mapper.convertValue(transformerService.connectToJSON(knowledgBaseURL), Map.class);

        List<Map> data = dMappingRow.get("row");

        for (Map dMapping : data){

            MappingEntity mapping = mapper.convertValue(dMapping, MappingEntity.class);

            Map<String,String> mappingValues = mapping.getMappingValues();

            String originTissue         = mappingValues.get("OriginTissue");
            String tumorType            = mappingValues.get("TumorType");
            String sampleDiagnosis      = mappingValues.get("SampleDiagnosis");
            String dataSource           = mappingValues.get("DataSource");
            String entityId             = mappingValues.get("entityId");

            String mappedTermLabel           = mappingValues.get("mappedTermLabel");
            String mappedTermUrl           = mappingValues.get("mappedTermUrl");

            ZoomaEntity zoomaEntity = new ZoomaEntity();


            Studies studies = new Studies(dataSource,null);

        }


        return zoomaEntities;

    }



}
<commit_msg>Correctly convert MappingEntity<commit_after>package org.pdxfinder.transcommands;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.pdxfinder.admin.pojos.MappingEntity;
import org.pdxfinder.admin.zooma.Studies;
import org.pdxfinder.admin.zooma.ZoomaEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import sun.jvm.hotspot.debugger.cdbg.LoadObject;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class ZoomaTransform {


    private ObjectMapper mapper = new ObjectMapper();
    private List<ZoomaEntity> zoomaEntities = new ArrayList<>();

    @Autowired
    DataTransformerService transformerService;

    public ZoomaTransform() {
    }


    public List<ZoomaEntity> transforMappingsForZooma(String knowledgBaseURL){

        Map<String, List<Map>> dMappingRow = mapper.convertValue(transformerService.connectToJSON(knowledgBaseURL), Map.class);

        List<Map> data = dMappingRow.get("row");

        for (Map dMapping : data){

            MappingEntity mapping = mapper.convertValue(dMapping, MappingEntity.class);

            Map<String,String> mappingValues = mapping.getMappingValues();

            String originTissue         = mappingValues.get("OriginTissue");
            String tumorType            = mappingValues.get("TumorType");
            String sampleDiagnosis      = mappingValues.get("SampleDiagnosis");
            String dataSource           = mappingValues.get("DataSource");
            String entityId             = mappingValues.get("entityId");

            String mappedTermLabel           = mappingValues.get("mappedTermLabel");
            String mappedTermUrl           = mappingValues.get("mappedTermUrl");

            ZoomaEntity zoomaEntity = new ZoomaEntity();

            Studies studies = new Studies(dataSource,null);

        }


        return zoomaEntities;

    }



}

{'fraction_non_alphanumeric': 0.09363201610873395, 'fraction_numerical': 0.0, 'mean_word_length': 3.218683651804671, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1697398', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1049, 'n_words': 196}