1 /*
2  *  Make.org Core API
3  *  Copyright (C) 2018 Make.org
4  *
5  * This program is free software: you can redistribute it and/or modify
6  *  it under the terms of the GNU Affero General Public License as
7  *  published by the Free Software Foundation, either version 3 of the
8  *  License, or (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU Affero General Public License for more details.
14  *
15  *  You should have received a copy of the GNU Affero General Public License
16  *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  *
18  */
19 
20 package org.make.api
21 
22 import scala.io.Source
23 import com.github.tototoshi.csv.CSVReader
24 import org.make.core.proposal.{ProposalId, ProposalKeywordKey, QualificationKey, VoteKey}
25 
26 import java.time.ZonedDateTime
27 import org.make.core.proposal.VoteKey.{Agree, Disagree, Neutral}
28 import org.make.core.user.UserId
29 import org.make.core.proposal._
30 import org.make.core.proposal.QualificationKey._
31 import org.make.core.proposal.indexed.{IndexedProposal, IndexedProposalKeyword}
32 
33 object ProposalsUtils {
34 
35   private def parseVote(values: Map[String, String], key: VoteKey): Vote =
36     Vote(
37       key = key,
38       count = values(s"vote_verified_${key.value}").toInt,
39       countVerified = values(s"vote_verified_${key.value}").toInt,
40       countSequence = values(s"vote_sequence_${key.value}").toInt,
41       countSegment = 0,
42       Seq.empty
43     )
44 
45   private def parseQualification(
46     values: Map[String, String],
47     voteKey: VoteKey,
48     qualificationKey: QualificationKey,
49     label: String
50   ): Qualification =
51     Qualification(
52       key = qualificationKey,
53       count = values(s"vote_verified_${voteKey.value}_$label").toInt,
54       countVerified = values(s"vote_verified_${voteKey.value}_$label").toInt,
55       countSequence = values(s"vote_sequence_${voteKey.value}_$label").toInt,
56       countSegment = 0
57     )
58 
59   private def parseVotes(values: Map[String, String]): VotingOptions =
60     VotingOptions(
61       agreeVote = AgreeWrapper(
62         vote = parseVote(values, Agree),
63         likeIt = parseQualification(values, Agree, LikeIt, "like"),
64         platitudeAgree = parseQualification(values, Agree, PlatitudeAgree, "platitudeagree"),
65         doable = parseQualification(values, Agree, Doable, "doable")
66       ),
67       neutralVote = NeutralWrapper(
68         vote = parseVote(values, Neutral),
69         noOpinion = parseQualification(values, Neutral, NoOpinion, "noopinion"),
70         doNotUnderstand = parseQualification(values, Neutral, DoNotUnderstand, "donotunderstand"),
71         doNotCare = parseQualification(values, Neutral, DoNotCare, "donotcare")
72       ),
73       disagreeVote = DisagreeWrapper(
74         vote = parseVote(values, Disagree),
75         impossible = parseQualification(values, Disagree, Impossible, "impossible"),
76         noWay = parseQualification(values, Disagree, NoWay, "noway"),
77         platitudeDisagree = parseQualification(values, Disagree, PlatitudeDisagree, "platitudedisagree")
78       )
79     )
80 
81   private def parseProposal(values: Map[String, String]): IndexedProposal = {
82     TestUtils.indexedProposal(
83       id = ProposalId(values("id")),
84       userId = UserId(values("id")),
85       votingOptions = this.parseVotes(values),
86       createdAt = ZonedDateTime.parse(values("date_created")),
87       keywords = values("keywords")
88         .split('|')
89         .map(k => IndexedProposalKeyword(ProposalKeywordKey(k), k))
90         .toSeq
91     )
92   }
93 
94   def getProposalsFromCsv(csvName: String): Seq[IndexedProposal] = {
95     CSVReader
96       .open(Source.fromResource(csvName))
97       .iteratorWithHeaders
98       .map(parseProposal)
99       .toSeq
100   }
101 
102   private val maxVotes = 2000
103 
104   def getNewAndTestedProposals(csvName: String): (Seq[IndexedProposal], Seq[IndexedProposal]) = {
105     getProposalsFromCsv(csvName)
106       .filter(_.votesSequenceCount < maxVotes)
107       .partition(_.votesSequenceCount <= 10)
108   }
109 }
Line Stmt Id Pos Tree Symbol Tests Code
36 51701 1318 - 1579 Apply org.make.core.proposal.Vote.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.Vote.apply(key, scala.Predef.augmentString(values.apply(("vote_verified_".+(key.value): String))).toInt, scala.Predef.augmentString(values.apply(("vote_verified_".+(key.value): String))).toInt, scala.Predef.augmentString(values.apply(("vote_sequence_".+(key.value): String))).toInt, 0, scala.`package`.Seq.empty[Nothing])
38 51469 1355 - 1398 Select scala.collection.StringOps.toInt org.make.api.sequence.sequencesimulationtest scala.Predef.augmentString(values.apply(("vote_verified_".+(key.value): String))).toInt
38 51627 1355 - 1392 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply(("vote_verified_".+(key.value): String))
39 51574 1422 - 1465 Select scala.collection.StringOps.toInt org.make.api.sequence.sequencesimulationtest scala.Predef.augmentString(values.apply(("vote_verified_".+(key.value): String))).toInt
39 51741 1422 - 1459 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply(("vote_verified_".+(key.value): String))
40 51770 1489 - 1532 Select scala.collection.StringOps.toInt org.make.api.sequence.sequencesimulationtest scala.Predef.augmentString(values.apply(("vote_sequence_".+(key.value): String))).toInt
40 51408 1489 - 1526 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply(("vote_sequence_".+(key.value): String))
41 51588 1555 - 1556 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest 0
42 51431 1564 - 1573 TypeApply scala.collection.SeqFactory.Delegate.empty org.make.api.sequence.sequencesimulationtest scala.`package`.Seq.empty[Nothing]
51 51420 1753 - 2052 Apply org.make.core.proposal.Qualification.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.Qualification.apply(qualificationKey, scala.Predef.augmentString(values.apply(("vote_verified_".+(voteKey.value).+("_").+(label): String))).toInt, scala.Predef.augmentString(values.apply(("vote_verified_".+(voteKey.value).+("_").+(label): String))).toInt, scala.Predef.augmentString(values.apply(("vote_sequence_".+(voteKey.value).+("_").+(label): String))).toInt, 0)
53 51629 1812 - 1860 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply(("vote_verified_".+(voteKey.value).+("_").+(label): String))
53 51470 1812 - 1866 Select scala.collection.StringOps.toInt org.make.api.sequence.sequencesimulationtest scala.Predef.augmentString(values.apply(("vote_verified_".+(voteKey.value).+("_").+(label): String))).toInt
54 51575 1890 - 1944 Select scala.collection.StringOps.toInt org.make.api.sequence.sequencesimulationtest scala.Predef.augmentString(values.apply(("vote_verified_".+(voteKey.value).+("_").+(label): String))).toInt
54 51727 1890 - 1938 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply(("vote_verified_".+(voteKey.value).+("_").+(label): String))
55 51772 1968 - 2022 Select scala.collection.StringOps.toInt org.make.api.sequence.sequencesimulationtest scala.Predef.augmentString(values.apply(("vote_sequence_".+(voteKey.value).+("_").+(label): String))).toInt
55 51398 1968 - 2016 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply(("vote_sequence_".+(voteKey.value).+("_").+(label): String))
56 51592 2045 - 2046 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest 0
60 51711 2129 - 3160 Apply org.make.core.proposal.VotingOptions.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VotingOptions.apply(org.make.core.proposal.AgreeWrapper.apply(ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Agree), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.LikeIt, "like"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.PlatitudeAgree, "platitudeagree"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.Doable, "doable")), org.make.core.proposal.NeutralWrapper.apply(ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Neutral), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.NoOpinion, "noopinion"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.DoNotUnderstand, "donotunderstand"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.DoNotCare, "donotcare")), org.make.core.proposal.DisagreeWrapper.apply(ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Disagree), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.Impossible, "impossible"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.NoWay, "noway"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.PlatitudeDisagree, "platitudedisagree")))
61 51412 2162 - 2455 Apply org.make.core.proposal.AgreeWrapper.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.AgreeWrapper.apply(ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Agree), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.LikeIt, "like"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.PlatitudeAgree, "platitudeagree"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.Doable, "doable"))
62 51622 2191 - 2215 Apply org.make.api.ProposalsUtils.parseVote org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Agree)
62 51703 2209 - 2214 Select org.make.core.proposal.VoteKey.Agree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Agree
63 51476 2261 - 2266 Select org.make.core.proposal.VoteKey.Agree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Agree
63 51571 2276 - 2282 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "like"
63 51729 2268 - 2274 Select org.make.core.proposal.QualificationKey.LikeIt org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.LikeIt
63 51400 2234 - 2283 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.LikeIt, "like")
64 51773 2337 - 2342 Select org.make.core.proposal.VoteKey.Agree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Agree
64 51713 2310 - 2377 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.PlatitudeAgree, "platitudeagree")
64 51614 2344 - 2358 Select org.make.core.proposal.QualificationKey.PlatitudeAgree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.PlatitudeAgree
64 51421 2360 - 2376 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "platitudeagree"
65 51751 2438 - 2446 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "doable"
65 51478 2430 - 2436 Select org.make.core.proposal.QualificationKey.Doable org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.Doable
65 51573 2396 - 2447 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Agree, org.make.core.proposal.QualificationKey.Doable, "doable")
65 51543 2423 - 2428 Select org.make.core.proposal.VoteKey.Agree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Agree
67 51464 2477 - 2803 Apply org.make.core.proposal.NeutralWrapper.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.NeutralWrapper.apply(ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Neutral), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.NoOpinion, "noopinion"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.DoNotUnderstand, "donotunderstand"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.DoNotCare, "donotcare"))
68 51616 2508 - 2534 Apply org.make.api.ProposalsUtils.parseVote org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Neutral)
68 51786 2526 - 2533 Select org.make.core.proposal.VoteKey.Neutral org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Neutral
69 51551 2603 - 2614 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "noopinion"
69 51715 2592 - 2601 Select org.make.core.proposal.QualificationKey.NoOpinion org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.NoOpinion
69 51473 2556 - 2615 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.NoOpinion, "noopinion")
69 51445 2583 - 2590 Select org.make.core.proposal.VoteKey.Neutral org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Neutral
70 51752 2670 - 2677 Select org.make.core.proposal.VoteKey.Neutral org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Neutral
70 51413 2696 - 2713 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "donotunderstand"
70 51690 2643 - 2714 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.DoNotUnderstand, "donotunderstand")
70 51564 2679 - 2694 Select org.make.core.proposal.QualificationKey.DoNotUnderstand org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.DoNotUnderstand
71 51716 2783 - 2794 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "donotcare"
71 51425 2772 - 2781 Select org.make.core.proposal.QualificationKey.DoNotCare org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.DoNotCare
71 51541 2736 - 2795 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Neutral, org.make.core.proposal.QualificationKey.DoNotCare, "donotcare")
71 51607 2763 - 2770 Select org.make.core.proposal.VoteKey.Neutral org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Neutral
73 51444 2826 - 3154 Apply org.make.core.proposal.DisagreeWrapper.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.DisagreeWrapper.apply(ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Disagree), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.Impossible, "impossible"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.NoWay, "noway"), ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.PlatitudeDisagree, "platitudedisagree"))
74 51743 2876 - 2884 Select org.make.core.proposal.VoteKey.Disagree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Disagree
74 51565 2858 - 2885 Apply org.make.api.ProposalsUtils.parseVote org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseVote(values, org.make.core.proposal.VoteKey.Disagree)
75 51414 2935 - 2943 Select org.make.core.proposal.VoteKey.Disagree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Disagree
75 51423 2908 - 2970 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.Impossible, "impossible")
75 51685 2945 - 2955 Select org.make.core.proposal.QualificationKey.Impossible org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.Impossible
75 51600 2957 - 2969 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "impossible"
76 51710 3015 - 3023 Select org.make.core.proposal.VoteKey.Disagree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Disagree
76 51542 3025 - 3030 Select org.make.core.proposal.QualificationKey.NoWay org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.NoWay
76 51454 3032 - 3039 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "noway"
76 51750 2988 - 3040 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.NoWay, "noway")
77 51393 3107 - 3124 Select org.make.core.proposal.QualificationKey.PlatitudeDisagree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.QualificationKey.PlatitudeDisagree
77 51686 3126 - 3145 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest "platitudedisagree"
77 51593 3070 - 3146 Apply org.make.api.ProposalsUtils.parseQualification org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseQualification(values, org.make.core.proposal.VoteKey.Disagree, org.make.core.proposal.QualificationKey.PlatitudeDisagree, "platitudedisagree")
77 51566 3097 - 3105 Select org.make.core.proposal.VoteKey.Disagree org.make.api.sequence.sequencesimulationtest org.make.core.proposal.VoteKey.Disagree
82 51402 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$24 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$24
82 51704 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$18 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$18
82 51677 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$26 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$26
82 51608 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$7 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$7
82 51680 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$6 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$6
82 51548 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$10 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$10
82 51584 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$4 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$4
82 51826 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$11 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$11
82 51560 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$23 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$23
82 51434 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$17 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$17
82 51410 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$14 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$14
82 51709 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$9 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$9
82 51691 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$15 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$15
82 51736 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$22 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$22
82 51550 3244 - 3599 Apply org.make.api.TestUtils.indexedProposal org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal(x$1, x$3, x$2, x$6, x$7, x$8, x$9, x$10, x$11, x$12, x$13, x$14, x$15, x$16, x$17, x$18, x$19, x$20, x$21, x$4, x$22, x$23, x$24, x$25, x$5, x$26, x$27, x$28, x$29)
82 51559 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$13 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$13
82 51822 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$21 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$21
82 51517 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$27 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$27
82 51744 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$12 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$12
82 51523 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$16 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$16
82 51433 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$8 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$8
82 51427 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$28 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$28
82 51409 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$5 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$5
82 51705 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$29 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$29
82 51549 3254 - 3254 Select org.make.api.TestUtils.indexedProposal$default$19 org.make.api.sequence.sequencesimulationtest TestUtils.indexedProposal$default$19
83 51823 3282 - 3306 Apply org.make.core.proposal.ProposalId.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.ProposalId.apply(values.apply("id"))
83 51534 3293 - 3305 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply("id")
84 51740 3330 - 3342 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply("id")
84 51583 3323 - 3343 Apply org.make.core.user.UserId.apply org.make.api.sequence.sequencesimulationtest org.make.core.user.UserId.apply(values.apply("id"))
85 51394 3367 - 3390 Apply org.make.api.ProposalsUtils.parseVotes org.make.api.sequence.sequencesimulationtest this.parseVotes(values)
86 51678 3430 - 3452 Apply scala.collection.MapOps.apply org.make.api.sequence.sequencesimulationtest values.apply("date_created")
86 51606 3410 - 3453 Apply java.time.ZonedDateTime.parse org.make.api.sequence.sequencesimulationtest java.time.ZonedDateTime.parse(values.apply("date_created"))
88 51446 3472 - 3510 Apply scala.collection.StringOps.split org.make.api.sequence.sequencesimulationtest scala.Predef.augmentString(values.apply("keywords")).split('|')
89 51535 3529 - 3577 Apply org.make.core.proposal.indexed.IndexedProposalKeyword.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.indexed.IndexedProposalKeyword.apply(org.make.core.proposal.ProposalKeywordKey.apply(k), k)
89 51708 3552 - 3573 Apply org.make.core.proposal.ProposalKeywordKey.apply org.make.api.sequence.sequencesimulationtest org.make.core.proposal.ProposalKeywordKey.apply(k)
89 51818 3472 - 3578 ApplyToImplicitArgs scala.collection.ArrayOps.map org.make.api.sequence.sequencesimulationtest scala.Predef.refArrayOps[String](scala.Predef.augmentString(values.apply("keywords")).split('|')).map[org.make.core.proposal.indexed.IndexedProposalKeyword](((k: String) => org.make.core.proposal.indexed.IndexedProposalKeyword.apply(org.make.core.proposal.ProposalKeywordKey.apply(k), k)))((ClassTag.apply[org.make.core.proposal.indexed.IndexedProposalKeyword](classOf[org.make.core.proposal.indexed.IndexedProposalKeyword]): scala.reflect.ClassTag[org.make.core.proposal.indexed.IndexedProposalKeyword]))
90 51742 3472 - 3593 Select scala.collection.ArrayOps.toSeq org.make.api.sequence.sequencesimulationtest scala.Predef.refArrayOps[org.make.core.proposal.indexed.IndexedProposalKeyword](scala.Predef.refArrayOps[String](scala.Predef.augmentString(values.apply("keywords")).split('|')).map[org.make.core.proposal.indexed.IndexedProposalKeyword](((k: String) => org.make.core.proposal.indexed.IndexedProposalKeyword.apply(org.make.core.proposal.ProposalKeywordKey.apply(k), k)))((ClassTag.apply[org.make.core.proposal.indexed.IndexedProposalKeyword](classOf[org.make.core.proposal.indexed.IndexedProposalKeyword]): scala.reflect.ClassTag[org.make.core.proposal.indexed.IndexedProposalKeyword]))).toSeq
96 51656 3700 - 3728 ApplyToImplicitArgs scala.io.Source.fromResource org.make.api.sequence.sequencesimulationtest scala.io.Source.fromResource(csvName, scala.io.Source.fromResource$default$2)(io.this.Codec.fallbackSystemCodec)
96 51817 3707 - 3707 Select scala.io.Source.fromResource$default$2 org.make.api.sequence.sequencesimulationtest scala.io.Source.fromResource$default$2
96 51558 3699 - 3699 Select com.github.tototoshi.csv.CSVFormat.defaultCSVFormat org.make.api.sequence.sequencesimulationtest csv.this.CSVFormat.defaultCSVFormat
98 51404 3768 - 3781 Apply org.make.api.ProposalsUtils.parseProposal org.make.api.sequence.sequencesimulationtest ProposalsUtils.this.parseProposal(values)
99 51679 3678 - 3795 Select scala.collection.IterableOnceOps.toSeq org.make.api.sequence.sequencesimulationtest com.github.tototoshi.csv.CSVReader.open(scala.io.Source.fromResource(csvName, scala.io.Source.fromResource$default$2)(io.this.Codec.fallbackSystemCodec))(csv.this.CSVFormat.defaultCSVFormat).iteratorWithHeaders.map[org.make.core.proposal.indexed.IndexedProposal](((values: Map[String,String]) => ProposalsUtils.this.parseProposal(values))).toSeq
102 51513 3826 - 3830 Literal <nosymbol> org.make.api.sequence.sequencesimulationtest 2000
106 51698 3977 - 4008 Apply scala.Int.< x$1.votesSequenceCount.<(ProposalsUtils.this.maxVotes)
106 51432 4000 - 4008 Select org.make.api.ProposalsUtils.maxVotes ProposalsUtils.this.maxVotes
107 51819 3934 - 4054 Apply scala.collection.IterableOps.partition ProposalsUtils.this.getProposalsFromCsv(csvName).filter(((x$1: org.make.core.proposal.indexed.IndexedProposal) => x$1.votesSequenceCount.<(ProposalsUtils.this.maxVotes))).partition(((x$2: org.make.core.proposal.indexed.IndexedProposal) => x$2.votesSequenceCount.<=(10)))
107 51552 4027 - 4053 Apply scala.Int.<= x$2.votesSequenceCount.<=(10)