task_id int64 0 2.26k | repository stringclasses 18
values | commit_hash stringclasses 241
values | filepath stringclasses 237
values | original_method stringlengths 21 4.65k | context listlengths 1 68 | masking dict |
|---|---|---|---|---|---|---|
1,900 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testLoad
(root / 'test identity')
ensureDelete;
writeStreamDo: [ :stream |
STONJSON
put: {
('identity' -> 'test identity').
('name' -> 'test name').
('items' -> { 'test item' }) } asDictionary
onStream: stream ].
narrative identity: 'test identity'.
narrative load.
self assert: nar... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testLoad\n\n\t(root / 'test identity')\n\t\tensureDelete;\n\t\twriteStreamDo: [ :stream |\n\t\t\tSTONJSON\n\t\t\t\tput: {\n\t\t\t\t\t\t('identity' -> 'test identity').\n\t\t\t\t\t\t('name' -> 'test name').\n\t\t\t\t\t\t('items' -> ... |
1,901 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testName
narrative name: 'test name'.
self assert: narrative name equals: 'test name' | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testName\n\n\tnarrative name: 'test name'.\n\tself assert: narrative",
"suffix": "",
"completion": " name equals: 'test name'"
} |
1,902 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testRemove
| testItem id |
testItem := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
id := testItem hideMetadata identity.
narrative add: testItem.
self assert: ((narrative instVarNamed: #items) includes: id).
narrative remove: testItem.
... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testRemove\n\n\t| testItem id |\n\ttestItem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tid := testItem hideMetadata identity.\n\tnarrative a... |
1,903 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testRemove
| testItem id |
testItem := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
id := testItem hideMetadata identity.
narrative add: testItem.
self assert: ((narrative instVarNamed: #items) includes: id).
narrative remove: testItem.
... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "testRemove\n\n\t| testItem id |\n\ttestItem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;",
"suffix": ".\n\tid := testItem hideMetadata identity.\n\tnarrative add: testItem.\n\tself assert: ((narrative ... |
1,904 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testRemove
| testItem id |
testItem := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
id := testItem hideMetadata identity.
narrative add: testItem.
self assert: ((narrative instVarNamed: #items) includes: id).
narrative remove: testItem.
... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "testRemove\n\n\t| testItem id |\n\ttestItem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tid :=",
"suffix": ".\n\tnarrative add: testItem.\n\tsel... |
1,905 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testRemoveAll
| id1 item1 id2 item2 |
id1 := (item1 := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself) hideMetadata identity.
id2 := (item2 := HiDePersistencyObjectForTesting new
hideStorage: storage;
... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testRemoveAll\n\n\t| id1 item1 id2 item2 |\n\tid1 := (item1 := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself) hideMetadata identity.\n... |
1,906 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testRemoveAll
| id1 item1 id2 item2 |
id1 := (item1 := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself) hideMetadata identity.
id2 := (item2 := HiDePersistencyObjectForTesting new
hideStorage: storage;
... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testRemoveAll\n\n\t| id1 item1 id2 item2 |\n\tid1 := (item1 := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself) hideMetadata identity.\n... |
1,907 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testRemoveAll
| id1 item1 id2 item2 |
id1 := (item1 := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself) hideMetadata identity.
id2 := (item2 := HiDePersistencyObjectForTesting new
hideStorage: storage;
... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 9,
"prefix": "testRemoveAll\n\n\t| id1 item1 id2 item2 |\n\tid1 := (item1 := HiDePersistencyObjectForTesting new",
"suffix": ".\n\tid2 := (item2 := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t ... |
1,908 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testSave
| testItem json |
testItem := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative add: testItem.
narrative name: 'test name'.
narrative identity: 'test identity'.
narrative save.
root / 'test identity' readStreamDo: [ :stream... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testSave\n\n\t| testItem json |\n\ttestItem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative add: testItem.\n\tnarrative name: 'test na... |
1,909 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testSave
| testItem json |
testItem := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative add: testItem.
narrative name: 'test name'.
narrative identity: 'test identity'.
narrative save.
root / 'test identity' readStreamDo: [ :stream... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 5,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testSave\n\n\t| testItem json |\n\ttestItem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative add: testItem.\n\tnarrative name: 'test na... |
1,910 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testSave
| testItem json |
testItem := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative add: testItem.
narrative name: 'test name'.
narrative identity: 'test identity'.
narrative save.
root / 'test identity' readStreamDo: [ :stream... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "testSave\n\n\t| testItem json |\n\ttestItem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative add: testItem.\n\tnarrative name: 'test na... |
1,911 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testStorage
narrative storage: nil.
self assert: narrative storage isNil.
narrative storage: storage.
self assert: narrative storage identicalTo: storage | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testStorage\n\n\tnarrative storage: nil.\n\tself assert:",
"suffix": ".\n\tnarrative storage: storage.\n\tself assert: narrative storage identicalTo: storage",
"completion": " narrative storage isNil"
} |
1,912 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeNarrativeTest.class.st | testStorage
narrative storage: nil.
self assert: narrative storage isNil.
narrative storage: storage.
self assert: narrative storage identicalTo: storage | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "testStorage\n\n\tnarrative storage: nil.\n\tself assert: narrative storage isNil.\n\tnarrative storage: storage.\n\tself assert: narrative",
"suffix": "",
"completion": " storage identicalTo: storage"
} |
1,913 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | chronicleAt: aString ifPresent: aBlock
^ chronicle at: aString ifPresent: aBlock | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "chronicleAt: aString ifPresent: aBlock\n\n\t^ chronicle",
"suffix": "",
"completion": " at: aString ifPresent: aBlock"
} |
1,914 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | ensureNarrativeIdentity: aHiDeNarrative
^ aHiDeNarrative identity ifNil: [
| timestamp random prefix |
timestamp := DateAndTime now.
random := Random new.
prefix := String streamContents: [ :stream |
stream nextPutAll: 'narrative-'.
timestamp year printOn: stream base: 10... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 11,
"mask_type": "keyword_message",
"n_masked_tokens": 10,
"prefix": "ensureNarrativeIdentity: aHiDeNarrative\n\n\t^ aHiDeNarrative identity ifNil: [\n\t\t | timestamp random prefix |\n\t\t timestamp := DateAndTime now.\n\t\t random := Random new.\n\t\t prefix := String streamContents: [ :strea... |
1,915 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | ensureNarrativeIdentity: aHiDeNarrative
^ aHiDeNarrative identity ifNil: [
| timestamp random prefix |
timestamp := DateAndTime now.
random := Random new.
prefix := String streamContents: [ :stream |
stream nextPutAll: 'narrative-'.
timestamp year printOn: stream base: 10... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 18,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "ensureNarrativeIdentity: aHiDeNarrative\n\n\t^ aHiDeNarrative identity ifNil: [\n\t\t | timestamp random prefix |\n\t\t timestamp := DateAndTime now.\n\t\t random := Random new.\n\t\t prefix := String streamContents: [ :stream |\n\t\t\... |
1,916 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | ensureNarrativeIdentity: aHiDeNarrative
^ aHiDeNarrative identity ifNil: [
| timestamp random prefix |
timestamp := DateAndTime now.
random := Random new.
prefix := String streamContents: [ :stream |
stream nextPutAll: 'narrative-'.
timestamp year printOn: stream base: 10... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 10,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "ensureNarrativeIdentity: aHiDeNarrative\n\n\t^ aHiDeNarrative identity ifNil: [\n\t\t | timestamp random prefix |\n\t\t timestamp := DateAndTime now.\n\t\t random := Random new.\n\t\t prefix := String streamContents: [ :stream... |
1,917 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | loadNarratives
self basepathDo: [ :ref |
(ref filesMatching: 'narrative-*.json') do: [ :file |
narratives
at: file basename
put: ((self narrativeClass fromFile: file)
storage: self;
yourself) ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 10,
"prefix": "loadNarratives\n\n\tself basepathDo: [ :ref |\n\t\t(ref filesMatching: 'narrative-*.json') do: [ :file |\n\t\t\tnarratives\n\t\t\t\tat: file basename\n\t\t\t\tput: ((self narrativeClass",
"suffix": "",
"completion": " fromFile... |
1,918 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | loadNarratives
self basepathDo: [ :ref |
(ref filesMatching: 'narrative-*.json') do: [ :file |
narratives
at: file basename
put: ((self narrativeClass fromFile: file)
storage: self;
yourself) ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "loadNarratives\n\n\tself basepathDo: [ :ref |\n\t\t(ref filesMatching: 'narrative-*.json') do: [ :file |\n\t\t\tnarratives\n\t\t\t\tat: file basename\n\t\t\t\tput: ((self narrativeClass fromFile: file)\n\t\t\t\t\t\t storage: self",... |
1,919 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | loadNarratives
self basepathDo: [ :ref |
(ref filesMatching: 'narrative-*.json') do: [ :file |
narratives
at: file basename
put: ((self narrativeClass fromFile: file)
storage: self;
yourself) ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 9,
"prefix": "loadNarratives\n\n\tself basepathDo: [ :ref |\n\t\t(ref filesMatching: 'narrative-*.json') do: [ :file |\n\t\t\tnarratives\n\t\t\t\tat: file basename\n\t\t\t\tput: ((self",
"suffix": " ] ]",
"completion": " narrativeClass fromF... |
1,920 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | narrative: aString
^ Array streamContents: [ :stream |
self
narrativeAt: aString
do: [ :persistency | stream nextPut: persistency ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 5,
"prefix": "narrative: aString\n\n\t^ Array streamContents: [ :stream |\n\t\t self\n\t\t\t narrativeAt: aString\n\t\t\t do: [ :persistency |",
"suffix": "",
"completion": " stream nextPut: persistency ] ]"
} |
1,921 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | narrative: aString
^ Array streamContents: [ :stream |
self
narrativeAt: aString
do: [ :persistency | stream nextPut: persistency ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "narrative: aString\n\n\t^ Array streamContents: [ :stream |\n\t\t self\n\t\t\t narrativeAt: aString\n\t\t\t do:",
"suffix": " ]",
"completion": " [ :persistency | stream nextPut: persistency ]"
} |
1,922 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | narrativeAt: aString
^ narratives at: aString ifAbsent: [ nil ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "narrativeAt: aString\n\n\t^ narratives at: aString ifAbsent:",
"suffix": "",
"completion": " [ nil ]"
} |
1,923 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | narrativeAt: aString do: aBlock
^ narratives
at: aString
ifPresent: [ :narrative | narrative do: aBlock ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 6,
"prefix": "narrativeAt: aString do: aBlock\n\n\t^ narratives\n\t\t at: aString\n\t\t ifPresent: [ :",
"suffix": "",
"completion": "narrative | narrative do: aBlock ]"
} |
1,924 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | narrativeNameAt: aString
^ narratives at: aString ifPresent: #name ifAbsent: [ nil ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 7,
"prefix": "narrativeNameAt: aString\n\n\t^ narratives at:",
"suffix": "",
"completion": " aString ifPresent: #name ifAbsent: [ nil ]"
} |
1,925 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | narrativeSave: aHiDeNarrative
self ensureNarrativeIdentity: aHiDeNarrative.
aHiDeNarrative storage: self.
aHiDeNarrative save.
narratives at: aHiDeNarrative identity put: aHiDeNarrative | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "narrativeSave: aHiDeNarrative\n\n\tself ensureNarrativeIdentity: aHiDeNarrative.\n\taHiDeNarrative storage: self.\n\taHiDeNarrative save.\n\tnarratives",
"suffix": "",
"completion": " at: aHiDeNarrative identity put: aHiDeNarra... |
1,926 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | narratives
^ narratives values asSortedCollection: #name ascending | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 5,
"prefix": "narratives\n\n\t^",
"suffix": "",
"completion": " narratives values asSortedCollection: #name ascending"
} |
1,927 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | newNarrativeNamed: aString
| timestamp random prefix |
timestamp := DateAndTime now.
random := Random new.
prefix := String streamContents: [ :stream |
stream nextPutAll: 'narrative-'.
timestamp year printOn: stream base: 10 nDigits: 4.
timestamp month printOn: stream base: 10 n... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 5,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "newNarrativeNamed: aString\n\n\t| timestamp random prefix |\n\ttimestamp := DateAndTime now.\n\trandom := Random new.\n\tprefix := String streamContents: [ :stream |\n\t\t stream nextPutAll: 'narrative-'.\n\t\t ti... |
1,928 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | newNarrativeNamed: aString
| timestamp random prefix |
timestamp := DateAndTime now.
random := Random new.
prefix := String streamContents: [ :stream |
stream nextPutAll: 'narrative-'.
timestamp year printOn: stream base: 10 nDigits: 4.
timestamp month printOn: stream base: 10 n... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 11,
"mask_type": "assignment",
"n_masked_tokens": 5,
"prefix": "newNarrativeNamed: aString\n\n\t| timestamp random prefix |\n\ttimestamp := DateAndTime now.\n\trandom := Random new.\n\tprefix := String streamContents: [ :stream |\n\t\t stream nextPutAll: 'narrative-'.\n\t\t timest... |
1,929 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorage.class.st | newNarrativeNamed: aString
| timestamp random prefix |
timestamp := DateAndTime now.
random := Random new.
prefix := String streamContents: [ :stream |
stream nextPutAll: 'narrative-'.
timestamp year printOn: stream base: 10 nDigits: 4.
timestamp month printOn: stream base: 10 n... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 7,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "newNarrativeNamed: aString\n\n\t| timestamp random prefix |\n\ttimestamp := DateAndTime now.\n\trandom := Random new.\n\tprefix := String streamContents: [ :stream |\n\t\t stream nextPutAll: 'narrative-'.\n\t\t ti... |
1,930 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testLoadNarratives
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrative... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "testLoadNarratives\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;",
"suffix": ".\n\t... |
1,931 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testLoadNarratives
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrative... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 5,
"prefix": "testLoadNarratives\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;\n\t\t s... |
1,932 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testLoadNarratives
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrative... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 9,
"prefix": "testLoadNarratives\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;\n\t\t ... |
1,933 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrative
| item narrative |
item := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative := HiDeNarrative new
name: 'test narrative';
storage: storage;
add: item;
yourself.
storage narr... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 5,
"prefix": "testNarrative\n\n\t| item narrative |\n\titem := HiDePersistencyObjectForTesting new\n\t\t hideStorage:",
"suffix": ".\n\tnarrative := HiDeNarrative new\n\t\t name: 'test narrative';\n\t\t storage: stora... |
1,934 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrative
| item narrative |
item := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative := HiDeNarrative new
name: 'test narrative';
storage: storage;
add: item;
yourself.
storage narr... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "testNarrative\n\n\t| item narrative |\n\titem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative := HiDeNarrative new\n\t\t name: 'test narrat... |
1,935 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrative
| item narrative |
item := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative := HiDeNarrative new
name: 'test narrative';
storage: storage;
add: item;
yourself.
storage narr... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 10,
"prefix": "testNarrative\n\n\t| item narrative |\n\titem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative := HiDeNarrative new\n\t\t name: 'test ... |
1,936 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeAt
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrative 2'... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "testNarrativeAt\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;\n\t\t save... |
1,937 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeAt
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrative 2'... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testNarrativeAt\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;\n\t\t ... |
1,938 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeAt
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrative 2'... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testNarrativeAt\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;\n\t\t ... |
1,939 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeAtDo
| item narrative |
item := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative := HiDeNarrative new
name: 'test narrative';
storage: storage;
add: item;
yourself.
storage ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "testNarrativeAtDo\n\n\t| item narrative |\n\titem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative := HiDeNarrative new\n\t\t name: 'te... |
1,940 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeAtDo
| item narrative |
item := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative := HiDeNarrative new
name: 'test narrative';
storage: storage;
add: item;
yourself.
storage ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 5,
"prefix": "testNarrativeAtDo\n\n\t| item narrative |\n\titem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative := HiDeNarrative new\n\t\t name: 'test na... |
1,941 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeAtDo
| item narrative |
item := HiDePersistencyObjectForTesting new
hideStorage: storage;
hideSave;
yourself.
narrative := HiDeNarrative new
name: 'test narrative';
storage: storage;
add: item;
yourself.
storage ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testNarrativeAtDo\n\n\t| item narrative |\n\titem := HiDePersistencyObjectForTesting new\n\t\t hideStorage: storage;\n\t\t hideSave;\n\t\t yourself.\n\tnarrative := HiDeNarrative new\n\t\t name: 'te... |
1,942 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeNameAt
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrativ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 5,
"prefix": "testNarrativeNameAt\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage:",
"suffix": ".\n\tnarrativ... |
1,943 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeNameAt
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrativ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "testNarrativeNameAt\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;\n\t\t ... |
1,944 | https://github.com/tomooda/HiDeHo | f4fe96a771a76a1d0041a0caada1c9cb44f9cce1 | src/HiDeHo-Storage/HiDeStorageTest.class.st | testNarrativeNameAt
| narrative1 narrative2 |
narrative1 := HiDeNarrative new
name: 'test narrative 1';
identity: 'narrative-1.json';
storage: storage;
save;
yourself.
narrative2 := HiDeNarrative new
name: 'test narrativ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeNarrativeTest.class.st",
"code": "Test... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "testNarrativeNameAt\n\n\t| narrative1 narrative2 |\n\tnarrative1 := HiDeNarrative new\n\t\t name: 'test narrative 1';\n\t\t identity: 'narrative-1.json';\n\t\t storage: storage;\n\t\t ... |
1,945 | https://github.com/tomooda/HiDeHo | c900c27556ae4f4e5e1c6610c50a66c29a8b313e | src/HiDeHo-Storage/HiDeNarrative.class.st | includes: aHiDePersistency
^ items includes: aHiDePersistency hideMetadata identity | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object sub... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 4,
"prefix": "includes: aHiDePersistency\n\n\t^ items",
"suffix": "",
"completion": " includes: aHiDePersistency hideMetadata identity"
} |
1,946 | https://github.com/tomooda/HiDeHo | c900c27556ae4f4e5e1c6610c50a66c29a8b313e | src/HiDeHo-Storage/HiDeStorage.class.st | hasNarrativeNamed: aString
^ narratives anySatisfy: [ :narrative | aString = narrative name ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object sub... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 9,
"prefix": "hasNarrativeNamed: aString\n\n\t^ narratives anySatisfy:",
"suffix": "",
"completion": " [ :narrative | aString = narrative name ]"
} |
1,947 | https://github.com/tomooda/HiDeHo | c900c27556ae4f4e5e1c6610c50a66c29a8b313e | src/HiDeHo-Storage/HiDeStorage.class.st | hasNarrativeNamed: aString
^ narratives anySatisfy: [ :narrative | aString = narrative name ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeNarrative.class.st",
"code": "Object subclass: #HiDeNarrative\n\tinstanceVariableNames: 'name identity items storage'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object sub... | {
"fim_idx": 1,
"mask_type": "binary_message",
"n_masked_tokens": 3,
"prefix": "hasNarrativeNamed: aString\n\n\t^ narratives anySatisfy: [ :narrative | aString",
"suffix": " ]",
"completion": " = narrative name"
} |
1,948 | https://github.com/tomooda/HiDeHo | 1b77b576b01b1a013a7047dfcd89bbc976b5c00c | src/HiDeHo-Storage/HiDeStorage.class.st | removeNarrative: aHiDeNarrative
aHiDeNarrative fileReference ensureDelete.
narratives removeKey: aHiDeNarrative identity ifAbsent: [ ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicleMaxSize chronicleMaxDays chronicle narratives'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
}
] | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "removeNarrative: aHiDeNarrative\n\n\taHiDeNarrative fileReference ensureDelete.\n\tnarratives",
"suffix": "",
"completion": " removeKey: aHiDeNarrative identity ifAbsent: [ ]"
} |
1,949 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorage.class.st | isAbstract
^ self = HiDeStorage | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "isAbstract\n\n\t^",
"suffix": "",
"completion": " self = HiDeStorage"
} |
1,950 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorage.class.st | on: aFileReference
^ self new
basepath: aFileReference;
yourself | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 6,
"prefix": "on: aFileReference\n\n\t^",
"suffix": "",
"completion": " self new\n\t\t basepath: aFileReference;\n\t\t yourself"
} |
1,951 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | isAbstract
^ self = HiDeStorageWithExpiration | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 3,
"prefix": "isAbstract\n\n\t^",
"suffix": "",
"completion": " self = HiDeStorageWithExpiration"
} |
1,952 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleEnsureStorageLimits
self
chronicleEnsureStorageMaxSize;
chronicleEnsureStorageMaxDays | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "cascade",
"n_masked_tokens": 3,
"prefix": "chronicleEnsureStorageLimits\n\n\tself",
"suffix": "",
"completion": "\n\t\tchronicleEnsureStorageMaxSize;\n\t\tchronicleEnsureStorageMaxDays"
} |
1,953 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleEnsureStorageMaxDays
chronicleMaxDays ifNotNil: [ :maxDays |
| expiration |
expiration := DateAndTime now - maxDays days.
self chronicle reverseDo: [ :persistency |
expiration <= persistency hideMetadata timestamp ifTrue: [ ^ self ].
persistency hideIsAutoExpirable ifTrue: [ persistency hideRemov... | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "chronicleEnsureStorageMaxDays\n\n\tchronicleMaxDays ifNotNil: [ :maxDays |\n\t\t| expiration |\n\t\texpiration := DateAndTime now - maxDays days.\n\t\tself chronicle reverseDo: [ :persistency |\n\t\t\texpiration <= persistency hide... |
1,954 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleEnsureStorageMaxDays
chronicleMaxDays ifNotNil: [ :maxDays |
| expiration |
expiration := DateAndTime now - maxDays days.
self chronicle reverseDo: [ :persistency |
expiration <= persistency hideMetadata timestamp ifTrue: [ ^ self ].
persistency hideIsAutoExpirable ifTrue: [ persistency hideRemov... | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 5,
"prefix": "chronicleEnsureStorageMaxDays\n\n\tchronicleMaxDays ifNotNil: [ :maxDays |\n\t\t| expiration |\n\t\texpiration :=",
"suffix": ".\n\t\tself chronicle reverseDo: [ :persistency |\n\t\t\texpiration <= persistency hideMetadata timestamp i... |
1,955 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleEnsureStorageMaxDays
chronicleMaxDays ifNotNil: [ :maxDays |
| expiration |
expiration := DateAndTime now - maxDays days.
self chronicle reverseDo: [ :persistency |
expiration <= persistency hideMetadata timestamp ifTrue: [ ^ self ].
persistency hideIsAutoExpirable ifTrue: [ persistency hideRemov... | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "chronicleEnsureStorageMaxDays\n\n\tchronicleMaxDays ifNotNil: [ :maxDays |\n\t\t| expiration |\n\t\texpiration := DateAndTime now - maxDays days.\n\t\tself chronicle reverseDo: [ :persistency |\n\t\t\texpiration <= persistency hide... |
1,956 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleEnsureStorageMaxSize
chronicleMaxSize ifNotNil: [ :maxSize |
[ chronicle size > maxSize ] whileTrue: [
(self chronicle reverse
detect: #hideIsAutoExpirable
ifNone: [ ^ self ]) hideRemove ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "chronicleEnsureStorageMaxSize\n\n\tchronicleMaxSize ifNotNil: [ :maxSize |\n\t\t[ chronicle size > maxSize ] whileTrue: [\n\t\t\t(self chronicle reverse\n\t\t\t\t detect: #hideIsAutoExpirable\n\t\t\t\t ifNone: [ ^ self ]",
"suffi... |
1,957 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleEnsureStorageMaxSize
chronicleMaxSize ifNotNil: [ :maxSize |
[ chronicle size > maxSize ] whileTrue: [
(self chronicle reverse
detect: #hideIsAutoExpirable
ifNone: [ ^ self ]) hideRemove ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 3,
"mask_type": "unary_message",
"n_masked_tokens": 3,
"prefix": "chronicleEnsureStorageMaxSize\n\n\tchronicleMaxSize ifNotNil: [ :maxSize |\n\t\t[ chronicle size > maxSize ] whileTrue: [\n\t\t\t(self chronicle reverse\n\t\t\t\t detect: #hideIsAutoExpirable\n\t\t\t\t ifNone: [ ^ self",
"suffix": ... |
1,958 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleEnsureStorageMaxSize
chronicleMaxSize ifNotNil: [ :maxSize |
[ chronicle size > maxSize ] whileTrue: [
(self chronicle reverse
detect: #hideIsAutoExpirable
ifNone: [ ^ self ]) hideRemove ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 2,
"mask_type": "binary_message",
"n_masked_tokens": 3,
"prefix": "chronicleEnsureStorageMaxSize\n\n\tchronicleMaxSize ifNotNil: [ :maxSize |\n\t\t[ chronicle",
"suffix": " ] whileTrue: [\n\t\t\t(self chronicle reverse\n\t\t\t\t detect: #hideIsAutoExpirable\n\t\t\t\t ifNone: [ ^ self ]) hideRemov... |
1,959 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | chronicleSave: aHiDePersistency
^ (super chronicleSave: aHiDePersistency) ifNotNil: [ :ref |
self chronicleEnsureStorageLimits.
ref ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 8,
"prefix": "chronicleSave: aHiDePersistency\n\n\t^ (super chronicleSave: aHiDePersistency) ifNotNil: [",
"suffix": "",
"completion": " :ref |\n\t\t self chronicleEnsureStorageLimits.\n\t\t ref ]"
} |
1,960 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | initialize
super initialize.
chronicleMaxDays := self defaultChronicleMaxDays.
chronicleMaxSize := self defaultChronicleMaxSize | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initialize\n\n\tsuper initialize.\n\tchronicleMaxDays",
"suffix": ".\n\tchronicleMaxSize := self defaultChronicleMaxSize",
"completion": " := self defaultChronicleMaxDays"
} |
1,961 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | initialize
super initialize.
chronicleMaxDays := self defaultChronicleMaxDays.
chronicleMaxSize := self defaultChronicleMaxSize | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initialize\n\n\tsuper initialize.\n\tchronicleMaxDays := self defaultChronicleMaxDays.\n\tchronicleMaxSize",
"suffix": "",
"completion": " := self defaultChronicleMaxSize"
} |
1,962 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | loadSettings
self settingsFileReferenceDo: [ :ref |
([ ref readStreamDo: [ :stream | STONJSON fromStream: stream ] ]
on: Exception
do: [ :ex | ex return: nil ]) ifNotNil: [ :json |
self settings: json ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "loadSettings\n\n\tself settingsFileReferenceDo: [ :ref |\n\t\t([ ref readStreamDo: [ :stream | STONJSON fromStream: stream ] ]\n\t\t\t on: Exception\n\t\t\t do: [ :ex | ex return: nil ]) ifNotNil: [ :json |",
"suffix": "",
"com... |
1,963 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | loadSettings
self settingsFileReferenceDo: [ :ref |
([ ref readStreamDo: [ :stream | STONJSON fromStream: stream ] ]
on: Exception
do: [ :ex | ex return: nil ]) ifNotNil: [ :json |
self settings: json ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 10,
"prefix": "loadSettings\n\n\tself settingsFileReferenceDo: [ :ref |\n\t\t([ ref readStreamDo: [ :stream | STONJSON fromStream: stream ] ]\n\t\t\t on: Exception\n\t\t\t do: [ :ex | ex return: nil ]",
"suffix": " ]",
"completion": ") ifNot... |
1,964 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | loadSettings
self settingsFileReferenceDo: [ :ref |
([ ref readStreamDo: [ :stream | STONJSON fromStream: stream ] ]
on: Exception
do: [ :ex | ex return: nil ]) ifNotNil: [ :json |
self settings: json ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "loadSettings\n\n\tself settingsFileReferenceDo: [ :ref |\n\t\t([ ref readStreamDo: [ :stream",
"suffix": " ]\n\t\t\t on: Exception\n\t\t\t do: [ :ex | ex return: nil ]) ifNotNil: [ :json |\n\t\t\tself settings: json ] ]",
"comp... |
1,965 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | saveSettings
self settingsFileReferenceDo: [ :ref |
ref
ensureDelete;
writeStreamDo: [ :stream |
STONJSON put: self settings onStreamPretty: stream ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "saveSettings\n\n\tself settingsFileReferenceDo: [ :ref |\n\t\tref\n\t\t\tensureDelete;\n\t\t\twriteStreamDo: [ :stream |\n\t\t\t\tSTONJSON put: self settings",
"suffix": "",
"completion": " onStreamPretty: stream ] ]"
} |
1,966 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | saveSettings
self settingsFileReferenceDo: [ :ref |
ref
ensureDelete;
writeStreamDo: [ :stream |
STONJSON put: self settings onStreamPretty: stream ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 1,
"mask_type": "cascade",
"n_masked_tokens": 3,
"prefix": "saveSettings\n\n\tself settingsFileReferenceDo: [ :ref |\n\t\tref\n\t\t\tensureDelete;\n\t\t\twriteStreamDo: [ :stream |\n\t\t\t\tSTONJSON put: self settings",
"suffix": " ]",
"completion": " onStreamPretty: stream ]"
} |
1,967 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | saveSettings
self settingsFileReferenceDo: [ :ref |
ref
ensureDelete;
writeStreamDo: [ :stream |
STONJSON put: self settings onStreamPretty: stream ] ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "saveSettings\n\n\tself settingsFileReferenceDo: [ :ref |\n\t\tref\n\t\t\tensureDelete;\n\t\t\twriteStreamDo: [ :stream |\n\t\t\t\tSTONJSON put: self",
"suffix": " ] ]",
"completion": " settings onStreamPretty: stream"
} |
1,968 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | settings
| json |
json := OrderedDictionary new.
chronicleMaxDays ifNotNil: [
json at: 'chronicle-max-days' put: chronicleMaxDays ].
chronicleMaxSize ifNotNil: [
json at: 'chronicle-max-size' put: chronicleMaxSize ].
^ json | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "settings\n\n\t| json |\n\tjson := OrderedDictionary new.\n\tchronicleMaxDays ifNotNil: [\n\t\tjson at: 'chronicle-max-days' put: chronicleMaxDays ].\n\tchronicleMaxSize ifNotNil:",
"suffix": ".\n\t^ json",
"completion": " [\n\t... |
1,969 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | settings
| json |
json := OrderedDictionary new.
chronicleMaxDays ifNotNil: [
json at: 'chronicle-max-days' put: chronicleMaxDays ].
chronicleMaxSize ifNotNil: [
json at: 'chronicle-max-size' put: chronicleMaxSize ].
^ json | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "settings\n\n\t| json |\n\tjson := OrderedDictionary new.\n\tchronicleMaxDays ifNotNil: [\n\t\tjson at: 'chronicle-max-days' put: chronicleMaxDays ].\n\tchronicleMaxSize ifNotNil: [\n\t\tjson",
"suffix": " ].\n\t^ json",
"comple... |
1,970 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | settings
| json |
json := OrderedDictionary new.
chronicleMaxDays ifNotNil: [
json at: 'chronicle-max-days' put: chronicleMaxDays ].
chronicleMaxSize ifNotNil: [
json at: 'chronicle-max-size' put: chronicleMaxSize ].
^ json | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "settings\n\n\t| json |\n\tjson := OrderedDictionary new.\n\tchronicleMaxDays ifNotNil: [\n\t\tjson at: 'chronicle-max-days'",
"suffix": ".\n\tchronicleMaxSize ifNotNil: [\n\t\tjson at: 'chronicle-max-size' put: chronicleMaxSize ]... |
1,971 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | settings: aDictionary
chronicleMaxDays := aDictionary
at: 'chronicle-max-days'
ifPresent: [ :value | value ]
ifAbsent: [ nil ].
chronicleMaxSize := aDictionary
at: 'chronicle-max-size'
ifPresent: [ :value | ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 8,
"prefix": "settings: aDictionary\n\n\tchronicleMaxDays := aDictionary\n\t\t at: 'chronicle-max-days'\n\t\t ifPresent: [ :",
"suffix": ".\n\tchronicleMaxSize := aDictionary\n\t\t at: 'chron... |
1,972 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | settings: aDictionary
chronicleMaxDays := aDictionary
at: 'chronicle-max-days'
ifPresent: [ :value | value ]
ifAbsent: [ nil ].
chronicleMaxSize := aDictionary
at: 'chronicle-max-size'
ifPresent: [ :value | ... | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 8,
"prefix": "settings: aDictionary\n\n\tchronicleMaxDays := aDictionary\n\t\t at: 'chronicle-max-days'\n\t\t ifPresent: [ :value | value ]\n\t\t ifAbsent: [ nil ].\n\tchronicleMaxSize := aDict... |
1,973 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | settingsFileReferenceDo: aBlock
^ self basepathDo: [ :ref |
aBlock cull: (ref / self settingsFilename) copy ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "return",
"n_masked_tokens": 6,
"prefix": "settingsFileReferenceDo: aBlock\n\n\t^ self basepathDo: [ :ref |\n\t\t aBlock cull: (ref",
"suffix": "",
"completion": " / self settingsFilename) copy ]"
} |
1,974 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/HiDeStorageWithExpiration.class.st | settingsFileReferenceDo: aBlock
^ self basepathDo: [ :ref |
aBlock cull: (ref / self settingsFilename) copy ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "settingsFileReferenceDo: aBlock\n\n\t^ self basepathDo: [ :ref |\n\t\t aBlock",
"suffix": " ]",
"completion": " cull: (ref / self settingsFilename) copy"
} |
1,975 | https://github.com/tomooda/HiDeHo | 417ecb978f7bda743193bd0a93e1e4ab1ad7404b | src/HiDeHo-Storage/THiDePersistency.trait.st | hideRemove
hideStorage ifNotNil: [ hideStorage chronicleRemove: self ] | [
{
"filepath": "src/HiDeHo-Storage/HiDeStorage.class.st",
"code": "Object subclass: #HiDeStorage\n\tinstanceVariableNames: 'basepath chronicle'\n\tclassVariableNames: ''\n\tpackage: 'HiDeHo-Storage-Core'"
},
{
"filepath": "src/HiDeHo-Storage/HiDeStorageForTesting.class.st",
"code": "HiDeStorageWi... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "hideRemove\n\n\thideStorage ifNotNil: [ hideStorage",
"suffix": "",
"completion": " chronicleRemove: self ]"
} |
1,976 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st | baseline: spec
<baseline>
spec for: #common do: [
spec
package: 'Collections-RobinHood';
package: 'Collections-RobinHood-Tests'.
spec
group: 'default'
with: #( 'Collections-RobinHood' 'Collections-RobinHood-Tests' ) ] | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 8,
"prefix": "baseline: spec\n\n\t<baseline>\n\tspec for: #common do: [\n\t\tspec\n\t\t\tpackage: 'Collections-RobinHood';\n\t\t\tpackage: 'Collections-RobinHood-Tests'.\n\t\tspec",
"suffix": "",
"completion": "\n\t\t\tgroup: 'default'\n\t\t... |
1,977 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st | baseline: spec
<baseline>
spec for: #common do: [
spec
package: 'Collections-RobinHood';
package: 'Collections-RobinHood-Tests'.
spec
group: 'default'
with: #( 'Collections-RobinHood' 'Collections-RobinHood-Tests' ) ] | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 1,
"mask_type": "cascade",
"n_masked_tokens": 5,
"prefix": "baseline: spec\n\n\t<baseline>\n\tspec for: #common do: [\n\t\tspec",
"suffix": ".\n\t\tspec\n\t\t\tgroup: 'default'\n\t\t\twith: #( 'Collections-RobinHood' 'Collections-RobinHood-Tests' ) ]",
"completion": "\n\t\t\tpackage: 'Collectio... |
1,978 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st | baseline: spec
<baseline>
spec for: #common do: [
spec
package: 'Collections-RobinHood';
package: 'Collections-RobinHood-Tests'.
spec
group: 'default'
with: #( 'Collections-RobinHood' 'Collections-RobinHood-Tests' ) ] | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "baseline: spec\n\n\t<baseline>\n\tspec for: #common do: [\n\t\tspec\n\t\t\tpackage: 'Collections-RobinHood';\n\t\t\tpackage: 'Collections-RobinHood-Tests'.\n\t\tspec\n\t\t\tgroup:",
"suffix": " ]",
"completion": " 'default'\n\t... |
1,979 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | add: anAssociation
"Add anAssociation to the dictionary. If the key is already in the dictionary then the value
will overwrite the one currently present."
| index element |
index := self findElementOrNilForInsertion: anAssociation key.
element := array at: index.
element
ifNil: [ self atNewIndex: index put: an... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "add: anAssociation\n\t\"Add anAssociation to the dictionary. If the key is already in the dictionary then the value\n\twill overwrite the one currently present.\"\n\n\t| index element |\n\tindex := self findElementOrNilForInsertion: anA... |
1,980 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | add: anAssociation
"Add anAssociation to the dictionary. If the key is already in the dictionary then the value
will overwrite the one currently present."
| index element |
index := self findElementOrNilForInsertion: anAssociation key.
element := array at: index.
element
ifNil: [ self atNewIndex: index put: an... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "add: anAssociation\n\t\"Add anAssociation to the dictionary. If the key is already in the dictionary then the value\n\twill overwrite the one currently present.\"\n\n\t| index element |\n\tindex := self",
"suffix": ".\n\telement := ar... |
1,981 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | add: anAssociation
"Add anAssociation to the dictionary. If the key is already in the dictionary then the value
will overwrite the one currently present."
| index element |
index := self findElementOrNilForInsertion: anAssociation key.
element := array at: index.
element
ifNil: [ self atNewIndex: index put: an... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "add: anAssociation\n\t\"Add anAssociation to the dictionary. If the key is already in the dictionary then the value\n\twill overwrite the one currently present.\"\n\n\t| index element |\n\tindex := self findElementOrNilForInsertion... |
1,982 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | at: key put: anObject
"Set the value at key to be anObject.
If key is not found, create a new entry for key and set its value to anObject.
Answer anObject."
| index assoc |
index := self findElementOrNilForInsertion: key.
assoc := array at: index.
assoc
ifNil: [
self atNewIndex: index put: (Association key:... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "at: key put: anObject\n\t\"Set the value at key to be anObject.\n\tIf key is not found, create a new entry for key and set its value to anObject.\n\tAnswer anObject.\"\n\n\t| index assoc |\n\tindex := self findElementOrNilForInsertion: ... |
1,983 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | at: key put: anObject
"Set the value at key to be anObject.
If key is not found, create a new entry for key and set its value to anObject.
Answer anObject."
| index assoc |
index := self findElementOrNilForInsertion: key.
assoc := array at: index.
assoc
ifNil: [
self atNewIndex: index put: (Association key:... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "at: key put: anObject\n\t\"Set the value at key to be anObject.\n\tIf key is not found, create a new entry for key and set its value to anObject.\n\tAnswer anObject.\"\n\n\t| index assoc |\n\tindex := self findElementOrNilForInsert... |
1,984 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | at: key put: anObject
"Set the value at key to be anObject.
If key is not found, create a new entry for key and set its value to anObject.
Answer anObject."
| index assoc |
index := self findElementOrNilForInsertion: key.
assoc := array at: index.
assoc
ifNil: [
self atNewIndex: index put: (Association key:... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "at: key put: anObject\n\t\"Set the value at key to be anObject.\n\tIf key is not found, create a new entry for key and set its value to anObject.\n\tAnswer anObject.\"\n\n\t| index assoc |\n\tindex",
"suffix": ".\n\tassoc := array at:... |
1,985 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | at: key update: updateBlock initial: initBlocktOrValue
"I am used to update the value at a given key. The updateBlock is passed
the existing value, and the result of the block is stored back.
If the key does not exist, store the value of the initBlocktOrValue.
initBlocktOrValue can be a block in case the initial va... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 10,
"prefix": "at: key update: updateBlock initial: initBlocktOrValue\n\t\"I am used to update the value at a given key. The updateBlock is passed\n\tthe existing value, and the result of the block is stored back.\n\tIf the key does not exist, s... |
1,986 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | at: key update: updateBlock initial: initBlocktOrValue
"I am used to update the value at a given key. The updateBlock is passed
the existing value, and the result of the block is stored back.
If the key does not exist, store the value of the initBlocktOrValue.
initBlocktOrValue can be a block in case the initial va... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 2,
"mask_type": "keyword_message",
"n_masked_tokens": 6,
"prefix": "at: key update: updateBlock initial: initBlocktOrValue\n\t\"I am used to update the value at a given key. The updateBlock is passed\n\tthe existing value, and the result of the block is stored back.\n\tIf the key does not exist, st... |
1,987 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | at: key update: updateBlock initial: initBlocktOrValue
"I am used to update the value at a given key. The updateBlock is passed
the existing value, and the result of the block is stored back.
If the key does not exist, store the value of the initBlocktOrValue.
initBlocktOrValue can be a block in case the initial va... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "at: key update: updateBlock initial: initBlocktOrValue\n\t\"I am used to update the value at a given key. The updateBlock is passed\n\tthe existing value, and the result of the block is stored back.\n\tIf the key does not exist, store t... |
1,988 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | findElementOrNilForInsertion: anObject
"Answer the index of a first slot containing either a nil (indicating an empty slot) or an element that matches the given object.
This method is called for inserting a new element, so we take the opportunity to compute its probe sequence length.
Answer the index of that slot or... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "findElementOrNilForInsertion: anObject\n\t\"Answer the index of a first slot containing either a nil (indicating an empty slot) or an element that matches the given object.\n\tThis method is called for inserting a new element, so we tak... |
1,989 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | findElementOrNilForInsertion: anObject
"Answer the index of a first slot containing either a nil (indicating an empty slot) or an element that matches the given object.
This method is called for inserting a new element, so we take the opportunity to compute its probe sequence length.
Answer the index of that slot or... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 1,
"mask_type": "keyword_message",
"n_masked_tokens": 7,
"prefix": "findElementOrNilForInsertion: anObject\n\t\"Answer the index of a first slot containing either a nil (indicating an empty slot) or an element that matches the given object.\n\tThis method is called for inserting a new element, so w... |
1,990 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | fixCollisionsFrom: start
"The element at start is to be removed.
This method moves forward from there, shifting back any entry that were placed after it due to collisions with it."
| element probeSequenceLength index previousIndex |
previousIndex := index := start.
[
(element := array at: (index := index \\ arra... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 6,
"mask_type": "keyword_message",
"n_masked_tokens": 3,
"prefix": "fixCollisionsFrom: start\n\t\"The element at start is to be removed.\n\tThis method moves forward from there, shifting back any entry that were placed after it due to collisions with it.\"\n\n\t| element probeSequenceLength index p... |
1,991 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | fixCollisionsFrom: start
"The element at start is to be removed.
This method moves forward from there, shifting back any entry that were placed after it due to collisions with it."
| element probeSequenceLength index previousIndex |
previousIndex := index := start.
[
(element := array at: (index := index \\ arra... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 4,
"mask_type": "keyword_message",
"n_masked_tokens": 4,
"prefix": "fixCollisionsFrom: start\n\t\"The element at start is to be removed.\n\tThis method moves forward from there, shifting back any entry that were placed after it due to collisions with it.\"\n\n\t| element probeSequenceLength index p... |
1,992 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | fixCollisionsFrom: start
"The element at start is to be removed.
This method moves forward from there, shifting back any entry that were placed after it due to collisions with it."
| element probeSequenceLength index previousIndex |
previousIndex := index := start.
[
(element := array at: (index := index \\ arra... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 3,
"mask_type": "binary_message",
"n_masked_tokens": 8,
"prefix": "fixCollisionsFrom: start\n\t\"The element at start is to be removed.\n\tThis method moves forward from there, shifting back any entry that were placed after it due to collisions with it.\"\n\n\t| element probeSequenceLength index pr... |
1,993 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | grow
"Grow the elements array and reinsert the old elements"
| oldElements newSize |
oldElements := array.
newSize := HashTableSizes atLeast: oldElements size * 2.
array := Array new: newSize.
probeSequenceLengths := Array new: newSize.
tally := 0.
oldElements do: [ :each | each ifNotNil: [ self noCheckAdd: ea... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "grow\n\t\"Grow the elements array and reinsert the old elements\"\n\n\t| oldElements newSize |\n\toldElements := array.\n\tnewSize := HashTableSizes atLeast: oldElements size * 2.\n\tarray :=",
"suffix": ".\n\tprobeSequenceLengths := ... |
1,994 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | grow
"Grow the elements array and reinsert the old elements"
| oldElements newSize |
oldElements := array.
newSize := HashTableSizes atLeast: oldElements size * 2.
array := Array new: newSize.
probeSequenceLengths := Array new: newSize.
tally := 0.
oldElements do: [ :each | each ifNotNil: [ self noCheckAdd: ea... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 3,
"mask_type": "keyword_message",
"n_masked_tokens": 5,
"prefix": "grow\n\t\"Grow the elements array and reinsert the old elements\"\n\n\t| oldElements newSize |\n\toldElements := array.\n\tnewSize := HashTableSizes atLeast: oldElements size * 2.\n\tarray := Array new: newSize.\n\tprobeSequenceLen... |
1,995 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | grow
"Grow the elements array and reinsert the old elements"
| oldElements newSize |
oldElements := array.
newSize := HashTableSizes atLeast: oldElements size * 2.
array := Array new: newSize.
probeSequenceLengths := Array new: newSize.
tally := 0.
oldElements do: [ :each | each ifNotNil: [ self noCheckAdd: ea... | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 6,
"prefix": "grow\n\t\"Grow the elements array and reinsert the old elements\"\n\n\t| oldElements newSize |\n\toldElements := array.\n\tnewSize :=",
"suffix": ".\n\tarray := Array new: newSize.\n\tprobeSequenceLengths := Array new: newSize.\n\ttal... |
1,996 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | growTo: anInteger
"Grow the elements array and reinsert the old elements"
| oldElements |
oldElements := array.
array := Array new: anInteger.
probeSequenceLengths := Array new: anInteger.
self noCheckNoGrowFillFrom: oldElements | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 4,
"prefix": "growTo: anInteger\n\t\"Grow the elements array and reinsert the old elements\"\n\n\t| oldElements |\n\toldElements := array.\n\tarray",
"suffix": ".\n\tprobeSequenceLengths := Array new: anInteger.\n\tself noCheckNoGrowFillFrom: oldEl... |
1,997 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | growTo: anInteger
"Grow the elements array and reinsert the old elements"
| oldElements |
oldElements := array.
array := Array new: anInteger.
probeSequenceLengths := Array new: anInteger.
self noCheckNoGrowFillFrom: oldElements | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 1,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "growTo: anInteger\n\t\"Grow the elements array and reinsert the old elements\"\n\n\t| oldElements |\n\toldElements := array.\n\tarray := Array new: anInteger.\n\tprobeSequenceLengths :=",
"suffix": ".\n\tself noCheckNoGrowFillFrom: ol... |
1,998 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | initialize: n
super initialize: n.
probeSequenceLengths := Array new: n | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "assignment",
"n_masked_tokens": 3,
"prefix": "initialize: n\n\n\tsuper initialize: n.\n\tprobeSequenceLengths :=",
"suffix": "",
"completion": " Array new: n"
} |
1,999 | https://github.com/Gabriel-Darbord/Collections-RobinHood | 89a0a16fb0d2cad2a73a0946093cd2607523650c | src/Collections-RobinHood/RHDictionary.class.st | noCheckAdd: anObject
"Must be defined separately because (self findElementOrNilForInsertion:) expects a key, not an association."
array
at: (self findElementOrNilForInsertion: anObject key)
put: anObject.
tally := tally + 1 | [
{
"filepath": "src/BaselineOfRobinHoodCollections/BaselineOfRobinHoodCollections.class.st",
"code": "BaselineOf subclass: #BaselineOfRobinHoodCollections\n\tinstanceVariableNames: ''\n\tclassVariableNames: ''\n\tpackage: 'BaselineOfRobinHoodCollections'"
},
{
"filepath": "src/Collections-RobinHood-T... | {
"fim_idx": 0,
"mask_type": "keyword_message",
"n_masked_tokens": 9,
"prefix": "noCheckAdd: anObject\n\t\"Must be defined separately because (self findElementOrNilForInsertion:) expects a key, not an association.\"\n\n\tarray",
"suffix": ".\n\ttally := tally + 1",
"completion": "\n\t\tat: (self findElement... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.