LLM4Code-memtune
Collection
Collection for the paper titled "How Much Do Code Language Models Remember? An Investigation on Data Extraction Attacks before and after Fine-tuning"
•
14 items
•
Updated
file_name
stringlengths 7
60
| file_path
stringlengths 63
220
| content
stringlengths 954
292k
| file_size
int64 954
292k
| language
stringclasses 1
value | extension
stringclasses 1
value | repo_name
stringlengths 8
75
| repo_stars
int64 8
21.2k
| repo_forks
int64 0
3.21k
| repo_open_issues
int64 0
1.54k
| repo_created_at
stringlengths 20
20
| repo_pushed_at
stringlengths 20
20
| sha
stringlengths 64
64
| near_dups_stkv2_idx
sequencelengths 0
0
| input_ids
sequencelengths 325
1.02k
| attention_mask
sequencelengths 1
1
| n_tok
int64 325
1.02k
| sample
sequencelengths 300
300
| hash
int64 -9,217,187,865,942,657,000
9,220,665,241B
| uniques_1
bool 1
class | uniques_2
bool 1
class | uniques_3
bool 1
class | uniques_g3
bool 1
class | sample_query
sequencelengths 100
100
| hash_sq
int64 -9,165,591,567,420,961,000
9,187,754,742B
| uniques
bool 1
class | prefix_250
stringlengths 276
2.18k
| prefix_200
stringlengths 230
1.78k
| prefix_150
stringlengths 180
1.4k
| prefix_100
stringlengths 110
917
| suffix
stringlengths 57
504
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FileOutputStreamAdapter.java
|
/FileExtraction/Java_unseen/husonlab_megan-ce/src/megan/io/FileOutputStreamAdapter.java
|
/*
* FileOutputStreamAdapter.java Copyright (C) 2024 Daniel H. Huson
*
* (Some files contain contributions from other authors, who are then mentioned separately.)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package megan.io;
import java.io.*;
/**
* file output wrapper
* Daniel Huson, 6.2009
*/
public class FileOutputStreamAdapter implements IOutput {
private static final int BUFFER_SIZE = 8192;
private final BufferedOutputStream outs;
private long position;
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file), BUFFER_SIZE);
position = 0;
}
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file, boolean append) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file, append), BUFFER_SIZE);
if (append)
position = file.length();
}
/**
* get position in file
*
* @return position
*/
public long getPosition() {
return position;
}
/**
* get current length of file
*
* @return length
*/
public long length() {
return position;
}
/**
* seek, not supported
*
*/
public void seek(long pos) {
}
/**
* seek is not supported
*
* @return false
*/
public boolean supportsSeek() {
return false;
}
/**
* write a byte
*
*/
public void write(int a) throws IOException {
outs.write(a);
position++;
}
/**
* write bytes
*
*/
public void write(byte[] bytes, int offset, int length) throws IOException {
outs.write(bytes, offset, length);
position += length;
}
/**
* close this stream
*
*/
public void close() throws IOException {
outs.close();
}
/**
* flush the current stream
*
*/
public void flush() throws IOException {
outs.flush();
}
}
| 2,692 |
Java
|
.java
|
husonlab/megan-ce
| 62 | 21 | 18 |
2016-05-09T10:55:38Z
|
2024-02-22T23:23:42Z
|
43edd8f3f7ae40a0e5e216b8fa8187bdce5eec06840d49f6827e6ff4cd4f6051
|
[] |
[
1127,
222,
338,
37000,
4433,
51,
1874,
2657,
327,
72,
46,
244,
55,
53,
55,
57,
32649,
696,
51,
696,
371,
286,
222,
338,
222,
338,
327,
7313,
2293,
4814,
25194,
664,
1623,
14656,
49,
6574,
904,
1636,
14554,
25028,
7475,
222,
338,
222,
338,
1369,
3477,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
1196,
49,
575,
222,
338,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
338,
222,
338,
1369,
3477,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
477,
3477,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
588,
222,
1337,
616,
16136,
51,
735,
64,
222,
222,
485,
1401,
51,
735,
7737,
222,
222,
1350,
222,
338,
822,
1716,
7780,
222,
338,
32649,
696,
371,
286,
49,
244,
59,
51,
55,
53,
53,
62,
222,
588,
222,
942,
462,
37000,
4433,
4584,
457,
2319,
320,
303,
964,
924,
1175,
648,
44206,
100,
3382,
299,
244,
61,
54,
62,
55,
64,
303,
964,
1175,
16900,
8783,
986,
120,
64,
303,
964,
1964,
2764,
64,
465,
1041,
294,
338,
4389,
294,
338,
376,
588,
303,
581,
37000,
4433,
45,
991,
822,
46,
2589,
47493,
320,
310,
986,
120,
299,
556,
16900,
8783,
45,
909,
37000,
45,
781,
490,
44206,
100,
3382,
312,
310,
2764,
299,
244,
53,
64,
303,
339,
465,
1041,
294,
338,
4389,
294,
338,
376,
588,
303,
581,
37000,
4433,
45,
991,
822,
49,
1922,
5507,
46,
2589,
47493,
320,
310,
986,
120,
299,
556,
16900,
8783,
45,
909,
37000,
45,
781,
49,
5507,
490,
44206,
100,
3382,
312,
310,
434,
327,
1713,
46,
343,
2764,
299,
822,
51,
1340,
492,
303,
339,
465,
1041,
294,
338,
640,
2764,
347,
822,
294,
338,
294,
338,
496,
620,
2764,
294,
588,
303,
581,
1964,
640,
2746,
365,
320,
310,
461,
2764,
64,
303,
339,
465,
1041,
294,
338,
640,
1565,
3124,
451,
822,
294,
338,
294,
338,
496,
620,
3124,
294,
588,
303,
581,
1964,
3124,
365,
320,
310,
461,
2764,
64,
303,
339,
465,
1041,
294,
338,
22829,
49,
666,
5430,
294,
338,
376,
588,
303,
581,
782,
22829,
45,
3239,
3423,
46,
320,
303,
339,
465,
1041,
294,
338,
22829,
458,
666,
5430,
294,
338,
294,
338,
496,
620,
920,
294,
588,
303,
581,
1922,
9568,
18441,
365,
320,
310,
461,
920,
64,
303,
339,
465,
1041,
294,
338,
2886,
331,
3447,
294,
338,
376,
588,
303,
581,
782,
2886,
45,
429,
331,
46,
2589,
6300,
320,
310,
986,
120,
51,
1838,
45,
102,
312,
310,
2764,
3348,
303,
339,
465,
1041,
294,
338,
2886,
3534,
294,
338,
376,
588,
303,
581,
782,
2886,
45,
2278,
1197,
3534,
49,
648,
3413,
49,
648,
3124,
46,
2589,
6300,
320,
310,
986,
120,
51,
1838,
45,
3669,
49,
3413,
49,
3124,
312,
310,
2764,
1475,
3124,
64,
303,
339,
465,
1041,
294,
338,
4248,
477,
3458,
294,
338,
376,
588,
303,
581,
782,
4248,
365,
2589,
6300,
320,
310,
986,
120,
51,
2698,
492,
303,
339,
465,
1041,
294,
338,
15037,
341,
1565,
3458,
294,
338,
376,
588,
303,
581,
782,
15037,
365,
2589,
6300,
320,
310,
986,
120,
51,
9327,
492,
303,
339,
222,
130,
222
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 624 |
[
244,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
477,
3477,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
588,
222,
1337,
616,
16136,
51,
735,
64,
222,
222,
485,
1401,
51,
735,
7737,
222,
222,
1350,
222,
338,
822,
1716,
7780,
222,
338,
32649,
696,
371,
286,
49,
244,
59,
51,
55,
53,
53,
62,
222,
588,
222,
942,
462,
37000,
4433,
4584,
457,
2319,
320,
303,
964,
924,
1175,
648,
44206,
100,
3382,
299,
244,
61,
54,
62,
55,
64,
303,
964,
1175,
16900,
8783,
986,
120,
64,
303,
964,
1964,
2764,
64,
465,
1041,
294,
338,
4389,
294,
338,
376,
588,
303,
581,
37000,
4433,
45,
991,
822,
46,
2589,
47493,
320,
310,
986,
120,
299,
556,
16900,
8783,
45,
909,
37000,
45,
781,
490,
44206,
100,
3382,
312,
310,
2764,
299,
244,
53,
64,
303,
339,
465,
1041,
294,
338,
4389,
294,
338,
376,
588,
303,
581,
37000,
4433,
45,
991,
822,
49,
1922,
5507,
46,
2589,
47493,
320,
310,
986,
120,
299,
556,
16900,
8783,
45,
909,
37000,
45,
781,
49,
5507,
490,
44206,
100,
3382,
312,
310,
434,
327,
1713,
46,
343,
2764,
299,
822,
51,
1340,
492,
303,
339,
465,
1041,
294,
338,
640,
2764,
347,
822,
294,
338,
294,
338,
496,
620,
2764,
294,
588,
303,
581,
1964,
640,
2746,
365,
320,
310,
461,
2764,
64,
303,
339,
465,
1041,
294,
338,
640,
1565,
3124,
451,
822,
294,
338,
294,
338,
496,
620,
3124,
294,
588,
303,
581,
1964,
3124,
365,
320,
310,
461,
2764,
64,
303,
339,
465,
1041,
294,
338,
22829,
49,
666,
5430,
294,
338
] | -5,135,551,200,280,734,000 | true | false | false | false |
[
986,
120,
299,
556,
16900,
8783,
45,
909,
37000,
45,
781,
490,
44206,
100,
3382,
312,
310,
2764,
299,
244,
53,
64,
303,
339,
465,
1041,
294,
338,
4389,
294,
338,
376,
588,
303,
581,
37000,
4433,
45,
991,
822,
49,
1922,
5507,
46,
2589,
47493,
320,
310,
986,
120,
299,
556,
16900,
8783,
45,
909,
37000,
45,
781,
49,
5507,
490,
44206,
100,
3382,
312,
310,
434,
327,
1713,
46,
343,
2764,
299,
822,
51,
1340,
492,
303,
339,
465,
1041,
294,
338,
640,
2764,
347,
822,
294,
338,
294,
338,
496,
620,
2764,
294,
588,
303,
581,
1964
] | -8,046,125,004,911,504,000 | true |
See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package megan.io;
import java.io.*;
/**
* file output wrapper
* Daniel Huson, 6.2009
*/
public class FileOutputStreamAdapter implements IOutput {
private static final int BUFFER_SIZE = 8192;
private final BufferedOutputStream outs;
private long position;
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file), BUFFER_SIZE);
position = 0;
}
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file, boolean append) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file, append), BUFFER_SIZE);
if (append)
position = file.length();
}
/**
* get position in file
*
* @return position
*/
public long
|
licenses/>.
*/
package megan.io;
import java.io.*;
/**
* file output wrapper
* Daniel Huson, 6.2009
*/
public class FileOutputStreamAdapter implements IOutput {
private static final int BUFFER_SIZE = 8192;
private final BufferedOutputStream outs;
private long position;
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file), BUFFER_SIZE);
position = 0;
}
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file, boolean append) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file, append), BUFFER_SIZE);
if (append)
position = file.length();
}
/**
* get position in file
*
* @return position
*/
public long
|
{
private static final int BUFFER_SIZE = 8192;
private final BufferedOutputStream outs;
private long position;
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file), BUFFER_SIZE);
position = 0;
}
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file, boolean append) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file, append), BUFFER_SIZE);
if (append)
position = file.length();
}
/**
* get position in file
*
* @return position
*/
public long
|
outs = new BufferedOutputStream(new FileOutputStream(file), BUFFER_SIZE);
position = 0;
}
/**
* constructor
*
*/
public FileOutputStreamAdapter(File file, boolean append) throws FileNotFoundException {
outs = new BufferedOutputStream(new FileOutputStream(file, append), BUFFER_SIZE);
if (append)
position = file.length();
}
/**
* get position in file
*
* @return position
*/
public long
|
getPosition() {
return position;
}
/**
* get current length of file
*
* @return length
*/
public long length() {
return position;
}
/**
* seek, not supported
*
|
ActionRunDo.java
|
/FileExtraction/Java_unseen/lishangwl_yichujifa/app/src/main/java/esqeee/xieqing/com/eeeeee/action/ActionRunDo.java
|
package esqeee.xieqing.com.eeeeee.action;
import com.yicu.yichujifa.GlobalContext;
import java.util.HashMap;
import esqeee.xieqing.com.eeeeee.bean.JSONBean;
import esqeee.xieqing.com.eeeeee.doAction.Base;
import esqeee.xieqing.com.eeeeee.doAction.api.App;
import esqeee.xieqing.com.eeeeee.doAction.api.Array;
import esqeee.xieqing.com.eeeeee.doAction.api.Assgin;
import esqeee.xieqing.com.eeeeee.doAction.api.Auto;
import esqeee.xieqing.com.eeeeee.doAction.api.Bule;
import esqeee.xieqing.com.eeeeee.doAction.api.Click;
import esqeee.xieqing.com.eeeeee.doAction.api.ClickText;
import esqeee.xieqing.com.eeeeee.doAction.api.Color;
import esqeee.xieqing.com.eeeeee.doAction.api.Condition;
import esqeee.xieqing.com.eeeeee.doAction.api.Dialog;
import esqeee.xieqing.com.eeeeee.doAction.api.Encrypt;
import esqeee.xieqing.com.eeeeee.doAction.api.Fast;
import esqeee.xieqing.com.eeeeee.doAction.api.File;
import esqeee.xieqing.com.eeeeee.doAction.api.FlashClose;
import esqeee.xieqing.com.eeeeee.doAction.api.FlashOpen;
import esqeee.xieqing.com.eeeeee.doAction.api.For;
import esqeee.xieqing.com.eeeeee.doAction.api.Genster;
import esqeee.xieqing.com.eeeeee.doAction.api.Http;
import esqeee.xieqing.com.eeeeee.doAction.api.If;
import esqeee.xieqing.com.eeeeee.doAction.api.Image;
import esqeee.xieqing.com.eeeeee.doAction.api.InputText;
import esqeee.xieqing.com.eeeeee.doAction.api.Key;
import esqeee.xieqing.com.eeeeee.doAction.api.LongClick;
import esqeee.xieqing.com.eeeeee.doAction.api.Node;
import esqeee.xieqing.com.eeeeee.doAction.api.Paste;
import esqeee.xieqing.com.eeeeee.doAction.api.RandomSleep;
import esqeee.xieqing.com.eeeeee.doAction.api.SL;
import esqeee.xieqing.com.eeeeee.doAction.api.STRING;
import esqeee.xieqing.com.eeeeee.doAction.api.Setting;
import esqeee.xieqing.com.eeeeee.doAction.api.Sleep;
import esqeee.xieqing.com.eeeeee.doAction.api.Swip;
import esqeee.xieqing.com.eeeeee.doAction.api.SwipLine;
import esqeee.xieqing.com.eeeeee.doAction.api.System;
import esqeee.xieqing.com.eeeeee.doAction.api.Toast;
import esqeee.xieqing.com.eeeeee.doAction.api.UI;
import esqeee.xieqing.com.eeeeee.doAction.api.While;
import esqeee.xieqing.com.eeeeee.doAction.api.Wifi;
import esqeee.xieqing.com.eeeeee.doAction.core.Media;
import esqeee.xieqing.com.eeeeee.doAction.core.ScaleMatrics;
import esqeee.xieqing.com.eeeeee.doAction.core.Text2Speech;
import esqeee.xieqing.com.eeeeee.library.RuntimeLog;
public class ActionRunDo {
private HashMap<Object, Base> actionTable = new HashMap<>();{
actionTable.put(-1,new Sleep());
actionTable.put(0,new FlashOpen());
actionTable.put(1,new FlashClose());
actionTable.put(2,new Click());
actionTable.put(3,new ClickText());
actionTable.put(41,new ClickText());
actionTable.put(49,new ClickText());
actionTable.put(62,new ClickText());
actionTable.put(30,new Image());
actionTable.put(50,new Image());
actionTable.put(60,new Image());
actionTable.put(61,new Image());
actionTable.put(58,new Color());
actionTable.put(59,new Color());
actionTable.put(67,new Color());
actionTable.put(68,new Color());
actionTable.put(4,new Key());
actionTable.put(5,new Key());
actionTable.put(6,new Key());
actionTable.put(11,new Key());
actionTable.put(14,new Key());
actionTable.put(15,new InputText());
actionTable.put(12,new App());
actionTable.put(13,new SwipLine());
actionTable.put(42,new Genster());
actionTable.put(7,new Swip());
actionTable.put(8,new Swip());
actionTable.put(9,new Swip());
actionTable.put(10,new Swip());
actionTable.put(22,new Setting());
actionTable.put(23,new Setting());
actionTable.put(24,new Setting());
actionTable.put(25,new Setting());
actionTable.put(26,new Setting());
actionTable.put(27,new Setting());
actionTable.put(28,new Setting());
actionTable.put(29,new Setting());
actionTable.put(31,new Setting());
actionTable.put(34,new Setting());
actionTable.put(35,new Setting());
actionTable.put(36,new Setting());
actionTable.put(37,new Setting());
actionTable.put(57,new Setting());
actionTable.put(64,new Setting());
actionTable.put(65,new Setting());
actionTable.put(66,new Setting());
actionTable.put(69,new Setting());
actionTable.put(38,new Fast());
actionTable.put(39,new Fast());
actionTable.put(40,new Fast());
actionTable.put(46,new Paste());
actionTable.put(53,new For());
actionTable.put(43,new If());
actionTable.put(51,new RandomSleep());
actionTable.put(52,new While());
actionTable.put(55,new Toast());
actionTable.put(16,new LongClick());
actionTable.put(17,new Auto());
actionTable.put(18,new Wifi());
actionTable.put(19,new Wifi());
actionTable.put(20,new Bule());
actionTable.put(21,new Bule());
actionTable.put(54,new Condition());
actionTable.put(63,new Condition());
actionTable.put(44,new Condition());
actionTable.put(45,new Condition());
actionTable.put(47,new Condition());
actionTable.put(48,new Condition());
actionTable.put(72,new Condition());
actionTable.put(70,new Http());
actionTable.put(71,new Assgin());
actionTable.put(73,new STRING());
actionTable.put(74,new File());
actionTable.put(75,new Encrypt());
actionTable.put(77,new SL());
actionTable.put(78,new Array());
actionTable.put(79,new Node());
actionTable.put(80,new Dialog());
actionTable.put(81,new UI());
actionTable.put(83,new System());
}
public boolean post(int type,JSONBean jsonBean, ActionRun self, ActionRun.Block block){
if (type == 56){
return true;
}
//RuntimeLog.log("[block:"+block.blockName+"]"+block.getVariables().length());
if (!actionTable.containsKey(type)){
RuntimeLog.e("error, action = "+type+" not define.");
return false;
}
JSONBean param = jsonBean.getJson("param");
String desc = param.getString("desc");
if (!desc.equals("")){
RuntimeLog.i("ps:"+desc);
}
return actionTable.get(type).setJsonBean(jsonBean).setRun(self).setBlock(block).post(param.put("actionType",type));
}
private Media media;
private Text2Speech speech = new Text2Speech(GlobalContext.getContext());
public Text2Speech getSpeech() {
return speech;
}
public Media getMedia() {
if (media == null){
media = new Media();
}
return media;
}
public ScaleMatrics getScaleMatrics(int width,int height) {
return new ScaleMatrics(width,height);
}
public void reslese(){
if (media != null){
media.reslese();
}
if (speech != null){
speech.reslese();
}
}
}
| 7,169 |
Java
|
.java
|
lishangwl/yichujifa
| 60 | 30 | 3 |
2023-04-06T11:51:16Z
|
2023-04-06T15:43:42Z
|
c67c17ed9595c305a23a6a51594b6c251fd04bc7fb0deca732572a73c5602007
|
[] |
[
1337,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1160,
64,
222,
222,
485,
785,
51,
126,
41003,
51,
126,
1211,
9646,
37365,
51,
4470,
1237,
64,
222,
222,
485,
1401,
51,
1058,
51,
8263,
64,
222,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
12455,
51,
3275,
5358,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1778,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1306,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1280,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
4028,
1542,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
4754,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
71,
779,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
2668,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
2668,
1049,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1530,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
5371,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
3742,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
19379,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
12200,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
991,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
15302,
4187,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
15302,
2981,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1580,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
5154,
6449,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
2233,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
2811,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1675,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1630,
1049,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
971,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
3967,
2668,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1230,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
29491,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
6124,
15145,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
3910,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
5215,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
7093,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
15145,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
3926,
658,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
3926,
658,
1829,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1615,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
15030,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
2299,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
16221,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
25124,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1284,
51,
5003,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1284,
51,
5243,
3002,
119,
1339,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1284,
51,
1049,
55,
22023,
64,
222,
485
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,024 |
[
1306,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1280,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
4028,
1542,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
4754,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
71,
779,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
2668,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
2668,
1049,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1530,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
5371,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
3742,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
19379,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
12200,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
991,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51
] | 4,832,389,744,547,261,000 | true | false | false | false |
[
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
1530,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
5371,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
3742,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310,
51,
1428,
1728,
51,
1256,
51,
19379,
64,
222,
485,
2834,
118,
17506,
51,
125,
1093,
118,
318,
51,
527,
51,
25909,
1310
] | 2,417,562,655,413,605,400 | true |
App;
import esqeee.xieqing.com.eeeeee.doAction.api.Array;
import esqeee.xieqing.com.eeeeee.doAction.api.Assgin;
import esqeee.xieqing.com.eeeeee.doAction.api.Auto;
import esqeee.xieqing.com.eeeeee.doAction.api.Bule;
import esqeee.xieqing.com.eeeeee.doAction.api.Click;
import esqeee.xieqing.com.eeeeee.doAction.api.ClickText;
import esqeee.xieqing.com.eeeeee.doAction.api.Color;
import esqeee.xieqing.com.eeeeee.doAction.api.Condition;
import esqeee.xieqing.com.eeeeee.doAction.api.Dialog;
import esqeee.xieqing.com.eeeeee.doAction.api.Encrypt;
import esqeee.xieqing.com.eeeeee
|
import esqeee.xieqing.com.eeeeee.doAction.api.Auto;
import esqeee.xieqing.com.eeeeee.doAction.api.Bule;
import esqeee.xieqing.com.eeeeee.doAction.api.Click;
import esqeee.xieqing.com.eeeeee.doAction.api.ClickText;
import esqeee.xieqing.com.eeeeee.doAction.api.Color;
import esqeee.xieqing.com.eeeeee.doAction.api.Condition;
import esqeee.xieqing.com.eeeeee.doAction.api.Dialog;
import esqeee.xieqing.com.eeeeee.doAction.api.Encrypt;
import esqeee.xieqing.com.eeeeee
|
eee.xieqing.com.eeeeee.doAction.api.Click;
import esqeee.xieqing.com.eeeeee.doAction.api.ClickText;
import esqeee.xieqing.com.eeeeee.doAction.api.Color;
import esqeee.xieqing.com.eeeeee.doAction.api.Condition;
import esqeee.xieqing.com.eeeeee.doAction.api.Dialog;
import esqeee.xieqing.com.eeeeee.doAction.api.Encrypt;
import esqeee.xieqing.com.eeeeee
|
ieqing.com.eeeeee.doAction.api.Color;
import esqeee.xieqing.com.eeeeee.doAction.api.Condition;
import esqeee.xieqing.com.eeeeee.doAction.api.Dialog;
import esqeee.xieqing.com.eeeeee.doAction.api.Encrypt;
import esqeee.xieqing.com.eeeeee
|
.doAction.api.Fast;
import esqeee.xieqing.com.eeeeee.doAction.api.File;
import esqeee.xieqing.com.eeeeee.doAction.
|
ABTestingServiceTest.java
|
/FileExtraction/Java_unseen/todoroo_astrid/tests/src/com/todoroo/astrid/service/ABTestingServiceTest.java
|
/**
* Copyright (c) 2012 Todoroo Inc
*
* See the file "LICENSE" for the full license governing this code.
*/
package com.todoroo.astrid.service;
import com.todoroo.andlib.data.TodorooCursor;
import com.todoroo.andlib.service.Autowired;
import com.todoroo.andlib.sql.Order;
import com.todoroo.andlib.sql.Query;
import com.todoroo.andlib.utility.AndroidUtilities;
import com.todoroo.andlib.utility.Preferences;
import com.todoroo.astrid.dao.ABTestEventDao;
import com.todoroo.astrid.data.ABTestEvent;
import com.todoroo.astrid.service.abtesting.ABChooser;
import com.todoroo.astrid.service.abtesting.ABTests;
import com.todoroo.astrid.test.DatabaseTestCase;
public class ABTestingServiceTest extends DatabaseTestCase {
@Autowired ABTestEventDao abTestEventDao;
@Autowired ABChooser abChooser;
@Autowired ABTests abTests;
public void testReportInitialEventNewUser() {
testInitialEvents(true, false);
}
public void testReportInitialEventExistingUser() {
testInitialEvents(false, true);
}
private void testInitialEvents(boolean newUser, boolean activatedUser) {
testInterval(newUser, activatedUser, 0);
}
public void testIntervalEventWithShortIntervalNewUser() {
testIntervalEventWithShortInterval(true, false);
}
public void testIntervalEventWithShortIntervalExistingUser() {
testIntervalEventWithShortInterval(false, true);
}
public void testIntervalEventWithLongIntervalNewUser() {
testIntervalEventWithLongInterval(true, false);
}
public void testIntervalEventWithLongIntervalExistingUser() {
testIntervalEventWithLongInterval(false, true);
}
private void testIntervalEventWithShortInterval(boolean newUser, boolean activatedUser) {
testInterval(newUser, activatedUser, 3);
}
private void testIntervalEventWithLongInterval(boolean newUser, boolean activatedUser) {
testInterval(newUser, activatedUser, 14);
}
private void testInterval(boolean newUser, boolean activatedUser, int testInterval) {
abChooser.makeChoicesForAllTests(newUser, activatedUser);
abTestEventDao.createTestEventWithTimeInterval(TEST_NAME, testInterval);
TodorooCursor<ABTestEvent> events = abTestEventDao.query(
Query.select(ABTestEvent.PROPERTIES)
.where(ABTestEvent.TEST_NAME.eq(TEST_NAME))
.orderBy(Order.asc(ABTestEvent.TIME_INTERVAL)));
try {
int maxIntervalIndex = AndroidUtilities.indexOf(ABTestEvent.TIME_INTERVALS, testInterval);
assertEquals(maxIntervalIndex + 1, events.getCount());
for (int i = 0; i < events.getCount(); i++) {
events.moveToNext();
ABTestEvent event = new ABTestEvent(events);
assertExpectedValues(event, newUser, activatedUser, ABTestEvent.TIME_INTERVALS[i]);
}
} finally {
events.close();
}
}
private void assertExpectedValues(ABTestEvent event, boolean newUser, boolean activatedUser, int timeInterval) {
assertEquals(TEST_NAME, event.getValue(ABTestEvent.TEST_NAME));
assertEquals(newUser ? 1 : 0, event.getValue(ABTestEvent.NEW_USER).intValue());
assertEquals(activatedUser ? 1 : 0, event.getValue(ABTestEvent.ACTIVATED_USER).intValue());
assertEquals(timeInterval, event.getValue(ABTestEvent.TIME_INTERVAL).intValue());
}
@Override
protected void setUp() throws Exception {
super.setUp();
abTests.addTest(TEST_NAME, new int[] { 9, 1 } , new int[] { 1, 9 }, TEST_OPTIONS, true);
Preferences.clear(TEST_NAME);
}
private static final String TEST_NAME = "test_experiment";
private static final String[] TEST_OPTIONS = new String[] { "opt-1", "opt-2" };
}
| 3,831 |
Java
|
.java
|
todoroo/astrid
| 1,076 | 691 | 14 |
2010-05-22T20:26:39Z
|
2020-01-30T20:16:21Z
|
c9317d75c605c74064a6b19f8686f20884e52f499bd9580172a680d017df2b62
|
[] |
[
1350,
222,
338,
2657,
327,
104,
46,
244,
55,
53,
54,
55,
28818,
290,
623,
6367,
222,
338,
222,
338,
2819,
341,
822,
332,
4106,
39,
456,
341,
3559,
3553,
5139,
477,
1361,
51,
222,
588,
222,
1337,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
2140,
64,
222,
222,
485,
785,
51,
10197,
290,
623,
51,
382,
1379,
51,
624,
51,
16468,
290,
623,
7424,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
382,
1379,
51,
2140,
51,
10789,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
382,
1379,
51,
2622,
51,
2888,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
382,
1379,
51,
2622,
51,
1643,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
382,
1379,
51,
16777,
51,
9213,
13392,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
382,
1379,
51,
16777,
51,
11333,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
13974,
51,
1336,
1024,
1167,
8924,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
624,
51,
1336,
1024,
1167,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
2140,
51,
380,
4280,
51,
1336,
21216,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
2140,
51,
380,
4280,
51,
1336,
4485,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
881,
51,
3969,
7246,
64,
222,
222,
942,
462,
20660,
10870,
1201,
1024,
2041,
6728,
7246,
320,
465,
496,
10789,
20660,
1024,
1167,
8924,
1419,
1024,
1167,
8924,
64,
303,
496,
10789,
20660,
21216,
1419,
21216,
64,
303,
496,
10789,
20660,
4485,
1419,
4485,
64,
465,
581,
782,
913,
4158,
4694,
1167,
1827,
1259,
365,
320,
310,
913,
4694,
5015,
45,
1527,
49,
920,
312,
303,
339,
465,
581,
782,
913,
4158,
4694,
1167,
18104,
1259,
365,
320,
310,
913,
4694,
5015,
45,
1886,
49,
878,
312,
303,
339,
465,
964,
782,
913,
4694,
5015,
45,
4412,
556,
1259,
49,
1922,
25220,
1259,
46,
320,
310,
913,
5766,
45,
909,
1259,
49,
25220,
1259,
49,
244,
53,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
6881,
5766,
1827,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
6881,
5766,
45,
1527,
49,
920,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
6881,
5766,
18104,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
6881,
5766,
45,
1886,
49,
878,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
3967,
5766,
1827,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
3967,
5766,
45,
1527,
49,
920,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
3967,
5766,
18104,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
3967,
5766,
45,
1886,
49,
878,
312,
303,
339,
465,
964,
782,
913,
5766,
1167,
1569,
6881,
5766,
45,
4412,
556,
1259,
49,
1922,
25220,
1259,
46,
320,
310,
913,
5766,
45,
909,
1259,
49,
25220,
1259,
49,
244,
56,
312,
303,
339,
465,
964,
782,
913,
5766,
1167,
1569,
3967,
5766,
45,
4412,
556,
1259,
49,
1922,
25220,
1259,
46,
320,
310,
913,
5766,
45,
909,
1259,
49,
25220,
1259,
49,
244,
54,
57,
312,
303,
339,
465,
964,
782,
913,
5766,
45,
4412,
556,
1259,
49,
1922,
25220,
1259,
49,
648,
913,
5766,
46,
320,
310,
1419,
21216,
51,
2696,
34857,
43259,
4485,
45,
909,
1259,
49,
25220,
1259,
312,
310,
1419,
1024,
1167,
8924,
51,
1315,
1024,
1167,
1569,
1061,
5766,
45,
3780,
100,
2491,
49,
913,
5766,
312,
603,
28818,
290,
623,
7424,
65,
1336,
1024,
1167,
67,
5233,
299,
1419,
1024,
1167,
8924,
51,
1234,
45,
419,
6662,
51,
1632,
45,
1336,
1024,
1167,
51,
30801,
46,
419,
657,
2786,
45,
1336,
1024,
1167,
51,
3780,
100,
2491,
51,
3705,
45,
3780,
100,
2491,
509,
419,
657,
14412,
45,
2888,
51,
9600,
45,
1336,
1024,
1167,
51,
4812,
100,
22863,
4254,
310,
1614,
320,
343,
648,
1788,
5766,
1301,
299,
8107,
13392,
51,
7149,
45,
1336,
1024,
1167,
51,
4812,
100,
22863,
88,
49,
913,
5766,
312,
343,
3803,
45,
1472,
5766,
1301,
494,
244,
54,
49,
5233,
51,
32931,
1052,
1083,
456,
327,
429,
613,
299,
244,
53,
64,
613,
350,
5233,
51,
32931,
492,
613,
2002,
320,
419,
5233,
51,
23061,
3364,
492,
419,
20660,
1024,
1167,
1708,
299,
556,
20660,
1024,
1167,
45,
5070,
312,
419,
1217,
7705,
3367,
45,
1585,
49,
556,
1259,
49,
25220,
1259,
49,
20660,
1024,
1167,
51,
4812,
100,
22863,
88,
96,
110,
2004,
343,
339,
310,
339,
8312,
320,
343,
5233,
51,
2698,
492,
310,
339,
303,
339,
465,
964,
782,
1217,
7705,
3367,
45,
1336,
1024,
1167,
1708,
49,
1922,
556,
1259,
49,
1922,
25220,
1259,
49,
648,
1153,
5766,
46,
320,
310,
3803,
45,
3780,
100,
2491,
49,
1708,
51,
6693,
45,
1336,
1024,
1167,
51,
3780,
100,
2491,
894,
310,
3803,
45,
909,
1259,
1037,
244,
54,
518,
244,
53,
49,
1708,
51,
6693,
45,
1336,
1024,
1167,
51,
11364,
100,
4991,
566,
22777,
1052,
310,
3803,
45,
25201,
1259,
1037,
244,
54,
518,
244,
53,
49,
1708,
51,
6693,
45,
1336,
1024,
1167,
51,
20526,
8153,
100,
4991,
566,
22777,
1052,
310,
3803,
45,
1021,
5766,
49,
1708,
51,
6693,
45,
1336,
1024,
1167,
51,
4812,
100,
22863,
566,
22777,
1052,
303,
339,
465,
496,
1806,
303,
2532,
782,
14544,
365,
2589,
3284,
320,
310,
2615,
51,
23715,
492,
310,
1419,
4485,
51,
688,
1024,
45,
3780,
100,
2491,
49,
556,
648,
1197,
320,
244,
62,
49,
244,
54,
339,
1737,
556,
648,
1197,
320,
244,
54,
49,
244,
62,
820,
5904,
100,
15966,
49,
878,
312,
310,
38440,
51,
3830,
45,
3780,
100,
2491,
312,
303,
339,
465,
964,
924,
1175,
910,
5904,
100,
2491,
299,
332,
881,
100,
10963,
884,
303,
964,
924,
1175,
910,
1197,
5904,
100,
15966,
299,
556,
910,
1197,
320,
332,
2238,
50,
54,
411,
332,
2238,
50,
55,
39,
1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
51,
624,
51,
1336,
1024,
1167,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
2140,
51,
380,
4280,
51,
1336,
21216,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
2140,
51,
380,
4280,
51,
1336,
4485,
64,
222,
485,
785,
51,
10197,
290,
623,
51,
22375,
333,
51,
881,
51,
3969,
7246,
64,
222,
222,
942,
462,
20660,
10870,
1201,
1024,
2041,
6728,
7246,
320,
465,
496,
10789,
20660,
1024,
1167,
8924,
1419,
1024,
1167,
8924,
64,
303,
496,
10789,
20660,
21216,
1419,
21216,
64,
303,
496,
10789,
20660,
4485,
1419,
4485,
64,
465,
581,
782,
913,
4158,
4694,
1167,
1827,
1259,
365,
320,
310,
913,
4694,
5015,
45,
1527,
49,
920,
312,
303,
339,
465,
581,
782,
913,
4158,
4694,
1167,
18104,
1259,
365,
320,
310,
913,
4694,
5015,
45,
1886,
49,
878,
312,
303,
339,
465,
964,
782,
913,
4694,
5015,
45,
4412,
556,
1259,
49,
1922,
25220,
1259,
46,
320,
310,
913,
5766,
45,
909,
1259,
49,
25220,
1259,
49,
244,
53,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
6881,
5766,
1827,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
6881,
5766,
45,
1527,
49,
920,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
6881,
5766,
18104,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
6881,
5766,
45,
1886,
49,
878,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
3967,
5766,
1827,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
3967,
5766,
45,
1527,
49,
920,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
3967,
5766,
18104,
1259,
365,
320,
310,
913,
5766
] | -4,984,972,391,152,324,000 | true | false | false | false |
[
465,
581,
782,
913,
4158,
4694,
1167,
18104,
1259,
365,
320,
310,
913,
4694,
5015,
45,
1886,
49,
878,
312,
303,
339,
465,
964,
782,
913,
4694,
5015,
45,
4412,
556,
1259,
49,
1922,
25220,
1259,
46,
320,
310,
913,
5766,
45,
909,
1259,
49,
25220,
1259,
49,
244,
53,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
6881,
5766,
1827,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
6881,
5766,
45,
1527,
49,
920,
312,
303,
339,
465,
581,
782,
913,
5766,
1167,
1569,
6881,
5766,
18104,
1259,
365,
320,
310,
913,
5766,
1167,
1569,
6881,
5766
] | -1,762,339,727,393,467,000 | true |
import com.todoroo.astrid.dao.ABTestEventDao;
import com.todoroo.astrid.data.ABTestEvent;
import com.todoroo.astrid.service.abtesting.ABChooser;
import com.todoroo.astrid.service.abtesting.ABTests;
import com.todoroo.astrid.test.DatabaseTestCase;
public class ABTestingServiceTest extends DatabaseTestCase {
@Autowired ABTestEventDao abTestEventDao;
@Autowired ABChooser abChooser;
@Autowired ABTests abTests;
public void testReportInitialEventNewUser() {
testInitialEvents(true, false);
}
public void testReportInitialEventExistingUser() {
testInitialEvents(false, true);
}
private void testInitialEvents(boolean newUser, boolean activatedUser) {
testInterval(newUser, activatedUser, 0);
}
public void testIntervalEventWithShortIntervalNewUser() {
testIntervalEventWithShortInterval(true, false);
}
public void testIntervalEventWithShortIntervalExistingUser() {
testIntervalEventWithShortInterval
|
ABChooser;
import com.todoroo.astrid.service.abtesting.ABTests;
import com.todoroo.astrid.test.DatabaseTestCase;
public class ABTestingServiceTest extends DatabaseTestCase {
@Autowired ABTestEventDao abTestEventDao;
@Autowired ABChooser abChooser;
@Autowired ABTests abTests;
public void testReportInitialEventNewUser() {
testInitialEvents(true, false);
}
public void testReportInitialEventExistingUser() {
testInitialEvents(false, true);
}
private void testInitialEvents(boolean newUser, boolean activatedUser) {
testInterval(newUser, activatedUser, 0);
}
public void testIntervalEventWithShortIntervalNewUser() {
testIntervalEventWithShortInterval(true, false);
}
public void testIntervalEventWithShortIntervalExistingUser() {
testIntervalEventWithShortInterval
|
@Autowired ABTestEventDao abTestEventDao;
@Autowired ABChooser abChooser;
@Autowired ABTests abTests;
public void testReportInitialEventNewUser() {
testInitialEvents(true, false);
}
public void testReportInitialEventExistingUser() {
testInitialEvents(false, true);
}
private void testInitialEvents(boolean newUser, boolean activatedUser) {
testInterval(newUser, activatedUser, 0);
}
public void testIntervalEventWithShortIntervalNewUser() {
testIntervalEventWithShortInterval(true, false);
}
public void testIntervalEventWithShortIntervalExistingUser() {
testIntervalEventWithShortInterval
|
public void testReportInitialEventExistingUser() {
testInitialEvents(false, true);
}
private void testInitialEvents(boolean newUser, boolean activatedUser) {
testInterval(newUser, activatedUser, 0);
}
public void testIntervalEventWithShortIntervalNewUser() {
testIntervalEventWithShortInterval(true, false);
}
public void testIntervalEventWithShortIntervalExistingUser() {
testIntervalEventWithShortInterval
|
(false, true);
}
public void testIntervalEventWithLongIntervalNewUser() {
testIntervalEventWithLongInterval(true, false);
}
public void testIntervalEventWithLongIntervalExistingUser() {
testInterval
|
TransformXMLInterceptor_Test.java
|
/FileExtraction/Java_unseen/BorderTech_wcomponents/wcomponents-core/src/test/java/com/github/bordertech/wcomponents/container/TransformXMLInterceptor_Test.java
|
package com.github.bordertech.wcomponents.container;
import com.github.bordertech.wcomponents.AbstractWComponentTestCase;
import com.github.bordertech.wcomponents.RenderContext;
import com.github.bordertech.wcomponents.UIContext;
import com.github.bordertech.wcomponents.WContainer;
import com.github.bordertech.wcomponents.WebUtilities;
import com.github.bordertech.wcomponents.servlet.ServletRequest;
import com.github.bordertech.wcomponents.servlet.WebXmlRenderContext;
import com.github.bordertech.wcomponents.util.Config;
import com.github.bordertech.wcomponents.util.ConfigurationProperties;
import com.github.bordertech.wcomponents.util.SystemException;
import com.github.bordertech.wcomponents.util.mock.MockResponse;
import com.github.bordertech.wcomponents.util.mock.servlet.MockHttpServletRequest;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.junit.AfterClass;
import org.junit.Test;
/**
* Test cases for the {@link TransformXMLInterceptor} class.
*
* @author Rick Brown
* @since 1.0.0
*/
public class TransformXMLInterceptor_Test extends AbstractWComponentTestCase {
/**
* The corrupt character input xml.
*/
private static final String TEST_CORRUPT_CHAR_XML = buildCorruptXML();
/**
* When these tests are done put things back as they were.
*/
@AfterClass
public static void tearDownClass() {
Config.reset();
TransformXMLTestHelper.reloadTransformer();
}
/**
* Ensure that the interceptor does nothing when the user agent string opts out.
*/
@Test
public void testPaintWithUserAgentOverride() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
TransformXMLTestHelper.reloadTransformer();
Map<String, String> headers = new HashMap<String, String>();
headers.put("User-Agent", "Mozilla/5.0 Firefox/26.0 wcnoxslt");
TestResult actual = generateOutput(testUI, headers);
Assert.assertEquals("XML should not be transformed when useragent string flag present", TransformXMLTestHelper.TEST_XML, actual.result);
}
/**
* Ensure that the interceptor does nothing as long as the controlling property is disabled.
*/
@Test
public void testPaintWhileEnabledWithThemeContentPathSet() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "set");
TransformXMLTestHelper.reloadTransformer();
TestResult actual = generateOutput(testUI);
Assert.assertEquals("XML should be transformed when interceptor enabled and theme content path set", TransformXMLTestHelper.EXPECTED, actual.result);
}
/**
* Test that the interceptor transforms our XML when it is enabled.
*/
@Test
public void testPaintWhileEnabled() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
TransformXMLTestHelper.reloadTransformer();
TestResult actual = generateOutput(testUI);
Assert.assertEquals("XML should be transformed when interceptor enabled", TransformXMLTestHelper.EXPECTED, actual.result);
Assert.assertEquals("The content type should be correctly set", WebUtilities.CONTENT_TYPE_HTML, actual.contentType);
}
/**
* Test that the interceptor transforms our XML when it is enabled.
*/
@Test
public void testPaintWhileEnabledWithChromeUserAgent() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
TransformXMLTestHelper.reloadTransformer();
Map<String, String> headers = new HashMap<String, String>();
headers.put("User-Agent",
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36");
TestResult actual = generateOutput(testUI, headers);
Assert.assertEquals("XML should be transformed when interceptor enabled", TransformXMLTestHelper.EXPECTED, actual.result);
Assert.assertEquals("The content type should be correctly set", WebUtilities.CONTENT_TYPE_HTML, actual.contentType);
}
/**
* Ensure that the interceptor does nothing as long as the controlling property is disabled.
*/
@Test
public void testPaintWithCorruptCharacterException() {
MyComponent testUI = new MyComponent(TEST_CORRUPT_CHAR_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
Config.getInstance().setProperty(ConfigurationProperties.XSLT_ALLOW_CORRUPT_CHARACTER, "false");
TransformXMLTestHelper.reloadTransformer();
testUI.setLocked(true);
UIContext uic = createUIContext();
uic.setUI(testUI);
setActiveContext(uic);
try {
generateOutput(testUI, null);
Assert.fail("Corrupt character in XML should have failed.");
} catch (Exception e) {
Assert.assertTrue("Should contain could not transform", e.getMessage().contains("Could not transform"));
}
}
/**
* Ensure that the interceptor does nothing as long as the controlling property is disabled.
*/
@Test
public void testPaintWithCorruptCharacterAllowed() {
MyComponent testUI = new MyComponent(TEST_CORRUPT_CHAR_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
Config.getInstance().setProperty(ConfigurationProperties.XSLT_ALLOW_CORRUPT_CHARACTER, "true");
TransformXMLTestHelper.reloadTransformer();
testUI.setLocked(true);
UIContext uic = createUIContext();
uic.setUI(testUI);
setActiveContext(uic);
try {
generateOutput(testUI, null);
} catch (Exception e) {
Assert.fail("Corrupt character in XML should have NOT have failed.");
}
}
/**
* Test that the interceptor transforms with HTML entities.
*/
@Test
public void testPaintWithXMLEntities() {
// Should not change after transform
String entities = "&<>";
String in = "<kung><fu>" + entities + "</fu></kung>";
String out = "<omg><wtf>" + entities + "</wtf></omg>";
MyComponent testUI = new MyComponent(in);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
TransformXMLTestHelper.reloadTransformer();
TestResult actual = generateOutput(testUI);
Assert.assertEquals("XML entities should not be decoded", out, actual.result);
}
/**
* Test that the interceptor transforms with HTML entities.
*/
@Test
public void testPaintWithEncodedBrackets() {
// Should not change after transform
String entities = "{}{}";
String in = "<kung><fu>" + entities + "</fu></kung>";
String out = "<omg><wtf>" + entities + "</wtf></omg>";
MyComponent testUI = new MyComponent(in);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
TransformXMLTestHelper.reloadTransformer();
TestResult actual = generateOutput(testUI);
Assert.assertEquals("XML entities should not be decoded", out, actual.result);
}
/**
*
* @return XML with bad characters
*/
private static String buildCorruptXML() {
StringBuilder data = new StringBuilder();
for (int i = 0; i < Integer.MAX_VALUE; i++) {
if (!Character.isValidCodePoint(i)) {
continue;
}
char ch = (char) i;
if (ch != '>' && ch != '<' && ch != '&' && ch != '"') {
data.append(ch);
}
}
String utfString = "<kung><fu>" + data.toString() + "</fu></kung>";
String isoString = null;
try {
byte[] bytes = utfString.getBytes("UTF8");
isoString = new String(bytes, "ISO-8859-1");
} catch (final Exception e) {
throw new SystemException("Error translating. " + e.getMessage());
}
return isoString;
}
/**
* A 'fake' WComponent that renders the string we pass to the constructor.
*/
private static final class MyComponent extends WContainer {
/**
* Content to be painted by the test component.
*/
private final String content;
/**
* @param content the test content
*/
private MyComponent(final String content) {
this.content = content;
}
/**
* Simply render the string that was passed to the constructor.
*
* @param renderContext
*/
@Override
protected void paintComponent(final RenderContext renderContext) {
((WebXmlRenderContext) renderContext).getWriter().print(content);
super.paintComponent(renderContext);
}
}
/**
* Render the component and execute the interceptor.
*
* @param testUI the test component
* @return the response
*/
private TestResult generateOutput(final MyComponent testUI) {
return generateOutput(testUI, null);
}
/**
* Render the component and execute the interceptor.
*
* @param testUI the test component
* @param headers Request headers to set (key/value pairs).
* @return the response
*/
private TestResult generateOutput(final MyComponent testUI, final Map<String, String> headers) {
InterceptorComponent interceptor = new TransformXMLInterceptor();
interceptor.attachUI(testUI);
MockHttpServletRequest backing = new MockHttpServletRequest();
if (headers != null) {
for (String headerName : headers.keySet()) {
backing.setHeader(headerName, headers.get(headerName));
}
}
ServletRequest request = new ServletRequest(backing);
MockResponse response = new MockResponse();
interceptor.attachResponse(response);
StringWriter writer = new StringWriter();
UIContext uic = createUIContext();
uic.setLocale(new Locale("en"));
setActiveContext(uic);
try {
interceptor.preparePaint(request);
interceptor.paint(new WebXmlRenderContext(new PrintWriter(writer)));
} finally {
resetContext();
}
return new TestResult(writer.toString(), response.getContentType());
}
/**
* A simple DTO to pass back the results of the render to the calling test.
*/
private final class TestResult {
private String result;
private String contentType;
/**
* Create and instance of the DTO.
*
* @param result The rendered output of the UI component.
* @param contentType The content type of the response.
*/
private TestResult(final String result, final String contentType) {
this.result = result;
this.contentType = contentType;
}
}
/**
* Custom Log implementation to prevent all logging.
*
*/
public static final class NoLogLogger implements Log {
@Override
public boolean isDebugEnabled() {
return false;
}
@Override
public boolean isErrorEnabled() {
return false;
}
@Override
public boolean isFatalEnabled() {
return false;
}
@Override
public boolean isInfoEnabled() {
return false;
}
@Override
public boolean isTraceEnabled() {
return false;
}
@Override
public boolean isWarnEnabled() {
return false;
}
@Override
public void trace(final Object message) {
// No-impl
}
@Override
public void trace(final Object message, final Throwable t) {
// No-impl
}
@Override
public void debug(final Object message) {
// No-impl
}
@Override
public void debug(final Object message, final Throwable t) {
// No-impl
}
@Override
public void info(final Object message) {
// No-impl
}
@Override
public void info(final Object message, final Throwable t) {
// No-impl
}
@Override
public void warn(final Object message) {
// No-impl
}
@Override
public void warn(final Object message, final Throwable t) {
// No-impl
}
@Override
public void error(final Object message) {
// No-impl
}
@Override
public void error(final Object message, final Throwable t) {
// No-impl
}
@Override
public void fatal(final Object message) {
// No-impl
}
@Override
public void fatal(final Object message, final Throwable t) {
// No-impl
}
}
}
| 11,840 |
Java
|
.java
|
BorderTech/wcomponents
| 20 | 19 | 111 |
2015-03-10T02:59:08Z
|
2024-05-09T06:05:12Z
|
0460957083cc51f6c421d334cc8be98d724a6403e5c2fe08640188fc10b94be8
|
[] |
[
1337,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
2646,
64,
222,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
5597,
92,
1735,
7246,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
3135,
1237,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
2299,
1237,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
92,
2894,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
2609,
13392,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
10010,
51,
7399,
1123,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
10010,
51,
2609,
4411,
3135,
1237,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
1058,
51,
1081,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
1058,
51,
2339,
3303,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
1058,
51,
1615,
1002,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
1058,
51,
3628,
51,
3672,
1416,
64,
222,
485,
785,
51,
951,
51,
3489,
6646,
51,
124,
3545,
51,
1058,
51,
3628,
51,
10010,
51,
3672,
18804,
64,
222,
485,
1401,
51,
735,
51,
42446,
64,
222,
485,
1401,
51,
735,
51,
671,
3989,
64,
222,
485,
1401,
51,
1058,
51,
8263,
64,
222,
485,
1401,
51,
1058,
51,
9459,
64,
222,
485,
1401,
51,
1058,
51,
1225,
64,
222,
485,
1105,
51,
3946,
51,
3285,
64,
222,
485,
1105,
51,
2121,
51,
8381,
51,
7506,
51,
1353,
64,
222,
485,
1105,
51,
3946,
51,
5131,
1359,
64,
222,
485,
1105,
51,
3946,
51,
1024,
64,
222,
222,
1350,
222,
338,
2128,
6819,
456,
341,
3105,
1222,
11685,
5741,
13843,
130,
462,
51,
222,
338,
222,
338,
496,
2133,
578,
1246,
38619,
222,
338,
496,
8152,
244,
54,
51,
53,
51,
53,
222,
588,
222,
942,
462,
11685,
5741,
13843,
100,
1024,
2041,
7406,
92,
1735,
7246,
320,
499,
221,
1350,
376,
338,
906,
42511,
5373,
1533,
5604,
51,
376,
588,
222,
221,
2072,
924,
1175,
910,
5904,
100,
47023,
2430,
89,
100,
4935,
100,
5741,
299,
1984,
8714,
4874,
5741,
492,
499,
221,
1350,
376,
338,
5094,
3301,
3326,
904,
3412,
4180,
6397,
1769,
641,
2974,
4547,
51,
376,
588,
222,
221,
69,
5131,
1359,
222,
221,
942,
924,
782,
28896,
1359,
365,
320,
376,
221,
1081,
51,
4558,
492,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
222,
221,
130,
499,
221,
1350,
376,
338,
15135,
708,
341,
22978,
1976,
7572,
1429,
341,
1275,
7725,
821,
6414,
986,
51,
376,
588,
222,
221,
69,
1024,
222,
221,
942,
782,
913,
12297,
1569,
32246,
1806,
365,
320,
376,
221,
3781,
1735,
913,
2299,
299,
556,
4318,
1735,
45,
4879,
5741,
39031,
51,
3780,
100,
5741,
312,
376,
221,
1081,
51,
7432,
941,
17507,
45,
2339,
3303,
51,
30497,
100,
11841,
100,
4088,
49,
10780,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
376,
221,
1225,
65,
671,
49,
910,
67,
4839,
299,
556,
8329,
65,
671,
49,
910,
2938,
376,
221,
5090,
51,
543,
459,
1259,
50,
6150,
411,
332,
24252,
52,
58,
51,
53,
18397,
52,
55,
59,
51,
53,
360,
4999,
1290,
36732,
742,
376,
221,
41146,
4668,
299,
4468,
2319,
45,
881,
2299,
49,
4839,
312,
376,
221,
3285,
51,
4993,
459,
5741,
1414,
666,
545,
21698,
1429,
1275,
4881,
821,
4666,
5041,
411,
11685,
5741,
39031,
51,
3780,
100,
5741,
49,
4668,
51,
1285,
312,
222,
221,
130,
499,
221,
1350,
376,
338,
15135,
708,
341,
22978,
1976,
7572,
641,
1964,
641,
341,
42259,
2821,
458,
6879,
51,
376,
588,
222,
221,
69,
1024,
222,
221,
942,
782,
913,
12297,
16221,
4006,
1569,
6537,
1795,
1233,
903,
365,
320,
376,
221,
3781,
1735,
913,
2299,
299,
556,
4318,
1735,
45,
4879,
5741,
39031,
51,
3780,
100,
5741,
312,
376,
221,
1081,
51,
7432,
941,
17507,
45,
2339,
3303,
51,
30497,
100,
11841,
100,
4088,
49,
332,
489,
742,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
376,
221,
41146,
4668,
299,
4468,
2319,
45,
881,
2299,
312,
376,
221,
3285,
51,
4993,
459,
5741,
1414,
545,
21698,
1429,
22978,
5892,
480,
6099,
1813,
1536,
758,
411,
11685,
5741,
39031,
51,
30314,
49,
4668,
51,
1285,
312,
222,
221,
130,
499,
221,
1350,
376,
338,
2128,
708,
341,
22978,
19725,
3027,
7408,
1429,
580,
458,
5892,
51,
376,
588,
222,
221,
69,
1024,
222,
221,
942,
782,
913,
12297,
16221,
4006,
365,
320,
376,
221,
3781,
1735,
913,
2299,
299,
556,
4318,
1735,
45,
4879,
5741,
39031,
51,
3780,
100,
5741,
312,
376,
221,
1081,
51,
7432,
941,
17507,
45,
2339,
3303,
51,
30497,
100,
11841,
100,
4088,
49,
10780,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
376,
221,
41146,
4668,
299,
4468,
2319,
45,
881,
2299,
312,
376,
221,
3285,
51,
4993,
459,
5741,
1414,
545,
21698,
1429,
22978,
5892,
411,
11685,
5741,
39031,
51,
30314,
49,
4668,
51,
1285,
312,
376,
221,
3285,
51,
4993,
459,
1338,
1813,
847,
1414,
545,
8487,
758,
411,
3718,
13392,
51,
11841,
100,
2333,
100,
4438,
49,
4668,
51,
20256,
312,
222,
221,
130,
499,
221,
1350,
376,
338,
2128,
708,
341,
22978,
19725,
3027,
7408,
1429,
580,
458,
5892,
51,
376,
588,
222,
221,
69,
1024,
222,
221,
942,
782,
913,
12297,
16221,
4006,
1569,
18115,
32246,
365,
320,
1332,
221,
3781,
1735,
913,
2299,
299,
556,
4318,
1735,
45,
4879,
5741,
39031,
51,
3780,
100,
5741,
312,
376,
221,
1081,
51,
7432,
941,
17507,
45,
2339,
3303,
51,
30497,
100,
11841,
100,
4088,
49,
10780,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
376,
221,
1225,
65,
671,
49,
910,
67,
4839,
299,
556,
8329,
65,
671,
49,
910,
2938,
376,
221,
5090,
51,
543,
459,
1259,
50,
6150,
411,
621,
221,
39,
24252,
52,
58,
51,
53,
327,
8009,
429,
13827,
64,
16756,
9501,
6652,
1618,
244,
54,
53,
100,
54,
54,
100,
59,
46,
32337,
52,
58,
56,
60,
51,
56,
59,
327
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,024 |
[
320,
376,
221,
1081,
51,
4558,
492,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
222,
221,
130,
499,
221,
1350,
376,
338,
15135,
708,
341,
22978,
1976,
7572,
1429,
341,
1275,
7725,
821,
6414,
986,
51,
376,
588,
222,
221,
69,
1024,
222,
221,
942,
782,
913,
12297,
1569,
32246,
1806,
365,
320,
376,
221,
3781,
1735,
913,
2299,
299,
556,
4318,
1735,
45,
4879,
5741,
39031,
51,
3780,
100,
5741,
312,
376,
221,
1081,
51,
7432,
941,
17507,
45,
2339,
3303,
51,
30497,
100,
11841,
100,
4088,
49,
10780,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
376,
221,
1225,
65,
671,
49,
910,
67,
4839,
299,
556,
8329,
65,
671,
49,
910,
2938,
376,
221,
5090,
51,
543,
459,
1259,
50,
6150,
411,
332,
24252,
52,
58,
51,
53,
18397,
52,
55,
59,
51,
53,
360,
4999,
1290,
36732,
742,
376,
221,
41146,
4668,
299,
4468,
2319,
45,
881,
2299,
49,
4839,
312,
376,
221,
3285,
51,
4993,
459,
5741,
1414,
666,
545,
21698,
1429,
1275,
4881,
821,
4666,
5041,
411,
11685,
5741,
39031,
51,
3780,
100,
5741,
49,
4668,
51,
1285,
312,
222,
221,
130,
499,
221,
1350,
376,
338,
15135,
708,
341,
22978,
1976,
7572,
641,
1964,
641,
341,
42259,
2821,
458,
6879,
51,
376,
588,
222,
221,
69,
1024,
222,
221,
942,
782,
913,
12297,
16221,
4006,
1569,
6537,
1795,
1233,
903,
365,
320,
376,
221,
3781,
1735,
913,
2299,
299,
556,
4318,
1735,
45,
4879,
5741,
39031,
51,
3780,
100,
5741,
312,
376,
221,
1081,
51,
7432,
941,
17507,
45,
2339,
3303,
51,
30497,
100,
11841,
100,
4088,
49,
332,
489,
742,
376,
221,
4879,
5741,
39031,
51,
12998,
15070,
492,
376,
221,
41146,
4668,
299,
4468,
2319,
45,
881,
2299,
312,
376,
221,
3285,
51,
4993,
459,
5741,
1414,
545
] | 4,977,524,717,120,023,000 | true | false | false | false |
[
4468,
2319,
45,
881,
2299,
49,
4839,
312,
376,
221,
3285,
51,
4993,
459,
5741,
1414,
666,
545,
21698,
1429,
1275,
4881,
821,
4666,
5041,
411,
11685,
5741,
39031,
51,
3780,
100,
5741,
49,
4668,
51,
1285,
312,
222,
221,
130,
499,
221,
1350,
376,
338,
15135,
708,
341,
22978,
1976,
7572,
641,
1964,
641,
341,
42259,
2821,
458,
6879,
51,
376,
588,
222,
221,
69,
1024,
222,
221,
942,
782,
913,
12297,
16221,
4006,
1569,
6537,
1795,
1233,
903,
365,
320,
376,
221,
3781,
1735,
913,
2299,
299,
556,
4318,
1735,
45,
4879,
5741,
39031,
51,
3780,
100,
5741
] | -1,027,225,083,193,646,800 | true |
{
Config.reset();
TransformXMLTestHelper.reloadTransformer();
}
/**
* Ensure that the interceptor does nothing when the user agent string opts out.
*/
@Test
public void testPaintWithUserAgentOverride() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
TransformXMLTestHelper.reloadTransformer();
Map<String, String> headers = new HashMap<String, String>();
headers.put("User-Agent", "Mozilla/5.0 Firefox/26.0 wcnoxslt");
TestResult actual = generateOutput(testUI, headers);
Assert.assertEquals("XML should not be transformed when useragent string flag present", TransformXMLTestHelper.TEST_XML, actual.result);
}
/**
* Ensure that the interceptor does nothing as long as the controlling property is disabled.
*/
@Test
public void testPaintWhileEnabledWithThemeContentPathSet() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML
|
WithUserAgentOverride() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "");
TransformXMLTestHelper.reloadTransformer();
Map<String, String> headers = new HashMap<String, String>();
headers.put("User-Agent", "Mozilla/5.0 Firefox/26.0 wcnoxslt");
TestResult actual = generateOutput(testUI, headers);
Assert.assertEquals("XML should not be transformed when useragent string flag present", TransformXMLTestHelper.TEST_XML, actual.result);
}
/**
* Ensure that the interceptor does nothing as long as the controlling property is disabled.
*/
@Test
public void testPaintWhileEnabledWithThemeContentPathSet() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML
|
();
Map<String, String> headers = new HashMap<String, String>();
headers.put("User-Agent", "Mozilla/5.0 Firefox/26.0 wcnoxslt");
TestResult actual = generateOutput(testUI, headers);
Assert.assertEquals("XML should not be transformed when useragent string flag present", TransformXMLTestHelper.TEST_XML, actual.result);
}
/**
* Ensure that the interceptor does nothing as long as the controlling property is disabled.
*/
@Test
public void testPaintWhileEnabledWithThemeContentPathSet() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML
|
generateOutput(testUI, headers);
Assert.assertEquals("XML should not be transformed when useragent string flag present", TransformXMLTestHelper.TEST_XML, actual.result);
}
/**
* Ensure that the interceptor does nothing as long as the controlling property is disabled.
*/
@Test
public void testPaintWhileEnabledWithThemeContentPathSet() {
MyComponent testUI = new MyComponent(TransformXMLTestHelper.TEST_XML
|
);
Config.getInstance().setProperty(ConfigurationProperties.THEME_CONTENT_PATH, "set");
TransformXMLTestHelper.reloadTransformer();
TestResult actual = generateOutput(testUI);
Assert.assertEquals("XML should be
|
JDDNode.java
|
/FileExtraction/Java_unseen/prismmodelchecker_prism/prism/src/jdd/JDDNode.java
|
//==============================================================================
//
// Copyright (c) 2002-
// Authors:
// * Dave Parker <david.parker@comlab.ox.ac.uk> (University of Oxford, formerly University of Birmingham)
// * Christian von Essen <christian.vonessen@imag.fr> (VERIMAG)
// * Joachim Klein <klein@tcs.inf.tu-dresden.de> (TU Dresden)
//
//------------------------------------------------------------------------------
//
// This file is part of PRISM.
//
// PRISM is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// PRISM is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with PRISM; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
//==============================================================================
package jdd;
public class JDDNode
{
private long ptr;
// native methods (jni)
protected static native boolean DDN_IsConstant(long dd);
protected static native int DDN_GetIndex(long dd);
protected static native double DDN_GetValue(long dd);
protected static native long DDN_GetThen(long dd);
protected static native long DDN_GetElse(long dd);
static
{
try {
System.loadLibrary("jdd");
}
catch (UnsatisfiedLinkError e) {
System.out.println(e);
System.exit(1);
}
}
/**
* Protected constructor from a DdNode pointer.
* In general, to get a JDDNode from a pointer,
* use JDD.ptrToNode().
*/
protected JDDNode(long p)
{
ptr = p;
}
public long ptr()
{
return ptr;
}
public boolean isConstant()
{
return DDN_IsConstant(ptr);
}
public int getIndex()
{
return DDN_GetIndex(ptr);
}
public double getValue()
{
if (DebugJDD.debugEnabled) {
return DebugJDD.nodeGetValue(this);
}
return DDN_GetValue(ptr);
}
/**
* Returns the Then child of a (non-constant) JDDNode.
* <br>
* This method does NOT increase the reference count of the returned
* node, it is therefore illegal to call JDD.Deref on the result.
* Additionally, it is recommended to not use the returned node
* as the argument to the JDD methods or call JDD.Ref on it.
* Instead, if you need to obtain a "proper" node, call copy()
* on the returned node.
* <br>[ REFS: <i>none</i>, DEREFS: <i>none</i> ]
*/
public JDDNode getThen()
{
if (DebugJDD.debugEnabled) {
return DebugJDD.nodeGetThen(this);
}
long thenPtr = DDN_GetThen(ptr);
if (thenPtr == 0) {
if (isConstant()) {
throw new RuntimeException("Trying to access the 'then' child of a constant MTBDD node");
} else {
throw new RuntimeException("getThen: CUDD returned NULL, but node is not a constant node. Out of memory or corrupted MTBDD?");
}
}
return new JDDNode(thenPtr);
}
/**
* Returns the Else child of a (non-constant) JDDNode.
* <br>
* This method does NOT increase the reference count of the returned
* node, it is therefore illegal to call JDD.Deref on the result.
* Additionally, it is recommended to not use the returned node
* as the argument to the JDD methods or call JDD.Ref on it.
* Instead, if you need to obtain a "proper" node, call copy()
* on the returned node.
* <br>[ REFS: <i>none</i>, DEREFS: <i>none</i> ]
*/
public JDDNode getElse()
{
if (DebugJDD.debugEnabled) {
return DebugJDD.nodeGetElse(this);
}
long elsePtr = DDN_GetElse(ptr);
if (elsePtr == 0) {
if (isConstant()) {
throw new RuntimeException("Trying to access the 'else' child of a constant MTBDD node");
} else {
throw new RuntimeException("getElse: CUDD returned NULL, but node is not a constant node. Out of memory or corrupted MTBDD?");
}
}
return new JDDNode(elsePtr);
}
public boolean equals(Object o)
{
return (o instanceof JDDNode) && (((JDDNode) o).ptr == ptr);
}
public int hashCode()
{
return (int)ptr;
}
public String toString()
{
String result = "" + ptr;
if (ptr != 0) {
if (this.isConstant()) result += " value=" + this.getValue();
result += " references=" + DebugJDD.getRefCount(this);
}
return result;
}
/**
* Returns a referenced copy of this node.
* This has the effect of increasing the reference count
* for the underlying MTBDD.
* <br>[ REFS: <i>result</i>, DEREFS: <i>none</i> ]
*/
public JDDNode copy()
{
if (DebugJDD.debugEnabled) {
return DebugJDD.Copy(this);
} else {
JDDNode result = new JDDNode(ptr());
JDD.Ref(result);
return result;
}
}
}
//------------------------------------------------------------------------------
| 4,958 |
Java
|
.java
|
prismmodelchecker/prism
| 145 | 65 | 54 |
2016-01-05T09:46:26Z
|
2024-03-27T18:31:12Z
|
bbebfd33cc6fa47158c4a5f637ef1542192f3261e4142953327483f3f524a388
|
[] |
[
20037,
18480,
222,
325,
221,
222,
325,
221,
10585,
327,
104,
46,
244,
55,
53,
53,
55,
50,
222,
325,
221,
36330,
63,
222,
325,
221,
47,
493,
808,
27004,
284,
350,
27928,
51,
587,
4797,
69,
527,
4809,
51,
1290,
51,
348,
51,
3434,
67,
327,
37137,
451,
565,
2088,
675,
49,
31329,
651,
11451,
451,
570,
3550,
318,
11809,
46,
222,
325,
221,
47,
47673,
9645,
535,
27075,
350,
399,
11581,
2560,
51,
123,
286,
522,
291,
69,
17802,
51,
2197,
67,
327,
1986,
78,
7536,
46,
222,
325,
221,
47,
13923,
886,
468,
1242,
293,
285,
350,
22940,
285,
69,
42308,
51,
5290,
51,
13389,
50,
105,
595,
5130,
51,
305,
67,
327,
34114,
493,
595,
5130,
46,
222,
325,
221,
222,
24652,
222,
325,
221,
222,
325,
221,
2287,
822,
458,
1760,
451,
2789,
1309,
82,
51,
222,
325,
221,
222,
325,
221,
2999,
1309,
82,
458,
3760,
2951,
64,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
325,
221,
302,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
641,
9582,
829,
222,
325,
221,
1402,
7834,
3870,
7120,
64,
3173,
1522,
244,
55,
451,
341,
1196,
49,
575,
222,
325,
221,
45,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
325,
221,
222,
325,
221,
2999,
1309,
82,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
325,
221,
717,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
325,
221,
22265,
7760,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
325,
221,
21307,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
325,
221,
222,
325,
221,
4296,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
325,
221,
40307,
642,
2789,
1309,
82,
64,
434,
666,
49,
2886,
391,
341,
7834,
3870,
7120,
49,
222,
325,
221,
16469,
4345,
244,
58,
62,
38849,
17693,
49,
25280,
244,
56,
56,
53,
49,
25006,
49,
13083,
280,
53,
55,
54,
54,
54,
50,
54,
56,
53,
60,
244,
15067,
222,
325,
221,
222,
20037,
18480,
222,
222,
1337,
614,
601,
64,
222,
222,
942,
462,
990,
2936,
1230,
222,
128,
222,
221,
2072,
1964,
8417,
64,
3038,
221,
325,
7565,
4457,
327,
18472,
46,
222,
221,
5332,
924,
7565,
1922,
493,
11686,
100,
1640,
5476,
45,
3239,
14713,
312,
222,
221,
5332,
924,
7565,
648,
493,
11686,
100,
953,
1301,
45,
3239,
14713,
312,
222,
221,
5332,
924,
7565,
2082,
493,
11686,
100,
12642,
45,
3239,
14713,
312,
222,
221,
5332,
924,
7565,
1964,
493,
11686,
100,
953,
10695,
45,
3239,
14713,
312,
222,
221,
5332,
924,
7565,
1964,
493,
11686,
100,
953,
13216,
45,
3239,
14713,
312,
499,
221,
1592,
222,
221,
128,
376,
221,
1287,
320,
374,
221,
1615,
51,
963,
5887,
459,
111,
601,
742,
376,
221,
130,
376,
221,
5639,
327,
1079,
47291,
2375,
943,
503,
46,
320,
374,
221,
1615,
51,
560,
51,
3962,
45,
106,
312,
374,
221,
1615,
51,
4788,
45,
54,
312,
376,
221,
130,
222,
221,
130,
499,
221,
1350,
376,
338,
37293,
4389,
664,
331,
493,
105,
1230,
4964,
51,
376,
338,
719,
8108,
49,
391,
640,
331,
990,
2936,
1230,
664,
331,
4964,
49,
376,
338,
813,
990,
2936,
51,
1768,
724,
1230,
941,
376,
588,
222,
221,
5332,
990,
2936,
1230,
45,
3239,
317,
46,
222,
221,
128,
376,
221,
1768,
299,
317,
64,
222,
221,
130,
3038,
221,
942,
1964,
8417,
365,
222,
221,
128,
376,
221,
620,
8417,
64,
222,
221,
130,
499,
221,
942,
1922,
458,
5476,
365,
222,
221,
128,
376,
221,
620,
493,
11686,
100,
1640,
5476,
45,
1768,
312,
222,
221,
130,
499,
221,
942,
648,
640,
1301,
365,
222,
221,
128,
21997,
221,
620,
493,
11686,
100,
953,
1301,
45,
1768,
312,
222,
221,
130,
499,
221,
942,
2082,
21517,
365,
222,
221,
128,
376,
221,
344,
327,
3544,
79,
2936,
51,
2824,
4006,
46,
320,
374,
221,
620,
8093,
79,
2936,
51,
1271,
12642,
45,
597,
312,
376,
221,
130,
376,
221,
620,
493,
11686,
100,
12642,
45,
1768,
312,
222,
221,
130,
499,
221,
1350,
376,
338,
3777,
341,
7794,
2851,
451,
331,
327,
3804,
50,
8696,
46,
990,
2936,
1230,
51,
376,
338,
350,
858,
67,
376,
338,
1369,
1431,
1976,
2387,
12113,
341,
4141,
2409,
451,
341,
4731,
376,
338,
1560,
49,
580,
458,
16438,
24211,
391,
1495,
990,
2936,
51,
44295,
563,
341,
1074,
51,
376,
338,
33138,
49,
580,
458,
14398,
391,
666,
813,
341,
4731,
1560,
376,
338,
641,
341,
2814,
391,
341,
990,
2936,
4457,
575,
1495,
990,
2936,
51,
2099,
563,
580,
51,
376,
338,
19509,
49,
434,
863,
1868,
391,
4245,
331,
332,
35681,
39,
1560,
49,
1495,
1948,
365,
376,
338,
563,
341,
4731,
1560,
51,
376,
338,
350,
858,
8838,
3062,
6900,
63,
350,
110,
67,
4129,
396,
110,
2731,
493,
25071,
6900,
63,
350,
110,
67,
4129,
396,
110,
67,
1499,
376,
588,
222,
221,
942,
990,
2936,
1230,
640,
10695,
365,
222,
221,
128,
376,
221,
344,
327,
3544,
79,
2936,
51,
2824,
4006,
46,
320,
374,
221,
620,
8093,
79,
2936,
51,
1271,
953,
10695,
45,
597,
312,
376,
221,
130,
1332,
221,
3239,
1636,
2664,
299,
493,
11686,
100,
953,
10695,
45,
1768,
312,
376,
221,
344,
327,
3369,
2664,
630,
244,
53,
46,
320,
374,
221,
344,
327,
316,
5476,
1177,
320,
621,
221,
5267,
556,
13383,
459,
41964,
391,
2872,
341,
349,
3369,
44,
2851,
451,
331,
8100,
12471,
46774,
1560,
742,
374,
221,
130,
832,
320,
621,
221,
5267,
556,
13383,
459,
390,
10695,
63,
19514,
2936,
4731,
1199,
49,
1294,
1560,
458,
666,
331,
8100,
1560,
51,
4322,
451,
4137,
575,
45088,
12471,
46774,
35690,
374,
221,
130,
376,
221,
130,
376,
221,
620,
556,
990,
2936,
1230,
45,
3369,
2664,
312,
222,
221,
130,
499,
221,
1350,
376,
338,
3777,
341,
24170,
2851,
451,
331,
327,
3804,
50,
8696,
46,
990,
2936,
1230,
51,
376,
338,
350,
858,
67,
376,
338,
1369,
1431,
1976,
2387,
12113,
341,
4141,
2409,
451,
341,
4731,
376,
338,
1560,
49,
580,
458,
16438,
24211,
391,
1495,
990,
2936,
51,
44295
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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
3239,
14713,
312,
222,
221,
5332,
924,
7565,
2082,
493,
11686,
100,
12642,
45,
3239,
14713,
312,
222,
221,
5332,
924,
7565,
1964,
493,
11686,
100,
953,
10695,
45,
3239,
14713,
312,
222,
221,
5332,
924,
7565,
1964,
493,
11686,
100,
953,
13216,
45,
3239,
14713,
312,
499,
221,
1592,
222,
221,
128,
376,
221,
1287,
320,
374,
221,
1615,
51,
963,
5887,
459,
111,
601,
742,
376,
221,
130,
376,
221,
5639,
327,
1079,
47291,
2375,
943,
503,
46,
320,
374,
221,
1615,
51,
560,
51,
3962,
45,
106,
312,
374,
221,
1615,
51,
4788,
45,
54,
312,
376,
221,
130,
222,
221,
130,
499,
221,
1350,
376,
338,
37293,
4389,
664,
331,
493,
105,
1230,
4964,
51,
376,
338,
719,
8108,
49,
391,
640,
331,
990,
2936,
1230,
664,
331,
4964,
49,
376,
338,
813,
990,
2936,
51,
1768,
724,
1230,
941,
376,
588,
222,
221,
5332,
990,
2936,
1230,
45,
3239,
317,
46,
222,
221,
128,
376,
221,
1768,
299,
317,
64,
222,
221,
130,
3038,
221,
942,
1964,
8417,
365,
222,
221,
128,
376,
221,
620,
8417,
64,
222,
221,
130,
499,
221,
942,
1922,
458,
5476,
365,
222,
221,
128,
376,
221,
620,
493,
11686,
100,
1640,
5476,
45,
1768,
312,
222,
221,
130,
499,
221,
942,
648,
640,
1301,
365,
222,
221,
128,
21997,
221,
620,
493,
11686,
100,
953,
1301,
45,
1768,
312,
222,
221,
130,
499,
221,
942,
2082,
21517,
365,
222,
221,
128,
376,
221,
344,
327,
3544,
79,
2936,
51,
2824
] | 3,271,562,224,513,457,000 | true | false | false | false |
[
130,
222,
221,
130,
499,
221,
1350,
376,
338,
37293,
4389,
664,
331,
493,
105,
1230,
4964,
51,
376,
338,
719,
8108,
49,
391,
640,
331,
990,
2936,
1230,
664,
331,
4964,
49,
376,
338,
813,
990,
2936,
51,
1768,
724,
1230,
941,
376,
588,
222,
221,
5332,
990,
2936,
1230,
45,
3239,
317,
46,
222,
221,
128,
376,
221,
1768,
299,
317,
64,
222,
221,
130,
3038,
221,
942,
1964,
8417,
365,
222,
221,
128,
376,
221,
620,
8417,
64,
222,
221,
130,
499,
221,
942,
1922,
458,
5476,
365,
222,
221,
128,
376,
221,
620,
493,
11686,
100
] | -6,862,543,772,319,436,000 | true |
public class JDDNode
{
private long ptr;
// native methods (jni)
protected static native boolean DDN_IsConstant(long dd);
protected static native int DDN_GetIndex(long dd);
protected static native double DDN_GetValue(long dd);
protected static native long DDN_GetThen(long dd);
protected static native long DDN_GetElse(long dd);
static
{
try {
System.loadLibrary("jdd");
}
catch (UnsatisfiedLinkError e) {
System.out.println(e);
System.exit(1);
}
}
/**
* Protected constructor from a DdNode pointer.
* In general, to get a JDDNode from a pointer,
* use JDD.ptrToNode().
*/
protected JDDNode(long p)
{
ptr = p;
}
public long ptr()
{
return ptr;
}
public boolean isConstant()
{
return DDN_
|
dd);
protected static native double DDN_GetValue(long dd);
protected static native long DDN_GetThen(long dd);
protected static native long DDN_GetElse(long dd);
static
{
try {
System.loadLibrary("jdd");
}
catch (UnsatisfiedLinkError e) {
System.out.println(e);
System.exit(1);
}
}
/**
* Protected constructor from a DdNode pointer.
* In general, to get a JDDNode from a pointer,
* use JDD.ptrToNode().
*/
protected JDDNode(long p)
{
ptr = p;
}
public long ptr()
{
return ptr;
}
public boolean isConstant()
{
return DDN_
|
{
try {
System.loadLibrary("jdd");
}
catch (UnsatisfiedLinkError e) {
System.out.println(e);
System.exit(1);
}
}
/**
* Protected constructor from a DdNode pointer.
* In general, to get a JDDNode from a pointer,
* use JDD.ptrToNode().
*/
protected JDDNode(long p)
{
ptr = p;
}
public long ptr()
{
return ptr;
}
public boolean isConstant()
{
return DDN_
|
}
}
/**
* Protected constructor from a DdNode pointer.
* In general, to get a JDDNode from a pointer,
* use JDD.ptrToNode().
*/
protected JDDNode(long p)
{
ptr = p;
}
public long ptr()
{
return ptr;
}
public boolean isConstant()
{
return DDN_
|
IsConstant(ptr);
}
public int getIndex()
{
return DDN_GetIndex(ptr);
}
public double getValue()
{
if (DebugJDD.debug
|
NotesManager.java
|
/FileExtraction/Java_unseen/sbs20_filenotes-android/app/src/main/java/sbs20/filenotes/model/NotesManager.java
|
package sbs20.filenotes.model;
import java.io.File;
import java.util.Date;
import java.util.List;
import sbs20.filenotes.ServiceManager;
import sbs20.filenotes.R;
import sbs20.filenotes.storage.FileSystemService;
public class NotesManager {
private FileSystemService storage;
private Note selectedNote;
private NoteCollection notes;
private boolean isChanged;
public NotesManager() {
this.storage = FileSystemService.getInstance();
this.notes = new NoteCollection();
this.isChanged = false;
}
private void setSelectedNote(Note note) {
this.selectedNote = note;
}
public Note getSelectedNote() {
return this.selectedNote;
}
public NoteCollection search(String query) {
Logger.debug(this, "search()");
NoteCollection results = new NoteCollection();
for (Note note : this.notes) {
if (note.getName()
.toLowerCase()
.contains(query.toLowerCase()) ||
this.storedContent(note)
.toLowerCase()
.contains(query.toLowerCase())) {
results.add(note);
}
}
return results;
}
public NoteCollection getNotes() {
return this.notes;
}
private void mergeFileIntoNote(File file, Note note) {
note.setTextSummary(this.storage.fileSummaryAsString(file));
note.setSize(file.length());
note.setLastModified(new Date(file.lastModified()));
}
private static boolean fileListContainsName(List<File> files, String name) {
for (File file : files) {
if (name.equals(file.getName())) {
return true;
}
}
return false;
}
public void readAllFromStorage() {
Logger.verbose(this, "readAllFromStorage.Start");
List<File> files = this.storage.readAllFilesFromStorage();
// Ensure all files are in notes and up to date
for (File file : files) {
Note note = this.notes.getByName(file.getName());
if (note == null) {
note = new Note();
note.setName(file.getName());
notes.add(note);
}
this.mergeFileIntoNote(file, note);
}
// Now ensure that any notes NOT in a file is removed
for (int index = 0; index < notes.size(); index++) {
if (!fileListContainsName(files, notes.get(index).getName())) {
notes.remove(index);
index--;
}
}
// Now filter for preferences
Settings settings = ServiceManager.getInstance().getSettings();
for (int index = 0; index < notes.size(); index++) {
if (notes.get(index).isHidden() && !settings.showHiddenFile()) {
notes.remove(index);
index--;
} else if (!notes.get(index).isText() && !settings.showNonTextFile()) {
notes.remove(index);
index--;
}
}
notes.sortBy(settings.getNoteSortComparator());
Logger.verbose(this, "readAllFromStorage.Finish");
}
private void registerChange() {
this.isChanged = true;
}
public void clearChange() {
this.isChanged = false;
}
public boolean isChanged() {
return this.isChanged;
}
public void writeToStorage(Note note) {
this.storage.write(note.getName(), note.getText());
note.reset();
this.registerChange();
}
public String storedContent(Note note) {
File file = this.storage.getFile(note.getName());
if (file.exists()) {
return this.storage.fileAsString(file);
}
return null;
}
public void editNote(Note note) {
String content = this.storedContent(note);
if (content != null) {
note.setText(content);
note.reset();
}
this.setSelectedNote(note);
}
public void deleteNote(Note note) {
this.storage.delete(note.getName());
this.notes.remove(note);
this.registerChange();
}
public boolean renameNote(Note note, String desiredName) {
boolean succeeded = this.storage.rename(note.getName(), desiredName);
if (succeeded) {
note.setName(desiredName);
this.registerChange();
}
return succeeded;
}
public boolean isStored(Note note) {
return this.storage.exists(note.getName());
}
private String createUniqueNewName(String stem) {
String attempt = String.format(stem, "");
int i = 0;
while (this.notes.isExistingName(attempt)) {
++i;
attempt = String.format(stem, i);
}
return attempt;
}
public Note createNote() {
String stem = ServiceManager.getInstance().getContext().getString(R.string.new_note_file_stem);
Note note = new Note();
note.setName(this.createUniqueNewName(stem));
this.notes.add(note);
return note;
}
}
| 5,111 |
Java
|
.java
|
sbs20/filenotes-android
| 10 | 5 | 5 |
2016-01-07T15:40:24Z
|
2018-08-14T21:49:47Z
|
3853572cb4eaa985a494d935aa587027c633a06f9f129f0f20d4ea5bf11b4c0d
|
[] |
[
1337,
328,
3904,
55,
53,
51,
5049,
291,
8365,
51,
1184,
64,
222,
222,
485,
1401,
51,
735,
51,
991,
64,
222,
485,
1401,
51,
1058,
51,
1563,
64,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
485,
328,
3904,
55,
53,
51,
5049,
291,
8365,
51,
1201,
1590,
64,
222,
485,
328,
3904,
55,
53,
51,
5049,
291,
8365,
51,
87,
64,
222,
485,
328,
3904,
55,
53,
51,
5049,
291,
8365,
51,
4239,
51,
13867,
1201,
64,
222,
222,
942,
462,
13917,
1590,
320,
303,
964,
27207,
1201,
4780,
64,
222,
221,
2072,
5857,
4337,
5232,
64,
222,
221,
2072,
5857,
2272,
10178,
64,
303,
964,
1922,
458,
3663,
64,
465,
581,
13917,
1590,
365,
320,
310,
477,
51,
4239,
299,
27207,
1201,
51,
7432,
492,
310,
477,
51,
8903,
299,
556,
5857,
2272,
492,
310,
477,
51,
316,
3663,
299,
920,
64,
303,
339,
499,
221,
2072,
782,
43313,
5232,
45,
5232,
6013,
46,
320,
376,
221,
597,
51,
4358,
5232,
299,
6013,
64,
222,
221,
130,
222,
221,
942,
5857,
640,
4559,
5232,
365,
320,
376,
221,
620,
477,
51,
4358,
5232,
64,
222,
221,
130,
465,
581,
5857,
2272,
3252,
45,
671,
2487,
46,
320,
310,
7145,
51,
2824,
45,
597,
49,
332,
1925,
33942,
310,
5857,
2272,
3300,
299,
556,
5857,
2272,
492,
603,
456,
327,
5232,
6013,
518,
477,
51,
8903,
46,
320,
343,
434,
327,
5774,
51,
5175,
365,
547,
657,
10498,
365,
547,
657,
4766,
45,
1234,
51,
10498,
1177,
1293,
419,
477,
51,
22175,
1795,
45,
5774,
46,
547,
657,
10498,
365,
547,
657,
4766,
45,
1234,
51,
10498,
5183,
320,
419,
3300,
51,
688,
45,
5774,
312,
343,
339,
310,
339,
603,
461,
3300,
64,
303,
339,
499,
221,
942,
5857,
2272,
640,
11440,
365,
320,
376,
221,
620,
477,
51,
8903,
64,
222,
221,
130,
465,
964,
782,
4009,
991,
13650,
5232,
45,
991,
822,
49,
5857,
6013,
46,
320,
310,
6013,
51,
6619,
8111,
45,
597,
51,
4239,
51,
781,
8111,
15021,
45,
781,
894,
310,
6013,
51,
29572,
45,
781,
51,
1340,
1052,
310,
6013,
51,
489,
46179,
45,
909,
2833,
45,
781,
51,
48470,
5086,
303,
339,
465,
964,
924,
1922,
822,
739,
7282,
577,
45,
739,
65,
991,
67,
2293,
49,
910,
655,
46,
320,
310,
456,
327,
991,
822,
518,
2293,
46,
320,
343,
434,
327,
444,
51,
3591,
45,
781,
51,
5175,
5183,
320,
419,
461,
878,
64,
343,
339,
310,
339,
603,
461,
920,
64,
303,
339,
465,
581,
782,
1511,
1947,
1811,
3581,
365,
320,
603,
7145,
51,
10563,
45,
597,
49,
332,
870,
1947,
1811,
3581,
51,
2148,
742,
310,
1701,
65,
991,
67,
2293,
299,
477,
51,
4239,
51,
870,
1947,
3852,
1811,
3581,
492,
603,
453,
15135,
1187,
2293,
904,
347,
10178,
480,
992,
391,
2361,
310,
456,
327,
991,
822,
518,
2293,
46,
320,
343,
5857,
6013,
299,
477,
51,
8903,
51,
390,
9809,
45,
781,
51,
5175,
1052,
343,
434,
327,
5774,
630,
762,
46,
320,
419,
6013,
299,
556,
5857,
492,
419,
6013,
51,
15779,
45,
781,
51,
5175,
1052,
419,
10178,
51,
688,
45,
5774,
312,
343,
339,
1083,
477,
51,
6097,
991,
13650,
5232,
45,
781,
49,
6013,
312,
310,
339,
603,
453,
9188,
7197,
708,
1364,
10178,
2387,
347,
331,
822,
458,
6563,
310,
456,
327,
429,
1671,
299,
244,
53,
64,
1671,
350,
10178,
51,
911,
492,
1671,
2002,
320,
343,
434,
1445,
781,
739,
7282,
577,
45,
2558,
49,
10178,
51,
390,
45,
1076,
566,
5175,
5183,
320,
419,
10178,
51,
2564,
45,
1076,
312,
419,
1671,
10606,
343,
339,
310,
339,
603,
453,
9188,
2785,
456,
23333,
310,
9925,
4086,
299,
4860,
1590,
51,
7432,
941,
390,
2977,
492,
310,
456,
327,
429,
1671,
299,
244,
53,
64,
1671,
350,
10178,
51,
911,
492,
1671,
2002,
320,
343,
434,
327,
8903,
51,
390,
45,
1076,
566,
316,
13831,
365,
979,
673,
3563,
51,
2276,
13831,
991,
1177,
320,
419,
10178,
51,
2564,
45,
1076,
312,
419,
1671,
10606,
343,
339,
832,
434,
1445,
8903,
51,
390,
45,
1076,
566,
316,
1049,
365,
979,
673,
3563,
51,
2276,
3921,
1049,
991,
1177,
320,
419,
10178,
51,
2564,
45,
1076,
312,
419,
1671,
10606,
343,
339,
310,
339,
603,
10178,
51,
33231,
45,
3563,
51,
390,
5232,
5217,
18676,
1052,
603,
7145,
51,
10563,
45,
597,
49,
332,
870,
1947,
1811,
3581,
51,
13534,
742,
303,
339,
465,
964,
782,
3923,
1810,
365,
320,
310,
477,
51,
316,
3663,
299,
878,
64,
303,
339,
465,
581,
782,
4250,
1810,
365,
320,
310,
477,
51,
316,
3663,
299,
920,
64,
303,
339,
465,
581,
1922,
458,
3663,
365,
320,
310,
461,
477,
51,
316,
3663,
64,
303,
339,
465,
581,
782,
48562,
3581,
45,
5232,
6013,
46,
320,
310,
477,
51,
4239,
51,
1838,
45,
5774,
51,
5175,
1046,
6013,
51,
10624,
1052,
310,
6013,
51,
4558,
492,
310,
477,
51,
3334,
1810,
492,
303,
339,
465,
581,
910,
7129,
1795,
45,
5232,
6013,
46,
320,
310,
2050,
822,
299,
477,
51,
4239,
51,
22184,
45,
5774,
51,
5175,
1052,
310,
434,
327,
781,
51,
4678,
1177,
320,
343,
461,
477,
51,
4239,
51,
781,
15021,
45,
781,
312,
310,
339,
603,
461,
762,
64,
303,
339,
465,
581,
782,
4588,
5232,
45,
5232,
6013,
46,
320,
310,
910,
1813,
299,
477,
51,
22175,
1795,
45,
5774,
312,
603,
434,
327,
1304,
882,
762,
46,
320,
343,
6013,
51,
6619,
45,
1304,
312,
343,
6013,
51,
4558,
492,
310,
339,
603,
477,
51,
26623,
5232,
45,
5774,
312,
303,
339,
465,
581,
782,
3081,
5232,
45,
5232,
6013,
46,
320,
310,
477,
51,
4239,
51,
2577,
45,
5774,
51,
5175,
1052,
310,
477,
51,
8903,
51,
2564,
45,
5774,
312,
310,
477,
51,
3334,
1810,
492,
303,
339,
465,
581,
1922,
16138,
5232,
45,
5232,
6013,
49,
910,
10865,
577,
46,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,024 |
[
492,
310,
477,
51,
8903,
299,
556,
5857,
2272,
492,
310,
477,
51,
316,
3663,
299,
920,
64,
303,
339,
499,
221,
2072,
782,
43313,
5232,
45,
5232,
6013,
46,
320,
376,
221,
597,
51,
4358,
5232,
299,
6013,
64,
222,
221,
130,
222,
221,
942,
5857,
640,
4559,
5232,
365,
320,
376,
221,
620,
477,
51,
4358,
5232,
64,
222,
221,
130,
465,
581,
5857,
2272,
3252,
45,
671,
2487,
46,
320,
310,
7145,
51,
2824,
45,
597,
49,
332,
1925,
33942,
310,
5857,
2272,
3300,
299,
556,
5857,
2272,
492,
603,
456,
327,
5232,
6013,
518,
477,
51,
8903,
46,
320,
343,
434,
327,
5774,
51,
5175,
365,
547,
657,
10498,
365,
547,
657,
4766,
45,
1234,
51,
10498,
1177,
1293,
419,
477,
51,
22175,
1795,
45,
5774,
46,
547,
657,
10498,
365,
547,
657,
4766,
45,
1234,
51,
10498,
5183,
320,
419,
3300,
51,
688,
45,
5774,
312,
343,
339,
310,
339,
603,
461,
3300,
64,
303,
339,
499,
221,
942,
5857,
2272,
640,
11440,
365,
320,
376,
221,
620,
477,
51,
8903,
64,
222,
221,
130,
465,
964,
782,
4009,
991,
13650,
5232,
45,
991,
822,
49,
5857,
6013,
46,
320,
310,
6013,
51,
6619,
8111,
45,
597,
51,
4239,
51,
781,
8111,
15021,
45,
781,
894,
310,
6013,
51,
29572,
45,
781,
51,
1340,
1052,
310,
6013,
51,
489,
46179,
45,
909,
2833,
45,
781,
51,
48470,
5086,
303,
339,
465,
964,
924,
1922,
822,
739,
7282,
577,
45,
739,
65,
991,
67,
2293,
49,
910,
655,
46,
320,
310,
456,
327,
991,
822,
518,
2293,
46,
320,
343,
434,
327,
444,
51,
3591,
45,
781,
51,
5175,
5183,
320,
419,
461,
878,
64,
343,
339,
310,
339,
603,
461,
920,
64,
303,
339,
465,
581,
782,
1511,
1947,
1811,
3581,
365,
320,
603,
7145
] | 4,983,961,059,280,856,000 | true | false | false | false |
[
312,
343,
339,
310,
339,
603,
461,
3300,
64,
303,
339,
499,
221,
942,
5857,
2272,
640,
11440,
365,
320,
376,
221,
620,
477,
51,
8903,
64,
222,
221,
130,
465,
964,
782,
4009,
991,
13650,
5232,
45,
991,
822,
49,
5857,
6013,
46,
320,
310,
6013,
51,
6619,
8111,
45,
597,
51,
4239,
51,
781,
8111,
15021,
45,
781,
894,
310,
6013,
51,
29572,
45,
781,
51,
1340,
1052,
310,
6013,
51,
489,
46179,
45,
909,
2833,
45,
781,
51,
48470,
5086,
303,
339,
465,
964,
924,
1922,
822,
739,
7282,
577,
45,
739,
65,
991,
67,
2293,
49
] | 3,098,153,080,429,572,000 | true |
();
this.notes = new NoteCollection();
this.isChanged = false;
}
private void setSelectedNote(Note note) {
this.selectedNote = note;
}
public Note getSelectedNote() {
return this.selectedNote;
}
public NoteCollection search(String query) {
Logger.debug(this, "search()");
NoteCollection results = new NoteCollection();
for (Note note : this.notes) {
if (note.getName()
.toLowerCase()
.contains(query.toLowerCase()) ||
this.storedContent(note)
.toLowerCase()
.contains(query.toLowerCase())) {
results.add(note);
}
}
return results;
}
public NoteCollection getNotes() {
return this.notes;
}
private void mergeFileIntoNote(File file, Note note) {
note.setTextSummary(this.storage.fileSummaryAsString(file));
note.setSize(file.length());
note.setLastModified(new Date(file.lastModified()));
}
private static boolean fileListContainsName(List<File> files,
|
() {
return this.selectedNote;
}
public NoteCollection search(String query) {
Logger.debug(this, "search()");
NoteCollection results = new NoteCollection();
for (Note note : this.notes) {
if (note.getName()
.toLowerCase()
.contains(query.toLowerCase()) ||
this.storedContent(note)
.toLowerCase()
.contains(query.toLowerCase())) {
results.add(note);
}
}
return results;
}
public NoteCollection getNotes() {
return this.notes;
}
private void mergeFileIntoNote(File file, Note note) {
note.setTextSummary(this.storage.fileSummaryAsString(file));
note.setSize(file.length());
note.setLastModified(new Date(file.lastModified()));
}
private static boolean fileListContainsName(List<File> files,
|
notes) {
if (note.getName()
.toLowerCase()
.contains(query.toLowerCase()) ||
this.storedContent(note)
.toLowerCase()
.contains(query.toLowerCase())) {
results.add(note);
}
}
return results;
}
public NoteCollection getNotes() {
return this.notes;
}
private void mergeFileIntoNote(File file, Note note) {
note.setTextSummary(this.storage.fileSummaryAsString(file));
note.setSize(file.length());
note.setLastModified(new Date(file.lastModified()));
}
private static boolean fileListContainsName(List<File> files,
|
);
}
}
return results;
}
public NoteCollection getNotes() {
return this.notes;
}
private void mergeFileIntoNote(File file, Note note) {
note.setTextSummary(this.storage.fileSummaryAsString(file));
note.setSize(file.length());
note.setLastModified(new Date(file.lastModified()));
}
private static boolean fileListContainsName(List<File> files,
|
String name) {
for (File file : files) {
if (name.equals(file.getName())) {
return true;
}
}
return false;
}
public void readAllFromStorage() {
Logger
|
Transporter.java
|
/FileExtraction/Java_unseen/MatterOverdrive_MatterOverdrive-Legacy-Edition/src/main/java/matteroverdrive/compat/modules/waila/provider/Transporter.java
|
/*
* This file is part of Matter Overdrive
* Copyright (C) 2018, Horizon Studio <contact@hrznstudio.com>, All rights reserved.
*
* Matter Overdrive is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Matter Overdrive is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Matter Overdrive. If not, see <http://www.gnu.org/licenses>.
*/
package matteroverdrive.compat.modules.waila.provider;
import matteroverdrive.api.transport.TransportLocation;
import matteroverdrive.compat.modules.waila.IWailaBodyProvider;
import matteroverdrive.machines.transporter.TileEntityMachineTransporter;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.text.TextFormatting;
import java.util.List;
/**
* @author shadowfacts
*/
public class Transporter implements IWailaBodyProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
TileEntity te = accessor.getTileEntity();
if (te instanceof TileEntityMachineTransporter) {
TileEntityMachineTransporter transporter = (TileEntityMachineTransporter) te;
TransportLocation location = transporter.getSelectedLocation();
currenttip.add(String.format("%sSelected Location: %s%s", TextFormatting.YELLOW, TextFormatting.WHITE, location.name));
currenttip.add(String.format("%sDestination s: %s X:%d Y:%d Z:%d", TextFormatting.YELLOW, TextFormatting.WHITE, location.pos.getX(), location.pos.getY(), location.pos.getZ()));
} else {
throw new RuntimeException("Transporter WAILA provider is being used for something that is not a Transporter: " + te.getClass());
}
return currenttip;
}
}
| 2,343 |
Java
|
.java
|
MatterOverdrive/MatterOverdrive-Legacy-Edition
| 34 | 10 | 1 |
2018-02-08T21:50:42Z
|
2018-10-14T13:04:11Z
|
5306ca8ea15dcbf4534b6f8f1b1389b62a29e8164a3c9b4c67b1ef2be2a3c377
|
[] |
[
1127,
222,
338,
1369,
822,
458,
1760,
451,
5876,
410,
9878,
13872,
222,
338,
2657,
327,
72,
46,
244,
55,
53,
54,
61,
49,
696,
25357,
9394,
350,
5559,
69,
3943,
9241,
13086,
51,
527,
2731,
3381,
4760,
5225,
51,
222,
338,
222,
338,
5876,
410,
9878,
13872,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
1196,
49,
575,
222,
338,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
338,
222,
338,
5876,
410,
9878,
13872,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
5876,
410,
9878,
13872,
51,
244,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
4513,
222,
588,
222,
1337,
15254,
1515,
13872,
51,
8540,
51,
3490,
51,
124,
626,
102,
51,
6390,
64,
222,
222,
485,
15254,
1515,
13872,
51,
1256,
51,
9618,
51,
10003,
2941,
64,
222,
485,
15254,
1515,
13872,
51,
8540,
51,
3490,
51,
124,
626,
102,
51,
27358,
626,
102,
3069,
2588,
64,
222,
485,
15254,
1515,
13872,
51,
20894,
51,
9618,
284,
51,
41760,
7105,
10003,
284,
64,
222,
485,
364,
2217,
51,
6010,
3279,
51,
124,
626,
102,
51,
1256,
51,
27358,
626,
102,
1081,
1985,
64,
222,
485,
364,
2217,
51,
6010,
3279,
51,
124,
626,
102,
51,
1256,
51,
27358,
626,
102,
768,
9794,
64,
222,
485,
3723,
51,
8654,
51,
1113,
51,
26022,
64,
222,
485,
3723,
51,
8654,
51,
8344,
2244,
51,
41760,
64,
222,
485,
3723,
51,
8654,
51,
1058,
51,
897,
51,
1049,
25332,
64,
222,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
1350,
222,
338,
496,
2133,
11092,
37279,
222,
588,
222,
942,
462,
23597,
284,
4584,
457,
92,
626,
102,
3069,
2588,
320,
465,
496,
1806,
303,
581,
1701,
65,
671,
67,
640,
92,
626,
102,
3069,
45,
26022,
1641,
3131,
49,
1701,
65,
671,
67,
1565,
3976,
49,
457,
92,
626,
102,
768,
9794,
22069,
49,
457,
92,
626,
102,
1081,
1985,
1377,
46,
320,
310,
18891,
2234,
2713,
299,
22069,
51,
390,
41760,
492,
603,
434,
327,
538,
5118,
18891,
2234,
7105,
10003,
284,
46,
320,
343,
18891,
2234,
7105,
10003,
284,
11350,
284,
299,
327,
41760,
7105,
10003,
284,
46,
2713,
64,
1083,
23597,
2941,
3913,
299,
11350,
284,
51,
21851,
2941,
492,
1083,
1565,
3976,
51,
688,
45,
671,
51,
1664,
4923,
120,
4559,
10642,
63,
925,
120,
42,
120,
411,
3336,
25332,
51,
38076,
49,
3336,
25332,
51,
21256,
49,
3913,
51,
444,
894,
343,
1565,
3976,
51,
688,
45,
671,
51,
1664,
4923,
120,
11351,
328,
63,
925,
120,
1618,
6081,
105,
1432,
6081,
105,
2538,
6081,
105,
411,
3336,
25332,
51,
38076,
49,
3336,
25332,
51,
21256,
49,
3913,
51,
985,
51,
18807,
1046,
3913,
51,
985,
51,
20421,
1046,
3913,
51,
985,
51,
40500,
5086,
603,
339,
832,
320,
343,
1440,
556,
13383,
459,
10003,
284,
643,
9619,
70,
6897,
458,
4019,
1674,
456,
4682,
708,
458,
666,
331,
23597,
284,
63,
332,
494,
2713,
51,
9699,
1052,
310,
339,
603,
461,
1565,
3976,
64,
303,
339,
222,
222,
130,
222
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 599 |
[
13872,
51,
20894,
51,
9618,
284,
51,
41760,
7105,
10003,
284,
64,
222,
485,
364,
2217,
51,
6010,
3279,
51,
124,
626,
102,
51,
1256,
51,
27358,
626,
102,
1081,
1985,
64,
222,
485,
364,
2217,
51,
6010,
3279,
51,
124,
626,
102,
51,
1256,
51,
27358,
626,
102,
768,
9794,
64,
222,
485,
3723,
51,
8654,
51,
1113,
51,
26022,
64,
222,
485,
3723,
51,
8654,
51,
8344,
2244,
51,
41760,
64,
222,
485,
3723,
51,
8654,
51,
1058,
51,
897,
51,
1049,
25332,
64,
222,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
1350,
222,
338,
496,
2133,
11092,
37279,
222,
588,
222,
942,
462,
23597,
284,
4584,
457,
92,
626,
102,
3069,
2588,
320,
465,
496,
1806,
303,
581,
1701,
65,
671,
67,
640,
92,
626,
102,
3069,
45,
26022,
1641,
3131,
49,
1701,
65,
671,
67,
1565,
3976,
49,
457,
92,
626,
102,
768,
9794,
22069,
49,
457,
92,
626,
102,
1081,
1985,
1377,
46,
320,
310,
18891,
2234,
2713,
299,
22069,
51,
390,
41760,
492,
603,
434,
327,
538,
5118,
18891,
2234,
7105,
10003,
284,
46,
320,
343,
18891,
2234,
7105,
10003,
284,
11350,
284,
299,
327,
41760,
7105,
10003,
284,
46,
2713,
64,
1083,
23597,
2941,
3913,
299,
11350,
284,
51,
21851,
2941,
492,
1083,
1565,
3976,
51,
688,
45,
671,
51,
1664,
4923,
120,
4559,
10642,
63,
925,
120,
42,
120,
411,
3336,
25332,
51,
38076,
49,
3336,
25332,
51,
21256,
49,
3913,
51,
444,
894,
343,
1565,
3976,
51,
688,
45,
671,
51,
1664,
4923,
120,
11351,
328,
63,
925,
120,
1618,
6081,
105,
1432,
6081,
105,
2538,
6081,
105,
411,
3336,
25332,
51,
38076,
49,
3336,
25332,
51,
21256,
49,
3913,
51,
985,
51,
18807,
1046,
3913,
51,
985,
51,
20421,
1046,
3913,
51,
985,
51,
40500,
5086,
603
] | 1,386,205,289,048,081,400 | true | false | false | false |
[
9794,
22069,
49,
457,
92,
626,
102,
1081,
1985,
1377,
46,
320,
310,
18891,
2234,
2713,
299,
22069,
51,
390,
41760,
492,
603,
434,
327,
538,
5118,
18891,
2234,
7105,
10003,
284,
46,
320,
343,
18891,
2234,
7105,
10003,
284,
11350,
284,
299,
327,
41760,
7105,
10003,
284,
46,
2713,
64,
1083,
23597,
2941,
3913,
299,
11350,
284,
51,
21851,
2941,
492,
1083,
1565,
3976,
51,
688,
45,
671,
51,
1664,
4923,
120,
4559,
10642,
63,
925,
120,
42,
120,
411,
3336,
25332,
51,
38076,
49,
3336,
25332,
51,
21256,
49,
3913,
51,
444,
894,
343,
1565,
3976,
51,
688
] | 3,584,061,662,690,199,600 | true |
drive.machines.transporter.TileEntityMachineTransporter;
import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.text.TextFormatting;
import java.util.List;
/**
* @author shadowfacts
*/
public class Transporter implements IWailaBodyProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
TileEntity te = accessor.getTileEntity();
if (te instanceof TileEntityMachineTransporter) {
TileEntityMachineTransporter transporter = (TileEntityMachineTransporter) te;
TransportLocation location = transporter.getSelectedLocation();
currenttip.add(String.format("%sSelected Location: %s%s", TextFormatting.YELLOW, TextFormatting.WHITE, location.name));
currenttip.add
|
Accessor;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.text.TextFormatting;
import java.util.List;
/**
* @author shadowfacts
*/
public class Transporter implements IWailaBodyProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
TileEntity te = accessor.getTileEntity();
if (te instanceof TileEntityMachineTransporter) {
TileEntityMachineTransporter transporter = (TileEntityMachineTransporter) te;
TransportLocation location = transporter.getSelectedLocation();
currenttip.add(String.format("%sSelected Location: %s%s", TextFormatting.YELLOW, TextFormatting.WHITE, location.name));
currenttip.add
|
@author shadowfacts
*/
public class Transporter implements IWailaBodyProvider {
@Override
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
TileEntity te = accessor.getTileEntity();
if (te instanceof TileEntityMachineTransporter) {
TileEntityMachineTransporter transporter = (TileEntityMachineTransporter) te;
TransportLocation location = transporter.getSelectedLocation();
currenttip.add(String.format("%sSelected Location: %s%s", TextFormatting.YELLOW, TextFormatting.WHITE, location.name));
currenttip.add
|
Accessor accessor, IWailaConfigHandler config) {
TileEntity te = accessor.getTileEntity();
if (te instanceof TileEntityMachineTransporter) {
TileEntityMachineTransporter transporter = (TileEntityMachineTransporter) te;
TransportLocation location = transporter.getSelectedLocation();
currenttip.add(String.format("%sSelected Location: %s%s", TextFormatting.YELLOW, TextFormatting.WHITE, location.name));
currenttip.add
|
(String.format("%sDestination s: %s X:%d Y:%d Z:%d", TextFormatting.YELLOW, TextFormatting.WHITE, location.pos.getX(), location.pos.getY(), location.pos.getZ()));
|
ProjectExpectedStudyDTO.java
|
/FileExtraction/Java_unseen/CCAFS_MARLO/marlo-web/src/main/java/org/cgiar/ccafs/marlo/rest/dto/ProjectExpectedStudyDTO.java
|
/*****************************************************************
* This file is part of Managing Agricultural Research for Learning &
* Outcomes Platform (MARLO).
* MARLO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* at your option) any later version.
* MARLO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with MARLO. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************/
/**************
* @author Diego Perez - CIAT/CCAFS
**************/
package org.cgiar.ccafs.marlo.rest.dto;
import java.util.List;
import io.swagger.annotations.ApiModelProperty;
public class ProjectExpectedStudyDTO {
@ApiModelProperty(notes = "The Generated expected study id", position = 1)
private Long id;
@ApiModelProperty(notes = "Project id", position = 1)
private String project;
@ApiModelProperty(notes = "Project expected study info", position = 2)
private ProjectExpectedStudyInfoDTO projectExpectedEstudyInfo;
@ApiModelProperty(notes = "CGIAR Sub-IDOs List", position = 3)
private List<ProjectExpectedStudySubIdoDTO> srfSubIdoList;
@ApiModelProperty(notes = "CGIAR SLO target List", position = 4)
private List<ProjectExpectedStudySrfSloTargetDTO> srfSloTargetList;
@ApiModelProperty(notes = "Geographic Scope List", position = 5)
private List<GeographicScopeDTO> geographicScopes;
@ApiModelProperty(notes = "Contributing Flagship List", position = 8)
private List<CrpProgramDTO> flagshipsList;
@ApiModelProperty(notes = "Contributing External Partners List", position = 9)
private List<InstitutionDTO> institutionsList;
@ApiModelProperty(notes = "Contributing CRP/Plataform List", position = 7)
private List<CGIAREntityDTO> projectExpectedStudiesCrp;
@ApiModelProperty(notes = "Regions", position = 6)
private List<RegionDTO> regions;
@ApiModelProperty(notes = "Countries", position = 6)
private List<CountryDTO> countries;
@ApiModelProperty(notes = "Quantification List List", position = 11)
private List<QuantificationDTO> quantificationList;
@ApiModelProperty(notes = "Contributing innovations list", position = 10)
private List<ProjectExpectedStudyInnovationDTO> innovationCodeList;
@ApiModelProperty(notes = "Contributing policies list", position = 3)
private List<ProjectExpectedStudyPolicyDTO> policiesCodeList;
@ApiModelProperty(notes = "Aditional link list", position = 4)
private List<ProjectExpectedStudyLinkDTO> links;
@ApiModelProperty(notes = "Contributing milestone list", position = 13)
private List<ProjectExpectedStudyMilestoneDTO> milestonesList;
@ApiModelProperty(notes = "phase (POWB, AR, UpKeep)", position = 14)
private PhaseDTO phase;
@ApiModelProperty(notes = "phase id", position = 14)
private Long phaseID;
public List<CountryDTO> getCountries() {
return countries;
}
public List<CrpProgramDTO> getFlagshipsList() {
return flagshipsList;
}
public List<GeographicScopeDTO> getGeographicScopes() {
return geographicScopes;
}
public Long getId() {
return id;
}
public List<ProjectExpectedStudyInnovationDTO> getInnovationCodeList() {
return innovationCodeList;
}
public List<InstitutionDTO> getInstitutionsList() {
return institutionsList;
}
public List<ProjectExpectedStudyLinkDTO> getLinks() {
return links;
}
public List<ProjectExpectedStudyMilestoneDTO> getMilestonesList() {
return milestonesList;
}
public PhaseDTO getPhase() {
return phase;
}
public Long getPhaseID() {
return phaseID;
}
public List<ProjectExpectedStudyPolicyDTO> getPoliciesCodeList() {
return policiesCodeList;
}
public String getProject() {
return project;
}
public ProjectExpectedStudyInfoDTO getProjectExpectedEstudyInfo() {
return projectExpectedEstudyInfo;
}
public List<CGIAREntityDTO> getProjectExpectedStudiesCrp() {
return projectExpectedStudiesCrp;
}
public List<QuantificationDTO> getQuantificationList() {
return quantificationList;
}
public List<RegionDTO> getRegions() {
return regions;
}
public List<ProjectExpectedStudySrfSloTargetDTO> getSrfSloTargetList() {
return srfSloTargetList;
}
public List<ProjectExpectedStudySubIdoDTO> getSrfSubIdoList() {
return srfSubIdoList;
}
public void setCountries(List<CountryDTO> countries) {
this.countries = countries;
}
public void setFlagshipsList(List<CrpProgramDTO> flagshipsList) {
this.flagshipsList = flagshipsList;
}
public void setGeographicScopes(List<GeographicScopeDTO> geographicScopes) {
this.geographicScopes = geographicScopes;
}
public void setId(Long id) {
this.id = id;
}
public void setInnovationCodeList(List<ProjectExpectedStudyInnovationDTO> innovationCodeList) {
this.innovationCodeList = innovationCodeList;
}
public void setInstitutionsList(List<InstitutionDTO> institutionsList) {
this.institutionsList = institutionsList;
}
public void setLinks(List<ProjectExpectedStudyLinkDTO> links) {
this.links = links;
}
public void setMilestonesList(List<ProjectExpectedStudyMilestoneDTO> milestonesList) {
this.milestonesList = milestonesList;
}
public void setPhase(PhaseDTO phase) {
this.phase = phase;
}
public void setPhaseID(Long phaseID) {
this.phaseID = phaseID;
}
public void setPoliciesCodeList(List<ProjectExpectedStudyPolicyDTO> policiesCodeList) {
this.policiesCodeList = policiesCodeList;
}
public void setProject(String project) {
this.project = project;
}
public void setProjectExpectedEstudyInfo(ProjectExpectedStudyInfoDTO projectExpectedEstudyInfo) {
this.projectExpectedEstudyInfo = projectExpectedEstudyInfo;
}
public void setProjectExpectedStudiesCrp(List<CGIAREntityDTO> projectExpectedStudiesCrp) {
this.projectExpectedStudiesCrp = projectExpectedStudiesCrp;
}
public void setQuantificationList(List<QuantificationDTO> quantificationList) {
this.quantificationList = quantificationList;
}
public void setRegions(List<RegionDTO> regions) {
this.regions = regions;
}
public void setSrfSloTargetList(List<ProjectExpectedStudySrfSloTargetDTO> srfSloTargetList) {
this.srfSloTargetList = srfSloTargetList;
}
public void setSrfSubIdoList(List<ProjectExpectedStudySubIdoDTO> srfSubIdoList) {
this.srfSubIdoList = srfSubIdoList;
}
}
| 7,112 |
Java
|
.java
|
CCAFS/MARLO
| 8 | 8 | 286 |
2016-05-11T18:52:21Z
|
2024-05-08T21:14:43Z
|
df157d5abba774556c74e8459d39b4318c3105b7ba38171317460a88a13dd5e5
|
[] |
[
18200,
47,
222,
338,
1369,
822,
458,
1760,
451,
4795,
4892,
418,
791,
10259,
5413,
18687,
456,
14421,
568,
222,
338,
4322,
3772,
120,
11329,
327,
28159,
1323,
566,
222,
338,
507,
802,
1323,
458,
3760,
2951,
63,
863,
902,
14081,
580,
480,
52,
290,
5370,
222,
338,
580,
1549,
341,
5974,
451,
341,
6994,
6153,
5062,
1196,
641,
9582,
829,
222,
338,
341,
7834,
3870,
7120,
49,
3173,
1522,
244,
56,
451,
341,
1196,
49,
575,
222,
338,
840,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
338,
507,
802,
1323,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
2819,
341,
222,
338,
6994,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
6153,
5062,
1196,
222,
338,
7979,
642,
507,
802,
1323,
51,
1691,
666,
49,
2337,
350,
544,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
17854,
52,
222,
222,
52,
639,
6372,
222,
338,
496,
2133,
15326,
1724,
466,
767,
127,
449,
9683,
741,
52,
2218,
5999,
88,
222,
30574,
19923,
222,
222,
1337,
1105,
51,
10305,
301,
51,
1172,
1566,
120,
51,
3321,
335,
51,
4756,
51,
12292,
64,
222,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
485,
3377,
51,
13166,
51,
8839,
51,
29245,
64,
222,
222,
942,
462,
5426,
7705,
22721,
8723,
320,
736,
496,
29245,
45,
8903,
299,
332,
1338,
13046,
2816,
14887,
828,
411,
2764,
299,
244,
54,
46,
353,
964,
6374,
828,
64,
736,
496,
29245,
45,
8903,
299,
332,
3214,
828,
411,
2764,
299,
244,
54,
46,
353,
964,
910,
2091,
64,
8886,
496,
29245,
45,
8903,
299,
332,
3214,
2816,
14887,
3116,
411,
2764,
299,
244,
55,
46,
353,
964,
5426,
7705,
22721,
1139,
8723,
2091,
7705,
9208,
8430,
1139,
64,
8886,
496,
29245,
45,
8903,
299,
332,
9424,
78,
802,
3743,
50,
798,
14587,
1701,
411,
2764,
299,
244,
56,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
1736,
625,
116,
8723,
67,
328,
4939,
1736,
625,
116,
739,
64,
8886,
496,
29245,
45,
8903,
299,
332,
9424,
78,
802,
377,
1323,
1780,
1701,
411,
2764,
299,
244,
57,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
88,
4939,
88,
335,
2937,
8723,
67,
328,
4939,
88,
335,
2937,
739,
64,
736,
496,
29245,
45,
8903,
299,
332,
10643,
14166,
22135,
1701,
411,
2764,
299,
244,
58,
46,
353,
964,
1701,
65,
10643,
14166,
5518,
8723,
67,
12315,
14166,
30961,
64,
736,
496,
29245,
45,
8903,
299,
332,
47629,
18857,
4808,
1701,
411,
2764,
299,
244,
61,
46,
353,
964,
1701,
65,
72,
8640,
5756,
8723,
67,
4666,
44878,
739,
64,
736,
496,
29245,
45,
8903,
299,
332,
47629,
16933,
6695,
11831,
1701,
411,
2764,
299,
244,
62,
46,
353,
964,
1701,
65,
3245,
10376,
8723,
67,
31691,
120,
739,
64,
736,
496,
29245,
45,
8903,
299,
332,
47629,
409,
5743,
52,
1839,
420,
618,
1701,
411,
2764,
299,
244,
60,
46,
353,
964,
1701,
65,
9424,
78,
3212,
27041,
8723,
67,
2091,
7705,
520,
23617,
72,
8640,
64,
736,
496,
29245,
45,
8903,
299,
332,
22585,
411,
2764,
299,
244,
59,
46,
353,
964,
1701,
65,
6071,
8723,
67,
17844,
64,
736,
496,
29245,
45,
8903,
299,
332,
44511,
411,
2764,
299,
244,
59,
46,
353,
964,
1701,
65,
10926,
8723,
67,
24569,
64,
736,
496,
29245,
45,
8903,
299,
332,
17143,
1884,
1701,
1701,
411,
2764,
299,
244,
54,
54,
46,
353,
964,
1701,
65,
17143,
1884,
8723,
67,
13408,
1884,
739,
64,
736,
496,
29245,
45,
8903,
299,
332,
47629,
347,
15019,
1014,
1168,
411,
2764,
299,
244,
54,
53,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
402,
38736,
8723,
67,
347,
38736,
1241,
739,
64,
8886,
496,
29245,
45,
8903,
299,
332,
47629,
20623,
1168,
411,
2764,
299,
244,
56,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
4263,
8723,
67,
20623,
1241,
739,
64,
736,
496,
29245,
45,
8903,
299,
332,
1785,
3312,
2572,
1168,
411,
2764,
299,
244,
57,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
2375,
8723,
67,
7343,
64,
736,
496,
29245,
45,
8903,
299,
332,
47629,
38078,
1168,
411,
2764,
299,
244,
54,
56,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
82,
20272,
8723,
67,
364,
44267,
739,
64,
8886,
496,
29245,
45,
8903,
299,
332,
12055,
327,
1862,
21766,
49,
5500,
49,
2791,
16635,
5742,
2764,
299,
244,
54,
57,
46,
353,
964,
26166,
8723,
11311,
64,
8886,
496,
29245,
45,
8903,
299,
332,
12055,
828,
411,
2764,
299,
244,
54,
57,
46,
353,
964,
6374,
11311,
798,
64,
8886,
581,
1701,
65,
10926,
8723,
67,
640,
44511,
365,
320,
303,
461,
24569,
64,
353,
339,
736,
581,
1701,
65,
72,
8640,
5756,
8723,
67,
640,
5266,
44878,
739,
365,
320,
303,
461,
4666,
44878,
739,
64,
353,
339,
736,
581,
1701,
65,
10643,
14166,
5518,
8723,
67,
640,
10643,
14166,
30961,
365,
320,
303,
461,
12315,
14166,
30961,
64,
353,
339,
736,
581,
6374,
19832,
365,
320,
303,
461,
828,
64,
353,
339,
8886,
581,
1701,
65,
3214,
7705,
22721,
402,
38736,
8723,
67,
640,
402,
38736,
1241,
739,
365,
320,
303,
461,
347,
38736,
1241,
739,
64,
353,
339,
8886,
581,
1701,
65,
3245,
10376,
8723,
67,
640,
3245,
10376,
120,
739,
365,
320,
303,
461,
31691,
120,
739,
64,
353,
339,
8886,
581,
1701,
65,
3214,
7705,
22721,
2375,
8723,
67,
640,
11632,
365,
320,
303,
461,
7343,
64,
353,
339,
8886,
581,
1701,
65,
3214,
7705,
22721,
82,
20272,
8723,
67,
640,
82,
44267,
739,
365,
320,
303,
461,
364,
44267,
739,
64,
353,
339,
8886,
581,
26166,
8723,
640,
12238,
365,
320,
303,
461,
11311,
64,
353,
339,
8886,
581,
6374,
640,
12238,
798,
365,
320,
303,
461,
11311,
798,
64,
353,
339,
8886,
581,
1701,
65,
3214,
7705,
22721,
4263,
8723,
67,
640,
21420,
1241,
739,
365,
320,
303,
461,
20623,
1241,
739,
64,
353,
339,
8886,
581,
910,
640,
3214,
365,
320,
303,
461,
2091,
64,
353,
339,
8886,
581,
5426
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,024 |
[
332,
17143,
1884,
1701,
1701,
411,
2764,
299,
244,
54,
54,
46,
353,
964,
1701,
65,
17143,
1884,
8723,
67,
13408,
1884,
739,
64,
736,
496,
29245,
45,
8903,
299,
332,
47629,
347,
15019,
1014,
1168,
411,
2764,
299,
244,
54,
53,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
402,
38736,
8723,
67,
347,
38736,
1241,
739,
64,
8886,
496,
29245,
45,
8903,
299,
332,
47629,
20623,
1168,
411,
2764,
299,
244,
56,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
4263,
8723,
67,
20623,
1241,
739,
64,
736,
496,
29245,
45,
8903,
299,
332,
1785,
3312,
2572,
1168,
411,
2764,
299,
244,
57,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
2375,
8723,
67,
7343,
64,
736,
496,
29245,
45,
8903,
299,
332,
47629,
38078,
1168,
411,
2764,
299,
244,
54,
56,
46,
353,
964,
1701,
65,
3214,
7705,
22721,
82,
20272,
8723,
67,
364,
44267,
739,
64,
8886,
496,
29245,
45,
8903,
299,
332,
12055,
327,
1862,
21766,
49,
5500,
49,
2791,
16635,
5742,
2764,
299,
244,
54,
57,
46,
353,
964,
26166,
8723,
11311,
64,
8886,
496,
29245,
45,
8903,
299,
332,
12055,
828,
411,
2764,
299,
244,
54,
57,
46,
353,
964,
6374,
11311,
798,
64,
8886,
581,
1701,
65,
10926,
8723,
67,
640,
44511,
365,
320,
303,
461,
24569,
64,
353,
339,
736,
581,
1701,
65,
72,
8640,
5756,
8723,
67,
640,
5266,
44878,
739,
365,
320,
303,
461,
4666,
44878,
739,
64,
353,
339,
736,
581,
1701,
65,
10643,
14166,
5518,
8723,
67,
640,
10643,
14166,
30961,
365,
320,
303,
461,
12315,
14166,
30961,
64,
353,
339,
736,
581,
6374,
19832,
365,
320,
303,
461,
828,
64,
353,
339,
8886,
581,
1701,
65,
3214,
7705,
22721,
402,
38736,
8723,
67,
640,
402,
38736,
1241,
739,
365,
320,
303,
461,
347,
38736,
1241,
739
] | 3,260,393,002,759,096,000 | true | false | false | false |
[
8886,
496,
29245,
45,
8903,
299,
332,
12055,
327,
1862,
21766,
49,
5500,
49,
2791,
16635,
5742,
2764,
299,
244,
54,
57,
46,
353,
964,
26166,
8723,
11311,
64,
8886,
496,
29245,
45,
8903,
299,
332,
12055,
828,
411,
2764,
299,
244,
54,
57,
46,
353,
964,
6374,
11311,
798,
64,
8886,
581,
1701,
65,
10926,
8723,
67,
640,
44511,
365,
320,
303,
461,
24569,
64,
353,
339,
736,
581,
1701,
65,
72,
8640,
5756,
8723,
67,
640,
5266,
44878,
739,
365,
320,
303,
461,
4666,
44878,
739,
64,
353,
339,
736,
581,
1701,
65,
10643,
14166,
5518,
8723,
67
] | 7,940,745,857,860,520,000 | true |
"Quantification List List", position = 11)
private List<QuantificationDTO> quantificationList;
@ApiModelProperty(notes = "Contributing innovations list", position = 10)
private List<ProjectExpectedStudyInnovationDTO> innovationCodeList;
@ApiModelProperty(notes = "Contributing policies list", position = 3)
private List<ProjectExpectedStudyPolicyDTO> policiesCodeList;
@ApiModelProperty(notes = "Aditional link list", position = 4)
private List<ProjectExpectedStudyLinkDTO> links;
@ApiModelProperty(notes = "Contributing milestone list", position = 13)
private List<ProjectExpectedStudyMilestoneDTO> milestonesList;
@ApiModelProperty(notes = "phase (POWB, AR, UpKeep)", position = 14)
private PhaseDTO phase;
@ApiModelProperty(notes = "phase id", position = 14)
private Long phaseID;
public List<CountryDTO> getCountries() {
return countries;
}
public List<CrpProgramDTO> getFlagshipsList() {
return flagshipsList;
}
public List<GeographicScopeDTO>
|
InnovationDTO> innovationCodeList;
@ApiModelProperty(notes = "Contributing policies list", position = 3)
private List<ProjectExpectedStudyPolicyDTO> policiesCodeList;
@ApiModelProperty(notes = "Aditional link list", position = 4)
private List<ProjectExpectedStudyLinkDTO> links;
@ApiModelProperty(notes = "Contributing milestone list", position = 13)
private List<ProjectExpectedStudyMilestoneDTO> milestonesList;
@ApiModelProperty(notes = "phase (POWB, AR, UpKeep)", position = 14)
private PhaseDTO phase;
@ApiModelProperty(notes = "phase id", position = 14)
private Long phaseID;
public List<CountryDTO> getCountries() {
return countries;
}
public List<CrpProgramDTO> getFlagshipsList() {
return flagshipsList;
}
public List<GeographicScopeDTO>
|
", position = 4)
private List<ProjectExpectedStudyLinkDTO> links;
@ApiModelProperty(notes = "Contributing milestone list", position = 13)
private List<ProjectExpectedStudyMilestoneDTO> milestonesList;
@ApiModelProperty(notes = "phase (POWB, AR, UpKeep)", position = 14)
private PhaseDTO phase;
@ApiModelProperty(notes = "phase id", position = 14)
private Long phaseID;
public List<CountryDTO> getCountries() {
return countries;
}
public List<CrpProgramDTO> getFlagshipsList() {
return flagshipsList;
}
public List<GeographicScopeDTO>
|
@ApiModelProperty(notes = "phase (POWB, AR, UpKeep)", position = 14)
private PhaseDTO phase;
@ApiModelProperty(notes = "phase id", position = 14)
private Long phaseID;
public List<CountryDTO> getCountries() {
return countries;
}
public List<CrpProgramDTO> getFlagshipsList() {
return flagshipsList;
}
public List<GeographicScopeDTO>
|
getGeographicScopes() {
return geographicScopes;
}
public Long getId() {
return id;
}
public List<ProjectExpectedStudyInnovationDTO> getInnovationCodeList() {
return innovationCodeList
|
SculkSpreadTicker.java
|
/FileExtraction/Java_unseen/FrozenBlock_WilderWild/src/main/java/net/frozenblock/wilderwild/entity/SculkSpreadTicker.java
|
/*
* Copyright 2023-2024 FrozenBlock
* This file is part of Wilder Wild.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
package net.frozenblock.wilderwild.entity;
import net.frozenblock.lib.entity.api.SilentTicker;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.SculkSpreader;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
public class SculkSpreadTicker extends SilentTicker {
public final SculkSpreader sculkSpreader;
public SculkSpreadTicker(@NotNull EntityType<?> entityType, @NotNull Level level) {
super(entityType, level);
this.sculkSpreader = SculkSpreader.createLevelSpreader();
}
public SculkSpreadTicker(@NotNull EntityType<?> entityType, @NotNull Level level, @NotNull BlockPos pos, boolean worldgen) {
super(entityType, level);
this.setPos(Vec3.atCenterOf(pos));
this.sculkSpreader = worldgen ? SculkSpreader.createWorldGenSpreader() : SculkSpreader.createLevelSpreader();
}
public static void createAndSpawn(@NotNull EntityType<?> entityType, @NotNull Level level, @NotNull BlockPos pos, boolean worldgen, int charge) {
SculkSpreadTicker sculkSpreadTicker = new SculkSpreadTicker(entityType, level, pos, worldgen);
level.addFreshEntity(sculkSpreadTicker);
sculkSpreadTicker.sculkSpreader.addCursors(pos, charge);
}
@Override
public void addAdditionalSaveData(@NotNull CompoundTag compound) {
super.addAdditionalSaveData(compound);
this.sculkSpreader.save(compound);
}
@Override
public void readAdditionalSaveData(@NotNull CompoundTag compound) {
super.readAdditionalSaveData(compound);
this.sculkSpreader.save(compound);
}
@Override
public void tick(@NotNull Level level, @NotNull Vec3 vec3, @NotNull BlockPos pos, int ticks) {
if (!this.sculkSpreader.getCursors().isEmpty()) {
this.sculkSpreader.updateCursors(level, pos, level.random, true);
} else {
this.discard();
}
}
}
| 2,666 |
Java
|
.java
|
FrozenBlock/WilderWild
| 78 | 20 | 8 |
2022-04-16T10:36:16Z
|
2024-05-08T01:38:23Z
|
330db67bab4f354f23bb1e95f5690929c8524dff083c4c747b1f7a9bd6b05b69
|
[] |
[
1127,
222,
338,
2657,
244,
55,
53,
55,
56,
50,
55,
53,
55,
57,
525,
13277,
2246,
222,
338,
1369,
822,
458,
1760,
451,
643,
1331,
643,
771,
51,
222,
338,
222,
338,
1369,
3477,
458,
3760,
2951,
64,
863,
902,
14081,
580,
480,
52,
290,
222,
338,
5370,
580,
1549,
341,
5974,
451,
341,
6994,
16227,
6153,
5062,
222,
338,
1196,
641,
9582,
829,
341,
7834,
3870,
7120,
64,
3173,
222,
338,
1522,
244,
56,
451,
341,
1196,
49,
575,
327,
288,
1390,
2489,
46,
1364,
6146,
1522,
51,
222,
338,
222,
338,
1369,
3477,
458,
2744,
347,
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
6994,
222,
338,
16227,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
16227,
6153,
5062,
1196,
222,
338,
7979,
642,
477,
3477,
64,
434,
666,
49,
2337,
350,
662,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
588,
222,
222,
1337,
3723,
51,
30562,
1540,
51,
124,
1331,
33640,
51,
2244,
64,
222,
222,
485,
3723,
51,
30562,
1540,
51,
1379,
51,
2244,
51,
1256,
51,
20068,
323,
31739,
64,
222,
485,
3723,
51,
8654,
51,
1284,
51,
2246,
3010,
64,
222,
485,
3723,
51,
8654,
51,
39749,
51,
18133,
2649,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2244,
51,
21960,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2675,
51,
2671,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2675,
51,
1540,
51,
2391,
6627,
88,
1023,
839,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
22563,
51,
5985,
56,
64,
222,
485,
1105,
51,
15575,
51,
8839,
51,
4936,
64,
222,
222,
942,
462,
377,
2908,
112,
33518,
31739,
2041,
19128,
323,
31739,
320,
499,
221,
942,
1175,
377,
2908,
112,
88,
1023,
839,
2240,
6627,
88,
1023,
839,
64,
499,
221,
942,
377,
2908,
112,
33518,
31739,
4810,
4936,
44947,
11667,
4436,
638,
49,
496,
4936,
11587,
3215,
46,
320,
376,
221,
5282,
45,
2244,
638,
49,
3215,
312,
376,
221,
597,
51,
564,
6627,
88,
1023,
839,
299,
377,
2908,
112,
88,
1023,
839,
51,
1315,
2671,
88,
1023,
839,
492,
222,
221,
130,
499,
221,
942,
377,
2908,
112,
33518,
31739,
4810,
4936,
44947,
11667,
4436,
638,
49,
496,
4936,
11587,
3215,
49,
496,
4936,
41721,
3423,
49,
1922,
5810,
2536,
46,
320,
376,
221,
5282,
45,
2244,
638,
49,
3215,
312,
376,
221,
597,
51,
489,
3010,
45,
5985,
56,
51,
288,
7067,
1436,
45,
985,
894,
376,
221,
597,
51,
564,
6627,
88,
1023,
839,
299,
5810,
2536,
1037,
377,
2908,
112,
88,
1023,
839,
51,
1315,
6719,
5154,
88,
1023,
839,
365,
518,
377,
2908,
112,
88,
1023,
839,
51,
1315,
2671,
88,
1023,
839,
492,
222,
221,
130,
499,
221,
942,
924,
782,
1506,
2199,
16354,
4810,
4936,
44947,
11667,
4436,
638,
49,
496,
4936,
11587,
3215,
49,
496,
4936,
41721,
3423,
49,
1922,
5810,
2536,
49,
648,
10117,
46,
320,
376,
221,
2391,
6627,
33518,
31739,
2240,
6627,
33518,
31739,
299,
556,
377,
2908,
112,
33518,
31739,
45,
2244,
638,
49,
3215,
49,
3423,
49,
5810,
2536,
312,
376,
221,
2675,
51,
688,
46999,
2234,
45,
564,
6627,
33518,
31739,
312,
376,
221,
564,
6627,
33518,
31739,
51,
564,
6627,
88,
1023,
839,
51,
688,
4306,
120,
1758,
45,
985,
49,
10117,
312,
222,
221,
130,
499,
221,
69,
1806,
222,
221,
942,
782,
1035,
11644,
39311,
4810,
4936,
42160,
2649,
27089,
46,
320,
376,
221,
5282,
51,
688,
11644,
39311,
45,
26799,
312,
376,
221,
597,
51,
564,
6627,
88,
1023,
839,
51,
2882,
45,
26799,
312,
222,
221,
130,
499,
221,
69,
1806,
222,
221,
942,
782,
1511,
11644,
39311,
4810,
4936,
42160,
2649,
27089,
46,
320,
376,
221,
5282,
51,
870,
11644,
39311,
45,
26799,
312,
376,
221,
597,
51,
564,
6627,
88,
1023,
839,
51,
2882,
45,
26799,
312,
222,
221,
130,
499,
221,
69,
1806,
222,
221,
942,
782,
12931,
4810,
4936,
11587,
3215,
49,
496,
4936,
7485,
56,
4724,
56,
49,
496,
4936,
41721,
3423,
49,
648,
23571,
46,
320,
376,
221,
344,
1445,
597,
51,
564,
6627,
88,
1023,
839,
51,
390,
4306,
120,
1758,
941,
6401,
1177,
320,
374,
221,
597,
51,
564,
6627,
88,
1023,
839,
51,
1896,
4306,
120,
1758,
45,
2675,
49,
3423,
49,
3215,
51,
3917,
49,
878,
312,
376,
221,
130,
832,
320,
374,
221,
597,
51,
29808,
492,
376,
221,
130,
222,
221,
130,
222,
222,
130,
222
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 774 |
[
341,
9850,
708,
580,
1118,
545,
6386,
49,
222,
338,
1294,
4213,
2979,
9345,
64,
2895,
4462,
341,
4506,
14319,
451,
222,
338,
7934,
575,
8114,
4800,
418,
7848,
7763,
51,
244,
2819,
341,
6994,
222,
338,
16227,
6153,
5062,
1196,
456,
1851,
4261,
51,
222,
338,
222,
338,
2469,
1414,
1178,
6589,
331,
1948,
451,
341,
6994,
16227,
6153,
5062,
1196,
222,
338,
7979,
642,
477,
3477,
64,
434,
666,
49,
2337,
350,
662,
574,
1516,
51,
10627,
51,
1107,
52,
4205,
28699,
222,
588,
222,
222,
1337,
3723,
51,
30562,
1540,
51,
124,
1331,
33640,
51,
2244,
64,
222,
222,
485,
3723,
51,
30562,
1540,
51,
1379,
51,
2244,
51,
1256,
51,
20068,
323,
31739,
64,
222,
485,
3723,
51,
8654,
51,
1284,
51,
2246,
3010,
64,
222,
485,
3723,
51,
8654,
51,
39749,
51,
18133,
2649,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2244,
51,
21960,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2675,
51,
2671,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2675,
51,
1540,
51,
2391,
6627,
88,
1023,
839,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
22563,
51,
5985,
56,
64,
222,
485,
1105,
51,
15575,
51,
8839,
51,
4936,
64,
222,
222,
942,
462,
377,
2908,
112,
33518,
31739,
2041,
19128,
323,
31739,
320,
499,
221,
942,
1175,
377,
2908,
112,
88,
1023,
839,
2240,
6627,
88,
1023,
839,
64,
499,
221,
942,
377,
2908,
112,
33518,
31739,
4810,
4936,
44947,
11667,
4436,
638,
49,
496,
4936,
11587,
3215,
46,
320,
376,
221,
5282,
45,
2244,
638,
49,
3215,
312,
376,
221,
597,
51,
564,
6627,
88,
1023,
839,
299,
377,
2908,
112,
88,
1023,
839,
51,
1315,
2671,
88,
1023,
839,
492,
222,
221,
130,
499,
221,
942,
377,
2908,
112,
33518,
31739,
4810
] | 3,797,254,256,326,099,000 | true | false | false | false |
[
21960,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2675,
51,
2671,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
2675,
51,
1540,
51,
2391,
6627,
88,
1023,
839,
64,
222,
485,
3723,
51,
8654,
51,
5879,
51,
22563,
51,
5985,
56,
64,
222,
485,
1105,
51,
15575,
51,
8839,
51,
4936,
64,
222,
222,
942,
462,
377,
2908,
112,
33518,
31739,
2041,
19128,
323,
31739,
320,
499,
221,
942,
1175,
377,
2908,
112,
88,
1023,
839,
2240,
6627,
88,
1023,
839,
64,
499,
221,
942,
377,
2908,
112,
33518,
31739,
4810,
4936,
44947,
11667,
4436,
638,
49
] | -5,990,618,094,154,235,000 | true |
the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
package net.frozenblock.wilderwild.entity;
import net.frozenblock.lib.entity.api.SilentTicker;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.SculkSpreader;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
public class SculkSpreadTicker extends SilentTicker {
public final SculkSpreader sculkSpreader;
public SculkSpreadTicker(@NotNull EntityType<?> entityType,
|
should have received a copy of the GNU Lesser General Public License
* along with this program; if not, see <https://www.gnu.org/licenses/>.
*/
package net.frozenblock.wilderwild.entity;
import net.frozenblock.lib.entity.api.SilentTicker;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.SculkSpreader;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
public class SculkSpreadTicker extends SilentTicker {
public final SculkSpreader sculkSpreader;
public SculkSpreadTicker(@NotNull EntityType<?> entityType,
|
import net.frozenblock.lib.entity.api.SilentTicker;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.SculkSpreader;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
public class SculkSpreadTicker extends SilentTicker {
public final SculkSpreader sculkSpreader;
public SculkSpreadTicker(@NotNull EntityType<?> entityType,
|
EntityType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.SculkSpreader;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
public class SculkSpreadTicker extends SilentTicker {
public final SculkSpreader sculkSpreader;
public SculkSpreadTicker(@NotNull EntityType<?> entityType,
|
@NotNull Level level) {
super(entityType, level);
this.sculkSpreader = SculkSpreader.createLevelSpreader();
}
public SculkSpreadTicker(@
|
LocalRemoteLinkTest.java
|
/FileExtraction/Java_unseen/hartwigmedical_hmftools/esvee/src/test/java/com/hartwig/hmftools/esvee/assembly/LocalRemoteLinkTest.java
|
package com.hartwig.hmftools.esvee.assembly;
import static com.hartwig.hmftools.common.genome.region.Orientation.FORWARD;
import static com.hartwig.hmftools.common.genome.region.Orientation.REVERSE;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.BND;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.DEL;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.DUP;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_1;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_2;
import static com.hartwig.hmftools.esvee.TestUtils.READ_ID_GENERATOR;
import static com.hartwig.hmftools.esvee.TestUtils.REF_BASES_200;
import static com.hartwig.hmftools.esvee.TestUtils.cloneRead;
import static com.hartwig.hmftools.esvee.TestUtils.createAssembly;
import static com.hartwig.hmftools.esvee.TestUtils.createRead;
import static com.hartwig.hmftools.esvee.TestUtils.formTestRefSequence;
import static com.hartwig.hmftools.esvee.assembly.RemoteRegionAssembler.isExtensionCandidateAssembly;
import static com.hartwig.hmftools.esvee.assembly.types.RemoteReadType.DISCORDANT;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import java.util.List;
import com.hartwig.hmftools.common.codon.Nucleotides;
import com.hartwig.hmftools.common.region.ChrBaseRegion;
import com.hartwig.hmftools.common.test.MockRefGenome;
import com.hartwig.hmftools.common.test.SamRecordTestUtils;
import com.hartwig.hmftools.esvee.assembly.read.Read;
import com.hartwig.hmftools.esvee.assembly.types.AssemblyLink;
import com.hartwig.hmftools.esvee.assembly.types.Junction;
import com.hartwig.hmftools.esvee.assembly.types.JunctionAssembly;
import com.hartwig.hmftools.esvee.assembly.types.RemoteRegion;
import org.junit.Test;
public class LocalRemoteLinkTest
{
@Test
public void testAssemblyLocalRefMatch()
{
// must be long enough to test the local ref genome sequence but not repetitive
String localRefSequence = formTestRefSequence(600);
MockRefGenome refGenome = new MockRefGenome(false);
refGenome.RefGenomeMap.put(CHR_1, localRefSequence);
LocalSequenceMatcher localSequenceMatcher = new LocalSequenceMatcher(refGenome, 200);
// first a basic exact match junction
Junction posJunction = new Junction(CHR_1, 300, FORWARD);
String assemblyRefBases = localRefSequence.substring(201, 301);
String assemblyExtensionBases = localRefSequence.substring(400, 450);
String assemblyBases = assemblyRefBases + assemblyExtensionBases;
byte[] baseQuals = SamRecordTestUtils.buildDefaultBaseQuals(assemblyBases.length());
JunctionAssembly assembly = new JunctionAssembly(posJunction, assemblyBases.getBytes(), baseQuals, assemblyRefBases.length() - 1);
AssemblyLink assemblyLink = localSequenceMatcher.tryLocalAssemblyLink(assembly);
assertNotNull(assemblyLink);
assertEquals(DEL, assemblyLink.svType());
assertEquals(400, assemblyLink.second().junction().Position);
Junction negJunction = new Junction(CHR_1, 300, REVERSE);
assemblyRefBases = localRefSequence.substring(300, 400);
assemblyExtensionBases = localRefSequence.substring(400, 450);
assemblyBases = assemblyExtensionBases + assemblyRefBases;
baseQuals = SamRecordTestUtils.buildDefaultBaseQuals(assemblyBases.length());
assembly = new JunctionAssembly(negJunction, assemblyBases.getBytes(), baseQuals, assemblyExtensionBases.length());
assemblyLink = localSequenceMatcher.tryLocalAssemblyLink(assembly);
assertNotNull(assemblyLink);
assertEquals(DUP, assemblyLink.svType());
assertEquals(400, assemblyLink.second().junction().Position);
}
@Test
public void testAssemblyRemoteReadMatch()
{
String remoteRefSequence = formTestRefSequence(400);
MockRefGenome refGenome = new MockRefGenome(true);
refGenome.RefGenomeMap.put(CHR_2, remoteRefSequence);
// first a basic exact match at the remote site
String assemblyRefBases = REF_BASES_200.substring(1, 101);
String assemblyExtensionBases = refGenome.getBaseString(CHR_2, 200, 300);
String assemblyBases = assemblyRefBases + assemblyExtensionBases;
JunctionAssembly assembly = createAssembly(CHR_1, 100, FORWARD, assemblyBases, 99);
String juncReadBases = REF_BASES_200.substring(51, 101) + refGenome.getBaseString(CHR_2, 200, 250);
Read juncRead = createRead(
READ_ID_GENERATOR.nextId(), CHR_1, 51, juncReadBases, "50M50S", CHR_2, 200, true);
Read juncRead2 = cloneRead(juncRead, READ_ID_GENERATOR.nextId());
assembly.addJunctionRead(juncRead);
assembly.addJunctionRead(juncRead2);
assertTrue(isExtensionCandidateAssembly(assembly));
RemoteRegionAssembler remoteRegionAssembler = new RemoteRegionAssembler(refGenome, null);
Read remoteRead = createRead(READ_ID_GENERATOR.nextId(), 200, refGenome.getBaseString(CHR_2, 200, 300), "100M");
RemoteRegion remoteRegion = new RemoteRegion(
new ChrBaseRegion(CHR_2, 200, 300), REVERSE, remoteRead.id(), DISCORDANT);
remoteRegionAssembler.addMatchedReads(List.of(remoteRead), remoteRegion);
byte[] remoteRegionBases = refGenome.getBases(CHR_2, 200, 300);
AssemblyLink assemblyLink = remoteRegionAssembler.tryAssemblyRemoteRefOverlap(
assembly, 200, 300, remoteRegionBases);
assertNotNull(assemblyLink);
assertEquals(BND, assemblyLink.svType());
assertEquals(200, assemblyLink.second().junction().Position);
assertEquals(REVERSE, assemblyLink.second().junction().Orient);
assertEquals(1, assemblyLink.second().supportCount());
// now a match upstream of the remote read, inferring the missing ref bases
assemblyExtensionBases = refGenome.getBaseString(CHR_2, 150, 250);
assemblyBases = assemblyRefBases + assemblyExtensionBases;
assembly = createAssembly(CHR_1, 100, FORWARD, assemblyBases, 99);
assemblyLink = remoteRegionAssembler.tryAssemblyRemoteRefOverlap(assembly, 200, 300, remoteRegionBases);
assertNotNull(assemblyLink);
assertEquals(BND, assemblyLink.svType());
assertEquals(150, assemblyLink.second().junction().Position);
assertEquals(REVERSE, assemblyLink.second().junction().Orient);
assertEquals(1, assemblyLink.second().supportCount());
// now test negative to negative orientation (a la 3-6-3)
assemblyRefBases = REF_BASES_200.substring(100, 200);
assemblyExtensionBases = refGenome.getBaseString(CHR_2, 150, 249);
String assemblyExtensionBasesReversed = Nucleotides.reverseComplementBases(assemblyExtensionBases);
assemblyBases = assemblyExtensionBasesReversed + assemblyRefBases;
assembly = createAssembly(CHR_1, 100, REVERSE, assemblyBases, assemblyExtensionBasesReversed.length());
assemblyLink = remoteRegionAssembler.tryAssemblyRemoteRefOverlap(assembly, 200, 300, remoteRegionBases);
assertNotNull(assemblyLink);
assertEquals(BND, assemblyLink.svType());
assertEquals(150, assemblyLink.second().junction().Position);
assertEquals(REVERSE, assemblyLink.second().junction().Orient);
assertEquals(1, assemblyLink.second().supportCount());
}
}
| 7,531 |
Java
|
.java
|
hartwigmedical/hmftools
| 176 | 53 | 13 |
2016-01-26T15:03:29Z
|
2024-05-09T06:18:58Z
|
0aff442ecc0bd1bea7e5f9e75cf6256948829e0f642b1915412ae7cffc761a0f
|
[] |
[
1337,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
64,
222,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
27582,
51,
3436,
51,
13986,
51,
33115,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
27582,
51,
3436,
51,
13986,
51,
632,
33733,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
2289,
51,
49023,
10827,
638,
51,
71,
9116,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
2289,
51,
49023,
10827,
638,
51,
17044,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
2289,
51,
49023,
10827,
638,
51,
27047,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
881,
51,
21950,
32384,
51,
1424,
87,
100,
54,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
881,
51,
21950,
32384,
51,
1424,
87,
100,
55,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
4423,
100,
798,
100,
12436,
7275,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
4196,
100,
6185,
88,
100,
55,
53,
53,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
6371,
2248,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
1315,
10878,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
1315,
2248,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
618,
1024,
2099,
5908,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
51,
7318,
6071,
24277,
51,
316,
4823,
19472,
10878,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
51,
2529,
51,
7318,
2248,
638,
51,
5988,
72,
3083,
4525,
64,
222,
222,
485,
924,
1105,
51,
3946,
51,
3285,
51,
4993,
64,
222,
485,
924,
1105,
51,
3946,
51,
3285,
51,
14765,
64,
222,
485,
924,
1105,
51,
3946,
51,
3285,
51,
6553,
64,
222,
222,
485,
1401,
51,
1058,
51,
739,
64,
222,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
10777,
286,
51,
83,
37838,
13014,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
3436,
51,
43545,
1778,
6071,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
881,
51,
3672,
2099,
5154,
861,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
881,
51,
29044,
3171,
32384,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
51,
870,
51,
2248,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
51,
2529,
51,
10878,
2375,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
51,
2529,
51,
79,
550,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
51,
2529,
51,
79,
550,
10878,
64,
222,
485,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
51,
2529,
51,
7318,
6071,
64,
222,
222,
485,
1105,
51,
3946,
51,
1024,
64,
222,
222,
942,
462,
7099,
7318,
2375,
1024,
222,
128,
303,
496,
1024,
303,
581,
782,
913,
10878,
3340,
2099,
3683,
365,
303,
320,
310,
453,
2315,
545,
1964,
8473,
391,
913,
341,
2212,
2505,
27747,
6645,
1294,
666,
34317,
4853,
310,
910,
2212,
2099,
5908,
299,
2252,
1024,
2099,
5908,
45,
59,
53,
53,
312,
603,
7509,
2099,
5154,
861,
2505,
5154,
861,
299,
556,
7509,
2099,
5154,
861,
45,
1886,
312,
310,
2505,
5154,
861,
51,
2099,
5154,
861,
1225,
51,
543,
45,
1424,
87,
100,
54,
49,
2212,
2099,
5908,
312,
603,
7099,
5908,
11947,
2212,
5908,
11947,
299,
556,
7099,
5908,
11947,
45,
631,
5154,
861,
49,
244,
55,
53,
53,
312,
603,
453,
1950,
331,
6575,
7174,
2549,
614,
550,
310,
990,
550,
3423,
79,
550,
299,
556,
990,
550,
45,
1424,
87,
100,
54,
49,
244,
56,
53,
53,
49,
4800,
17235,
312,
603,
910,
13859,
2099,
48242,
299,
2212,
2099,
5908,
51,
8724,
45,
55,
53,
54,
49,
244,
56,
53,
54,
312,
310,
910,
13859,
4823,
48242,
299,
2212,
2099,
5908,
51,
8724,
45,
57,
53,
53,
49,
244,
57,
58,
53,
312,
310,
910,
13859,
48242,
299,
13859,
2099,
48242,
494,
13859,
4823,
48242,
64,
310,
3447,
1197,
1712,
8842,
120,
299,
26159,
3171,
32384,
51,
1848,
2061,
1778,
8842,
120,
45,
14314,
48242,
51,
1340,
1052,
603,
990,
550,
10878,
13859,
299,
556,
990,
550,
10878,
45,
985,
79,
550,
49,
13859,
48242,
51,
19682,
1046,
1712,
8842,
120,
49,
13859,
2099,
48242,
51,
1340,
365,
449,
244,
54,
312,
603,
20719,
2375,
13859,
2375,
299,
2212,
5908,
11947,
51,
1287,
3340,
10878,
2375,
45,
14314,
312,
310,
17141,
45,
14314,
2375,
312,
310,
3803,
45,
17044,
49,
13859,
2375,
51,
2289,
638,
1052,
310,
3803,
45,
57,
53,
53,
49,
13859,
2375,
51,
3109,
941,
39093,
941,
2746,
312,
603,
990,
550,
7571,
79,
550,
299,
556,
990,
550,
45,
1424,
87,
100,
54,
49,
244,
56,
53,
53,
49,
3062,
33733,
312,
603,
13859,
2099,
48242,
299,
2212,
2099,
5908,
51,
8724,
45,
56,
53,
53,
49,
244,
57,
53,
53,
312,
310,
13859,
4823,
48242,
299,
2212,
2099,
5908
] |
[
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,024 |
[
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
14314,
64,
222,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
27582,
51,
3436,
51,
13986,
51,
33115,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
27582,
51,
3436,
51,
13986,
51,
632,
33733,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
2289,
51,
49023,
10827,
638,
51,
71,
9116,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
2289,
51,
49023,
10827,
638,
51,
17044,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
2289,
51,
49023,
10827,
638,
51,
27047,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
881,
51,
21950,
32384,
51,
1424,
87,
100,
54,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
881,
51,
21950,
32384,
51,
1424,
87,
100,
55,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
4423,
100,
798,
100,
12436,
7275,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
4196,
100,
6185,
88,
100,
55,
53,
53,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
6371,
2248,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
1315,
10878,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384
] | -6,396,524,076,657,140,000 | true | false | false | false |
[
51,
2297,
51,
881,
51,
21950,
32384,
51,
1424,
87,
100,
54,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
2297,
51,
881,
51,
21950,
32384,
51,
1424,
87,
100,
55,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
4423,
100,
798,
100,
12436,
7275,
64,
222,
485,
924,
785,
51,
109,
521,
124,
384,
51,
109,
10599,
4303,
51,
326,
606,
106,
51,
32384,
51,
4196,
100,
6185,
88,
100,
55,
53,
53,
64,
222,
485,
924,
785,
51
] | -7,542,814,705,116,227,000 | true |
artwig.hmftools.esvee.assembly;
import static com.hartwig.hmftools.common.genome.region.Orientation.FORWARD;
import static com.hartwig.hmftools.common.genome.region.Orientation.REVERSE;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.BND;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.DEL;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.DUP;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_1;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_2;
import static com.hartwig.hmftools.esvee.TestUtils.READ_ID_GENERATOR;
import static com.hartwig.hmftools.esvee.TestUtils.REF_BASES_200;
import static com.
|
mftools.common.genome.region.Orientation.REVERSE;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.BND;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.DEL;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.DUP;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_1;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_2;
import static com.hartwig.hmftools.esvee.TestUtils.READ_ID_GENERATOR;
import static com.hartwig.hmftools.esvee.TestUtils.REF_BASES_200;
import static com.
|
mftools.common.sv.StructuralVariantType.DEL;
import static com.hartwig.hmftools.common.sv.StructuralVariantType.DUP;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_1;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_2;
import static com.hartwig.hmftools.esvee.TestUtils.READ_ID_GENERATOR;
import static com.hartwig.hmftools.esvee.TestUtils.REF_BASES_200;
import static com.
|
.common.test.GeneTestUtils.CHR_1;
import static com.hartwig.hmftools.common.test.GeneTestUtils.CHR_2;
import static com.hartwig.hmftools.esvee.TestUtils.READ_ID_GENERATOR;
import static com.hartwig.hmftools.esvee.TestUtils.REF_BASES_200;
import static com.
|
hartwig.hmftools.esvee.TestUtils.cloneRead;
import static com.hartwig.hmftools.esvee.TestUtils.createAssembly;
import static com.hartwig
|
LinePlot.java
|
/FileExtraction/Java_unseen/mleoking_PhET/simulations-java/common/charts/src/edu/colorado/phet/common/charts/LinePlot.java
|
// Copyright 2002-2011, University of Colorado
/*
* CVS Info -
* Filename : $Source$
* Branch : $Name$
* Modified by : $Author:samreid $
* Revision : $Revision:14669 $
* Date modified : $Date:2007-04-17 02:12:41 -0500 (Tue, 17 Apr 2007) $
*/
package edu.colorado.phet.common.charts;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Component;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.GeneralPath;
import java.awt.geom.Point2D;
import edu.colorado.phet.common.phetgraphics.view.phetgraphics.PhetShapeGraphic;
/**
* LinePlot takes a set of points (a DataSet) and connects the
* points with line segments.
*
* @author Sam Reid
* @version $Revision:14669 $
*/
public class LinePlot extends DataSetGraphic {
private static final Stroke DEFAULT_STROKE = new BasicStroke( 1f );
private static final Color DEFAULT_COLOR = Color.BLACK;
private boolean generalPathIsEmpty; // true if generalPath contains zero points
private GeneralPath generalPath;
private PhetShapeGraphic phetShapeGraphic;
//----------------------------------------------------------------------------
// Constructors
//----------------------------------------------------------------------------
public LinePlot( Component component, Chart chart ) {
this( component, chart, null );
}
public LinePlot( Component component, Chart chart, DataSet dataSet ) {
this( component, chart, dataSet, DEFAULT_STROKE, DEFAULT_COLOR );
}
public LinePlot( Component component, final Chart chart, DataSet dataSet, Stroke stroke, Paint paint ) {
super( component, chart, dataSet );
// Create the PhetShape graphic that draws the plot.
generalPath = new GeneralPath();
generalPathIsEmpty = true;
phetShapeGraphic = new PhetShapeGraphic( getComponent(), generalPath, stroke, paint );
addGraphic( phetShapeGraphic );
addAllPoints();
}
//----------------------------------------------------------------------------
// Accessors
//----------------------------------------------------------------------------
/**
* Sets the Stroke used to stroke the plot.
*
* @param stroke
*/
public void setStroke( Stroke stroke ) {
phetShapeGraphic.setStroke( stroke );
}
/**
* Sets the Color used to stroke the plot.
*
* @param color
*/
public void setBorderColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
/**
* Sets the Color used to stroke the plot.
*
* @param color
*/
public void setStrokeColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
//----------------------------------------------------------------------------
// DataSetGraphic implementation
//----------------------------------------------------------------------------
/**
* Called when the associated Chart's size or range changes.
* The plot is reset by re-adding all points.
*/
public void transformChanged() {
generalPath.reset();
generalPathIsEmpty = true;
addAllPoints();
}
//----------------------------------------------------------------------------
// DataSet.Observer implementation
//----------------------------------------------------------------------------
/**
* Called when the associated data set is cleared.
* Clients should not call this method directly.
* Effectively causes the plot to erase itself.
*/
public void cleared() {
generalPath.reset();
generalPathIsEmpty = true;
repaintAll();
}
/**
* Called when a single point is added to the associated data set.
* Clients should not call this method directly.
* The plot is redrawn after the point is added.
* If you need to add a set of point, it is more efficient to call pointsAdded.
*
* @param point
*/
public void pointAdded( Point2D point ) {
pointAddedNoRepaint( point );
repaintAll();
}
/**
* Called when a set of points is added to the associateds data set.
* Clients should not call this method directly.
* The plot is redrawn after all the points have been added.
* If you need points to appear individually as they are added,
* then you need to call pointAdded.
*
* @param points
*/
public void pointsAdded( Point2D[] points ) {
for ( int i = 0; i < points.length; i++ ) {
pointAddedNoRepaint( points[i] );
}
repaintAll();
}
/**
* Adds a point to the plot, but performs no redraw.
* This method is shared by pointAdded and pointsAdded.
*
* @param point
*/
protected void pointAddedNoRepaint( Point2D point ) {
if ( point == null ) {
throw new RuntimeException( "Null point" );
}
Point2D viewLocation = getChart().transformDouble( point );
if ( generalPathIsEmpty ) {
generalPath.moveTo( (float) viewLocation.getX(), (float) viewLocation.getY() );
generalPathIsEmpty = false;
}
else {
generalPath.lineTo( (float) viewLocation.getX(), (float) viewLocation.getY() );
}
}
/**
* Triggers a repaint of the plot.
* This is currently done by setting the PhetShapeGraphic to dirty.
*/
private void repaintAll() {
phetShapeGraphic.setShapeDirty();
}
}
| 5,551 |
Java
|
.java
|
mleoking/PhET
| 18 | 10 | 0 |
2016-05-19T01:58:46Z
|
2016-05-19T03:51:45Z
|
1619b11247c6ae761a34bba1eafdd5db5e1f84fd7ed61fc477c679005567d0aa
|
[] |
[
325,
2657,
244,
55,
53,
53,
55,
50,
55,
53,
54,
54,
49,
11451,
451,
5459,
2619,
222,
222,
1127,
222,
338,
409,
5775,
12450,
449,
222,
338,
38005,
518,
417,
2044,
41,
222,
338,
23721,
518,
417,
577,
41,
222,
338,
13124,
829,
518,
417,
4372,
63,
14681,
287,
333,
417,
222,
338,
26854,
518,
417,
14021,
63,
54,
57,
59,
59,
62,
417,
222,
338,
2833,
8851,
518,
417,
1563,
63,
55,
53,
53,
60,
50,
53,
57,
50,
54,
60,
244,
53,
55,
63,
54,
55,
63,
57,
54,
449,
53,
58,
53,
53,
327,
46084,
49,
244,
54,
60,
12742,
244,
55,
53,
53,
60,
46,
417,
222,
588,
222,
222,
1337,
15357,
51,
1507,
2619,
51,
117,
10237,
51,
2297,
51,
16080,
64,
222,
222,
485,
1401,
51,
8236,
51,
7114,
14212,
64,
222,
485,
1401,
51,
8236,
51,
1530,
64,
222,
485,
1401,
51,
8236,
51,
1735,
64,
222,
485,
1401,
51,
8236,
51,
12297,
64,
222,
485,
1401,
51,
8236,
51,
14212,
64,
222,
485,
1401,
51,
8236,
51,
12338,
51,
46988,
64,
222,
485,
1401,
51,
8236,
51,
12338,
51,
1962,
55,
73,
64,
222,
222,
485,
15357,
51,
1507,
2619,
51,
117,
10237,
51,
2297,
51,
117,
10237,
7027,
51,
1090,
51,
117,
10237,
7027,
51,
85,
10237,
4749,
23903,
64,
222,
222,
1350,
222,
338,
7118,
11756,
8756,
331,
758,
451,
5018,
327,
102,
31671,
46,
480,
37311,
341,
222,
338,
5018,
642,
1646,
17134,
51,
222,
338,
222,
338,
496,
2133,
26159,
922,
333,
222,
338,
496,
1687,
417,
14021,
63,
54,
57,
59,
59,
62,
417,
222,
588,
222,
942,
462,
7118,
11756,
2041,
31671,
23903,
320,
465,
964,
924,
1175,
1277,
5446,
4050,
100,
654,
1030,
2241,
299,
556,
9280,
14212,
45,
244,
54,
107,
1110,
303,
964,
924,
1175,
5459,
4050,
100,
6237,
299,
5459,
51,
22746,
64,
465,
964,
1922,
8108,
1233,
29525,
64,
453,
878,
434,
8108,
1233,
4326,
5953,
5018,
303,
964,
6153,
1233,
8108,
1233,
64,
303,
964,
466,
10237,
4749,
23903,
317,
10237,
4749,
23903,
64,
465,
453,
2672,
3147,
303,
453,
34731,
303,
453,
2672,
3147,
465,
581,
7118,
11756,
45,
5715,
2595,
49,
16078,
7589,
848,
320,
310,
477,
45,
2595,
49,
7589,
49,
762,
1110,
303,
339,
465,
581,
7118,
11756,
45,
5715,
2595,
49,
16078,
7589,
49,
31671,
46907,
848,
320,
310,
477,
45,
2595,
49,
7589,
49,
46907,
49,
4050,
100,
654,
1030,
2241,
49,
4050,
100,
6237,
1110,
303,
339,
465,
581,
7118,
11756,
45,
5715,
2595,
49,
1175,
16078,
7589,
49,
31671,
46907,
49,
1277,
5446,
10085,
49,
24999,
16870,
848,
320,
310,
2615,
45,
2595,
49,
7589,
49,
46907,
1110,
603,
453,
2673,
341,
466,
10237,
4749,
37649,
708,
5194,
120,
341,
7036,
51,
310,
8108,
1233,
299,
556,
6153,
1233,
492,
310,
8108,
1233,
29525,
299,
878,
64,
310,
317,
10237,
4749,
23903,
299,
556,
466,
10237,
4749,
23903,
45,
640,
1735,
1046,
8108,
1233,
49,
10085,
49,
16870,
1110,
310,
1035,
23903,
45,
317,
10237,
4749,
23903,
1110,
603,
1035,
1947,
6843,
492,
303,
339,
465,
453,
2672,
3147,
303,
453,
8275,
1758,
303,
453,
2672,
3147,
465,
1041,
294,
338,
9023,
341,
1277,
5446,
1674,
391,
10085,
341,
7036,
51,
294,
338,
294,
338,
496,
772,
10085,
294,
588,
303,
581,
782,
758,
14212,
45,
1277,
5446,
10085,
848,
320,
310,
317,
10237,
4749,
23903,
51,
489,
14212,
45,
10085,
1110,
303,
339,
465,
1041,
294,
338,
9023,
341,
5459,
1674,
391,
10085,
341,
7036,
51,
294,
338,
294,
338,
496,
772,
1989,
294,
588,
303,
581,
782,
758,
36703,
45,
5459,
1989,
848,
320,
310,
317,
10237,
4749,
23903,
51,
489,
36703,
45,
1989,
1110,
303,
339,
465,
1041,
294,
338,
9023,
341,
5459,
1674,
391,
10085,
341,
7036,
51,
294,
338,
294,
338,
496,
772,
1989,
294,
588,
303,
581,
782,
758,
14212,
1530,
45,
5459,
1989,
848,
320,
310,
317,
10237,
4749,
23903,
51,
489,
36703,
45,
1989,
1110,
303,
339,
465,
453,
2672,
3147,
303,
453,
31671,
23903,
4753,
303,
453,
2672,
3147,
465,
1041,
294,
338,
18034,
1429,
341,
5764,
16078,
1200,
1354,
575,
2189,
3417,
51,
294,
338,
906,
7036,
458,
5672,
829,
334,
50,
2386,
1187,
5018,
51,
294,
588,
303,
581,
782,
4549,
3663,
365,
320,
310,
8108,
1233,
51,
4558,
492,
310,
8108,
1233,
29525,
299,
878,
64,
310,
1035,
1947,
6843,
492,
303,
339,
465,
453,
2672,
3147,
303,
453,
31671,
51,
9136,
4753,
303,
453,
2672,
3147,
465,
1041,
294,
338,
18034,
1429,
341,
5764,
727,
758,
458,
27731,
51,
294,
338,
43963,
1414,
666,
1495,
477,
1431,
7045,
51,
294,
338,
19234,
8637,
15665,
341,
7036,
391,
34387,
8032,
51,
294,
588,
303,
581,
782,
27731,
365,
320,
310,
8108,
1233,
51,
4558,
492,
310,
8108,
1233,
29525,
299,
878,
64,
310,
7095,
2043,
1947,
492,
303,
339,
465,
1041,
294,
338,
18034,
1429,
331,
4005,
2282,
458,
3654,
391,
341,
5764,
727,
758,
51,
294,
338,
43963,
1414,
666,
1495,
477,
1431,
7045,
51,
294,
338,
906,
7036,
458,
38848,
115,
2703,
341,
2282,
458,
3654,
51,
294,
338,
1691,
863,
1868,
391,
1035,
331,
758,
451,
2282,
49,
580,
458,
1851,
17505,
391,
1495,
5018,
11030,
51,
294,
338,
294,
338,
496,
772,
2282,
294,
588,
303,
581,
782,
2282,
11030,
45,
6460,
55,
73,
2282,
848,
320,
310,
2282,
11030,
2042,
7599,
2043,
45,
2282,
1110,
310,
7095,
2043,
1947,
492,
303,
339,
465,
1041,
294,
338,
18034,
1429,
331,
758,
451,
5018,
458,
3654,
391,
341,
5764,
120,
727,
758,
51,
294,
338,
43963,
1414,
666,
1495,
477,
1431,
7045,
51,
294,
338,
906,
7036,
458,
38848,
115,
2703,
1187,
341,
5018,
1178,
2602,
3654,
51,
294,
338,
1691,
863,
1868,
5018,
391,
9268,
44356,
641,
2974,
904,
3654,
49,
294,
338,
1636,
863,
1868,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
]
] | 1,024 |
[
10237,
4749,
23903,
45,
640,
1735,
1046,
8108,
1233,
49,
10085,
49,
16870,
1110,
310,
1035,
23903,
45,
317,
10237,
4749,
23903,
1110,
603,
1035,
1947,
6843,
492,
303,
339,
465,
453,
2672,
3147,
303,
453,
8275,
1758,
303,
453,
2672,
3147,
465,
1041,
294,
338,
9023,
341,
1277,
5446,
1674,
391,
10085,
341,
7036,
51,
294,
338,
294,
338,
496,
772,
10085,
294,
588,
303,
581,
782,
758,
14212,
45,
1277,
5446,
10085,
848,
320,
310,
317,
10237,
4749,
23903,
51,
489,
14212,
45,
10085,
1110,
303,
339,
465,
1041,
294,
338,
9023,
341,
5459,
1674,
391,
10085,
341,
7036,
51,
294,
338,
294,
338,
496,
772,
1989,
294,
588,
303,
581,
782,
758,
36703,
45,
5459,
1989,
848,
320,
310,
317,
10237,
4749,
23903,
51,
489,
36703,
45,
1989,
1110,
303,
339,
465,
1041,
294,
338,
9023,
341,
5459,
1674,
391,
10085,
341,
7036,
51,
294,
338,
294,
338,
496,
772,
1989,
294,
588,
303,
581,
782,
758,
14212,
1530,
45,
5459,
1989,
848,
320,
310,
317,
10237,
4749,
23903,
51,
489,
36703,
45,
1989,
1110,
303,
339,
465,
453,
2672,
3147,
303,
453,
31671,
23903,
4753,
303,
453,
2672,
3147,
465,
1041,
294,
338,
18034,
1429,
341,
5764,
16078,
1200,
1354,
575,
2189,
3417,
51,
294,
338,
906,
7036,
458,
5672,
829,
334,
50,
2386,
1187,
5018,
51,
294,
588,
303,
581,
782,
4549,
3663,
365,
320,
310,
8108,
1233,
51,
4558,
492,
310,
8108,
1233,
29525,
299,
878,
64,
310,
1035,
1947,
6843,
492,
303,
339,
465,
453,
2672,
3147,
303,
453,
31671,
51,
9136,
4753,
303,
453,
2672,
3147,
465,
1041,
294,
338,
18034,
1429,
341,
5764,
727,
758,
458,
27731,
51,
294,
338,
43963,
1414,
666,
1495,
477,
1431,
7045,
51,
294,
338,
19234,
8637,
15665,
341,
7036,
391,
34387,
8032,
51,
294,
588
] | -8,652,238,626,724,049,000 | true | false | false | false |
[
338,
496,
772,
1989,
294,
588,
303,
581,
782,
758,
14212,
1530,
45,
5459,
1989,
848,
320,
310,
317,
10237,
4749,
23903,
51,
489,
36703,
45,
1989,
1110,
303,
339,
465,
453,
2672,
3147,
303,
453,
31671,
23903,
4753,
303,
453,
2672,
3147,
465,
1041,
294,
338,
18034,
1429,
341,
5764,
16078,
1200,
1354,
575,
2189,
3417,
51,
294,
338,
906,
7036,
458,
5672,
829,
334,
50,
2386,
1187,
5018,
51,
294,
588,
303,
581,
782,
4549,
3663,
365,
320,
310,
8108,
1233,
51,
4558,
492,
310,
8108,
1233,
29525,
299,
878,
64,
310,
1035,
1947,
6843,
492,
303,
339
] | -9,043,049,934,694,770,000 | true |
hetShapeGraphic( getComponent(), generalPath, stroke, paint );
addGraphic( phetShapeGraphic );
addAllPoints();
}
//----------------------------------------------------------------------------
// Accessors
//----------------------------------------------------------------------------
/**
* Sets the Stroke used to stroke the plot.
*
* @param stroke
*/
public void setStroke( Stroke stroke ) {
phetShapeGraphic.setStroke( stroke );
}
/**
* Sets the Color used to stroke the plot.
*
* @param color
*/
public void setBorderColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
/**
* Sets the Color used to stroke the plot.
*
* @param color
*/
public void setStrokeColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
//----------------------------------------------------------------------------
// DataSetGraphic implementation
//----------------------------------------------------------------------------
/**
* Called when the associated Chart's size or range changes.
* The plot is reset by re-adding all points.
*/
public void transformChanged() {
generalPath.reset();
generalPathIsEmpty = true;
addAllPoints();
}
|
used to stroke the plot.
*
* @param stroke
*/
public void setStroke( Stroke stroke ) {
phetShapeGraphic.setStroke( stroke );
}
/**
* Sets the Color used to stroke the plot.
*
* @param color
*/
public void setBorderColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
/**
* Sets the Color used to stroke the plot.
*
* @param color
*/
public void setStrokeColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
//----------------------------------------------------------------------------
// DataSetGraphic implementation
//----------------------------------------------------------------------------
/**
* Called when the associated Chart's size or range changes.
* The plot is reset by re-adding all points.
*/
public void transformChanged() {
generalPath.reset();
generalPathIsEmpty = true;
addAllPoints();
}
|
plot.
*
* @param color
*/
public void setBorderColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
/**
* Sets the Color used to stroke the plot.
*
* @param color
*/
public void setStrokeColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
//----------------------------------------------------------------------------
// DataSetGraphic implementation
//----------------------------------------------------------------------------
/**
* Called when the associated Chart's size or range changes.
* The plot is reset by re-adding all points.
*/
public void transformChanged() {
generalPath.reset();
generalPathIsEmpty = true;
addAllPoints();
}
|
* @param color
*/
public void setStrokeColor( Color color ) {
phetShapeGraphic.setBorderColor( color );
}
//----------------------------------------------------------------------------
// DataSetGraphic implementation
//----------------------------------------------------------------------------
/**
* Called when the associated Chart's size or range changes.
* The plot is reset by re-adding all points.
*/
public void transformChanged() {
generalPath.reset();
generalPathIsEmpty = true;
addAllPoints();
}
|
//----------------------------------------------------------------------------
// DataSet.Observer implementation
//----------------------------------------------------------------------------
/**
* Called when the associated data set is cleared.
* Clients should not call this method directly.
* Effectively causes the plot to erase itself.
*/
|
This dataset consists of the attack samples used for the paper "How Much Do Code Language Models Remember? An Investigation on Data Extraction Attacks before and after Fine-tuning"
We have two splits:
fine-tuning attack, which consists of selected samples coming from the fine-tuning setpre-training attack, which consists of selected samples coming from the TheStack-v2 on the Java sectionWe have different splits depending on the duplication rate of the samples:
d1 the samples inside the training set are uniqued2 the samples inside the training set are present two timesd3 the samples inside the training set are present three timesdg3 the samples inside the training set are present more than three times