Search is not available for this dataset
hexsha
stringlengths
40
40
repo
stringlengths
6
126
path
stringlengths
6
1.02k
license
sequence
language
stringclasses
1 value
identifier
stringlengths
1
220
return_type
stringlengths
1
110
original_string
stringlengths
39
223k
original_docstring
stringlengths
16
34.8k
docstring
stringlengths
11
3.41k
docstring_tokens
sequence
code
stringlengths
26
223k
code_tokens
sequence
short_docstring
stringlengths
0
3.02k
short_docstring_tokens
sequence
comment
sequence
parameters
list
docstring_params
dict
input_ids
sequence
attention_mask
sequence
labels
sequence
32073c837feb515bae05b5fcda59b3abf151c592
Hurence/historian
historian-server/src/main/java/com/hurence/webapiservice/http/api/ingestion/util/DataConverter.java
[ "Apache-2.0" ]
Java
toDouble
Object
private Object toDouble(Object value) { try { return Double.parseDouble(Objects.toString(value).replaceAll("\\s+","")); }catch (Exception e) { return value; } }
/** * @param value Object * * get the value as double if possible. * */
@param value Object get the value as double if possible.
[ "@param", "value", "Object", "get", "the", "value", "as", "double", "if", "possible", "." ]
private Object toDouble(Object value) { try { return Double.parseDouble(Objects.toString(value).replaceAll("\\s+","")); }catch (Exception e) { return value; } }
[ "private", "Object", "toDouble", "(", "Object", "value", ")", "{", "try", "{", "return", "Double", ".", "parseDouble", "(", "Objects", ".", "toString", "(", "value", ")", ".", "replaceAll", "(", "\"\\\\s+\"", ",", "\"\"", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "value", ";", "}", "}" ]
@param value Object get the value as double if possible.
[ "@param", "value", "Object", "get", "the", "value", "as", "double", "if", "possible", "." ]
[]
[ { "param": "value", "type": "Object" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "value", "type": "Object", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1033, 358, 5265, 12, 921, 460, 13, 288, 203, 3639, 775, 288, 203, 5411, 327, 3698, 18, 2670, 5265, 12, 4710, 18, 10492, 12, 1132, 2934, 2079, 1595, 2932, 1695, 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 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
32073c837feb515bae05b5fcda59b3abf151c592
Hurence/historian
historian-server/src/main/java/com/hurence/webapiservice/http/api/ingestion/util/DataConverter.java
[ "Apache-2.0" ]
Java
toFloat
Object
private Object toFloat(Object value) { try { return Float.parseFloat(Objects.toString(value).replaceAll("\\s+","")); }catch (Exception e) { return value; } }
/** * @param value Object * * get the value as Float if possible. * */
@param value Object get the value as Float if possible.
[ "@param", "value", "Object", "get", "the", "value", "as", "Float", "if", "possible", "." ]
private Object toFloat(Object value) { try { return Float.parseFloat(Objects.toString(value).replaceAll("\\s+","")); }catch (Exception e) { return value; } }
[ "private", "Object", "toFloat", "(", "Object", "value", ")", "{", "try", "{", "return", "Float", ".", "parseFloat", "(", "Objects", ".", "toString", "(", "value", ")", ".", "replaceAll", "(", "\"\\\\s+\"", ",", "\"\"", ")", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "return", "value", ";", "}", "}" ]
@param value Object get the value as Float if possible.
[ "@param", "value", "Object", "get", "the", "value", "as", "Float", "if", "possible", "." ]
[]
[ { "param": "value", "type": "Object" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "value", "type": "Object", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1033, 358, 4723, 12, 921, 460, 13, 288, 203, 3639, 775, 288, 203, 5411, 327, 5450, 18, 2670, 4723, 12,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, 326, 460, 487, 5450, 309, 3323, 18, 203, 377, 380, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5827a95c43f8dc0c3d099724dc44aafb5ace8ef4
Hurence/historian
historian-timeseries/src/test/java/com/hurence/timeseries/forecasting/ForecasterTest.java
[ "Apache-2.0" ]
Java
rootMeanSquaredErrorDouble
null
private static double rootMeanSquaredErrorDouble (List<Double> measured, List<Double> forecasted) { double mse = 0; for (int i=0;i<forecasted.size();i++) { mse += Math.pow(measured.get(i) - forecasted.get(i), 2); } return Math.sqrt(mse / forecasted.size()); }
/** * Compute the Root Mean Squared between 2 lists of double value * * @param measured data * @param forecasted data * @return RMS */
Compute the Root Mean Squared between 2 lists of double value @param measured data @param forecasted data @return RMS
[ "Compute", "the", "Root", "Mean", "Squared", "between", "2", "lists", "of", "double", "value", "@param", "measured", "data", "@param", "forecasted", "data", "@return", "RMS" ]
private static double rootMeanSquaredErrorDouble (List<Double> measured, List<Double> forecasted) { double mse = 0; for (int i=0;i<forecasted.size();i++) { mse += Math.pow(measured.get(i) - forecasted.get(i), 2); } return Math.sqrt(mse / forecasted.size()); }
[ "private", "static", "double", "rootMeanSquaredErrorDouble", "(", "List", "<", "Double", ">", "measured", ",", "List", "<", "Double", ">", "forecasted", ")", "{", "double", "mse", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "forecasted", ".", "size", "(", ")", ";", "i", "++", ")", "{", "mse", "+=", "Math", ".", "pow", "(", "measured", ".", "get", "(", "i", ")", "-", "forecasted", ".", "get", "(", "i", ")", ",", "2", ")", ";", "}", "return", "Math", ".", "sqrt", "(", "mse", "/", "forecasted", ".", "size", "(", ")", ")", ";", "}" ]
Compute the Root Mean Squared between 2 lists of double value @param measured data @param forecasted data @return RMS
[ "Compute", "the", "Root", "Mean", "Squared", "between", "2", "lists", "of", "double", "value", "@param", "measured", "data", "@param", "forecasted", "data", "@return", "RMS" ]
[]
[ { "param": "measured", "type": "List<Double>" }, { "param": "forecasted", "type": "List<Double>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "measured", "type": "List<Double>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "forecasted", "type": "List<Double>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 1645, 1365, 15312, 20888, 668, 5265, 261, 682, 32, 5265, 34, 22221, 16, 987, 32, 5265, 34, 18763, 329, 13, 288, 203, 3639, 1645, 18689, 273, 374, 31, 203, 3639, 364, 261, 474, 277, 33, 20, 31, 77, 32, 1405, 4155, 329, 18, 1467, 5621, 77, 27245, 288, 203, 5411, 18689, 1011, 2361, 18, 23509, 12, 21992, 2862, 18, 588, 12, 77, 13, 300, 18763, 329, 18, 588, 12, 77, 3631, 576, 1769, 203, 3639, 289, 203, 3639, 327, 2361, 18, 24492, 12, 81, 307, 342, 18763, 329, 18, 1467, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 8155, 326, 7450, 21979, 348, 11903, 3086, 576, 6035, 434, 1645, 460, 203, 377, 380, 203, 377, 380, 632, 891, 22221, 501, 203, 377, 380, 632, 891, 18763, 329, 501, 203, 377, 380, 632, 2463, 534, 3537, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5827a95c43f8dc0c3d099724dc44aafb5ace8ef4
Hurence/historian
historian-timeseries/src/test/java/com/hurence/timeseries/forecasting/ForecasterTest.java
[ "Apache-2.0" ]
Java
rootMeanSquaredErrorMeasure
null
private static double rootMeanSquaredErrorMeasure(List<Measure> measured, List<Measure> forecasted) { double mse = 0; for (int i=0;i<forecasted.size();i++) { mse += Math.pow(measured.get(i).getValue() - forecasted.get(i).getValue(), 2); } return Math.sqrt(mse / forecasted.size()); }
/** * Compute the Root Mean Squared between 2 lists of Measure value * * @param measured data * @param forecasted data * @return RMS */
Compute the Root Mean Squared between 2 lists of Measure value @param measured data @param forecasted data @return RMS
[ "Compute", "the", "Root", "Mean", "Squared", "between", "2", "lists", "of", "Measure", "value", "@param", "measured", "data", "@param", "forecasted", "data", "@return", "RMS" ]
private static double rootMeanSquaredErrorMeasure(List<Measure> measured, List<Measure> forecasted) { double mse = 0; for (int i=0;i<forecasted.size();i++) { mse += Math.pow(measured.get(i).getValue() - forecasted.get(i).getValue(), 2); } return Math.sqrt(mse / forecasted.size()); }
[ "private", "static", "double", "rootMeanSquaredErrorMeasure", "(", "List", "<", "Measure", ">", "measured", ",", "List", "<", "Measure", ">", "forecasted", ")", "{", "double", "mse", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "forecasted", ".", "size", "(", ")", ";", "i", "++", ")", "{", "mse", "+=", "Math", ".", "pow", "(", "measured", ".", "get", "(", "i", ")", ".", "getValue", "(", ")", "-", "forecasted", ".", "get", "(", "i", ")", ".", "getValue", "(", ")", ",", "2", ")", ";", "}", "return", "Math", ".", "sqrt", "(", "mse", "/", "forecasted", ".", "size", "(", ")", ")", ";", "}" ]
Compute the Root Mean Squared between 2 lists of Measure value @param measured data @param forecasted data @return RMS
[ "Compute", "the", "Root", "Mean", "Squared", "between", "2", "lists", "of", "Measure", "value", "@param", "measured", "data", "@param", "forecasted", "data", "@return", "RMS" ]
[]
[ { "param": "measured", "type": "List<Measure>" }, { "param": "forecasted", "type": "List<Measure>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "measured", "type": "List<Measure>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "forecasted", "type": "List<Measure>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 1645, 1365, 15312, 20888, 668, 7197, 12, 682, 32, 7197, 34, 22221, 16, 987, 32, 7197, 34, 18763, 329, 13, 288, 203, 3639, 1645, 18689, 273, 374, 31, 203, 3639, 364, 261, 474, 277, 33, 20, 31, 77, 32, 1405, 4155, 329, 18, 1467, 5621, 77, 27245, 288, 203, 5411, 18689, 1011, 2361, 18, 23509, 12, 21992, 2862, 18, 588, 12, 77, 2934, 24805, 1435, 300, 18763, 329, 18, 588, 12, 77, 2934, 24805, 9334, 576, 1769, 203, 3639, 289, 203, 3639, 327, 2361, 18, 24492, 12, 81, 307, 342, 18763, 329, 18, 1467, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 8155, 326, 7450, 21979, 348, 11903, 3086, 576, 6035, 434, 13544, 460, 203, 377, 380, 203, 377, 380, 632, 891, 22221, 501, 203, 377, 380, 632, 891, 18763, 329, 501, 203, 377, 380, 632, 2463, 534, 3537, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5827a95c43f8dc0c3d099724dc44aafb5ace8ef4
Hurence/historian
historian-timeseries/src/test/java/com/hurence/timeseries/forecasting/ForecasterTest.java
[ "Apache-2.0" ]
Java
csvWriter
null
private static void csvWriter(String algo, String args) throws IOException { FileWriter pw = null; File file = new File("src/test/resources/data/results_forecasting/" + algo + "_java.csv"); try { pw = new FileWriter(file); } catch (IOException e) { e.printStackTrace(); } String columnNamesList = "metric_id,mean_squared_error,training_time,inference_time"; String builder = columnNamesList + "\n" + args; assert pw != null; pw.write(builder); pw.close(); System.out.println("done!"); }
/** * create a csv file named 'algo'_java and write 'args' in the file * * @param algo name for the file * @param args data to write in the file * @throws IOException */
create a csv file named 'algo'_java and write 'args' in the file @param algo name for the file @param args data to write in the file @throws IOException
[ "create", "a", "csv", "file", "named", "'", "algo", "'", "_java", "and", "write", "'", "args", "'", "in", "the", "file", "@param", "algo", "name", "for", "the", "file", "@param", "args", "data", "to", "write", "in", "the", "file", "@throws", "IOException" ]
private static void csvWriter(String algo, String args) throws IOException { FileWriter pw = null; File file = new File("src/test/resources/data/results_forecasting/" + algo + "_java.csv"); try { pw = new FileWriter(file); } catch (IOException e) { e.printStackTrace(); } String columnNamesList = "metric_id,mean_squared_error,training_time,inference_time"; String builder = columnNamesList + "\n" + args; assert pw != null; pw.write(builder); pw.close(); System.out.println("done!"); }
[ "private", "static", "void", "csvWriter", "(", "String", "algo", ",", "String", "args", ")", "throws", "IOException", "{", "FileWriter", "pw", "=", "null", ";", "File", "file", "=", "new", "File", "(", "\"src/test/resources/data/results_forecasting/\"", "+", "algo", "+", "\"_java.csv\"", ")", ";", "try", "{", "pw", "=", "new", "FileWriter", "(", "file", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "String", "columnNamesList", "=", "\"metric_id,mean_squared_error,training_time,inference_time\"", ";", "String", "builder", "=", "columnNamesList", "+", "\"\\n\"", "+", "args", ";", "assert", "pw", "!=", "null", ";", "pw", ".", "write", "(", "builder", ")", ";", "pw", ".", "close", "(", ")", ";", "System", ".", "out", ".", "println", "(", "\"done!\"", ")", ";", "}" ]
create a csv file named 'algo'_java and write 'args' in the file @param algo name for the file @param args data to write in the file @throws IOException
[ "create", "a", "csv", "file", "named", "'", "algo", "'", "_java", "and", "write", "'", "args", "'", "in", "the", "file", "@param", "algo", "name", "for", "the", "file", "@param", "args", "data", "to", "write", "in", "the", "file", "@throws", "IOException" ]
[]
[ { "param": "algo", "type": "String" }, { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "algo", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 918, 6101, 2289, 12, 780, 13901, 16, 514, 833, 13, 1216, 1860, 288, 203, 3639, 24639, 8772, 273, 446, 31, 203, 3639, 1387, 585, 273, 394, 1387, 2932, 4816, 19, 3813, 19, 4683, 19, 892, 19, 4717, 67, 1405, 4155, 310, 4898, 397, 13901, 397, 4192, 6290, 18, 6715, 8863, 203, 3639, 775, 288, 203, 5411, 8772, 273, 394, 24639, 12, 768, 1769, 203, 3639, 289, 1044, 261, 14106, 425, 13, 288, 203, 5411, 425, 18, 1188, 6332, 5621, 203, 3639, 289, 203, 3639, 514, 19975, 682, 273, 315, 6899, 67, 350, 16, 7079, 67, 87, 11903, 67, 1636, 16, 17584, 67, 957, 16, 267, 1134, 67, 957, 14432, 203, 3639, 514, 2089, 273, 19975, 682, 397, 1548, 82, 6, 397, 833, 31, 203, 3639, 1815, 8772, 480, 446, 31, 203, 3639, 8772, 18, 2626, 12, 9574, 1769, 203, 3639, 8772, 18, 4412, 5621, 203, 3639, 2332, 18, 659, 18, 8222, 2932, 8734, 4442, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 377, 380, 203, 377, 380, 632, 891, 13901, 508, 364, 326, 585, 203, 377, 380, 632, 891, 833, 501, 358, 1045, 316, 326, 585, 203, 377, 380, 632, 15069, 1860, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5827a95c43f8dc0c3d099724dc44aafb5ace8ef4
Hurence/historian
historian-timeseries/src/test/java/com/hurence/timeseries/forecasting/ForecasterTest.java
[ "Apache-2.0" ]
Java
recorderNN
null
private static void recorderNN(Forecaster forecaster, String algo) throws IOException { File filePath = new File("src/test/resources/data/split_data/"); File[] files = filePath.listFiles(); String result = ""; for (File file : files) { if(file != null) { List<Measure> inputs = getInputMeasureData("split_data/" + file.getName()); numPoints = (int) (inputs.size()*0.67); List<Measure> training = inputs.subList(0, inputs.size() - numPoints); List<Measure> validating = inputs.subList(inputs.size()-numPoints, inputs.size()); double debut = System.currentTimeMillis(); forecaster.fit(training, validating); double fin = System.currentTimeMillis(); double fTime = (fin - debut)/1000; debut = System.currentTimeMillis(); List<Measure> forecasted = forecaster.forecast(validating, numPoints); fin = System.currentTimeMillis(); double iTime = (fin - debut)/1000; Double mse = rootMeanSquaredErrorMeasure(validating, forecasted); if (!(mse.isNaN())) { result = result + file.getName() +","+mse+","+fTime+","+iTime+"\n"; } } } csvWriter(algo, result); }
/** * Iterate on all files in resources/data/split_data and forecasted the last 1/3 data of each file * then it save the result using csvWriter * * @param forecaster used to forecast * @param algo name of the forecaster * @throws IOException */
Iterate on all files in resources/data/split_data and forecasted the last 1/3 data of each file then it save the result using csvWriter @param forecaster used to forecast @param algo name of the forecaster @throws IOException
[ "Iterate", "on", "all", "files", "in", "resources", "/", "data", "/", "split_data", "and", "forecasted", "the", "last", "1", "/", "3", "data", "of", "each", "file", "then", "it", "save", "the", "result", "using", "csvWriter", "@param", "forecaster", "used", "to", "forecast", "@param", "algo", "name", "of", "the", "forecaster", "@throws", "IOException" ]
private static void recorderNN(Forecaster forecaster, String algo) throws IOException { File filePath = new File("src/test/resources/data/split_data/"); File[] files = filePath.listFiles(); String result = ""; for (File file : files) { if(file != null) { List<Measure> inputs = getInputMeasureData("split_data/" + file.getName()); numPoints = (int) (inputs.size()*0.67); List<Measure> training = inputs.subList(0, inputs.size() - numPoints); List<Measure> validating = inputs.subList(inputs.size()-numPoints, inputs.size()); double debut = System.currentTimeMillis(); forecaster.fit(training, validating); double fin = System.currentTimeMillis(); double fTime = (fin - debut)/1000; debut = System.currentTimeMillis(); List<Measure> forecasted = forecaster.forecast(validating, numPoints); fin = System.currentTimeMillis(); double iTime = (fin - debut)/1000; Double mse = rootMeanSquaredErrorMeasure(validating, forecasted); if (!(mse.isNaN())) { result = result + file.getName() +","+mse+","+fTime+","+iTime+"\n"; } } } csvWriter(algo, result); }
[ "private", "static", "void", "recorderNN", "(", "Forecaster", "forecaster", ",", "String", "algo", ")", "throws", "IOException", "{", "File", "filePath", "=", "new", "File", "(", "\"src/test/resources/data/split_data/\"", ")", ";", "File", "[", "]", "files", "=", "filePath", ".", "listFiles", "(", ")", ";", "String", "result", "=", "\"\"", ";", "for", "(", "File", "file", ":", "files", ")", "{", "if", "(", "file", "!=", "null", ")", "{", "List", "<", "Measure", ">", "inputs", "=", "getInputMeasureData", "(", "\"split_data/\"", "+", "file", ".", "getName", "(", ")", ")", ";", "numPoints", "=", "(", "int", ")", "(", "inputs", ".", "size", "(", ")", "*", "0.67", ")", ";", "List", "<", "Measure", ">", "training", "=", "inputs", ".", "subList", "(", "0", ",", "inputs", ".", "size", "(", ")", "-", "numPoints", ")", ";", "List", "<", "Measure", ">", "validating", "=", "inputs", ".", "subList", "(", "inputs", ".", "size", "(", ")", "-", "numPoints", ",", "inputs", ".", "size", "(", ")", ")", ";", "double", "debut", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "forecaster", ".", "fit", "(", "training", ",", "validating", ")", ";", "double", "fin", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "double", "fTime", "=", "(", "fin", "-", "debut", ")", "/", "1000", ";", "debut", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "List", "<", "Measure", ">", "forecasted", "=", "forecaster", ".", "forecast", "(", "validating", ",", "numPoints", ")", ";", "fin", "=", "System", ".", "currentTimeMillis", "(", ")", ";", "double", "iTime", "=", "(", "fin", "-", "debut", ")", "/", "1000", ";", "Double", "mse", "=", "rootMeanSquaredErrorMeasure", "(", "validating", ",", "forecasted", ")", ";", "if", "(", "!", "(", "mse", ".", "isNaN", "(", ")", ")", ")", "{", "result", "=", "result", "+", "file", ".", "getName", "(", ")", "+", "\",\"", "+", "mse", "+", "\",\"", "+", "fTime", "+", "\",\"", "+", "iTime", "+", "\"\\n\"", ";", "}", "}", "}", "csvWriter", "(", "algo", ",", "result", ")", ";", "}" ]
Iterate on all files in resources/data/split_data and forecasted the last 1/3 data of each file then it save the result using csvWriter
[ "Iterate", "on", "all", "files", "in", "resources", "/", "data", "/", "split_data", "and", "forecasted", "the", "last", "1", "/", "3", "data", "of", "each", "file", "then", "it", "save", "the", "result", "using", "csvWriter" ]
[]
[ { "param": "forecaster", "type": "Forecaster" }, { "param": "algo", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "forecaster", "type": "Forecaster", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "algo", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 918, 15766, 12225, 12, 13573, 23748, 895, 23748, 16, 514, 13901, 13, 1216, 1860, 288, 203, 3639, 1387, 4612, 273, 394, 1387, 2932, 4816, 19, 3813, 19, 4683, 19, 892, 19, 4939, 67, 892, 4898, 1769, 203, 3639, 1387, 8526, 1390, 273, 4612, 18, 1098, 2697, 5621, 203, 3639, 514, 563, 273, 1408, 31, 203, 3639, 364, 261, 812, 585, 294, 1390, 13, 288, 203, 5411, 309, 12, 768, 480, 446, 13, 288, 203, 7734, 987, 32, 7197, 34, 4540, 273, 12353, 7197, 751, 2932, 4939, 67, 892, 4898, 397, 585, 18, 17994, 10663, 203, 7734, 818, 5636, 273, 261, 474, 13, 261, 10029, 18, 1467, 1435, 14, 20, 18, 9599, 1769, 203, 7734, 987, 32, 7197, 34, 8277, 273, 4540, 18, 1717, 682, 12, 20, 16, 4540, 18, 1467, 1435, 300, 818, 5636, 1769, 203, 7734, 987, 32, 7197, 34, 18075, 273, 4540, 18, 1717, 682, 12, 10029, 18, 1467, 1435, 17, 2107, 5636, 16, 4540, 18, 1467, 10663, 203, 203, 7734, 1645, 443, 12885, 273, 2332, 18, 2972, 28512, 5621, 203, 7734, 895, 23748, 18, 7216, 12, 17584, 16, 18075, 1769, 203, 7734, 1645, 574, 273, 2332, 18, 2972, 28512, 5621, 203, 7734, 1645, 284, 950, 273, 261, 926, 300, 443, 12885, 13176, 18088, 31, 203, 203, 7734, 443, 12885, 273, 2332, 18, 2972, 28512, 5621, 203, 7734, 987, 32, 7197, 34, 18763, 329, 273, 895, 23748, 18, 1405, 4155, 12, 877, 1776, 16, 818, 5636, 1769, 203, 7734, 574, 273, 2332, 18, 2972, 28512, 5621, 203, 7734, 1645, 277, 950, 273, 261, 926, 300, 443, 12885, 13176, 18088, 31, 203, 203, 7734, 3698, 18689, 273, 1365, 15312, 20888, 668, 7197, 12, 877, 1776, 16, 18763, 329, 1769, 203, 7734, 309, 16051, 12, 81, 307, 18, 291, 21172, 1435, 3719, 288, 203, 10792, 563, 273, 563, 397, 585, 18, 17994, 1435, 397, 15937, 15, 81, 307, 15, 15937, 15, 74, 950, 15, 15937, 15, 77, 950, 9078, 64, 82, 14432, 203, 7734, 289, 203, 5411, 289, 203,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 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 11436, 603, 777, 1390, 316, 2703, 19, 892, 19, 4939, 67, 892, 471, 18763, 329, 326, 1142, 404, 19, 23, 501, 434, 1517, 585, 203, 377, 380, 1508, 518, 1923, 326, 563, 1450, 6101, 2289, 203, 377, 380, 203, 377, 380, 632, 891, 895, 23748, 1399, 358, 18763, 203, 377, 380, 632, 891, 13901, 508, 434, 326, 895, 23748, 203, 377, 380, 632, 15069, 1860, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
90cfb0c2d837f5c658ee32fcc6e742b8d72f0fee
Hurence/historian
historian-server/src/main/java/com/hurence/webapiservice/historian/models/MetricsSizeInfoImpl.java
[ "Apache-2.0" ]
Java
increaseNumberOfPointsForMetricRequest
null
public void increaseNumberOfPointsForMetricRequest(MetricRequest metricRequest, long numberOfPoints) { if (metricsInfo.containsKey(metricRequest)) { metricsInfo.get(metricRequest).totalNumberOfPoints += numberOfPoints; } else { MetricSizeInfo metricInfo = new MetricSizeInfo(); metricInfo.totalNumberOfPoints = numberOfPoints; metricInfo.metricRequest = metricRequest; setMetricInfo(metricInfo); } }
/** * increase the number of point of MetricSizeInfo corresponding to this metricRequest if it already exist otherwise add a * new MetricSizeInfo with this metricRequest initialized with numberOfPoints. * @param metricRequest * @param numberOfPoints */
increase the number of point of MetricSizeInfo corresponding to this metricRequest if it already exist otherwise add a new MetricSizeInfo with this metricRequest initialized with numberOfPoints. @param metricRequest @param numberOfPoints
[ "increase", "the", "number", "of", "point", "of", "MetricSizeInfo", "corresponding", "to", "this", "metricRequest", "if", "it", "already", "exist", "otherwise", "add", "a", "new", "MetricSizeInfo", "with", "this", "metricRequest", "initialized", "with", "numberOfPoints", ".", "@param", "metricRequest", "@param", "numberOfPoints" ]
public void increaseNumberOfPointsForMetricRequest(MetricRequest metricRequest, long numberOfPoints) { if (metricsInfo.containsKey(metricRequest)) { metricsInfo.get(metricRequest).totalNumberOfPoints += numberOfPoints; } else { MetricSizeInfo metricInfo = new MetricSizeInfo(); metricInfo.totalNumberOfPoints = numberOfPoints; metricInfo.metricRequest = metricRequest; setMetricInfo(metricInfo); } }
[ "public", "void", "increaseNumberOfPointsForMetricRequest", "(", "MetricRequest", "metricRequest", ",", "long", "numberOfPoints", ")", "{", "if", "(", "metricsInfo", ".", "containsKey", "(", "metricRequest", ")", ")", "{", "metricsInfo", ".", "get", "(", "metricRequest", ")", ".", "totalNumberOfPoints", "+=", "numberOfPoints", ";", "}", "else", "{", "MetricSizeInfo", "metricInfo", "=", "new", "MetricSizeInfo", "(", ")", ";", "metricInfo", ".", "totalNumberOfPoints", "=", "numberOfPoints", ";", "metricInfo", ".", "metricRequest", "=", "metricRequest", ";", "setMetricInfo", "(", "metricInfo", ")", ";", "}", "}" ]
increase the number of point of MetricSizeInfo corresponding to this metricRequest if it already exist otherwise add a new MetricSizeInfo with this metricRequest initialized with numberOfPoints.
[ "increase", "the", "number", "of", "point", "of", "MetricSizeInfo", "corresponding", "to", "this", "metricRequest", "if", "it", "already", "exist", "otherwise", "add", "a", "new", "MetricSizeInfo", "with", "this", "metricRequest", "initialized", "with", "numberOfPoints", "." ]
[]
[ { "param": "metricRequest", "type": "MetricRequest" }, { "param": "numberOfPoints", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "metricRequest", "type": "MetricRequest", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "numberOfPoints", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 10929, 9226, 5636, 1290, 5396, 691, 12, 5396, 691, 3999, 691, 16, 1525, 7922, 5636, 13, 288, 203, 3639, 309, 261, 9597, 966, 18, 12298, 653, 12, 6899, 691, 3719, 288, 203, 5411, 4309, 966, 18, 588, 12, 6899, 691, 2934, 4963, 9226, 5636, 1011, 7922, 5636, 31, 203, 3639, 289, 469, 288, 203, 5411, 7279, 1225, 966, 3999, 966, 273, 394, 7279, 1225, 966, 5621, 203, 5411, 3999, 966, 18, 4963, 9226, 5636, 273, 7922, 5636, 31, 203, 5411, 3999, 966, 18, 6899, 691, 273, 3999, 691, 31, 203, 5411, 444, 5396, 966, 12, 6899, 966, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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203, 377, 380, 10929, 326, 1300, 434, 1634, 434, 7279, 1225, 966, 4656, 358, 333, 3999, 691, 309, 518, 1818, 1005, 3541, 527, 279, 203, 377, 380, 394, 7279, 1225, 966, 598, 333, 3999, 691, 6454, 598, 7922, 5636, 18, 203, 377, 380, 632, 891, 3999, 691, 203, 377, 380, 632, 891, 7922, 5636, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
90cfb0c2d837f5c658ee32fcc6e742b8d72f0fee
Hurence/historian
historian-server/src/main/java/com/hurence/webapiservice/historian/models/MetricsSizeInfoImpl.java
[ "Apache-2.0" ]
Java
increaseNumberOfChunksForMetricRequest
null
public void increaseNumberOfChunksForMetricRequest(MetricRequest metricRequest, long numberOfChunks) { if (metricsInfo.containsKey(metricRequest)) { metricsInfo.get(metricRequest).totalNumberOfChunks += numberOfChunks;; } else { MetricSizeInfo metricInfo = new MetricSizeInfo(); metricInfo.totalNumberOfChunks = numberOfChunks;; metricInfo.metricRequest = metricRequest; setMetricInfo(metricInfo); } }
/** * increase the number of chunks of MetricSizeInfo corresponding to this metricRequest if it already exist otherwise add a * new MetricSizeInfo with this metricRequest initialized with numberOfChunks. * @param metricRequest * @param numberOfChunks */
increase the number of chunks of MetricSizeInfo corresponding to this metricRequest if it already exist otherwise add a new MetricSizeInfo with this metricRequest initialized with numberOfChunks. @param metricRequest @param numberOfChunks
[ "increase", "the", "number", "of", "chunks", "of", "MetricSizeInfo", "corresponding", "to", "this", "metricRequest", "if", "it", "already", "exist", "otherwise", "add", "a", "new", "MetricSizeInfo", "with", "this", "metricRequest", "initialized", "with", "numberOfChunks", ".", "@param", "metricRequest", "@param", "numberOfChunks" ]
public void increaseNumberOfChunksForMetricRequest(MetricRequest metricRequest, long numberOfChunks) { if (metricsInfo.containsKey(metricRequest)) { metricsInfo.get(metricRequest).totalNumberOfChunks += numberOfChunks;; } else { MetricSizeInfo metricInfo = new MetricSizeInfo(); metricInfo.totalNumberOfChunks = numberOfChunks;; metricInfo.metricRequest = metricRequest; setMetricInfo(metricInfo); } }
[ "public", "void", "increaseNumberOfChunksForMetricRequest", "(", "MetricRequest", "metricRequest", ",", "long", "numberOfChunks", ")", "{", "if", "(", "metricsInfo", ".", "containsKey", "(", "metricRequest", ")", ")", "{", "metricsInfo", ".", "get", "(", "metricRequest", ")", ".", "totalNumberOfChunks", "+=", "numberOfChunks", ";", ";", "}", "else", "{", "MetricSizeInfo", "metricInfo", "=", "new", "MetricSizeInfo", "(", ")", ";", "metricInfo", ".", "totalNumberOfChunks", "=", "numberOfChunks", ";", ";", "metricInfo", ".", "metricRequest", "=", "metricRequest", ";", "setMetricInfo", "(", "metricInfo", ")", ";", "}", "}" ]
increase the number of chunks of MetricSizeInfo corresponding to this metricRequest if it already exist otherwise add a new MetricSizeInfo with this metricRequest initialized with numberOfChunks.
[ "increase", "the", "number", "of", "chunks", "of", "MetricSizeInfo", "corresponding", "to", "this", "metricRequest", "if", "it", "already", "exist", "otherwise", "add", "a", "new", "MetricSizeInfo", "with", "this", "metricRequest", "initialized", "with", "numberOfChunks", "." ]
[]
[ { "param": "metricRequest", "type": "MetricRequest" }, { "param": "numberOfChunks", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "metricRequest", "type": "MetricRequest", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "numberOfChunks", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 10929, 9226, 14975, 1290, 5396, 691, 12, 5396, 691, 3999, 691, 16, 1525, 7922, 14975, 13, 288, 203, 3639, 309, 261, 9597, 966, 18, 12298, 653, 12, 6899, 691, 3719, 288, 203, 5411, 4309, 966, 18, 588, 12, 6899, 691, 2934, 4963, 9226, 14975, 1011, 7922, 14975, 25708, 203, 3639, 289, 469, 288, 203, 5411, 7279, 1225, 966, 3999, 966, 273, 394, 7279, 1225, 966, 5621, 203, 5411, 3999, 966, 18, 4963, 9226, 14975, 273, 7922, 14975, 25708, 203, 5411, 3999, 966, 18, 6899, 691, 273, 3999, 691, 31, 203, 5411, 444, 5396, 966, 12, 6899, 966, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 434, 6055, 434, 7279, 1225, 966, 4656, 358, 333, 3999, 691, 309, 518, 1818, 1005, 3541, 527, 279, 203, 377, 380, 394, 7279, 1225, 966, 598, 333, 3999, 691, 6454, 598, 7922, 14975, 18, 203, 377, 380, 632, 891, 3999, 691, 203, 377, 380, 632, 891, 7922, 14975, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
efdae1cdc27ce8dd0963505d6971a3efcf686845
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/model/Measure.java
[ "Apache-2.0" ]
Java
fromValueAndQualityWithDate
Measure
public static Measure fromValueAndQualityWithDate(String date, String pattern, double value, float quality) { SimpleDateFormat sdf = createUtcDateFormatter(pattern); Date parsedDate = null; try { parsedDate = sdf.parse(date); } catch (ParseException e) { e.printStackTrace(); return null; } return fromValueAndQuality(parsedDate.getTime(), value, quality); }
/** * Creates a Measure from the value and quality, specifying the date of the measure with a date string * and a pattern. * For instance using pattern "yyyy-MM-dd HH:mm:ss.SSS" and date "2020-08-28 17:48:53.253" * will result in 1598636933253 timestamp usage * Warning: the pattern must not include a zone (UTC is always assumed) * @param date * @param pattern * @param value * @param quality * @return */
Creates a Measure from the value and quality, specifying the date of the measure with a date string and a pattern.
[ "Creates", "a", "Measure", "from", "the", "value", "and", "quality", "specifying", "the", "date", "of", "the", "measure", "with", "a", "date", "string", "and", "a", "pattern", "." ]
public static Measure fromValueAndQualityWithDate(String date, String pattern, double value, float quality) { SimpleDateFormat sdf = createUtcDateFormatter(pattern); Date parsedDate = null; try { parsedDate = sdf.parse(date); } catch (ParseException e) { e.printStackTrace(); return null; } return fromValueAndQuality(parsedDate.getTime(), value, quality); }
[ "public", "static", "Measure", "fromValueAndQualityWithDate", "(", "String", "date", ",", "String", "pattern", ",", "double", "value", ",", "float", "quality", ")", "{", "SimpleDateFormat", "sdf", "=", "createUtcDateFormatter", "(", "pattern", ")", ";", "Date", "parsedDate", "=", "null", ";", "try", "{", "parsedDate", "=", "sdf", ".", "parse", "(", "date", ")", ";", "}", "catch", "(", "ParseException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "return", "null", ";", "}", "return", "fromValueAndQuality", "(", "parsedDate", ".", "getTime", "(", ")", ",", "value", ",", "quality", ")", ";", "}" ]
Creates a Measure from the value and quality, specifying the date of the measure with a date string and a pattern.
[ "Creates", "a", "Measure", "from", "the", "value", "and", "quality", "specifying", "the", "date", "of", "the", "measure", "with", "a", "date", "string", "and", "a", "pattern", "." ]
[]
[ { "param": "date", "type": "String" }, { "param": "pattern", "type": "String" }, { "param": "value", "type": "double" }, { "param": "quality", "type": "float" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "date", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "pattern", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "value", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "quality", "type": "float", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 13544, 628, 620, 1876, 14846, 1190, 1626, 12, 780, 1509, 16, 514, 1936, 16, 1645, 460, 16, 1431, 9312, 13, 288, 203, 3639, 17005, 31789, 273, 752, 57, 5111, 1626, 5074, 12, 4951, 1769, 203, 3639, 2167, 2707, 1626, 273, 446, 31, 203, 3639, 775, 288, 203, 5411, 2707, 1626, 273, 31789, 18, 2670, 12, 712, 1769, 203, 3639, 289, 1044, 261, 13047, 425, 13, 288, 203, 5411, 425, 18, 1188, 6332, 5621, 203, 5411, 327, 446, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 10210, 279, 13544, 628, 326, 460, 471, 9312, 16, 13664, 326, 1509, 434, 326, 6649, 598, 279, 1509, 533, 203, 377, 380, 471, 279, 1936, 18, 203, 377, 380, 2457, 791, 1450, 1936, 315, 17722, 17, 8206, 17, 449, 20842, 30, 7020, 30, 1049, 18, 1260, 55, 6, 471, 1509, 315, 18212, 20, 17, 6840, 17, 6030, 8043, 30, 8875, 30, 8643, 18, 30304, 6, 203, 377, 380, 903, 563, 316, 4711, 10689, 4449, 8148, 23, 1578, 8643, 2858, 4084, 203, 377, 380, 9728, 30, 326, 1936, 1297, 486, 2341, 279, 4157, 261, 11471, 353, 3712, 12034, 13, 203, 377, 380, 632, 891, 1509, 203, 377, 380, 632, 891, 1936, 203, 377, 380, 632, 891, 460, 203, 377, 380, 632, 891, 9312, 2 ]
efdae1cdc27ce8dd0963505d6971a3efcf686845
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/model/Measure.java
[ "Apache-2.0" ]
Java
createUtcDateFormatter
SimpleDateFormat
public static SimpleDateFormat createUtcDateFormatter(String pattern) { SimpleDateFormat dateFormatter = new SimpleDateFormat(pattern); dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); dateFormatter.setLenient(false); return dateFormatter; }
/** * Creates a simple date formatter able to parse the passed pattern. * Warning: the pattern must not contain the timezone as the UTC timezone is hardcoded and * mandatory (all historian measure timestamps should be UTC) * @param pattern * @return */
Creates a simple date formatter able to parse the passed pattern. Warning: the pattern must not contain the timezone as the UTC timezone is hardcoded and mandatory (all historian measure timestamps should be UTC) @param pattern @return
[ "Creates", "a", "simple", "date", "formatter", "able", "to", "parse", "the", "passed", "pattern", ".", "Warning", ":", "the", "pattern", "must", "not", "contain", "the", "timezone", "as", "the", "UTC", "timezone", "is", "hardcoded", "and", "mandatory", "(", "all", "historian", "measure", "timestamps", "should", "be", "UTC", ")", "@param", "pattern", "@return" ]
public static SimpleDateFormat createUtcDateFormatter(String pattern) { SimpleDateFormat dateFormatter = new SimpleDateFormat(pattern); dateFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); dateFormatter.setLenient(false); return dateFormatter; }
[ "public", "static", "SimpleDateFormat", "createUtcDateFormatter", "(", "String", "pattern", ")", "{", "SimpleDateFormat", "dateFormatter", "=", "new", "SimpleDateFormat", "(", "pattern", ")", ";", "dateFormatter", ".", "setTimeZone", "(", "TimeZone", ".", "getTimeZone", "(", "\"UTC\"", ")", ")", ";", "dateFormatter", ".", "setLenient", "(", "false", ")", ";", "return", "dateFormatter", ";", "}" ]
Creates a simple date formatter able to parse the passed pattern.
[ "Creates", "a", "simple", "date", "formatter", "able", "to", "parse", "the", "passed", "pattern", "." ]
[]
[ { "param": "pattern", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "pattern", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 17005, 752, 57, 5111, 1626, 5074, 12, 780, 1936, 13, 288, 203, 3639, 17005, 1509, 5074, 273, 394, 17005, 12, 4951, 1769, 203, 3639, 1509, 5074, 18, 542, 16760, 12, 16760, 18, 588, 16760, 2932, 11471, 7923, 1769, 203, 3639, 1509, 5074, 18, 542, 2891, 1979, 12, 5743, 1769, 203, 3639, 327, 1509, 5074, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 10210, 279, 4143, 1509, 4453, 7752, 358, 1109, 326, 2275, 1936, 18, 203, 377, 380, 9728, 30, 326, 1936, 1297, 486, 912, 326, 6371, 487, 326, 9951, 6371, 353, 7877, 24808, 471, 203, 377, 380, 11791, 261, 454, 5356, 280, 2779, 6649, 11267, 1410, 506, 9951, 13, 203, 377, 380, 632, 891, 1936, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2fd15a474c18f35e44423b9efb49cf824b0ee989
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/functions/FunctionValueMap.java
[ "Apache-2.0" ]
Java
add
null
public void add(ChronixEncoding encoding, String value) { if (encodingSize < encodings.length) { encodings[encodingSize] = encoding; encodingValues[encodingSize] = value; encodingSize++; } else { throw new IndexOutOfBoundsException("Try to put encoding to map with max size " + encodings.length + " but index " + encodingSize + " is out of range."); } }
/** * Append the encoding to the result * * @param encoding the chronix encoding * @param value the value of the encoding */
Append the encoding to the result @param encoding the chronix encoding @param value the value of the encoding
[ "Append", "the", "encoding", "to", "the", "result", "@param", "encoding", "the", "chronix", "encoding", "@param", "value", "the", "value", "of", "the", "encoding" ]
public void add(ChronixEncoding encoding, String value) { if (encodingSize < encodings.length) { encodings[encodingSize] = encoding; encodingValues[encodingSize] = value; encodingSize++; } else { throw new IndexOutOfBoundsException("Try to put encoding to map with max size " + encodings.length + " but index " + encodingSize + " is out of range."); } }
[ "public", "void", "add", "(", "ChronixEncoding", "encoding", ",", "String", "value", ")", "{", "if", "(", "encodingSize", "<", "encodings", ".", "length", ")", "{", "encodings", "[", "encodingSize", "]", "=", "encoding", ";", "encodingValues", "[", "encodingSize", "]", "=", "value", ";", "encodingSize", "++", ";", "}", "else", "{", "throw", "new", "IndexOutOfBoundsException", "(", "\"Try to put encoding to map with max size \"", "+", "encodings", ".", "length", "+", "\" but index \"", "+", "encodingSize", "+", "\" is out of range.\"", ")", ";", "}", "}" ]
Append the encoding to the result @param encoding the chronix encoding @param value the value of the encoding
[ "Append", "the", "encoding", "to", "the", "result", "@param", "encoding", "the", "chronix", "encoding", "@param", "value", "the", "value", "of", "the", "encoding" ]
[]
[ { "param": "encoding", "type": "ChronixEncoding" }, { "param": "value", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "encoding", "type": "ChronixEncoding", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "value", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 12, 20235, 697, 4705, 2688, 16, 514, 460, 13, 288, 203, 3639, 309, 261, 5999, 1225, 411, 24118, 18, 2469, 13, 288, 203, 5411, 24118, 63, 5999, 1225, 65, 273, 2688, 31, 203, 5411, 2688, 1972, 63, 5999, 1225, 65, 273, 460, 31, 203, 5411, 2688, 1225, 9904, 31, 203, 3639, 289, 469, 288, 203, 5411, 604, 394, 17768, 2932, 7833, 358, 1378, 2688, 358, 852, 598, 943, 963, 315, 397, 24118, 18, 2469, 397, 315, 1496, 770, 315, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 6181, 326, 2688, 358, 326, 563, 203, 377, 380, 203, 377, 380, 632, 891, 2688, 326, 12227, 697, 2688, 203, 377, 380, 632, 891, 460, 565, 326, 460, 434, 326, 2688, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
697d249d754996e5153dbfc18025ea67d9f63038
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sax/GuessSaxParameters.java
[ "Apache-2.0" ]
Java
computeBestParam
ArrayList
public static ArrayList computeBestParam(List<Double> points ) { // discretization parameters int WINDOW_START = 0; int WINDOW_END = 100; int WINDOW_STEP = 20; int PAA_START = 2; int PAA_END = 30; int PAA_STEP = 1; int ALPHABETIC_START = 2; int ALPHABETIC_END = 8; int ALPHABETIC_STEP = 1; double[] valuePoints = points.stream().mapToDouble(x -> x).toArray(); ArrayList result= new ArrayList<>(); ArrayList<SampledPoint> res = new ArrayList<>(); RulePruner rp = new RulePruner(valuePoints); for (int WINDOW = WINDOW_START; WINDOW < WINDOW_END; WINDOW += WINDOW_STEP) { for (int PAA = PAA_START; PAA < PAA_END; PAA += PAA_STEP) { // check for invalid cases if (PAA > WINDOW) { continue; } for (int ALPHABET = ALPHABETIC_START; ALPHABET < ALPHABETIC_END; ALPHABET += ALPHABETIC_STEP) { SampledPoint p = null; try { if (valuePoints.length >= WINDOW_END - WINDOW_START) { p = rp.sample(WINDOW, PAA, ALPHABET, GIAlgorithm.REPAIR, RulePrunerParameters.SAX_NR_STRATEGY, RulePrunerParameters.SAX_NORM_THRESHOLD); } else return result; } catch (Exception e) { System.err.println("Ooops -- was interrupted"); } if (null != p) { res.add(p); } } } } //comparison is done through the use of reduction param, best parameters have the lowest reduction Collections.sort(res, new ReductionSorter()); // result.add(res.get(0)); result.add(res.get(0).getWindow()); result.add(res.get(0).getPAA()); result.add(res.get(0).getAlphabet()); result.add(res.get(0).getApproxDist()); result.add(res.get(0).getGrammarSize()); result.add(res.get(0).getGrammarRules()); result.add(res.get(0).getGrammarSize()); result.add(res.get(0).getCompressedGrammarSize()); result.add(res.get(0).getPrunedRules()); result.add(res.get(0).getCoverage()); result.add(res.get(0).getGrammarSize()); result.add(res.get(0).getReduction()); result.add(res.get(0).getMaxFrequency()); return result; }
/** * * @author Mejdeddine Nemsi * @version 1.0 *Example: *input data {5.635,5.635,5.64,5.64,5.64,5.65,5.66,5.68,5.7,5.71,5.71,5.715,5.72,5.73,5.735,5.74, * 5.77,5.78,5.775,5.78,5.79,5.785,5.79,5.8,5.81,5.815,5.8,5.805,5.815,5.82,5.82,5.82, * 5.825,5.82,5.83,5.83,5.82,5.81,5.815,5.82,5.82,5.815,5.815,5.8,5.79,5.78,5.77} * * * the guess method will return a list of the optimal window size, PAA size, alphabet size, Approx Distance, * Grammar size, Grammar rules, compressed grammar size, prune rules, coverage, reduction and max frequency: *[12, 4, 9, 1.4450012717343763, 100, 6, 100, 84, 2, 0.5531914893617021, 100, 0.3333333333333333, 2] * * Window size: Sliding window size, it's specified at the beginning (from 10 to a doubled length of typical structural phenomenon observed in the time series) * after the calculation of the optimal parameters we get the best sliding window size * PAA size: Piecewise Aggregation Approximation (of timeseries) it's used to reduce dimensionality of the input timeseries by splitting the into equal-sized segments * which are computed by averaging the values in these segments. * the typical range can be specified from 2->50 (Window size is always greater then PAA size) * Alphabet size: 'a' Alphabet size (e.g., for the alphabet = {a,b,c}, a = 3). It is specified btween 2 and 15 * Approx Distance: Or we can call it Approximation error. It can be seen as the sum of two error values computed for each subsequence extracted via sliding window * Grammar size: the number of suggested alphabet letters * Grammar rules: Each repeated substring is replaced by grammatical rule that produces a shorter original string * Compressed grammar size: Compressed number of suggested alphabet letters * Prune rules: It's designed to eliminate redundant grammar rules that do not contribute to timeseries grammar cover * coverage: The ratio of (the number of time series points which are located within any of the subsequence corresponding to the grammar rules) by * (the total number of points in the timeseries) * Reduction: It's used for selecting the set of optimal discretization parameters * It's the ratio of (number of rules in the pruned grammar) by * (number of rules in the full grammar) * *PS: For each parameter (inputed window size, PAA size and Alphabet size) combination a grammar is inferred and pruned in order to computeMetrics the reduction coefficient value. *Among all sampled and valid combinations we select one which yields the minimal value of the reduction coefficient as optimal discretization parameter set. * * RQ: NThreshold (normalization threshold value) can be used in SAX to deal with one special case (normalization to a subsequence which is almost constant) * as mentioned in "Experiencing SAX: a novel symbolic representation of time series".It assigns the entire word to the middle-ranged alphabet when * the standard deviation of current subsequence is slower than NThreshold * @param points * @return */
Window size: Sliding window size, it's specified at the beginning (from 10 to a doubled length of typical structural phenomenon observed in the time series) after the calculation of the optimal parameters we get the best sliding window size PAA size: Piecewise Aggregation Approximation (of timeseries) it's used to reduce dimensionality of the input timeseries by splitting the into equal-sized segments which are computed by averaging the values in these segments. the typical range can be specified from 2->50 (Window size is always greater then PAA size) Alphabet size: 'a' Alphabet size . It is specified btween 2 and 15 Approx Distance: Or we can call it Approximation error. For each parameter (inputed window size, PAA size and Alphabet size) combination a grammar is inferred and pruned in order to computeMetrics the reduction coefficient value. Among all sampled and valid combinations we select one which yields the minimal value of the reduction coefficient as optimal discretization parameter set. NThreshold (normalization threshold value) can be used in SAX to deal with one special case (normalization to a subsequence which is almost constant) as mentioned in "Experiencing SAX: a novel symbolic representation of time series".It assigns the entire word to the middle-ranged alphabet when the standard deviation of current subsequence is slower than NThreshold @param points @return
[ "Window", "size", ":", "Sliding", "window", "size", "it", "'", "s", "specified", "at", "the", "beginning", "(", "from", "10", "to", "a", "doubled", "length", "of", "typical", "structural", "phenomenon", "observed", "in", "the", "time", "series", ")", "after", "the", "calculation", "of", "the", "optimal", "parameters", "we", "get", "the", "best", "sliding", "window", "size", "PAA", "size", ":", "Piecewise", "Aggregation", "Approximation", "(", "of", "timeseries", ")", "it", "'", "s", "used", "to", "reduce", "dimensionality", "of", "the", "input", "timeseries", "by", "splitting", "the", "into", "equal", "-", "sized", "segments", "which", "are", "computed", "by", "averaging", "the", "values", "in", "these", "segments", ".", "the", "typical", "range", "can", "be", "specified", "from", "2", "-", ">", "50", "(", "Window", "size", "is", "always", "greater", "then", "PAA", "size", ")", "Alphabet", "size", ":", "'", "a", "'", "Alphabet", "size", ".", "It", "is", "specified", "btween", "2", "and", "15", "Approx", "Distance", ":", "Or", "we", "can", "call", "it", "Approximation", "error", ".", "For", "each", "parameter", "(", "inputed", "window", "size", "PAA", "size", "and", "Alphabet", "size", ")", "combination", "a", "grammar", "is", "inferred", "and", "pruned", "in", "order", "to", "computeMetrics", "the", "reduction", "coefficient", "value", ".", "Among", "all", "sampled", "and", "valid", "combinations", "we", "select", "one", "which", "yields", "the", "minimal", "value", "of", "the", "reduction", "coefficient", "as", "optimal", "discretization", "parameter", "set", ".", "NThreshold", "(", "normalization", "threshold", "value", ")", "can", "be", "used", "in", "SAX", "to", "deal", "with", "one", "special", "case", "(", "normalization", "to", "a", "subsequence", "which", "is", "almost", "constant", ")", "as", "mentioned", "in", "\"", "Experiencing", "SAX", ":", "a", "novel", "symbolic", "representation", "of", "time", "series", "\"", ".", "It", "assigns", "the", "entire", "word", "to", "the", "middle", "-", "ranged", "alphabet", "when", "the", "standard", "deviation", "of", "current", "subsequence", "is", "slower", "than", "NThreshold", "@param", "points", "@return" ]
public static ArrayList computeBestParam(List<Double> points ) { int WINDOW_START = 0; int WINDOW_END = 100; int WINDOW_STEP = 20; int PAA_START = 2; int PAA_END = 30; int PAA_STEP = 1; int ALPHABETIC_START = 2; int ALPHABETIC_END = 8; int ALPHABETIC_STEP = 1; double[] valuePoints = points.stream().mapToDouble(x -> x).toArray(); ArrayList result= new ArrayList<>(); ArrayList<SampledPoint> res = new ArrayList<>(); RulePruner rp = new RulePruner(valuePoints); for (int WINDOW = WINDOW_START; WINDOW < WINDOW_END; WINDOW += WINDOW_STEP) { for (int PAA = PAA_START; PAA < PAA_END; PAA += PAA_STEP) { if (PAA > WINDOW) { continue; } for (int ALPHABET = ALPHABETIC_START; ALPHABET < ALPHABETIC_END; ALPHABET += ALPHABETIC_STEP) { SampledPoint p = null; try { if (valuePoints.length >= WINDOW_END - WINDOW_START) { p = rp.sample(WINDOW, PAA, ALPHABET, GIAlgorithm.REPAIR, RulePrunerParameters.SAX_NR_STRATEGY, RulePrunerParameters.SAX_NORM_THRESHOLD); } else return result; } catch (Exception e) { System.err.println("Ooops -- was interrupted"); } if (null != p) { res.add(p); } } } } Collections.sort(res, new ReductionSorter()); result.add(res.get(0).getWindow()); result.add(res.get(0).getPAA()); result.add(res.get(0).getAlphabet()); result.add(res.get(0).getApproxDist()); result.add(res.get(0).getGrammarSize()); result.add(res.get(0).getGrammarRules()); result.add(res.get(0).getGrammarSize()); result.add(res.get(0).getCompressedGrammarSize()); result.add(res.get(0).getPrunedRules()); result.add(res.get(0).getCoverage()); result.add(res.get(0).getGrammarSize()); result.add(res.get(0).getReduction()); result.add(res.get(0).getMaxFrequency()); return result; }
[ "public", "static", "ArrayList", "computeBestParam", "(", "List", "<", "Double", ">", "points", ")", "{", "int", "WINDOW_START", "=", "0", ";", "int", "WINDOW_END", "=", "100", ";", "int", "WINDOW_STEP", "=", "20", ";", "int", "PAA_START", "=", "2", ";", "int", "PAA_END", "=", "30", ";", "int", "PAA_STEP", "=", "1", ";", "int", "ALPHABETIC_START", "=", "2", ";", "int", "ALPHABETIC_END", "=", "8", ";", "int", "ALPHABETIC_STEP", "=", "1", ";", "double", "[", "]", "valuePoints", "=", "points", ".", "stream", "(", ")", ".", "mapToDouble", "(", "x", "->", "x", ")", ".", "toArray", "(", ")", ";", "ArrayList", "result", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "ArrayList", "<", "SampledPoint", ">", "res", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "RulePruner", "rp", "=", "new", "RulePruner", "(", "valuePoints", ")", ";", "for", "(", "int", "WINDOW", "=", "WINDOW_START", ";", "WINDOW", "<", "WINDOW_END", ";", "WINDOW", "+=", "WINDOW_STEP", ")", "{", "for", "(", "int", "PAA", "=", "PAA_START", ";", "PAA", "<", "PAA_END", ";", "PAA", "+=", "PAA_STEP", ")", "{", "if", "(", "PAA", ">", "WINDOW", ")", "{", "continue", ";", "}", "for", "(", "int", "ALPHABET", "=", "ALPHABETIC_START", ";", "ALPHABET", "<", "ALPHABETIC_END", ";", "ALPHABET", "+=", "ALPHABETIC_STEP", ")", "{", "SampledPoint", "p", "=", "null", ";", "try", "{", "if", "(", "valuePoints", ".", "length", ">=", "WINDOW_END", "-", "WINDOW_START", ")", "{", "p", "=", "rp", ".", "sample", "(", "WINDOW", ",", "PAA", ",", "ALPHABET", ",", "GIAlgorithm", ".", "REPAIR", ",", "RulePrunerParameters", ".", "SAX_NR_STRATEGY", ",", "RulePrunerParameters", ".", "SAX_NORM_THRESHOLD", ")", ";", "}", "else", "return", "result", ";", "}", "catch", "(", "Exception", "e", ")", "{", "System", ".", "err", ".", "println", "(", "\"Ooops -- was interrupted\"", ")", ";", "}", "if", "(", "null", "!=", "p", ")", "{", "res", ".", "add", "(", "p", ")", ";", "}", "}", "}", "}", "Collections", ".", "sort", "(", "res", ",", "new", "ReductionSorter", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getWindow", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getPAA", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getAlphabet", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getApproxDist", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getGrammarSize", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getGrammarRules", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getGrammarSize", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getCompressedGrammarSize", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getPrunedRules", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getCoverage", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getGrammarSize", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getReduction", "(", ")", ")", ";", "result", ".", "add", "(", "res", ".", "get", "(", "0", ")", ".", "getMaxFrequency", "(", ")", ")", ";", "return", "result", ";", "}" ]
@author Mejdeddine Nemsi @version 1.0 *Example: input data {5.635,5.635,5.64,5.64,5.64,5.65,5.66,5.68,5.7,5.71,5.71,5.715,5.72,5.73,5.735,5.74, 5.77,5.78,5.775,5.78,5.79,5.785,5.79,5.8,5.81,5.815,5.8,5.805,5.815,5.82,5.82,5.82, 5.825,5.82,5.83,5.83,5.82,5.81,5.815,5.82,5.82,5.815,5.815,5.8,5.79,5.78,5.77}
[ "@author", "Mejdeddine", "Nemsi", "@version", "1", ".", "0", "*", "Example", ":", "input", "data", "{", "5", ".", "635", "5", ".", "635", "5", ".", "64", "5", ".", "64", "5", ".", "64", "5", ".", "65", "5", ".", "66", "5", ".", "68", "5", ".", "7", "5", ".", "71", "5", ".", "71", "5", ".", "715", "5", ".", "72", "5", ".", "73", "5", ".", "735", "5", ".", "74", "5", ".", "77", "5", ".", "78", "5", ".", "775", "5", ".", "78", "5", ".", "79", "5", ".", "785", "5", ".", "79", "5", ".", "8", "5", ".", "81", "5", ".", "815", "5", ".", "8", "5", ".", "805", "5", ".", "815", "5", ".", "82", "5", ".", "82", "5", ".", "82", "5", ".", "825", "5", ".", "82", "5", ".", "83", "5", ".", "83", "5", ".", "82", "5", ".", "81", "5", ".", "815", "5", ".", "82", "5", ".", "82", "5", ".", "815", "5", ".", "815", "5", ".", "8", "5", ".", "79", "5", ".", "78", "5", ".", "77", "}" ]
[ "// discretization parameters", "// check for invalid cases", "//comparison is done through the use of reduction param, best parameters have the lowest reduction", "// result.add(res.get(0));" ]
[ { "param": "points", "type": "List<Double>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "points", "type": "List<Double>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 225, 760, 2407, 3671, 14173, 786, 12, 682, 32, 5265, 34, 3143, 262, 225, 288, 203, 203, 3639, 368, 19169, 1349, 1588, 1472, 203, 3639, 509, 24482, 7306, 67, 7570, 273, 374, 31, 203, 3639, 509, 24482, 7306, 67, 4415, 273, 2130, 31, 203, 3639, 509, 24482, 7306, 67, 26951, 273, 4200, 31, 203, 3639, 509, 453, 5284, 67, 7570, 273, 576, 31, 203, 3639, 509, 453, 5284, 67, 4415, 273, 5196, 31, 203, 3639, 509, 453, 5284, 67, 26951, 273, 404, 31, 203, 3639, 509, 29432, 30277, 2871, 67, 7570, 273, 576, 31, 203, 3639, 509, 29432, 30277, 2871, 67, 4415, 273, 1725, 31, 203, 3639, 509, 29432, 30277, 2871, 67, 26951, 273, 404, 31, 203, 203, 203, 3639, 1645, 8526, 460, 5636, 273, 3143, 18, 3256, 7675, 1458, 774, 5265, 12, 92, 317, 619, 2934, 31447, 5621, 203, 203, 3639, 2407, 563, 33, 394, 2407, 29667, 5621, 203, 3639, 2407, 32, 55, 14814, 2148, 34, 400, 273, 394, 2407, 29667, 5621, 203, 3639, 6781, 2050, 29640, 8715, 273, 394, 6781, 2050, 29640, 12, 1132, 5636, 1769, 203, 203, 203, 3639, 364, 261, 474, 24482, 7306, 273, 24482, 7306, 67, 7570, 31, 24482, 7306, 411, 24482, 7306, 67, 4415, 31, 24482, 7306, 1011, 24482, 7306, 67, 26951, 13, 288, 203, 203, 5411, 364, 261, 474, 453, 5284, 273, 453, 5284, 67, 7570, 31, 453, 5284, 411, 453, 5284, 67, 4415, 31, 453, 5284, 1011, 453, 5284, 67, 26951, 13, 288, 203, 203, 203, 203, 7734, 368, 866, 364, 2057, 6088, 203, 7734, 309, 261, 4066, 37, 405, 24482, 7306, 13, 288, 203, 10792, 1324, 31, 203, 7734, 289, 203, 203, 7734, 364, 261, 474, 29432, 30277, 273, 29432, 30277, 2871, 67, 7570, 31, 29432, 30277, 411, 29432, 30277, 2871, 67, 4415, 31, 29432, 30277, 1011, 29432, 30277, 2871, 67, 26951, 13, 288, 203, 203, 10792, 348, 14814, 2148, 293, 273, 446, 31, 203, 203, 10792, 775, 288, 203, 13491, 309, 261, 1132, 5636, 18, 2469, 1545, 24482, 7306, 67, 4415, 300, 24482, 7306, 67, 7570, 13, 288, 203, 18701, 293, 273, 8715, 18, 6358, 12, 23407, 16, 453, 5284, 16, 29432, 30277, 16, 611, 45, 6801, 18, 862, 4066, 7937, 16, 203, 4766, 565, 6781, 2050, 29640, 2402, 18, 55, 2501, 67, 50, 54, 67, 3902, 27708, 16, 6781, 2050, 29640, 2402, 18, 55, 2501, 67, 50, 3466, 67, 23840, 1769, 203, 13491, 289, 203, 203, 13491, 469, 327, 563, 31, 203, 203, 10792, 289, 203, 10792, 1044, 261, 503, 425, 13, 288, 203, 13491, 2332, 18, 370, 18, 8222, 2932, 51, 83, 4473, 1493, 1703, 15711, 8863, 203, 10792, 289, 203, 203, 10792, 309, 261, 2011, 480, 293, 13, 288, 203, 13491, 400, 18, 1289, 12, 84, 1769, 203, 10792, 289, 203, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 203, 203, 3639, 368, 23050, 353, 2731, 3059, 326, 999, 434, 20176, 579, 16, 3796, 1472, 1240, 326, 11981, 20176, 203, 3639, 5737, 18, 3804, 12, 455, 16, 394, 4621, 4062, 24952, 10663, 203, 203, 203, 3639, 368, 563, 18, 1289, 12, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26873, 203, 377, 380, 203, 203, 203, 3639, 380, 632, 4161, 7499, 78, 323, 449, 558, 423, 7424, 77, 203, 565, 380, 632, 1589, 404, 18, 20, 380, 10908, 30, 203, 565, 380, 2630, 501, 288, 25, 18, 4449, 25, 16, 25, 18, 4449, 25, 16, 25, 18, 1105, 16, 25, 18, 1105, 16, 25, 18, 1105, 16, 25, 18, 9222, 16, 25, 18, 6028, 16, 25, 18, 9470, 16, 25, 18, 27, 16, 25, 18, 11212, 16, 25, 18, 11212, 16, 25, 18, 27, 3600, 16, 25, 18, 9060, 16, 25, 18, 9036, 16, 25, 18, 27, 4763, 16, 25, 18, 5608, 16, 203, 565, 380, 1381, 18, 4700, 16, 25, 18, 8285, 16, 25, 18, 27714, 16, 25, 18, 8285, 16, 25, 18, 7235, 2 ]
0a3b4e1c84fb974d34ad20ed59bc37ae6201a039
Hurence/historian
historian-server/src/main/java/com/hurence/webapiservice/http/api/ingestion/util/IngestionApiUtil.java
[ "Apache-2.0" ]
Java
parseFiles
null
public static void parseFiles(List<CsvFileConvertor> csvFileConvertors, AllFilesReport allFilesReport, CsvFilesConvertorConf csvFilesConvertorConf) { for (CsvFileConvertor convertor : csvFileConvertors) { try { // convert the file to json ConvertCsvFileToJson(convertor, csvFilesConvertorConf); } catch (NoSuchElementException e) { // the file will be skipped because it's mapping aren't correct. String errorMessage = "The csv mappings don't match the mappings in the attributes. this file will be skipped"; fillingTheNamesOfFailedFiles(errorMessage, convertor, allFilesReport); continue; } catch (IOException e) { // the file will be skipped because it is too big (> the max number of lignes) String errorMessage = "The csv contains " + e.getMessage() + " lines which is more than the max number of line of "+ csvFilesConvertorConf.getMaxNumberOfLignes(); fillingTheNamesOfFailedFiles(errorMessage, convertor, allFilesReport); continue; } // parse the jsonArray fileInArray parseCsvImportRequest(convertor.fileInArray,csvFilesConvertorConf, convertor.fileReport); } }
/** * @param csvFileConvertors List<CsvFileConvertor> * * parse each csv file : for each file : * 1- convert it to json then add it to CsvFileConvertor.fileInArray. * 2- parse the fileInArray to only get the correct points and store them in CsvFileConvertor.fileReport.correctPoints. * 3- fill the fileReport.numberOfFailedPointsPerMetric. * * @return void */
@param csvFileConvertors List parse each csv file : for each file : 1- convert it to json then add it to CsvFileConvertor.fileInArray. 2- parse the fileInArray to only get the correct points and store them in CsvFileConvertor.fileReport.correctPoints. @return void
[ "@param", "csvFileConvertors", "List", "parse", "each", "csv", "file", ":", "for", "each", "file", ":", "1", "-", "convert", "it", "to", "json", "then", "add", "it", "to", "CsvFileConvertor", ".", "fileInArray", ".", "2", "-", "parse", "the", "fileInArray", "to", "only", "get", "the", "correct", "points", "and", "store", "them", "in", "CsvFileConvertor", ".", "fileReport", ".", "correctPoints", ".", "@return", "void" ]
public static void parseFiles(List<CsvFileConvertor> csvFileConvertors, AllFilesReport allFilesReport, CsvFilesConvertorConf csvFilesConvertorConf) { for (CsvFileConvertor convertor : csvFileConvertors) { try { ConvertCsvFileToJson(convertor, csvFilesConvertorConf); } catch (NoSuchElementException e) { String errorMessage = "The csv mappings don't match the mappings in the attributes. this file will be skipped"; fillingTheNamesOfFailedFiles(errorMessage, convertor, allFilesReport); continue; } catch (IOException e) { String errorMessage = "The csv contains " + e.getMessage() + " lines which is more than the max number of line of "+ csvFilesConvertorConf.getMaxNumberOfLignes(); fillingTheNamesOfFailedFiles(errorMessage, convertor, allFilesReport); continue; } parseCsvImportRequest(convertor.fileInArray,csvFilesConvertorConf, convertor.fileReport); } }
[ "public", "static", "void", "parseFiles", "(", "List", "<", "CsvFileConvertor", ">", "csvFileConvertors", ",", "AllFilesReport", "allFilesReport", ",", "CsvFilesConvertorConf", "csvFilesConvertorConf", ")", "{", "for", "(", "CsvFileConvertor", "convertor", ":", "csvFileConvertors", ")", "{", "try", "{", "ConvertCsvFileToJson", "(", "convertor", ",", "csvFilesConvertorConf", ")", ";", "}", "catch", "(", "NoSuchElementException", "e", ")", "{", "String", "errorMessage", "=", "\"The csv mappings don't match the mappings in the attributes. this file will be skipped\"", ";", "fillingTheNamesOfFailedFiles", "(", "errorMessage", ",", "convertor", ",", "allFilesReport", ")", ";", "continue", ";", "}", "catch", "(", "IOException", "e", ")", "{", "String", "errorMessage", "=", "\"The csv contains \"", "+", "e", ".", "getMessage", "(", ")", "+", "\" lines which is more than the max number of line of \"", "+", "csvFilesConvertorConf", ".", "getMaxNumberOfLignes", "(", ")", ";", "fillingTheNamesOfFailedFiles", "(", "errorMessage", ",", "convertor", ",", "allFilesReport", ")", ";", "continue", ";", "}", "parseCsvImportRequest", "(", "convertor", ".", "fileInArray", ",", "csvFilesConvertorConf", ",", "convertor", ".", "fileReport", ")", ";", "}", "}" ]
@param csvFileConvertors List<CsvFileConvertor> parse each csv file : for each file : 1- convert it to json then add it to CsvFileConvertor.fileInArray.
[ "@param", "csvFileConvertors", "List<CsvFileConvertor", ">", "parse", "each", "csv", "file", ":", "for", "each", "file", ":", "1", "-", "convert", "it", "to", "json", "then", "add", "it", "to", "CsvFileConvertor", ".", "fileInArray", "." ]
[ "// convert the file to json", "// the file will be skipped because it's mapping aren't correct.", "// the file will be skipped because it is too big (> the max number of lignes)", "// parse the jsonArray fileInArray" ]
[ { "param": "csvFileConvertors", "type": "List<CsvFileConvertor>" }, { "param": "allFilesReport", "type": "AllFilesReport" }, { "param": "csvFilesConvertorConf", "type": "CsvFilesConvertorConf" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "csvFileConvertors", "type": "List<CsvFileConvertor>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "allFilesReport", "type": "AllFilesReport", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "csvFilesConvertorConf", "type": "CsvFilesConvertorConf", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 1109, 2697, 12, 682, 32, 16759, 812, 2723, 280, 34, 6101, 812, 2723, 1383, 16, 4826, 2697, 4820, 777, 2697, 4820, 16, 203, 21394, 21532, 2697, 2723, 280, 3976, 6101, 2697, 2723, 280, 3976, 13, 288, 203, 3639, 364, 261, 16759, 812, 2723, 280, 1765, 280, 294, 6101, 812, 2723, 1383, 13, 288, 203, 5411, 775, 288, 203, 7734, 368, 1765, 326, 585, 358, 1163, 203, 7734, 4037, 16759, 812, 774, 3185, 12, 6283, 280, 16, 6101, 2697, 2723, 280, 3976, 1769, 203, 5411, 289, 1044, 261, 28341, 20826, 425, 13, 288, 203, 7734, 368, 326, 585, 903, 506, 9700, 2724, 518, 1807, 2874, 11526, 1404, 3434, 18, 203, 7734, 514, 9324, 273, 315, 1986, 6101, 7990, 2727, 1404, 845, 326, 7990, 316, 326, 1677, 18, 333, 585, 903, 506, 9700, 14432, 203, 7734, 25740, 1986, 1557, 951, 2925, 2697, 12, 1636, 1079, 16, 1765, 280, 16, 777, 2697, 4820, 1769, 203, 7734, 1324, 31, 203, 5411, 289, 1044, 261, 14106, 425, 13, 288, 203, 7734, 368, 326, 585, 903, 506, 9700, 2724, 518, 353, 4885, 5446, 261, 34, 326, 943, 1300, 434, 328, 724, 281, 13, 203, 7734, 514, 9324, 273, 315, 1986, 6101, 1914, 315, 397, 425, 18, 24906, 1435, 397, 315, 2362, 1492, 353, 1898, 2353, 326, 943, 1300, 434, 980, 434, 13773, 6101, 2697, 2723, 280, 3976, 18, 588, 2747, 9226, 48, 724, 281, 5621, 203, 7734, 25740, 1986, 1557, 951, 2925, 2697, 12, 1636, 1079, 16, 1765, 280, 16, 777, 2697, 4820, 1769, 203, 7734, 1324, 31, 203, 203, 5411, 289, 203, 5411, 368, 1109, 326, 26932, 585, 382, 1076, 203, 5411, 1109, 16759, 5010, 691, 12, 6283, 280, 18, 768, 382, 1076, 16, 6715, 2697, 2723, 280, 3976, 16, 1765, 280, 18, 768, 4820, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 632, 891, 6101, 812, 2723, 1383, 3639, 987, 32, 16759, 812, 2723, 280, 34, 203, 377, 380, 203, 377, 380, 1109, 1517, 6101, 585, 294, 364, 1517, 585, 294, 203, 377, 380, 15604, 404, 17, 1765, 518, 358, 1163, 1508, 527, 518, 358, 21532, 812, 2723, 280, 18, 768, 382, 1076, 18, 203, 377, 380, 15604, 576, 17, 1109, 326, 585, 382, 1076, 358, 1338, 336, 326, 3434, 3143, 471, 1707, 2182, 316, 21532, 812, 2723, 280, 18, 768, 4820, 18, 6746, 5636, 18, 203, 377, 380, 15604, 890, 17, 3636, 326, 585, 4820, 18, 2696, 951, 2925, 5636, 2173, 5396, 18, 203, 377, 380, 203, 377, 380, 632, 2463, 918, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100 ]
e23927b672c31ca21bf6689c7d83efbb7117029d
Hurence/historian
historian-server/src/integration-test/java/com/hurence/webapiservice/http/api/grafana/hurence/QueryEndPointShouldTruncateChunksIfNeededCurrentVersionIT.java
[ "Apache-2.0" ]
Java
testExpect6PointsQueryMode1
null
@Test @Timeout(value = 5, timeUnit = TimeUnit.SECONDS) public void testExpect6PointsQueryMode1(DockerComposeContainer container, Vertx vertx, VertxTestContext testContext) { initVerticlesWithQueryMode1(container, vertx) .doOnError(testContext::failNow) .blockingGet(); List<RequestResponseConfI<?>> confs = Arrays.asList( new RequestResponseConf<JsonArray>(HURENCE_DATASOURCE_GRAFANA_QUERY_API_ENDPOINT, "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode1/request.json", "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode1/expectedResponse.json", OK, StatusMessages.OK, BodyCodec.jsonArray(), vertx) ); AssertResponseGivenRequestHelper .assertRequestGiveResponseFromFileAndFinishTest(webClient, testContext, confs); }
/** * If we get a chunk with chunk_start : t1 and chunk_end: t2. * Then if we do a request from "tfrom" to "tto". * And if the following is true : t1 < tfrom < ttp < t2 * Then we should not get point outside of scope [tfrom, tto] * And this should be the case for every chunks if there is several chunks ! * @param vertx * @param testContext */
If we get a chunk with chunk_start : t1 and chunk_end: t2. Then if we do a request from "tfrom" to "tto". And if the following is true : t1 < tfrom < ttp < t2 Then we should not get point outside of scope [tfrom, tto] And this should be the case for every chunks if there is several chunks . @param vertx @param testContext
[ "If", "we", "get", "a", "chunk", "with", "chunk_start", ":", "t1", "and", "chunk_end", ":", "t2", ".", "Then", "if", "we", "do", "a", "request", "from", "\"", "tfrom", "\"", "to", "\"", "tto", "\"", ".", "And", "if", "the", "following", "is", "true", ":", "t1", "<", "tfrom", "<", "ttp", "<", "t2", "Then", "we", "should", "not", "get", "point", "outside", "of", "scope", "[", "tfrom", "tto", "]", "And", "this", "should", "be", "the", "case", "for", "every", "chunks", "if", "there", "is", "several", "chunks", ".", "@param", "vertx", "@param", "testContext" ]
@Test @Timeout(value = 5, timeUnit = TimeUnit.SECONDS) public void testExpect6PointsQueryMode1(DockerComposeContainer container, Vertx vertx, VertxTestContext testContext) { initVerticlesWithQueryMode1(container, vertx) .doOnError(testContext::failNow) .blockingGet(); List<RequestResponseConfI<?>> confs = Arrays.asList( new RequestResponseConf<JsonArray>(HURENCE_DATASOURCE_GRAFANA_QUERY_API_ENDPOINT, "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode1/request.json", "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode1/expectedResponse.json", OK, StatusMessages.OK, BodyCodec.jsonArray(), vertx) ); AssertResponseGivenRequestHelper .assertRequestGiveResponseFromFileAndFinishTest(webClient, testContext, confs); }
[ "@", "Test", "@", "Timeout", "(", "value", "=", "5", ",", "timeUnit", "=", "TimeUnit", ".", "SECONDS", ")", "public", "void", "testExpect6PointsQueryMode1", "(", "DockerComposeContainer", "container", ",", "Vertx", "vertx", ",", "VertxTestContext", "testContext", ")", "{", "initVerticlesWithQueryMode1", "(", "container", ",", "vertx", ")", ".", "doOnError", "(", "testContext", "::", "failNow", ")", ".", "blockingGet", "(", ")", ";", "List", "<", "RequestResponseConfI", "<", "?", ">", ">", "confs", "=", "Arrays", ".", "asList", "(", "new", "RequestResponseConf", "<", "JsonArray", ">", "(", "HURENCE_DATASOURCE_GRAFANA_QUERY_API_ENDPOINT", ",", "\"/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode1/request.json\"", ",", "\"/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode1/expectedResponse.json\"", ",", "OK", ",", "StatusMessages", ".", "OK", ",", "BodyCodec", ".", "jsonArray", "(", ")", ",", "vertx", ")", ")", ";", "AssertResponseGivenRequestHelper", ".", "assertRequestGiveResponseFromFileAndFinishTest", "(", "webClient", ",", "testContext", ",", "confs", ")", ";", "}" ]
If we get a chunk with chunk_start : t1 and chunk_end: t2.
[ "If", "we", "get", "a", "chunk", "with", "chunk_start", ":", "t1", "and", "chunk_end", ":", "t2", "." ]
[]
[ { "param": "container", "type": "DockerComposeContainer" }, { "param": "vertx", "type": "Vertx" }, { "param": "testContext", "type": "VertxTestContext" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "container", "type": "DockerComposeContainer", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "vertx", "type": "Vertx", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "testContext", "type": "VertxTestContext", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 632, 2694, 12, 1132, 273, 1381, 16, 23874, 273, 9206, 18, 11609, 13, 203, 565, 1071, 918, 1842, 11988, 26, 5636, 1138, 2309, 21, 12, 14174, 22375, 2170, 1478, 16, 203, 4766, 5411, 6160, 978, 1924, 978, 16, 203, 4766, 5411, 6160, 978, 4709, 1042, 1842, 1042, 13, 288, 203, 3639, 1208, 4828, 8383, 1190, 1138, 2309, 21, 12, 3782, 16, 1924, 978, 13, 203, 7734, 263, 2896, 11427, 12, 3813, 1042, 2866, 6870, 8674, 13, 203, 7734, 263, 18926, 967, 5621, 203, 3639, 987, 32, 691, 1064, 3976, 45, 12880, 9778, 2195, 87, 273, 5647, 18, 345, 682, 12, 203, 7734, 394, 1567, 1064, 3976, 32, 3185, 1076, 34, 12, 44, 4830, 50, 1441, 67, 11102, 3033, 51, 5727, 67, 24554, 42, 1258, 37, 67, 10753, 67, 2557, 67, 18506, 16, 203, 13491, 2206, 2505, 19, 2752, 74, 13848, 19, 76, 25267, 19, 2271, 19, 13139, 25871, 14975, 18299, 19, 3813, 22, 1138, 2309, 21, 19, 2293, 18, 1977, 3113, 203, 13491, 2206, 2505, 19, 2752, 74, 13848, 19, 76, 25267, 19, 2271, 19, 13139, 25871, 14975, 18299, 19, 3813, 22, 1138, 2309, 21, 19, 3825, 1064, 18, 1977, 3113, 203, 13491, 7791, 16, 2685, 5058, 18, 3141, 16, 203, 13491, 5652, 11008, 18, 1977, 1076, 9334, 1924, 978, 13, 203, 3639, 11272, 203, 3639, 5452, 1064, 6083, 691, 2276, 203, 7734, 263, 11231, 691, 43, 688, 1064, 13087, 1876, 11641, 4709, 12, 4875, 1227, 16, 1842, 1042, 16, 2195, 87, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 971, 732, 336, 279, 2441, 598, 2441, 67, 1937, 294, 268, 21, 471, 2441, 67, 409, 30, 268, 22, 18, 203, 377, 380, 9697, 309, 732, 741, 279, 590, 628, 315, 88, 2080, 6, 358, 315, 748, 83, 9654, 203, 377, 380, 7835, 309, 326, 3751, 353, 638, 294, 225, 268, 21, 411, 268, 2080, 411, 3574, 84, 411, 268, 22, 203, 377, 380, 9697, 732, 1410, 486, 336, 1634, 8220, 434, 2146, 306, 88, 2080, 16, 268, 869, 65, 203, 377, 380, 7835, 333, 1410, 506, 326, 648, 364, 3614, 6055, 309, 1915, 353, 11392, 6055, 401, 203, 377, 380, 632, 891, 1924, 978, 203, 377, 380, 632, 891, 1842, 1042, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100 ]
e23927b672c31ca21bf6689c7d83efbb7117029d
Hurence/historian
historian-server/src/integration-test/java/com/hurence/webapiservice/http/api/grafana/hurence/QueryEndPointShouldTruncateChunksIfNeededCurrentVersionIT.java
[ "Apache-2.0" ]
Java
testExpect2PointQueryMode2
null
@Test @Timeout(value = 5, timeUnit = TimeUnit.SECONDS) public void testExpect2PointQueryMode2(DockerComposeContainer container, Vertx vertx, VertxTestContext testContext) { initVerticlesWithQueryMode2(container, vertx) .doOnError(testContext::failNow) .blockingGet(); List<RequestResponseConfI<?>> confs = Arrays.asList( new RequestResponseConf<JsonArray>(HURENCE_DATASOURCE_GRAFANA_QUERY_API_ENDPOINT, "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode2/request.json", "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode2/expectedResponse.json", OK, StatusMessages.OK, BodyCodec.jsonArray(), vertx) ); AssertResponseGivenRequestHelper .assertRequestGiveResponseFromFileAndFinishTest(webClient, testContext, confs); }
/** * If we get a chunk with chunk_start : t1 and chunk_end: t2. * Then if we do a request from "tfrom" to "tto". * And if the following is true : t1 < tfrom < ttp < t2 * Then we should not get point outside of scope [tfrom, tto] * And this should be the case for every chunks if there is several chunks ! * @param vertx * @param testContext */
If we get a chunk with chunk_start : t1 and chunk_end: t2. Then if we do a request from "tfrom" to "tto". And if the following is true : t1 < tfrom < ttp < t2 Then we should not get point outside of scope [tfrom, tto] And this should be the case for every chunks if there is several chunks . @param vertx @param testContext
[ "If", "we", "get", "a", "chunk", "with", "chunk_start", ":", "t1", "and", "chunk_end", ":", "t2", ".", "Then", "if", "we", "do", "a", "request", "from", "\"", "tfrom", "\"", "to", "\"", "tto", "\"", ".", "And", "if", "the", "following", "is", "true", ":", "t1", "<", "tfrom", "<", "ttp", "<", "t2", "Then", "we", "should", "not", "get", "point", "outside", "of", "scope", "[", "tfrom", "tto", "]", "And", "this", "should", "be", "the", "case", "for", "every", "chunks", "if", "there", "is", "several", "chunks", ".", "@param", "vertx", "@param", "testContext" ]
@Test @Timeout(value = 5, timeUnit = TimeUnit.SECONDS) public void testExpect2PointQueryMode2(DockerComposeContainer container, Vertx vertx, VertxTestContext testContext) { initVerticlesWithQueryMode2(container, vertx) .doOnError(testContext::failNow) .blockingGet(); List<RequestResponseConfI<?>> confs = Arrays.asList( new RequestResponseConf<JsonArray>(HURENCE_DATASOURCE_GRAFANA_QUERY_API_ENDPOINT, "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode2/request.json", "/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode2/expectedResponse.json", OK, StatusMessages.OK, BodyCodec.jsonArray(), vertx) ); AssertResponseGivenRequestHelper .assertRequestGiveResponseFromFileAndFinishTest(webClient, testContext, confs); }
[ "@", "Test", "@", "Timeout", "(", "value", "=", "5", ",", "timeUnit", "=", "TimeUnit", ".", "SECONDS", ")", "public", "void", "testExpect2PointQueryMode2", "(", "DockerComposeContainer", "container", ",", "Vertx", "vertx", ",", "VertxTestContext", "testContext", ")", "{", "initVerticlesWithQueryMode2", "(", "container", ",", "vertx", ")", ".", "doOnError", "(", "testContext", "::", "failNow", ")", ".", "blockingGet", "(", ")", ";", "List", "<", "RequestResponseConfI", "<", "?", ">", ">", "confs", "=", "Arrays", ".", "asList", "(", "new", "RequestResponseConf", "<", "JsonArray", ">", "(", "HURENCE_DATASOURCE_GRAFANA_QUERY_API_ENDPOINT", ",", "\"/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode2/request.json\"", ",", "\"/http/grafana/hurence/query/shouldTruncateChunksIfNeeded/test2QueryMode2/expectedResponse.json\"", ",", "OK", ",", "StatusMessages", ".", "OK", ",", "BodyCodec", ".", "jsonArray", "(", ")", ",", "vertx", ")", ")", ";", "AssertResponseGivenRequestHelper", ".", "assertRequestGiveResponseFromFileAndFinishTest", "(", "webClient", ",", "testContext", ",", "confs", ")", ";", "}" ]
If we get a chunk with chunk_start : t1 and chunk_end: t2.
[ "If", "we", "get", "a", "chunk", "with", "chunk_start", ":", "t1", "and", "chunk_end", ":", "t2", "." ]
[]
[ { "param": "container", "type": "DockerComposeContainer" }, { "param": "vertx", "type": "Vertx" }, { "param": "testContext", "type": "VertxTestContext" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "container", "type": "DockerComposeContainer", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "vertx", "type": "Vertx", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "testContext", "type": "VertxTestContext", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 632, 2694, 12, 1132, 273, 1381, 16, 23874, 273, 9206, 18, 11609, 13, 203, 565, 1071, 918, 1842, 11988, 22, 2148, 1138, 2309, 22, 12, 14174, 22375, 2170, 1478, 16, 203, 4766, 6647, 6160, 978, 1924, 978, 16, 203, 4766, 6647, 6160, 978, 4709, 1042, 1842, 1042, 13, 288, 203, 3639, 1208, 4828, 8383, 1190, 1138, 2309, 22, 12, 3782, 16, 1924, 978, 13, 203, 7734, 263, 2896, 11427, 12, 3813, 1042, 2866, 6870, 8674, 13, 203, 7734, 263, 18926, 967, 5621, 203, 3639, 987, 32, 691, 1064, 3976, 45, 12880, 9778, 2195, 87, 273, 5647, 18, 345, 682, 12, 203, 7734, 394, 1567, 1064, 3976, 32, 3185, 1076, 34, 12, 44, 4830, 50, 1441, 67, 11102, 3033, 51, 5727, 67, 24554, 42, 1258, 37, 67, 10753, 67, 2557, 67, 18506, 16, 203, 13491, 2206, 2505, 19, 2752, 74, 13848, 19, 76, 25267, 19, 2271, 19, 13139, 25871, 14975, 18299, 19, 3813, 22, 1138, 2309, 22, 19, 2293, 18, 1977, 3113, 203, 13491, 2206, 2505, 19, 2752, 74, 13848, 19, 76, 25267, 19, 2271, 19, 13139, 25871, 14975, 18299, 19, 3813, 22, 1138, 2309, 22, 19, 3825, 1064, 18, 1977, 3113, 203, 13491, 7791, 16, 2685, 5058, 18, 3141, 16, 203, 13491, 5652, 11008, 18, 1977, 1076, 9334, 1924, 978, 13, 203, 3639, 11272, 203, 3639, 5452, 1064, 6083, 691, 2276, 203, 7734, 263, 11231, 691, 43, 688, 1064, 13087, 1876, 11641, 4709, 12, 4875, 1227, 16, 1842, 1042, 16, 2195, 87, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 971, 732, 336, 279, 2441, 598, 2441, 67, 1937, 294, 268, 21, 471, 2441, 67, 409, 30, 268, 22, 18, 203, 377, 380, 9697, 309, 732, 741, 279, 590, 628, 315, 88, 2080, 6, 358, 315, 748, 83, 9654, 203, 377, 380, 7835, 309, 326, 3751, 353, 638, 294, 225, 268, 21, 411, 268, 2080, 411, 3574, 84, 411, 268, 22, 203, 377, 380, 9697, 732, 1410, 486, 336, 1634, 8220, 434, 2146, 306, 88, 2080, 16, 268, 869, 65, 203, 377, 380, 7835, 333, 1410, 506, 326, 648, 364, 3614, 6055, 309, 1915, 353, 11392, 6055, 401, 203, 377, 380, 632, 891, 1924, 978, 203, 377, 380, 632, 891, 1842, 1042, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100 ]
b4f5076d904d897242360e725dbb7aec1d740ea1
Hurence/historian
logisland-timeseries/src/main/java/com/hurence/logisland/sampling/record/FirstItemRecordSampler.java
[ "Apache-2.0" ]
Java
sample
null
@Override public List<Record> sample(List<Record> inputRecords) { // simple downsample to numBucket data points return SamplingUtils.grouped(inputRecords, bucketSize) .map(record -> getTimeValueRecord(record.get(0))) .collect(Collectors.toList()); }
/** * divide the points sequence into equally sized buckets * and select the first point of each bucket * * @param inputRecords the iput list * @return */
divide the points sequence into equally sized buckets and select the first point of each bucket @param inputRecords the iput list @return
[ "divide", "the", "points", "sequence", "into", "equally", "sized", "buckets", "and", "select", "the", "first", "point", "of", "each", "bucket", "@param", "inputRecords", "the", "iput", "list", "@return" ]
@Override public List<Record> sample(List<Record> inputRecords) { return SamplingUtils.grouped(inputRecords, bucketSize) .map(record -> getTimeValueRecord(record.get(0))) .collect(Collectors.toList()); }
[ "@", "Override", "public", "List", "<", "Record", ">", "sample", "(", "List", "<", "Record", ">", "inputRecords", ")", "{", "return", "SamplingUtils", ".", "grouped", "(", "inputRecords", ",", "bucketSize", ")", ".", "map", "(", "record", "->", "getTimeValueRecord", "(", "record", ".", "get", "(", "0", ")", ")", ")", ".", "collect", "(", "Collectors", ".", "toList", "(", ")", ")", ";", "}" ]
divide the points sequence into equally sized buckets and select the first point of each bucket
[ "divide", "the", "points", "sequence", "into", "equally", "sized", "buckets", "and", "select", "the", "first", "point", "of", "each", "bucket" ]
[ "// simple downsample to numBucket data points" ]
[ { "param": "inputRecords", "type": "List<Record>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inputRecords", "type": "List<Record>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 987, 32, 2115, 34, 3296, 12, 682, 32, 2115, 34, 810, 6499, 13, 288, 203, 3639, 368, 4143, 2588, 6358, 358, 818, 4103, 501, 3143, 203, 3639, 327, 348, 7639, 1989, 18, 25472, 12, 2630, 6499, 16, 2783, 1225, 13, 203, 7734, 263, 1458, 12, 3366, 317, 6135, 620, 2115, 12, 3366, 18, 588, 12, 20, 20349, 203, 7734, 263, 14676, 12, 10808, 1383, 18, 869, 682, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 12326, 326, 3143, 3102, 1368, 1298, 1230, 26046, 9169, 203, 377, 380, 471, 2027, 326, 1122, 1634, 434, 1517, 2783, 203, 377, 380, 203, 377, 380, 632, 891, 810, 6499, 326, 277, 458, 666, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
754b939bce8f7a83b360fbe5855edadcb75c88ee
Hurence/historian
historian-server/src/main/java/com/hurence/webapiservice/timeseries/extractor/TimeSeriesExtracterUtil.java
[ "Apache-2.0" ]
Java
calculSamplingConf
SamplingConf
public static SamplingConf calculSamplingConf(SamplingConf samplingConf, long totalNumberOfPoint) { SamplingAlgorithm algorithm = calculSamplingAlgorithm(samplingConf, totalNumberOfPoint); int bucketSize = samplingConf.getBucketSize(); if (bucketSize == 0) throw new IllegalArgumentException("bucket size can not be '0' !"); long numberOfPointToReturnWithCurrentBucket = totalNumberOfPoint / bucketSize; if (totalNumberOfPoint > samplingConf.getMaxPoint() && numberOfPointToReturnWithCurrentBucket > samplingConf.getMaxPoint()) { //verify there is not too many point to return them all or to return them with user chosen bucket size // otherwise recalcul bucket size accordingly. bucketSize = calculBucketSize(samplingConf.getMaxPoint(), totalNumberOfPoint); } return new SamplingConf(algorithm, bucketSize, samplingConf.getMaxPoint()); }
/** * return the sampling in input if it is compatible with totalNumberOfPoint to sample. * If totalNumberOfPoint > maxpoint then we have to sample. * Calcul bucket size if needed (dependending on samplingConf.getMaxPoint() and totalNumberOfPoint * @param samplingConf * @param totalNumberOfPoint * @return */
return the sampling in input if it is compatible with totalNumberOfPoint to sample. If totalNumberOfPoint > maxpoint then we have to sample. Calcul bucket size if needed (dependending on samplingConf.getMaxPoint() and totalNumberOfPoint @param samplingConf @param totalNumberOfPoint @return
[ "return", "the", "sampling", "in", "input", "if", "it", "is", "compatible", "with", "totalNumberOfPoint", "to", "sample", ".", "If", "totalNumberOfPoint", ">", "maxpoint", "then", "we", "have", "to", "sample", ".", "Calcul", "bucket", "size", "if", "needed", "(", "dependending", "on", "samplingConf", ".", "getMaxPoint", "()", "and", "totalNumberOfPoint", "@param", "samplingConf", "@param", "totalNumberOfPoint", "@return" ]
public static SamplingConf calculSamplingConf(SamplingConf samplingConf, long totalNumberOfPoint) { SamplingAlgorithm algorithm = calculSamplingAlgorithm(samplingConf, totalNumberOfPoint); int bucketSize = samplingConf.getBucketSize(); if (bucketSize == 0) throw new IllegalArgumentException("bucket size can not be '0' !"); long numberOfPointToReturnWithCurrentBucket = totalNumberOfPoint / bucketSize; if (totalNumberOfPoint > samplingConf.getMaxPoint() && numberOfPointToReturnWithCurrentBucket > samplingConf.getMaxPoint()) { bucketSize = calculBucketSize(samplingConf.getMaxPoint(), totalNumberOfPoint); } return new SamplingConf(algorithm, bucketSize, samplingConf.getMaxPoint()); }
[ "public", "static", "SamplingConf", "calculSamplingConf", "(", "SamplingConf", "samplingConf", ",", "long", "totalNumberOfPoint", ")", "{", "SamplingAlgorithm", "algorithm", "=", "calculSamplingAlgorithm", "(", "samplingConf", ",", "totalNumberOfPoint", ")", ";", "int", "bucketSize", "=", "samplingConf", ".", "getBucketSize", "(", ")", ";", "if", "(", "bucketSize", "==", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"bucket size can not be '0' !\"", ")", ";", "long", "numberOfPointToReturnWithCurrentBucket", "=", "totalNumberOfPoint", "/", "bucketSize", ";", "if", "(", "totalNumberOfPoint", ">", "samplingConf", ".", "getMaxPoint", "(", ")", "&&", "numberOfPointToReturnWithCurrentBucket", ">", "samplingConf", ".", "getMaxPoint", "(", ")", ")", "{", "bucketSize", "=", "calculBucketSize", "(", "samplingConf", ".", "getMaxPoint", "(", ")", ",", "totalNumberOfPoint", ")", ";", "}", "return", "new", "SamplingConf", "(", "algorithm", ",", "bucketSize", ",", "samplingConf", ".", "getMaxPoint", "(", ")", ")", ";", "}" ]
return the sampling in input if it is compatible with totalNumberOfPoint to sample.
[ "return", "the", "sampling", "in", "input", "if", "it", "is", "compatible", "with", "totalNumberOfPoint", "to", "sample", "." ]
[ "//verify there is not too many point to return them all or to return them with user chosen bucket size", "// otherwise recalcul bucket size accordingly." ]
[ { "param": "samplingConf", "type": "SamplingConf" }, { "param": "totalNumberOfPoint", "type": "long" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "samplingConf", "type": "SamplingConf", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "totalNumberOfPoint", "type": "long", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 348, 7639, 3976, 3026, 25149, 3976, 12, 25149, 3976, 11558, 3976, 16, 1525, 2078, 9226, 2148, 13, 288, 203, 3639, 348, 7639, 6801, 4886, 273, 3026, 25149, 6801, 12, 23002, 3976, 16, 2078, 9226, 2148, 1769, 203, 3639, 509, 2783, 1225, 273, 11558, 3976, 18, 588, 4103, 1225, 5621, 203, 3639, 309, 261, 7242, 1225, 422, 374, 13, 604, 394, 2754, 2932, 7242, 963, 848, 486, 506, 296, 20, 11, 401, 8863, 203, 3639, 1525, 7922, 2148, 27014, 1190, 3935, 4103, 273, 2078, 9226, 2148, 342, 2783, 1225, 31, 203, 3639, 309, 261, 4963, 9226, 2148, 405, 11558, 3976, 18, 588, 2747, 2148, 1435, 597, 203, 7734, 7922, 2148, 27014, 1190, 3935, 4103, 405, 11558, 3976, 18, 588, 2747, 2148, 10756, 288, 203, 5411, 368, 8705, 1915, 353, 486, 4885, 4906, 1634, 358, 327, 2182, 777, 578, 358, 327, 2182, 598, 729, 10447, 2783, 963, 203, 5411, 368, 3541, 283, 12780, 2783, 963, 15905, 18, 203, 5411, 2783, 1225, 273, 3026, 4103, 1225, 12, 23002, 3976, 18, 588, 2747, 2148, 9334, 2078, 9226, 2148, 1769, 203, 3639, 289, 203, 3639, 327, 394, 348, 7639, 3976, 12, 12743, 16, 2783, 1225, 16, 11558, 3976, 18, 588, 2747, 2148, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 327, 326, 11558, 316, 810, 309, 518, 353, 7318, 598, 2078, 9226, 2148, 358, 3296, 18, 203, 377, 380, 971, 2078, 9226, 2148, 405, 943, 1153, 1508, 732, 1240, 358, 3296, 18, 203, 377, 380, 15994, 2783, 963, 309, 3577, 261, 5817, 2846, 603, 11558, 3976, 18, 588, 2747, 2148, 1435, 471, 2078, 9226, 2148, 203, 377, 380, 632, 891, 11558, 3976, 203, 377, 380, 632, 891, 2078, 9226, 2148, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f75fa95584c8bf57f44e2d56c0fd42842c7895c3
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/functions/analyse/Trend.java
[ "Apache-2.0" ]
Java
execute
null
@Override public void execute(MetricTimeSeries timeSeries, FunctionValueMap functionValueMap) { //We need to sort the time series for this analysis timeSeries.sort(); //Calculate the linear regression LinearRegression linearRegression = new LinearRegression(timeSeries.getTimestamps(), timeSeries.getValues()); double slope = linearRegression.slope(); //If we have a positive slope, we return 1 otherwise -1 functionValueMap.add(this, slope > 0, null); }
/** * Detects trends in time series using a linear regression. * * @param functionValueMap * @return 1 if there is a positive trend, otherwise -1 */
Detects trends in time series using a linear regression. @param functionValueMap @return 1 if there is a positive trend, otherwise -1
[ "Detects", "trends", "in", "time", "series", "using", "a", "linear", "regression", ".", "@param", "functionValueMap", "@return", "1", "if", "there", "is", "a", "positive", "trend", "otherwise", "-", "1" ]
@Override public void execute(MetricTimeSeries timeSeries, FunctionValueMap functionValueMap) { timeSeries.sort(); LinearRegression linearRegression = new LinearRegression(timeSeries.getTimestamps(), timeSeries.getValues()); double slope = linearRegression.slope(); functionValueMap.add(this, slope > 0, null); }
[ "@", "Override", "public", "void", "execute", "(", "MetricTimeSeries", "timeSeries", ",", "FunctionValueMap", "functionValueMap", ")", "{", "timeSeries", ".", "sort", "(", ")", ";", "LinearRegression", "linearRegression", "=", "new", "LinearRegression", "(", "timeSeries", ".", "getTimestamps", "(", ")", ",", "timeSeries", ".", "getValues", "(", ")", ")", ";", "double", "slope", "=", "linearRegression", ".", "slope", "(", ")", ";", "functionValueMap", ".", "add", "(", "this", ",", "slope", ">", "0", ",", "null", ")", ";", "}" ]
Detects trends in time series using a linear regression.
[ "Detects", "trends", "in", "time", "series", "using", "a", "linear", "regression", "." ]
[ "//We need to sort the time series for this analysis", "//Calculate the linear regression", "//If we have a positive slope, we return 1 otherwise -1" ]
[ { "param": "timeSeries", "type": "MetricTimeSeries" }, { "param": "functionValueMap", "type": "FunctionValueMap" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "timeSeries", "type": "MetricTimeSeries", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "functionValueMap", "type": "FunctionValueMap", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 918, 1836, 12, 5396, 28486, 813, 6485, 16, 4284, 26795, 445, 26795, 13, 288, 203, 203, 3639, 368, 3218, 1608, 358, 1524, 326, 813, 4166, 364, 333, 6285, 203, 3639, 813, 6485, 18, 3804, 5621, 203, 3639, 368, 8695, 326, 9103, 23215, 203, 3639, 13921, 1617, 16345, 9103, 1617, 16345, 273, 394, 13921, 1617, 16345, 12, 957, 6485, 18, 588, 23761, 9334, 813, 6485, 18, 588, 1972, 10663, 203, 3639, 1645, 17543, 273, 9103, 1617, 16345, 18, 30320, 5621, 203, 3639, 368, 2047, 732, 1240, 279, 6895, 17543, 16, 732, 327, 404, 3541, 300, 21, 203, 3639, 445, 26795, 18, 1289, 12, 2211, 16, 17543, 405, 374, 16, 446, 1769, 203, 203, 565,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 13796, 87, 268, 1187, 2377, 316, 813, 4166, 1450, 279, 9103, 23215, 18, 203, 377, 380, 203, 377, 380, 632, 891, 445, 26795, 203, 377, 380, 632, 2463, 404, 309, 1915, 353, 279, 6895, 268, 20262, 16, 3541, 300, 21, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a6e273a48558c74601952be9d02a1cbc3a0fc042
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/functions/transformation/MovingAverage.java
[ "Apache-2.0" ]
Java
execute
null
@Override public void execute(MetricTimeSeries timeSeries, FunctionValueMap functionValueMap) { if(timeSeries.size() <= 1) return; try { //we need a sorted time series timeSeries.sort(); //get the raw values as arrays double[] values = timeSeries.getValuesAsArray(); long[] times = timeSeries.getTimestampsAsArray(); int timeSeriesSize = timeSeries.size(); //remove the old values timeSeries.clear(); int startIdx = 0; long current = times[0]; long currentWindowEnd = current + windowTime; long last = times[timeSeriesSize - 1]; boolean lastWindowOnlyOnePoint = true; //the start is already set for (int i = 0; i < timeSeriesSize; i++) { //fill window while (i < timeSeriesSize && !outsideWindow(currentWindowEnd, current)) { current = times[i++]; } //decrement counter to mark the last index position that is within the window i -= 1; //calculate the average of the values and the time evaluateAveragesAndAddToTimeSeries(timeSeries, values, times, startIdx, i); //slide the window startIdx++; currentWindowEnd = times[startIdx] + windowTime; //check if the current window end is larger equals the end timestamp if (currentWindowEnd >= last) { //break and add the last window lastWindowOnlyOnePoint = false; break; } } if (lastWindowOnlyOnePoint) { timeSeries.add(times[timeSeriesSize - 1], values[timeSeriesSize - 1]); } else { //add the last window evaluateAveragesAndAddToTimeSeries(timeSeries, values, times, startIdx, timeSeriesSize); } functionValueMap.add(this); }catch (Exception ex){ logger.error(ex.toString()); } }
/** * Calculates the moving average by sliding a window (timeSpan * unit, set in the constructor) over the time series. * First the window is filled with points whose timestamps are within the window and the averages of the window * are evaluated. Then the window slides over the next point, calculates the end and evaluates the averages and so on. * If the next point is not within the window, it slides anyway. The first point is dropped and the averages * of the remaining points are evaluated. If the next point also not within the window, again the first point is * dropped and so on until the end of the window is greater equals the time series end. * We do this as time series can have gaps that are larger than the defined window. * * @param timeSeries the time series that is transformed */
Calculates the moving average by sliding a window (timeSpan * unit, set in the constructor) over the time series. First the window is filled with points whose timestamps are within the window and the averages of the window are evaluated. Then the window slides over the next point, calculates the end and evaluates the averages and so on. If the next point is not within the window, it slides anyway. The first point is dropped and the averages of the remaining points are evaluated. If the next point also not within the window, again the first point is dropped and so on until the end of the window is greater equals the time series end. We do this as time series can have gaps that are larger than the defined window. @param timeSeries the time series that is transformed
[ "Calculates", "the", "moving", "average", "by", "sliding", "a", "window", "(", "timeSpan", "*", "unit", "set", "in", "the", "constructor", ")", "over", "the", "time", "series", ".", "First", "the", "window", "is", "filled", "with", "points", "whose", "timestamps", "are", "within", "the", "window", "and", "the", "averages", "of", "the", "window", "are", "evaluated", ".", "Then", "the", "window", "slides", "over", "the", "next", "point", "calculates", "the", "end", "and", "evaluates", "the", "averages", "and", "so", "on", ".", "If", "the", "next", "point", "is", "not", "within", "the", "window", "it", "slides", "anyway", ".", "The", "first", "point", "is", "dropped", "and", "the", "averages", "of", "the", "remaining", "points", "are", "evaluated", ".", "If", "the", "next", "point", "also", "not", "within", "the", "window", "again", "the", "first", "point", "is", "dropped", "and", "so", "on", "until", "the", "end", "of", "the", "window", "is", "greater", "equals", "the", "time", "series", "end", ".", "We", "do", "this", "as", "time", "series", "can", "have", "gaps", "that", "are", "larger", "than", "the", "defined", "window", ".", "@param", "timeSeries", "the", "time", "series", "that", "is", "transformed" ]
@Override public void execute(MetricTimeSeries timeSeries, FunctionValueMap functionValueMap) { if(timeSeries.size() <= 1) return; try { timeSeries.sort(); double[] values = timeSeries.getValuesAsArray(); long[] times = timeSeries.getTimestampsAsArray(); int timeSeriesSize = timeSeries.size(); timeSeries.clear(); int startIdx = 0; long current = times[0]; long currentWindowEnd = current + windowTime; long last = times[timeSeriesSize - 1]; boolean lastWindowOnlyOnePoint = true; for (int i = 0; i < timeSeriesSize; i++) { while (i < timeSeriesSize && !outsideWindow(currentWindowEnd, current)) { current = times[i++]; } i -= 1; evaluateAveragesAndAddToTimeSeries(timeSeries, values, times, startIdx, i); startIdx++; currentWindowEnd = times[startIdx] + windowTime; if (currentWindowEnd >= last) { lastWindowOnlyOnePoint = false; break; } } if (lastWindowOnlyOnePoint) { timeSeries.add(times[timeSeriesSize - 1], values[timeSeriesSize - 1]); } else { evaluateAveragesAndAddToTimeSeries(timeSeries, values, times, startIdx, timeSeriesSize); } functionValueMap.add(this); }catch (Exception ex){ logger.error(ex.toString()); } }
[ "@", "Override", "public", "void", "execute", "(", "MetricTimeSeries", "timeSeries", ",", "FunctionValueMap", "functionValueMap", ")", "{", "if", "(", "timeSeries", ".", "size", "(", ")", "<=", "1", ")", "return", ";", "try", "{", "timeSeries", ".", "sort", "(", ")", ";", "double", "[", "]", "values", "=", "timeSeries", ".", "getValuesAsArray", "(", ")", ";", "long", "[", "]", "times", "=", "timeSeries", ".", "getTimestampsAsArray", "(", ")", ";", "int", "timeSeriesSize", "=", "timeSeries", ".", "size", "(", ")", ";", "timeSeries", ".", "clear", "(", ")", ";", "int", "startIdx", "=", "0", ";", "long", "current", "=", "times", "[", "0", "]", ";", "long", "currentWindowEnd", "=", "current", "+", "windowTime", ";", "long", "last", "=", "times", "[", "timeSeriesSize", "-", "1", "]", ";", "boolean", "lastWindowOnlyOnePoint", "=", "true", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "timeSeriesSize", ";", "i", "++", ")", "{", "while", "(", "i", "<", "timeSeriesSize", "&&", "!", "outsideWindow", "(", "currentWindowEnd", ",", "current", ")", ")", "{", "current", "=", "times", "[", "i", "++", "]", ";", "}", "i", "-=", "1", ";", "evaluateAveragesAndAddToTimeSeries", "(", "timeSeries", ",", "values", ",", "times", ",", "startIdx", ",", "i", ")", ";", "startIdx", "++", ";", "currentWindowEnd", "=", "times", "[", "startIdx", "]", "+", "windowTime", ";", "if", "(", "currentWindowEnd", ">=", "last", ")", "{", "lastWindowOnlyOnePoint", "=", "false", ";", "break", ";", "}", "}", "if", "(", "lastWindowOnlyOnePoint", ")", "{", "timeSeries", ".", "add", "(", "times", "[", "timeSeriesSize", "-", "1", "]", ",", "values", "[", "timeSeriesSize", "-", "1", "]", ")", ";", "}", "else", "{", "evaluateAveragesAndAddToTimeSeries", "(", "timeSeries", ",", "values", ",", "times", ",", "startIdx", ",", "timeSeriesSize", ")", ";", "}", "functionValueMap", ".", "add", "(", "this", ")", ";", "}", "catch", "(", "Exception", "ex", ")", "{", "logger", ".", "error", "(", "ex", ".", "toString", "(", ")", ")", ";", "}", "}" ]
Calculates the moving average by sliding a window (timeSpan * unit, set in the constructor) over the time series.
[ "Calculates", "the", "moving", "average", "by", "sliding", "a", "window", "(", "timeSpan", "*", "unit", "set", "in", "the", "constructor", ")", "over", "the", "time", "series", "." ]
[ "//we need a sorted time series", "//get the raw values as arrays", "//remove the old values", "//the start is already set", "//fill window", "//decrement counter to mark the last index position that is within the window", "//calculate the average of the values and the time", "//slide the window", "//check if the current window end is larger equals the end timestamp", "//break and add the last window", "//add the last window" ]
[ { "param": "timeSeries", "type": "MetricTimeSeries" }, { "param": "functionValueMap", "type": "FunctionValueMap" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "timeSeries", "type": "MetricTimeSeries", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "functionValueMap", "type": "FunctionValueMap", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 918, 1836, 12, 5396, 28486, 813, 6485, 16, 4284, 26795, 445, 26795, 13, 288, 203, 203, 3639, 309, 12, 957, 6485, 18, 1467, 1435, 1648, 404, 13, 203, 5411, 327, 31, 203, 203, 3639, 775, 288, 203, 5411, 368, 1814, 1608, 279, 3115, 813, 4166, 203, 5411, 813, 6485, 18, 3804, 5621, 203, 203, 5411, 368, 588, 326, 1831, 924, 487, 5352, 203, 5411, 1645, 8526, 924, 273, 813, 6485, 18, 588, 1972, 19196, 5621, 203, 5411, 1525, 8526, 4124, 273, 813, 6485, 18, 588, 23761, 19196, 5621, 203, 203, 5411, 509, 813, 6485, 1225, 273, 813, 6485, 18, 1467, 5621, 203, 5411, 368, 4479, 326, 1592, 924, 203, 5411, 813, 6485, 18, 8507, 5621, 203, 203, 5411, 509, 27108, 273, 374, 31, 203, 5411, 1525, 783, 273, 4124, 63, 20, 15533, 203, 5411, 1525, 783, 3829, 1638, 273, 783, 397, 2742, 950, 31, 203, 5411, 1525, 1142, 273, 4124, 63, 957, 6485, 1225, 300, 404, 15533, 203, 203, 5411, 1250, 1142, 3829, 3386, 3335, 2148, 273, 638, 31, 203, 203, 5411, 368, 5787, 787, 353, 1818, 444, 203, 5411, 364, 261, 474, 277, 273, 374, 31, 277, 411, 813, 6485, 1225, 31, 277, 27245, 288, 203, 203, 7734, 368, 5935, 2742, 203, 7734, 1323, 261, 77, 411, 813, 6485, 1225, 597, 401, 659, 5564, 3829, 12, 2972, 3829, 1638, 16, 783, 3719, 288, 203, 10792, 783, 273, 4124, 63, 77, 9904, 15533, 203, 7734, 289, 203, 7734, 368, 323, 3702, 3895, 358, 2267, 326, 1142, 770, 1754, 716, 353, 3470, 326, 2742, 203, 7734, 277, 3947, 404, 31, 203, 203, 7734, 368, 11162, 326, 8164, 434, 326, 924, 471, 326, 813, 203, 7734, 5956, 37, 502, 1023, 1876, 986, 774, 28486, 12, 957, 6485, 16, 924, 16, 4124, 16, 27108, 16, 277, 1769, 203, 203, 7734, 368, 26371, 326, 2742, 203, 7734, 27108, 9904, 31, 203, 7734, 783, 3829, 1638, 273, 4124, 63, 1937, 4223, 65, 397, 2742, 950, 31, 203, 203, 7734, 368, 1893, 309, 326, 783, 2742, 679, 353, 10974, 1606, 326, 679, 2858, 203, 7734, 309, 261, 2972, 3829, 1638, 1545, 1142, 13, 288, 203, 10792, 368, 8820, 471, 527, 326, 1142, 2742, 203, 10792, 1142, 3829, 3386, 3335, 2148, 273, 629, 31, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 203, 5411, 309, 261, 2722, 3829, 3386, 3335, 2148, 13, 288, 203, 7734, 813, 6485, 18, 1289, 12, 8293, 63, 957, 6485, 1225, 300, 404, 6487, 924, 63, 957, 6485, 1225, 300, 404, 19226, 203, 5411, 289, 469, 288, 203, 7734, 368, 1289, 326, 1142, 2742, 203, 7734, 5956, 37, 502, 1023, 1876, 986, 774, 28486, 12, 957, 6485, 16, 924, 16, 4124, 16, 27108, 16, 813, 6485, 1225, 1769, 203, 5411, 289, 203, 203, 5411, 445, 26795, 18, 1289, 12, 2211, 1769, 203, 3639, 289, 14683, 261, 503, 431, 15329, 203, 5411, 1194, 18, 1636, 12, 338, 18, 10492, 10663, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 3143, 8272, 11267, 854, 3470, 326, 2742, 471, 326, 23713, 1023, 434, 326, 2742, 203, 377, 380, 854, 12697, 18, 9697, 326, 2742, 30119, 1879, 326, 1024, 1634, 16, 17264, 326, 679, 471, 20996, 326, 23713, 1023, 471, 1427, 603, 18, 203, 377, 380, 971, 326, 1024, 1634, 353, 486, 3470, 326, 2742, 16, 518, 30119, 13466, 18, 1021, 1122, 1634, 353, 14611, 471, 326, 23713, 1023, 203, 377, 380, 434, 326, 4463, 3143, 854, 12697, 18, 971, 326, 1024, 1634, 2546, 486, 3470, 326, 2742, 16, 3382, 2 ]
8cd3fcbd56735ee0a0977773c739c0a52043bb4c
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sampling/MinSamplerWithQuality.java
[ "Apache-2.0" ]
Java
sample
null
@Override public List<SAMPLED> sample(List<SAMPLED> inputRecords) { return SamplingUtils.grouped(inputRecords, bucketSize) .map(bucket -> { SummaryStatistics stats = new SummaryStatistics(); bucket.forEach(element -> { final Double recordValue = timeSerieHandlerWithQuality.getTimeserieValue(element); if (recordValue != null) stats.addValue(recordValue); }); SummaryStatistics statsQuality = new SummaryStatistics(); bucket.forEach(element -> { final Float recordQuality = timeSerieHandlerWithQuality.getTimeserieQuality(element); if (recordQuality != null) statsQuality.addValue(recordQuality); }); final double minValue = stats.getMin(); final float minQuality = (float) statsQuality.getMin(); final long timestamp = timeSerieHandlerWithQuality.getTimeserieTimestamp(bucket.get(0)); final SAMPLED sampleElement = timeSerieHandlerWithQuality.createTimeserie(timestamp, minValue, minQuality); return sampleElement; }).collect(Collectors.toList()); }
/** * divide the points sequence into equally sized buckets * and compute average of each bucket * * @param inputRecords the input list * @return */
divide the points sequence into equally sized buckets and compute average of each bucket @param inputRecords the input list @return
[ "divide", "the", "points", "sequence", "into", "equally", "sized", "buckets", "and", "compute", "average", "of", "each", "bucket", "@param", "inputRecords", "the", "input", "list", "@return" ]
@Override public List<SAMPLED> sample(List<SAMPLED> inputRecords) { return SamplingUtils.grouped(inputRecords, bucketSize) .map(bucket -> { SummaryStatistics stats = new SummaryStatistics(); bucket.forEach(element -> { final Double recordValue = timeSerieHandlerWithQuality.getTimeserieValue(element); if (recordValue != null) stats.addValue(recordValue); }); SummaryStatistics statsQuality = new SummaryStatistics(); bucket.forEach(element -> { final Float recordQuality = timeSerieHandlerWithQuality.getTimeserieQuality(element); if (recordQuality != null) statsQuality.addValue(recordQuality); }); final double minValue = stats.getMin(); final float minQuality = (float) statsQuality.getMin(); final long timestamp = timeSerieHandlerWithQuality.getTimeserieTimestamp(bucket.get(0)); final SAMPLED sampleElement = timeSerieHandlerWithQuality.createTimeserie(timestamp, minValue, minQuality); return sampleElement; }).collect(Collectors.toList()); }
[ "@", "Override", "public", "List", "<", "SAMPLED", ">", "sample", "(", "List", "<", "SAMPLED", ">", "inputRecords", ")", "{", "return", "SamplingUtils", ".", "grouped", "(", "inputRecords", ",", "bucketSize", ")", ".", "map", "(", "bucket", "->", "{", "SummaryStatistics", "stats", "=", "new", "SummaryStatistics", "(", ")", ";", "bucket", ".", "forEach", "(", "element", "->", "{", "final", "Double", "recordValue", "=", "timeSerieHandlerWithQuality", ".", "getTimeserieValue", "(", "element", ")", ";", "if", "(", "recordValue", "!=", "null", ")", "stats", ".", "addValue", "(", "recordValue", ")", ";", "}", ")", ";", "SummaryStatistics", "statsQuality", "=", "new", "SummaryStatistics", "(", ")", ";", "bucket", ".", "forEach", "(", "element", "->", "{", "final", "Float", "recordQuality", "=", "timeSerieHandlerWithQuality", ".", "getTimeserieQuality", "(", "element", ")", ";", "if", "(", "recordQuality", "!=", "null", ")", "statsQuality", ".", "addValue", "(", "recordQuality", ")", ";", "}", ")", ";", "final", "double", "minValue", "=", "stats", ".", "getMin", "(", ")", ";", "final", "float", "minQuality", "=", "(", "float", ")", "statsQuality", ".", "getMin", "(", ")", ";", "final", "long", "timestamp", "=", "timeSerieHandlerWithQuality", ".", "getTimeserieTimestamp", "(", "bucket", ".", "get", "(", "0", ")", ")", ";", "final", "SAMPLED", "sampleElement", "=", "timeSerieHandlerWithQuality", ".", "createTimeserie", "(", "timestamp", ",", "minValue", ",", "minQuality", ")", ";", "return", "sampleElement", ";", "}", ")", ".", "collect", "(", "Collectors", ".", "toList", "(", ")", ")", ";", "}" ]
divide the points sequence into equally sized buckets and compute average of each bucket
[ "divide", "the", "points", "sequence", "into", "equally", "sized", "buckets", "and", "compute", "average", "of", "each", "bucket" ]
[]
[ { "param": "inputRecords", "type": "List<SAMPLED>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inputRecords", "type": "List<SAMPLED>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 987, 32, 55, 8900, 6687, 34, 3296, 12, 682, 32, 55, 8900, 6687, 34, 810, 6499, 13, 288, 203, 3639, 327, 348, 7639, 1989, 18, 25472, 12, 2630, 6499, 16, 2783, 1225, 13, 203, 7734, 263, 1458, 12, 7242, 317, 288, 203, 10792, 17967, 8569, 3177, 273, 394, 17967, 8569, 5621, 203, 10792, 2783, 18, 1884, 3442, 12, 2956, 317, 288, 203, 13491, 727, 3698, 1409, 620, 273, 813, 827, 1385, 1503, 1190, 14846, 18, 588, 10694, 264, 1385, 620, 12, 2956, 1769, 203, 13491, 309, 261, 3366, 620, 480, 446, 13, 203, 18701, 3177, 18, 1289, 620, 12, 3366, 620, 1769, 203, 10792, 15549, 203, 10792, 17967, 8569, 3177, 14846, 273, 394, 17967, 8569, 5621, 203, 10792, 2783, 18, 1884, 3442, 12, 2956, 317, 288, 203, 13491, 727, 5450, 1409, 14846, 273, 813, 827, 1385, 1503, 1190, 14846, 18, 588, 10694, 264, 1385, 14846, 12, 2956, 1769, 203, 13491, 309, 261, 3366, 14846, 480, 446, 13, 203, 18701, 3177, 14846, 18, 1289, 620, 12, 3366, 14846, 1769, 203, 10792, 15549, 203, 10792, 727, 1645, 20533, 273, 3177, 18, 588, 2930, 5621, 203, 10792, 727, 1431, 1131, 14846, 273, 261, 5659, 13, 3177, 14846, 18, 588, 2930, 5621, 203, 10792, 727, 1525, 2858, 273, 813, 827, 1385, 1503, 1190, 14846, 18, 588, 10694, 264, 1385, 4921, 12, 7242, 18, 588, 12, 20, 10019, 203, 10792, 727, 348, 8900, 6687, 3296, 1046, 273, 813, 827, 1385, 1503, 1190, 14846, 18, 2640, 10694, 264, 1385, 12, 5508, 16, 20533, 16, 1131, 14846, 1769, 203, 10792, 327, 3296, 1046, 31, 203, 7734, 289, 2934, 14676, 12, 10808, 1383, 18, 869, 682, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1,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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 12326, 326, 3143, 3102, 1368, 1298, 1230, 26046, 9169, 203, 377, 380, 471, 3671, 8164, 434, 1517, 2783, 203, 377, 380, 203, 377, 380, 632, 891, 810, 6499, 326, 810, 666, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b258b47362a0ed3b4c68be49403488dee20db945
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sax/SaxAnalyzer.java
[ "Apache-2.0" ]
Java
countOccurrence
null
public static Map<Integer, Integer> countOccurrence(int[] numbersToProcess) { final int alphabeticMax = 30; int[] possibleNumbers = new int[alphabeticMax]; Map<Integer, Integer> result = new HashMap<Integer, Integer>(); for (int i = 0; i < numbersToProcess.length; ++i) { possibleNumbers[numbersToProcess[i]] = possibleNumbers[numbersToProcess[i]] + 1; result.put(numbersToProcess[i], possibleNumbers[numbersToProcess[i]]); } return result; }
/** *Method that counts the number of occurrence of intergers in an array * @param numbersToProcess array of integer * @return map of each element of input array and it's occurrences */
Method that counts the number of occurrence of intergers in an array @param numbersToProcess array of integer @return map of each element of input array and it's occurrences
[ "Method", "that", "counts", "the", "number", "of", "occurrence", "of", "intergers", "in", "an", "array", "@param", "numbersToProcess", "array", "of", "integer", "@return", "map", "of", "each", "element", "of", "input", "array", "and", "it", "'", "s", "occurrences" ]
public static Map<Integer, Integer> countOccurrence(int[] numbersToProcess) { final int alphabeticMax = 30; int[] possibleNumbers = new int[alphabeticMax]; Map<Integer, Integer> result = new HashMap<Integer, Integer>(); for (int i = 0; i < numbersToProcess.length; ++i) { possibleNumbers[numbersToProcess[i]] = possibleNumbers[numbersToProcess[i]] + 1; result.put(numbersToProcess[i], possibleNumbers[numbersToProcess[i]]); } return result; }
[ "public", "static", "Map", "<", "Integer", ",", "Integer", ">", "countOccurrence", "(", "int", "[", "]", "numbersToProcess", ")", "{", "final", "int", "alphabeticMax", "=", "30", ";", "int", "[", "]", "possibleNumbers", "=", "new", "int", "[", "alphabeticMax", "]", ";", "Map", "<", "Integer", ",", "Integer", ">", "result", "=", "new", "HashMap", "<", "Integer", ",", "Integer", ">", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "numbersToProcess", ".", "length", ";", "++", "i", ")", "{", "possibleNumbers", "[", "numbersToProcess", "[", "i", "]", "]", "=", "possibleNumbers", "[", "numbersToProcess", "[", "i", "]", "]", "+", "1", ";", "result", ".", "put", "(", "numbersToProcess", "[", "i", "]", ",", "possibleNumbers", "[", "numbersToProcess", "[", "i", "]", "]", ")", ";", "}", "return", "result", ";", "}" ]
Method that counts the number of occurrence of intergers in an array @param numbersToProcess array of integer @return map of each element of input array and it's occurrences
[ "Method", "that", "counts", "the", "number", "of", "occurrence", "of", "intergers", "in", "an", "array", "@param", "numbersToProcess", "array", "of", "integer", "@return", "map", "of", "each", "element", "of", "input", "array", "and", "it", "'", "s", "occurrences" ]
[]
[ { "param": "numbersToProcess", "type": "int[]" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "numbersToProcess", "type": "int[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1635, 32, 4522, 16, 2144, 34, 1056, 24267, 12, 474, 8526, 5600, 30004, 13, 288, 203, 3639, 727, 509, 524, 8133, 7943, 2747, 273, 5196, 31, 203, 3639, 509, 8526, 3323, 10072, 273, 394, 509, 63, 287, 8133, 7943, 2747, 15533, 203, 3639, 1635, 32, 4522, 16, 2144, 34, 563, 273, 394, 4317, 32, 4522, 16, 2144, 34, 5621, 203, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 5600, 30004, 18, 2469, 31, 965, 77, 13, 288, 203, 5411, 3323, 10072, 63, 13851, 30004, 63, 77, 13563, 273, 3323, 10072, 63, 13851, 30004, 63, 77, 13563, 397, 404, 31, 203, 5411, 563, 18, 458, 12, 13851, 30004, 63, 77, 6487, 3323, 10072, 63, 13851, 30004, 63, 77, 13563, 1769, 203, 3639, 289, 203, 3639, 327, 563, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1305, 716, 6880, 326, 1300, 434, 13083, 434, 1554, 6215, 316, 392, 526, 203, 377, 380, 632, 891, 5600, 30004, 526, 434, 3571, 203, 377, 380, 632, 2463, 852, 434, 1517, 930, 434, 810, 526, 471, 518, 1807, 15698, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b258b47362a0ed3b4c68be49403488dee20db945
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sax/SaxAnalyzer.java
[ "Apache-2.0" ]
Java
convertStringToCharArray
null
public static char[] convertStringToCharArray (String str){ char[] result = new char[str.length()]; for (int i = 0; i < str.length(); i++) result[i] = str.charAt(i); return result; }
/** * Method that converts a string into an array of characters * @param str input sax coding string * @return array of characters */
Method that converts a string into an array of characters @param str input sax coding string @return array of characters
[ "Method", "that", "converts", "a", "string", "into", "an", "array", "of", "characters", "@param", "str", "input", "sax", "coding", "string", "@return", "array", "of", "characters" ]
public static char[] convertStringToCharArray (String str){ char[] result = new char[str.length()]; for (int i = 0; i < str.length(); i++) result[i] = str.charAt(i); return result; }
[ "public", "static", "char", "[", "]", "convertStringToCharArray", "(", "String", "str", ")", "{", "char", "[", "]", "result", "=", "new", "char", "[", "str", ".", "length", "(", ")", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "str", ".", "length", "(", ")", ";", "i", "++", ")", "result", "[", "i", "]", "=", "str", ".", "charAt", "(", "i", ")", ";", "return", "result", ";", "}" ]
Method that converts a string into an array of characters @param str input sax coding string @return array of characters
[ "Method", "that", "converts", "a", "string", "into", "an", "array", "of", "characters", "@param", "str", "input", "sax", "coding", "string", "@return", "array", "of", "characters" ]
[]
[ { "param": "str", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "str", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1149, 8526, 1765, 23282, 15936, 261, 780, 609, 15329, 203, 3639, 1149, 8526, 563, 273, 394, 1149, 63, 701, 18, 2469, 1435, 15533, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 609, 18, 2469, 5621, 277, 27245, 203, 5411, 563, 63, 77, 65, 273, 609, 18, 3001, 861, 12, 77, 1769, 203, 3639, 327, 563, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2985, 716, 7759, 279, 533, 1368, 392, 526, 434, 3949, 203, 377, 380, 632, 891, 609, 810, 20319, 14848, 533, 203, 377, 380, 632, 2463, 526, 434, 3949, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b258b47362a0ed3b4c68be49403488dee20db945
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sax/SaxAnalyzer.java
[ "Apache-2.0" ]
Java
charDistanceAbs
null
public static int[] charDistanceAbs (char[] strArray){ if (strArray.length == 0){ int reslut[] = {}; return reslut;} else{ int[] result1 = new int[strArray.length-1]; for (int i = 0; i < strArray.length-1; i++) result1[i] = Math.abs(strArray [i+1] - strArray[i]); return result1;} }
/** * Method that counts the distance between characters in an array of characters * @param strArray array of characters * @return array of integers, empty list in case of empty input */
Method that counts the distance between characters in an array of characters @param strArray array of characters @return array of integers, empty list in case of empty input
[ "Method", "that", "counts", "the", "distance", "between", "characters", "in", "an", "array", "of", "characters", "@param", "strArray", "array", "of", "characters", "@return", "array", "of", "integers", "empty", "list", "in", "case", "of", "empty", "input" ]
public static int[] charDistanceAbs (char[] strArray){ if (strArray.length == 0){ int reslut[] = {}; return reslut;} else{ int[] result1 = new int[strArray.length-1]; for (int i = 0; i < strArray.length-1; i++) result1[i] = Math.abs(strArray [i+1] - strArray[i]); return result1;} }
[ "public", "static", "int", "[", "]", "charDistanceAbs", "(", "char", "[", "]", "strArray", ")", "{", "if", "(", "strArray", ".", "length", "==", "0", ")", "{", "int", "reslut", "[", "]", "=", "{", "}", ";", "return", "reslut", ";", "}", "else", "{", "int", "[", "]", "result1", "=", "new", "int", "[", "strArray", ".", "length", "-", "1", "]", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "strArray", ".", "length", "-", "1", ";", "i", "++", ")", "result1", "[", "i", "]", "=", "Math", ".", "abs", "(", "strArray", "[", "i", "+", "1", "]", "-", "strArray", "[", "i", "]", ")", ";", "return", "result1", ";", "}", "}" ]
Method that counts the distance between characters in an array of characters @param strArray array of characters @return array of integers, empty list in case of empty input
[ "Method", "that", "counts", "the", "distance", "between", "characters", "in", "an", "array", "of", "characters", "@param", "strArray", "array", "of", "characters", "@return", "array", "of", "integers", "empty", "list", "in", "case", "of", "empty", "input" ]
[]
[ { "param": "strArray", "type": "char[]" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "strArray", "type": "char[]", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 509, 8526, 1149, 7200, 9382, 261, 3001, 8526, 609, 1076, 15329, 203, 3639, 309, 261, 701, 1076, 18, 2469, 422, 374, 15329, 203, 5411, 509, 400, 80, 322, 8526, 273, 2618, 31, 203, 5411, 327, 400, 80, 322, 31, 97, 203, 3639, 469, 95, 203, 5411, 509, 8526, 563, 21, 273, 394, 509, 63, 701, 1076, 18, 2469, 17, 21, 15533, 203, 5411, 364, 261, 474, 277, 273, 374, 31, 277, 411, 609, 1076, 18, 2469, 17, 21, 31, 277, 27245, 203, 7734, 563, 21, 63, 77, 65, 273, 2361, 18, 5113, 12, 701, 1076, 306, 77, 15, 21, 65, 300, 609, 1076, 63, 77, 19226, 203, 5411, 327, 563, 21, 31, 97, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2985, 716, 6880, 326, 3888, 3086, 3949, 316, 392, 526, 434, 3949, 203, 377, 380, 632, 891, 609, 1076, 526, 434, 3949, 203, 377, 380, 632, 2463, 526, 434, 12321, 16, 1008, 666, 316, 648, 434, 1008, 810, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b258b47362a0ed3b4c68be49403488dee20db945
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sax/SaxAnalyzer.java
[ "Apache-2.0" ]
Java
saxThreshold
null
public static List<Integer> saxThreshold(String str, double threshold){ //final double threshold = 0.1; //Transform our string into an array of characters then into an array of distances between characters int[] buff = charDistanceAbs(convertStringToCharArray(str)); //Counting occurrences Map<Integer, Integer> buffCount = countOccurrence(buff); //Normalize the occurrences Map<Integer, Double> buffCountNorm = buffCount.entrySet().stream().collect(toMap(e -> e.getKey(), e -> e.getValue()/((double)(str.length()-1)))); //filter to less the 10% of total occurrences Map<Integer, Double> buffCountNormPer = (buffCountNorm.entrySet().stream() .filter(map -> map.getValue() <threshold) .collect(Collectors.toMap(map -> map.getKey(), map -> map.getValue()))); //convert the last map created into a list to be outputed List<Integer> finalResult = new ArrayList(buffCountNormPer.keySet()); if (buffCountNormPer.isEmpty() == true) return Collections.emptyList(); else return finalResult; }
/** * Method that returns the search for abnormal distances between characters. * @param str string (sax coding string) * @return list of abnormal distances between characters */
Method that returns the search for abnormal distances between characters. @param str string (sax coding string) @return list of abnormal distances between characters
[ "Method", "that", "returns", "the", "search", "for", "abnormal", "distances", "between", "characters", ".", "@param", "str", "string", "(", "sax", "coding", "string", ")", "@return", "list", "of", "abnormal", "distances", "between", "characters" ]
public static List<Integer> saxThreshold(String str, double threshold){ int[] buff = charDistanceAbs(convertStringToCharArray(str)); Map<Integer, Integer> buffCount = countOccurrence(buff); Map<Integer, Double> buffCountNorm = buffCount.entrySet().stream().collect(toMap(e -> e.getKey(), e -> e.getValue()/((double)(str.length()-1)))); Map<Integer, Double> buffCountNormPer = (buffCountNorm.entrySet().stream() .filter(map -> map.getValue() <threshold) .collect(Collectors.toMap(map -> map.getKey(), map -> map.getValue()))); List<Integer> finalResult = new ArrayList(buffCountNormPer.keySet()); if (buffCountNormPer.isEmpty() == true) return Collections.emptyList(); else return finalResult; }
[ "public", "static", "List", "<", "Integer", ">", "saxThreshold", "(", "String", "str", ",", "double", "threshold", ")", "{", "int", "[", "]", "buff", "=", "charDistanceAbs", "(", "convertStringToCharArray", "(", "str", ")", ")", ";", "Map", "<", "Integer", ",", "Integer", ">", "buffCount", "=", "countOccurrence", "(", "buff", ")", ";", "Map", "<", "Integer", ",", "Double", ">", "buffCountNorm", "=", "buffCount", ".", "entrySet", "(", ")", ".", "stream", "(", ")", ".", "collect", "(", "toMap", "(", "e", "->", "e", ".", "getKey", "(", ")", ",", "e", "->", "e", ".", "getValue", "(", ")", "/", "(", "(", "double", ")", "(", "str", ".", "length", "(", ")", "-", "1", ")", ")", ")", ")", ";", "Map", "<", "Integer", ",", "Double", ">", "buffCountNormPer", "=", "(", "buffCountNorm", ".", "entrySet", "(", ")", ".", "stream", "(", ")", ".", "filter", "(", "map", "->", "map", ".", "getValue", "(", ")", "<", "threshold", ")", ".", "collect", "(", "Collectors", ".", "toMap", "(", "map", "->", "map", ".", "getKey", "(", ")", ",", "map", "->", "map", ".", "getValue", "(", ")", ")", ")", ")", ";", "List", "<", "Integer", ">", "finalResult", "=", "new", "ArrayList", "(", "buffCountNormPer", ".", "keySet", "(", ")", ")", ";", "if", "(", "buffCountNormPer", ".", "isEmpty", "(", ")", "==", "true", ")", "return", "Collections", ".", "emptyList", "(", ")", ";", "else", "return", "finalResult", ";", "}" ]
Method that returns the search for abnormal distances between characters.
[ "Method", "that", "returns", "the", "search", "for", "abnormal", "distances", "between", "characters", "." ]
[ "//final double threshold = 0.1;", "//Transform our string into an array of characters then into an array of distances between characters", "//Counting occurrences", "//Normalize the occurrences", "//filter to less the 10% of total occurrences", "//convert the last map created into a list to be outputed" ]
[ { "param": "str", "type": "String" }, { "param": "threshold", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "str", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "threshold", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 987, 32, 4522, 34, 20319, 7614, 12, 780, 609, 16, 1645, 5573, 15329, 203, 3639, 368, 6385, 1645, 5573, 273, 374, 18, 21, 31, 203, 3639, 368, 4059, 3134, 533, 1368, 392, 526, 434, 3949, 1508, 1368, 392, 526, 434, 12491, 3086, 3949, 203, 3639, 509, 8526, 6139, 273, 1149, 7200, 9382, 12, 6283, 23282, 15936, 12, 701, 10019, 203, 3639, 368, 1380, 310, 15698, 203, 3639, 1635, 32, 4522, 16, 2144, 34, 6139, 1380, 273, 1056, 24267, 12, 20664, 1769, 203, 3639, 368, 14380, 326, 15698, 203, 3639, 1635, 32, 4522, 16, 3698, 34, 6139, 1380, 14624, 273, 6139, 1380, 18, 4099, 694, 7675, 3256, 7675, 14676, 12, 869, 863, 12, 73, 317, 425, 18, 588, 653, 9334, 203, 7734, 425, 317, 425, 18, 24805, 1435, 19, 12443, 9056, 21433, 701, 18, 2469, 1435, 17, 21, 3719, 10019, 203, 3639, 368, 2188, 358, 5242, 326, 1728, 9, 434, 2078, 15698, 203, 3639, 1635, 32, 4522, 16, 3698, 34, 6139, 1380, 14624, 2173, 225, 273, 261, 20664, 1380, 14624, 18, 4099, 694, 7675, 3256, 1435, 203, 7734, 263, 2188, 12, 1458, 317, 852, 18, 24805, 1435, 411, 8699, 13, 203, 7734, 263, 14676, 12, 10808, 1383, 18, 869, 863, 12, 1458, 317, 852, 18, 588, 653, 9334, 852, 317, 852, 18, 24805, 1435, 3719, 1769, 203, 3639, 368, 6283, 326, 1142, 852, 2522, 1368, 279, 666, 358, 506, 876, 329, 203, 3639, 987, 32, 4522, 34, 727, 1253, 273, 394, 2407, 12, 20664, 1380, 14624, 2173, 18, 856, 694, 10663, 203, 3639, 309, 261, 20664, 1380, 14624, 2173, 18, 291, 1921, 1435, 422, 638, 13, 203, 5411, 327, 5737, 18, 5531, 682, 5621, 203, 3639, 469, 203, 5411, 327, 727, 1253, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2985, 716, 1135, 326, 1623, 364, 1223, 6130, 12491, 3086, 3949, 18, 203, 377, 380, 632, 891, 609, 533, 261, 87, 651, 14848, 533, 13, 203, 377, 380, 632, 2463, 666, 434, 1223, 6130, 12491, 3086, 3949, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b258b47362a0ed3b4c68be49403488dee20db945
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sax/SaxAnalyzer.java
[ "Apache-2.0" ]
Java
anomalyDetect
null
public static List<Integer> anomalyDetect (String str, List<Integer> thresh){ Boolean res = false; List<Integer> finalResult = new ArrayList<>(); //Transform our string into an array of characters char[] strArray = convertStringToCharArray(str); //Search for Anomalies for (int j = 0; j< str.length()-1; j++) if(thresh.contains(Math.abs(strArray [j+1] - strArray[j]))) { res = true; finalResult.add(j); } //In the case of no anomaly is detected if (res == false) finalResult.add(-1); return finalResult; }
/** * Method that prints the anomalies positions in our sax coding string * @param str string (sax coding string) * @param thresh list of anomaly distances between characters in input string * @return list of postions of anomalies in sax coding string */
Method that prints the anomalies positions in our sax coding string @param str string (sax coding string) @param thresh list of anomaly distances between characters in input string @return list of postions of anomalies in sax coding string
[ "Method", "that", "prints", "the", "anomalies", "positions", "in", "our", "sax", "coding", "string", "@param", "str", "string", "(", "sax", "coding", "string", ")", "@param", "thresh", "list", "of", "anomaly", "distances", "between", "characters", "in", "input", "string", "@return", "list", "of", "postions", "of", "anomalies", "in", "sax", "coding", "string" ]
public static List<Integer> anomalyDetect (String str, List<Integer> thresh){ Boolean res = false; List<Integer> finalResult = new ArrayList<>(); char[] strArray = convertStringToCharArray(str); for (int j = 0; j< str.length()-1; j++) if(thresh.contains(Math.abs(strArray [j+1] - strArray[j]))) { res = true; finalResult.add(j); } if (res == false) finalResult.add(-1); return finalResult; }
[ "public", "static", "List", "<", "Integer", ">", "anomalyDetect", "(", "String", "str", ",", "List", "<", "Integer", ">", "thresh", ")", "{", "Boolean", "res", "=", "false", ";", "List", "<", "Integer", ">", "finalResult", "=", "new", "ArrayList", "<", ">", "(", ")", ";", "char", "[", "]", "strArray", "=", "convertStringToCharArray", "(", "str", ")", ";", "for", "(", "int", "j", "=", "0", ";", "j", "<", "str", ".", "length", "(", ")", "-", "1", ";", "j", "++", ")", "if", "(", "thresh", ".", "contains", "(", "Math", ".", "abs", "(", "strArray", "[", "j", "+", "1", "]", "-", "strArray", "[", "j", "]", ")", ")", ")", "{", "res", "=", "true", ";", "finalResult", ".", "add", "(", "j", ")", ";", "}", "if", "(", "res", "==", "false", ")", "finalResult", ".", "add", "(", "-", "1", ")", ";", "return", "finalResult", ";", "}" ]
Method that prints the anomalies positions in our sax coding string @param str string (sax coding string) @param thresh list of anomaly distances between characters in input string @return list of postions of anomalies in sax coding string
[ "Method", "that", "prints", "the", "anomalies", "positions", "in", "our", "sax", "coding", "string", "@param", "str", "string", "(", "sax", "coding", "string", ")", "@param", "thresh", "list", "of", "anomaly", "distances", "between", "characters", "in", "input", "string", "@return", "list", "of", "postions", "of", "anomalies", "in", "sax", "coding", "string" ]
[ "//Transform our string into an array of characters", "//Search for Anomalies", "//In the case of no anomaly is detected" ]
[ { "param": "str", "type": "String" }, { "param": "thresh", "type": "List<Integer>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "str", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "thresh", "type": "List<Integer>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 987, 32, 4522, 34, 392, 26988, 12081, 261, 780, 609, 16, 987, 32, 4522, 34, 22939, 15329, 203, 203, 3639, 3411, 400, 273, 629, 31, 203, 3639, 987, 32, 4522, 34, 727, 1253, 273, 394, 2407, 29667, 5621, 203, 3639, 368, 4059, 3134, 533, 1368, 392, 526, 434, 3949, 203, 3639, 1149, 8526, 609, 1076, 273, 1765, 23282, 15936, 12, 701, 1769, 203, 3639, 368, 2979, 364, 1922, 362, 287, 606, 203, 3639, 364, 261, 474, 525, 273, 374, 31, 525, 32, 609, 18, 2469, 1435, 17, 21, 31, 525, 27245, 203, 5411, 309, 12, 19237, 18, 12298, 12, 10477, 18, 5113, 12, 701, 1076, 306, 78, 15, 21, 65, 300, 609, 1076, 63, 78, 65, 20349, 288, 203, 7734, 400, 273, 638, 31, 203, 7734, 727, 1253, 18, 1289, 12, 78, 1769, 203, 5411, 289, 203, 3639, 368, 382, 326, 648, 434, 1158, 392, 26988, 353, 8316, 203, 3639, 309, 261, 455, 422, 629, 13, 203, 5411, 727, 1253, 18, 1289, 19236, 21, 1769, 203, 203, 3639, 327, 727, 1253, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2985, 716, 14971, 326, 392, 362, 287, 606, 6865, 316, 3134, 20319, 14848, 533, 203, 377, 380, 632, 891, 609, 533, 261, 87, 651, 14848, 533, 13, 203, 377, 380, 632, 891, 22939, 666, 434, 392, 26988, 12491, 3086, 3949, 316, 810, 533, 203, 377, 380, 632, 2463, 666, 434, 1603, 1115, 434, 392, 362, 287, 606, 316, 20319, 14848, 533, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
c33d7f61b14b07eed9a069e1baaa129e22cc3fb1
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sampling/AverageSampler.java
[ "Apache-2.0" ]
Java
sample
null
@Override public List<SAMPLED> sample(List<SAMPLED> inputRecords) { return SamplingUtils.grouped(inputRecords, bucketSize) .map(bucket -> { SummaryStatistics stats = new SummaryStatistics(); bucket.forEach(element -> { final Double recordValue = timeSerieHandler.getTimeserieValue(element); if (recordValue != null) stats.addValue(recordValue); }); final double meanValue = stats.getMean(); final long timestamp = timeSerieHandler.getTimeserieTimestamp(bucket.get(0)); final SAMPLED sampleElement = timeSerieHandler.createTimeserie(timestamp, meanValue); return sampleElement; }).collect(Collectors.toList()); }
/** * divide the points sequence into equally sized buckets * and computeMetrics average of each bucket * * @param inputRecords the input list * @return */
divide the points sequence into equally sized buckets and computeMetrics average of each bucket @param inputRecords the input list @return
[ "divide", "the", "points", "sequence", "into", "equally", "sized", "buckets", "and", "computeMetrics", "average", "of", "each", "bucket", "@param", "inputRecords", "the", "input", "list", "@return" ]
@Override public List<SAMPLED> sample(List<SAMPLED> inputRecords) { return SamplingUtils.grouped(inputRecords, bucketSize) .map(bucket -> { SummaryStatistics stats = new SummaryStatistics(); bucket.forEach(element -> { final Double recordValue = timeSerieHandler.getTimeserieValue(element); if (recordValue != null) stats.addValue(recordValue); }); final double meanValue = stats.getMean(); final long timestamp = timeSerieHandler.getTimeserieTimestamp(bucket.get(0)); final SAMPLED sampleElement = timeSerieHandler.createTimeserie(timestamp, meanValue); return sampleElement; }).collect(Collectors.toList()); }
[ "@", "Override", "public", "List", "<", "SAMPLED", ">", "sample", "(", "List", "<", "SAMPLED", ">", "inputRecords", ")", "{", "return", "SamplingUtils", ".", "grouped", "(", "inputRecords", ",", "bucketSize", ")", ".", "map", "(", "bucket", "->", "{", "SummaryStatistics", "stats", "=", "new", "SummaryStatistics", "(", ")", ";", "bucket", ".", "forEach", "(", "element", "->", "{", "final", "Double", "recordValue", "=", "timeSerieHandler", ".", "getTimeserieValue", "(", "element", ")", ";", "if", "(", "recordValue", "!=", "null", ")", "stats", ".", "addValue", "(", "recordValue", ")", ";", "}", ")", ";", "final", "double", "meanValue", "=", "stats", ".", "getMean", "(", ")", ";", "final", "long", "timestamp", "=", "timeSerieHandler", ".", "getTimeserieTimestamp", "(", "bucket", ".", "get", "(", "0", ")", ")", ";", "final", "SAMPLED", "sampleElement", "=", "timeSerieHandler", ".", "createTimeserie", "(", "timestamp", ",", "meanValue", ")", ";", "return", "sampleElement", ";", "}", ")", ".", "collect", "(", "Collectors", ".", "toList", "(", ")", ")", ";", "}" ]
divide the points sequence into equally sized buckets and computeMetrics average of each bucket
[ "divide", "the", "points", "sequence", "into", "equally", "sized", "buckets", "and", "computeMetrics", "average", "of", "each", "bucket" ]
[]
[ { "param": "inputRecords", "type": "List<SAMPLED>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inputRecords", "type": "List<SAMPLED>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 987, 32, 55, 8900, 6687, 34, 3296, 12, 682, 32, 55, 8900, 6687, 34, 810, 6499, 13, 288, 203, 3639, 327, 348, 7639, 1989, 18, 25472, 12, 2630, 6499, 16, 2783, 1225, 13, 203, 7734, 263, 1458, 12, 7242, 317, 288, 203, 10792, 17967, 8569, 3177, 273, 394, 17967, 8569, 5621, 203, 10792, 2783, 18, 1884, 3442, 12, 2956, 317, 288, 203, 13491, 727, 3698, 1409, 620, 273, 813, 827, 1385, 1503, 18, 588, 10694, 264, 1385, 620, 12, 2956, 1769, 203, 13491, 309, 261, 3366, 620, 480, 446, 13, 203, 18701, 3177, 18, 1289, 620, 12, 3366, 620, 1769, 203, 10792, 15549, 203, 10792, 727, 1645, 3722, 620, 273, 3177, 18, 588, 15312, 5621, 203, 10792, 727, 1525, 2858, 273, 813, 827, 1385, 1503, 18, 588, 10694, 264, 1385, 4921, 12, 7242, 18, 588, 12, 20, 10019, 203, 10792, 727, 348, 8900, 6687, 3296, 1046, 273, 813, 827, 1385, 1503, 18, 2640, 10694, 264, 1385, 12, 5508, 16, 3722, 620, 1769, 203, 10792, 327, 3296, 1046, 31, 203, 7734, 289, 2934, 14676, 12, 10808, 1383, 18, 869, 682, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 12326, 326, 3143, 3102, 1368, 1298, 1230, 26046, 9169, 203, 377, 380, 471, 3671, 5653, 8164, 434, 1517, 2783, 203, 377, 380, 203, 377, 380, 632, 891, 810, 6499, 326, 810, 666, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2e72910c13810429ccf0deb462ef74e78e0d446d
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/sampling/SamplingUtils.java
[ "Apache-2.0" ]
Java
grouped
null
public static <E> Stream<List<E>> grouped(List<E> source, int bucketSize) throws IllegalArgumentException { if (bucketSize <= 0) throw new IllegalArgumentException("length = " + bucketSize); int size = source.size(); if (size <= 0) return Stream.empty(); int numberOfFullBucket = (size - 1) / bucketSize; return IntStream.range(0, numberOfFullBucket + 1).mapToObj( n -> source.subList(n * bucketSize, n == numberOfFullBucket ? size : (n + 1) * bucketSize) ); }
/** * group a list of records into fixed size sublist * * @param source * @param bucketSize * @return */
group a list of records into fixed size sublist @param source @param bucketSize @return
[ "group", "a", "list", "of", "records", "into", "fixed", "size", "sublist", "@param", "source", "@param", "bucketSize", "@return" ]
public static <E> Stream<List<E>> grouped(List<E> source, int bucketSize) throws IllegalArgumentException { if (bucketSize <= 0) throw new IllegalArgumentException("length = " + bucketSize); int size = source.size(); if (size <= 0) return Stream.empty(); int numberOfFullBucket = (size - 1) / bucketSize; return IntStream.range(0, numberOfFullBucket + 1).mapToObj( n -> source.subList(n * bucketSize, n == numberOfFullBucket ? size : (n + 1) * bucketSize) ); }
[ "public", "static", "<", "E", ">", "Stream", "<", "List", "<", "E", ">", ">", "grouped", "(", "List", "<", "E", ">", "source", ",", "int", "bucketSize", ")", "throws", "IllegalArgumentException", "{", "if", "(", "bucketSize", "<=", "0", ")", "throw", "new", "IllegalArgumentException", "(", "\"length = \"", "+", "bucketSize", ")", ";", "int", "size", "=", "source", ".", "size", "(", ")", ";", "if", "(", "size", "<=", "0", ")", "return", "Stream", ".", "empty", "(", ")", ";", "int", "numberOfFullBucket", "=", "(", "size", "-", "1", ")", "/", "bucketSize", ";", "return", "IntStream", ".", "range", "(", "0", ",", "numberOfFullBucket", "+", "1", ")", ".", "mapToObj", "(", "n", "->", "source", ".", "subList", "(", "n", "*", "bucketSize", ",", "n", "==", "numberOfFullBucket", "?", "size", ":", "(", "n", "+", "1", ")", "*", "bucketSize", ")", ")", ";", "}" ]
group a list of records into fixed size sublist @param source @param bucketSize @return
[ "group", "a", "list", "of", "records", "into", "fixed", "size", "sublist", "@param", "source", "@param", "bucketSize", "@return" ]
[]
[ { "param": "source", "type": "List<E>" }, { "param": "bucketSize", "type": "int" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "source", "type": "List<E>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "bucketSize", "type": "int", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 411, 41, 34, 3961, 32, 682, 32, 41, 9778, 10303, 12, 682, 32, 41, 34, 1084, 16, 509, 2783, 1225, 13, 1216, 2754, 288, 203, 3639, 309, 261, 7242, 1225, 1648, 374, 13, 203, 5411, 604, 394, 2754, 2932, 2469, 273, 315, 397, 2783, 1225, 1769, 203, 3639, 509, 963, 273, 1084, 18, 1467, 5621, 203, 3639, 309, 261, 1467, 1648, 374, 13, 203, 5411, 327, 3961, 18, 5531, 5621, 203, 3639, 509, 7922, 5080, 4103, 273, 261, 1467, 300, 404, 13, 342, 2783, 1225, 31, 203, 3639, 327, 3094, 1228, 18, 3676, 12, 20, 16, 7922, 5080, 4103, 397, 404, 2934, 1458, 774, 2675, 12, 203, 7734, 290, 317, 1084, 18, 1717, 682, 12, 82, 380, 2783, 1225, 16, 290, 422, 7922, 5080, 4103, 692, 963, 294, 261, 82, 397, 404, 13, 380, 2783, 1225, 13, 203, 3639, 11272, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1041, 279, 666, 434, 3853, 1368, 5499, 963, 26680, 203, 377, 380, 203, 377, 380, 632, 891, 1084, 203, 377, 380, 632, 891, 2783, 1225, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
91dad7814f7f81f8245bfe846e1da4662796285e
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/functions/aggregation/SignedDifference.java
[ "Apache-2.0" ]
Java
execute
null
@Override public void execute(MetricTimeSeries timeSeries, FunctionValueMap functionValueMap) { //If it is empty, we return NaN if (timeSeries.size() <= 0) { functionValueMap.add(this, Double.NaN); return; } //we need to sort the time series timeSeries.sort(); //get the first and the last value double first = timeSeries.getValue(0); double last = timeSeries.getValue(timeSeries.size() - 1); //both values are negative if (first < 0 && last < 0) { functionValueMap.add(this, last - first); return; } //both value are positive if (first > 0 && last > 0) { functionValueMap.add(this, last - first); return; } //start is negative and end is positive if (first < 0 && last > 0) { functionValueMap.add(this, last - first); return; } //start is positive and end is negative functionValueMap.add(this, last - first); }
/** * Calculate the difference between the first and the last value of a given time series * * @param timeSeries the time series * @return the average or 0 if the list is empty */
Calculate the difference between the first and the last value of a given time series @param timeSeries the time series @return the average or 0 if the list is empty
[ "Calculate", "the", "difference", "between", "the", "first", "and", "the", "last", "value", "of", "a", "given", "time", "series", "@param", "timeSeries", "the", "time", "series", "@return", "the", "average", "or", "0", "if", "the", "list", "is", "empty" ]
@Override public void execute(MetricTimeSeries timeSeries, FunctionValueMap functionValueMap) { if (timeSeries.size() <= 0) { functionValueMap.add(this, Double.NaN); return; } timeSeries.sort(); double first = timeSeries.getValue(0); double last = timeSeries.getValue(timeSeries.size() - 1); if (first < 0 && last < 0) { functionValueMap.add(this, last - first); return; } if (first > 0 && last > 0) { functionValueMap.add(this, last - first); return; } if (first < 0 && last > 0) { functionValueMap.add(this, last - first); return; } functionValueMap.add(this, last - first); }
[ "@", "Override", "public", "void", "execute", "(", "MetricTimeSeries", "timeSeries", ",", "FunctionValueMap", "functionValueMap", ")", "{", "if", "(", "timeSeries", ".", "size", "(", ")", "<=", "0", ")", "{", "functionValueMap", ".", "add", "(", "this", ",", "Double", ".", "NaN", ")", ";", "return", ";", "}", "timeSeries", ".", "sort", "(", ")", ";", "double", "first", "=", "timeSeries", ".", "getValue", "(", "0", ")", ";", "double", "last", "=", "timeSeries", ".", "getValue", "(", "timeSeries", ".", "size", "(", ")", "-", "1", ")", ";", "if", "(", "first", "<", "0", "&&", "last", "<", "0", ")", "{", "functionValueMap", ".", "add", "(", "this", ",", "last", "-", "first", ")", ";", "return", ";", "}", "if", "(", "first", ">", "0", "&&", "last", ">", "0", ")", "{", "functionValueMap", ".", "add", "(", "this", ",", "last", "-", "first", ")", ";", "return", ";", "}", "if", "(", "first", "<", "0", "&&", "last", ">", "0", ")", "{", "functionValueMap", ".", "add", "(", "this", ",", "last", "-", "first", ")", ";", "return", ";", "}", "functionValueMap", ".", "add", "(", "this", ",", "last", "-", "first", ")", ";", "}" ]
Calculate the difference between the first and the last value of a given time series @param timeSeries the time series @return the average or 0 if the list is empty
[ "Calculate", "the", "difference", "between", "the", "first", "and", "the", "last", "value", "of", "a", "given", "time", "series", "@param", "timeSeries", "the", "time", "series", "@return", "the", "average", "or", "0", "if", "the", "list", "is", "empty" ]
[ "//If it is empty, we return NaN", "//we need to sort the time series", "//get the first and the last value", "//both values are negative", "//both value are positive", "//start is negative and end is positive", "//start is positive and end is negative" ]
[ { "param": "timeSeries", "type": "MetricTimeSeries" }, { "param": "functionValueMap", "type": "FunctionValueMap" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "timeSeries", "type": "MetricTimeSeries", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "functionValueMap", "type": "FunctionValueMap", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 918, 1836, 12, 5396, 28486, 813, 6485, 16, 4284, 26795, 445, 26795, 13, 288, 203, 3639, 368, 2047, 518, 353, 1008, 16, 732, 327, 10180, 203, 3639, 309, 261, 957, 6485, 18, 1467, 1435, 1648, 374, 13, 288, 203, 5411, 445, 26795, 18, 1289, 12, 2211, 16, 3698, 18, 21172, 1769, 203, 5411, 327, 31, 203, 3639, 289, 203, 203, 3639, 368, 1814, 1608, 358, 1524, 326, 813, 4166, 203, 3639, 813, 6485, 18, 3804, 5621, 203, 3639, 368, 588, 326, 1122, 471, 326, 1142, 460, 203, 3639, 1645, 1122, 273, 813, 6485, 18, 24805, 12, 20, 1769, 203, 3639, 1645, 1142, 273, 813, 6485, 18, 24805, 12, 957, 6485, 18, 1467, 1435, 300, 404, 1769, 203, 203, 3639, 368, 18237, 924, 854, 6092, 203, 3639, 309, 261, 3645, 411, 374, 597, 1142, 411, 374, 13, 288, 203, 5411, 445, 26795, 18, 1289, 12, 2211, 16, 1142, 300, 1122, 1769, 203, 5411, 327, 31, 203, 3639, 289, 203, 203, 3639, 368, 18237, 460, 854, 6895, 203, 3639, 309, 261, 3645, 405, 374, 597, 1142, 405, 374, 13, 288, 203, 5411, 445, 26795, 18, 1289, 12, 2211, 16, 1142, 300, 1122, 1769, 203, 5411, 327, 31, 203, 3639, 289, 203, 203, 3639, 368, 1937, 353, 6092, 471, 679, 353, 6895, 203, 3639, 309, 261, 3645, 411, 374, 597, 1142, 405, 374, 13, 288, 203, 5411, 445, 26795, 18, 1289, 12, 2211, 16, 1142, 300, 1122, 1769, 203, 5411, 327, 31, 203, 3639, 289, 203, 203, 3639, 368, 1937, 353, 6895, 471, 679, 353, 6092, 203, 3639, 445, 26795, 18, 1289, 12, 2211, 16, 1142, 300, 1122, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 9029, 326, 7114, 3086, 326, 1122, 471, 326, 1142, 460, 434, 279, 864, 813, 4166, 203, 377, 380, 203, 377, 380, 632, 891, 813, 6485, 326, 813, 4166, 203, 377, 380, 632, 2463, 326, 8164, 578, 374, 309, 326, 666, 353, 1008, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3bb804d09cb2062de2565c4b7f25d52376f27541
Hurence/historian
historian-timeseries/src/main/java/com/hurence/timeseries/analysis/clustering/measures/JaccardDistanceMeasure.java
[ "Apache-2.0" ]
Java
jaccardSimilarity
null
public static double jaccardSimilarity(String similar1, String similar2) { HashSet<String> h1 = new HashSet<String>(); HashSet<String> h2 = new HashSet<String>(); for (String s : similar1.split("\\s+")) { h1.add(s); } System.out.println("h1 " + h1); for (String s : similar2.split("\\s+")) { h2.add(s); } System.out.println("h2 " + h2); int sizeh1 = h1.size(); //Retains all elements in h3 that are contained in h2 ie intersection h1.retainAll(h2); //h1 now contains the intersection of h1 and h2 System.out.println("Intersection " + h1); h2.removeAll(h1); //h2 now contains unique elements System.out.println("Unique in h2 " + h2); //Union int union = sizeh1 + h2.size(); int intersection = h1.size(); return (double) intersection / union; }
/* * Jaccard Similarity is a similarity function which is calculated by * first tokenizing the strings into sets and then taking the ratio of * (weighted) intersection to their union */
Jaccard Similarity is a similarity function which is calculated by first tokenizing the strings into sets and then taking the ratio of (weighted) intersection to their union
[ "Jaccard", "Similarity", "is", "a", "similarity", "function", "which", "is", "calculated", "by", "first", "tokenizing", "the", "strings", "into", "sets", "and", "then", "taking", "the", "ratio", "of", "(", "weighted", ")", "intersection", "to", "their", "union" ]
public static double jaccardSimilarity(String similar1, String similar2) { HashSet<String> h1 = new HashSet<String>(); HashSet<String> h2 = new HashSet<String>(); for (String s : similar1.split("\\s+")) { h1.add(s); } System.out.println("h1 " + h1); for (String s : similar2.split("\\s+")) { h2.add(s); } System.out.println("h2 " + h2); int sizeh1 = h1.size(); h1.retainAll(h2); System.out.println("Intersection " + h1); h2.removeAll(h1); System.out.println("Unique in h2 " + h2); int union = sizeh1 + h2.size(); int intersection = h1.size(); return (double) intersection / union; }
[ "public", "static", "double", "jaccardSimilarity", "(", "String", "similar1", ",", "String", "similar2", ")", "{", "HashSet", "<", "String", ">", "h1", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "HashSet", "<", "String", ">", "h2", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "for", "(", "String", "s", ":", "similar1", ".", "split", "(", "\"\\\\s+\"", ")", ")", "{", "h1", ".", "add", "(", "s", ")", ";", "}", "System", ".", "out", ".", "println", "(", "\"h1 \"", "+", "h1", ")", ";", "for", "(", "String", "s", ":", "similar2", ".", "split", "(", "\"\\\\s+\"", ")", ")", "{", "h2", ".", "add", "(", "s", ")", ";", "}", "System", ".", "out", ".", "println", "(", "\"h2 \"", "+", "h2", ")", ";", "int", "sizeh1", "=", "h1", ".", "size", "(", ")", ";", "h1", ".", "retainAll", "(", "h2", ")", ";", "System", ".", "out", ".", "println", "(", "\"Intersection \"", "+", "h1", ")", ";", "h2", ".", "removeAll", "(", "h1", ")", ";", "System", ".", "out", ".", "println", "(", "\"Unique in h2 \"", "+", "h2", ")", ";", "int", "union", "=", "sizeh1", "+", "h2", ".", "size", "(", ")", ";", "int", "intersection", "=", "h1", ".", "size", "(", ")", ";", "return", "(", "double", ")", "intersection", "/", "union", ";", "}" ]
Jaccard Similarity is a similarity function which is calculated by first tokenizing the strings into sets and then taking the ratio of (weighted) intersection to their union
[ "Jaccard", "Similarity", "is", "a", "similarity", "function", "which", "is", "calculated", "by", "first", "tokenizing", "the", "strings", "into", "sets", "and", "then", "taking", "the", "ratio", "of", "(", "weighted", ")", "intersection", "to", "their", "union" ]
[ "//Retains all elements in h3 that are contained in h2 ie intersection", "//h1 now contains the intersection of h1 and h2", "//h2 now contains unique elements", "//Union" ]
[ { "param": "similar1", "type": "String" }, { "param": "similar2", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "similar1", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "similar2", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1645, 525, 8981, 1060, 16891, 560, 12, 780, 7281, 21, 16, 514, 7281, 22, 13, 288, 203, 3639, 6847, 32, 780, 34, 366, 21, 273, 394, 6847, 32, 780, 34, 5621, 203, 3639, 6847, 32, 780, 34, 366, 22, 273, 394, 6847, 32, 780, 34, 5621, 203, 203, 3639, 364, 261, 780, 272, 294, 7281, 21, 18, 4939, 2932, 1695, 87, 9078, 3719, 288, 203, 5411, 366, 21, 18, 1289, 12, 87, 1769, 203, 3639, 289, 203, 3639, 2332, 18, 659, 18, 8222, 2932, 76, 21, 315, 397, 366, 21, 1769, 203, 3639, 364, 261, 780, 272, 294, 7281, 22, 18, 4939, 2932, 1695, 87, 9078, 3719, 288, 203, 5411, 366, 22, 18, 1289, 12, 87, 1769, 203, 3639, 289, 203, 3639, 2332, 18, 659, 18, 8222, 2932, 76, 22, 315, 397, 366, 22, 1769, 203, 203, 3639, 509, 963, 76, 21, 273, 366, 21, 18, 1467, 5621, 203, 3639, 368, 7055, 4167, 777, 2186, 316, 366, 23, 716, 854, 7542, 316, 366, 22, 9228, 7619, 203, 3639, 366, 21, 18, 1349, 530, 1595, 12, 76, 22, 1769, 203, 3639, 368, 76, 21, 2037, 1914, 326, 7619, 434, 366, 21, 471, 366, 22, 203, 3639, 2332, 18, 659, 18, 8222, 2932, 23634, 315, 397, 366, 21, 1769, 203, 203, 203, 3639, 366, 22, 18, 4479, 1595, 12, 76, 21, 1769, 203, 3639, 368, 76, 22, 2037, 1914, 3089, 2186, 203, 3639, 2332, 18, 659, 18, 8222, 2932, 6303, 316, 366, 22, 315, 397, 366, 22, 1769, 203, 203, 3639, 368, 14325, 203, 3639, 509, 7812, 273, 963, 76, 21, 397, 366, 22, 18, 1467, 5621, 203, 3639, 509, 7619, 273, 366, 21, 18, 1467, 5621, 203, 203, 3639, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 20308, 203, 377, 380, 804, 8981, 1060, 22967, 560, 353, 279, 16416, 445, 1492, 353, 8894, 635, 203, 377, 380, 1122, 1147, 6894, 326, 2064, 1368, 1678, 471, 1508, 13763, 326, 7169, 434, 203, 377, 380, 261, 30890, 13, 7619, 358, 3675, 7812, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
abcba1549a23c9174d2677cc28afd09635d95a82
Hurence/historian
historian-server/src/integration-test/java/com/hurence/LocalHistorianIT.java
[ "Apache-2.0" ]
Java
testRunLocalHistorian
null
@Test @Disabled("This test is usefull to start historian we some data and test REST api in local.") public void testRunLocalHistorian() { while(true) { try { LOGGER.info("waiting 100000 ms"); Thread.sleep(100000); } catch (InterruptedException e) { e.printStackTrace(); } } }
/** * This test can be used to run a two node solr cluster with initial data. It also Run the historian server * on localhost:8080 so you can query it. It serves for exemple to test the rest api manually and do some debugging ! */
This test can be used to run a two node solr cluster with initial data. It also Run the historian server on localhost:8080 so you can query it. It serves for exemple to test the rest api manually and do some debugging !
[ "This", "test", "can", "be", "used", "to", "run", "a", "two", "node", "solr", "cluster", "with", "initial", "data", ".", "It", "also", "Run", "the", "historian", "server", "on", "localhost", ":", "8080", "so", "you", "can", "query", "it", ".", "It", "serves", "for", "exemple", "to", "test", "the", "rest", "api", "manually", "and", "do", "some", "debugging", "!" ]
@Test @Disabled("This test is usefull to start historian we some data and test REST api in local.") public void testRunLocalHistorian() { while(true) { try { LOGGER.info("waiting 100000 ms"); Thread.sleep(100000); } catch (InterruptedException e) { e.printStackTrace(); } } }
[ "@", "Test", "@", "Disabled", "(", "\"This test is usefull to start historian we some data and test REST api in local.\"", ")", "public", "void", "testRunLocalHistorian", "(", ")", "{", "while", "(", "true", ")", "{", "try", "{", "LOGGER", ".", "info", "(", "\"waiting 100000 ms\"", ")", ";", "Thread", ".", "sleep", "(", "100000", ")", ";", "}", "catch", "(", "InterruptedException", "e", ")", "{", "e", ".", "printStackTrace", "(", ")", ";", "}", "}", "}" ]
This test can be used to run a two node solr cluster with initial data.
[ "This", "test", "can", "be", "used", "to", "run", "a", "two", "node", "solr", "cluster", "with", "initial", "data", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 632, 8853, 2932, 2503, 1842, 353, 999, 2854, 358, 787, 5356, 280, 2779, 732, 2690, 501, 471, 1842, 8392, 1536, 316, 1191, 1199, 13, 203, 565, 1071, 918, 1842, 1997, 2042, 8648, 280, 2779, 1435, 288, 203, 3639, 1323, 12, 3767, 13, 288, 203, 5411, 775, 288, 203, 7734, 4145, 18, 1376, 2932, 20241, 25259, 4086, 8863, 203, 7734, 4884, 18, 19607, 12, 21, 11706, 1769, 203, 5411, 289, 1044, 261, 24485, 503, 425, 13, 288, 203, 7734, 425, 18, 1188, 6332, 5621, 203, 5411, 289, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1220, 1842, 848, 506, 1399, 358, 1086, 279, 2795, 756, 15575, 2855, 598, 2172, 501, 18, 2597, 2546, 1939, 326, 5356, 280, 2779, 1438, 203, 377, 380, 603, 17365, 30, 3672, 3672, 1427, 1846, 848, 843, 518, 18, 2597, 26255, 364, 431, 351, 1802, 358, 1842, 326, 3127, 1536, 10036, 471, 741, 2690, 10450, 401, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a654d3a595ea6d39244e6e3275347a7d1f89ac8e
pascalweiss/cheatcode
java/src/test/java/org/example/mockito/MockitoTests.java
[ "Apache-2.0" ]
Java
testMethodInvocation
null
@Test void testMethodInvocation () { //given that the mock behaves in a certain way given(databaseMock.querySalary(anyString())).willReturn(2345.6); //when the tested function is executed String salary = employee.getSalary(); //ensure that the tested method called the function verify(databaseMock).querySalary(anyString()); }
/** * Test if a certain method is called by mocking the corresponding object and use apply Mockito.verify(<mock>) */
Test if a certain method is called by mocking the corresponding object and use apply Mockito.verify()
[ "Test", "if", "a", "certain", "method", "is", "called", "by", "mocking", "the", "corresponding", "object", "and", "use", "apply", "Mockito", ".", "verify", "()" ]
@Test void testMethodInvocation () { given(databaseMock.querySalary(anyString())).willReturn(2345.6); String salary = employee.getSalary(); verify(databaseMock).querySalary(anyString()); }
[ "@", "Test", "void", "testMethodInvocation", "(", ")", "{", "given", "(", "databaseMock", ".", "querySalary", "(", "anyString", "(", ")", ")", ")", ".", "willReturn", "(", "2345.6", ")", ";", "String", "salary", "=", "employee", ".", "getSalary", "(", ")", ";", "verify", "(", "databaseMock", ")", ".", "querySalary", "(", "anyString", "(", ")", ")", ";", "}" ]
Test if a certain method is called by mocking the corresponding object and use apply Mockito.verify(<mock>)
[ "Test", "if", "a", "certain", "method", "is", "called", "by", "mocking", "the", "corresponding", "object", "and", "use", "apply", "Mockito", ".", "verify", "(", "<mock", ">", ")" ]
[ "//given that the mock behaves in a certain way", "//when the tested function is executed", "//ensure that the tested method called the function" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 918, 1842, 1305, 9267, 1832, 288, 203, 203, 3639, 368, 10822, 716, 326, 5416, 12433, 6606, 316, 279, 8626, 4031, 203, 3639, 864, 12, 6231, 9865, 18, 2271, 55, 287, 814, 12, 2273, 780, 10756, 2934, 20194, 990, 12, 4366, 7950, 18, 26, 1769, 203, 203, 3639, 368, 13723, 326, 18432, 445, 353, 7120, 203, 3639, 514, 12814,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 309, 279, 8626, 707, 353, 2566, 635, 5416, 310, 326, 4656, 733, 471, 999, 2230, 7867, 11250, 18, 8705, 12, 32, 22851, 23429, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
73618411441ea37659033a5d14f8319a4c7f4518
YonathanR11/USB-Antivirus
src/Antivirus/Update.java
[ "MIT" ]
Java
initComponents
null
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(37, 183, 211), 2)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/info.png"))); // NOI18N jPanel1.add(ico, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 90, 90)); jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel1.setText("Esta opcion se agregara mas adelante..."); jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 50, -1, -1)); materialButton1.setBackground(new java.awt.Color(37, 183, 211)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("OK"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); jPanel1.add(materialButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 80, 90, 47)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 339, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", ".", "WARNING", ":", "Do", "NOT", "modify", "this", "code", ".", "The", "content", "of", "this", "method", "is", "always", "regenerated", "by", "the", "Form", "Editor", "." ]
@SuppressWarnings("unchecked") private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(37, 183, 211), 2)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/info.png"))); jPanel1.add(ico, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 90, 90)); jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); jLabel1.setText("Esta opcion se agregara mas adelante..."); jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 50, -1, -1)); materialButton1.setBackground(new java.awt.Color(37, 183, 211)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("OK"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); jPanel1.add(materialButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(150, 80, 90, 47)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 339, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "initComponents", "(", ")", "{", "jPanel1", "=", "new", "javax", ".", "swing", ".", "JPanel", "(", ")", ";", "ico", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "jLabel1", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "materialButton1", "=", "new", "principal", ".", "MaterialButton", "(", ")", ";", "setDefaultCloseOperation", "(", "javax", ".", "swing", ".", "WindowConstants", ".", "DISPOSE_ON_CLOSE", ")", ";", "setUndecorated", "(", "true", ")", ";", "jPanel1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "jPanel1", ".", "setBorder", "(", "javax", ".", "swing", ".", "BorderFactory", ".", "createLineBorder", "(", "new", "java", ".", "awt", ".", "Color", "(", "37", ",", "183", ",", "211", ")", ",", "2", ")", ")", ";", "jPanel1", ".", "setLayout", "(", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteLayout", "(", ")", ")", ";", "ico", ".", "setHorizontalAlignment", "(", "javax", ".", "swing", ".", "SwingConstants", ".", "CENTER", ")", ";", "ico", ".", "setIcon", "(", "new", "javax", ".", "swing", ".", "ImageIcon", "(", "getClass", "(", ")", ".", "getResource", "(", "\"/img/info.png\"", ")", ")", ")", ";", "jPanel1", ".", "add", "(", "ico", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "10", ",", "10", ",", "90", ",", "90", ")", ")", ";", "jLabel1", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel1", ".", "setText", "(", "\"Esta opcion se agregara mas adelante...\"", ")", ";", "jPanel1", ".", "add", "(", "jLabel1", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "100", ",", "50", ",", "-", "1", ",", "-", "1", ")", ")", ";", "materialButton1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "37", ",", "183", ",", "211", ")", ")", ";", "materialButton1", ".", "setForeground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "materialButton1", ".", "setText", "(", "\"OK\"", ")", ";", "materialButton1", ".", "addActionListener", "(", "new", "java", ".", "awt", ".", "event", ".", "ActionListener", "(", ")", "{", "public", "void", "actionPerformed", "(", "java", ".", "awt", ".", "event", ".", "ActionEvent", "evt", ")", "{", "materialButton1ActionPerformed", "(", "evt", ")", ";", "}", "}", ")", ";", "jPanel1", ".", "add", "(", "materialButton1", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "150", ",", "80", ",", "90", ",", "47", ")", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "getContentPane", "(", ")", ")", ";", "getContentPane", "(", ")", ".", "setLayout", "(", "layout", ")", ";", "layout", ".", "setHorizontalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "339", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "layout", ".", "setVerticalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "pack", "(", ")", ";", "}" ]
This method is called from within the constructor to initialize the form.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", "." ]
[ "// <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents", "// NOI18N", "// NOI18N" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 368, 411, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 7823, 3356, 6441, 759, 16652, 17, 16061, 30, 2738, 7171, 203, 565, 3238, 918, 1208, 7171, 1435, 288, 203, 203, 3639, 17871, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 5537, 5621, 203, 3639, 277, 2894, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 26538, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 9390, 3616, 21, 273, 394, 8897, 18, 11790, 3616, 5621, 203, 203, 3639, 9277, 4605, 2988, 12, 28384, 18, 5328, 310, 18, 3829, 2918, 18, 13498, 23757, 67, 673, 67, 13384, 1769, 203, 3639, 444, 984, 11880, 690, 12, 3767, 1769, 203, 203, 3639, 17871, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 17871, 21, 18, 542, 8107, 12, 28384, 18, 5328, 310, 18, 8107, 1733, 18, 2640, 1670, 8107, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 6418, 16, 6549, 23, 16, 576, 2499, 3631, 576, 10019, 203, 3639, 17871, 21, 18, 542, 3744, 12, 2704, 2358, 18, 2758, 2196, 634, 18, 2941, 18, 2219, 88, 7763, 18, 10368, 3744, 10663, 203, 203, 3639, 277, 2894, 18, 542, 14457, 11535, 12, 28384, 18, 5328, 310, 18, 6050, 310, 2918, 18, 19835, 1769, 203, 3639, 277, 2894, 18, 542, 5554, 12, 2704, 6863, 18, 5328, 310, 18, 2040, 5554, 12, 588, 797, 7675, 588, 1420, 2932, 19, 6081, 19, 1376, 18, 6446, 6, 3719, 1769, 368, 30085, 2643, 50, 203, 3639, 17871, 21, 18, 1289, 12, 10764, 16, 394, 2358, 18, 2758, 2196, 634, 18, 2941, 18, 2219, 88, 7763, 18, 10368, 4878, 12, 2163, 16, 1728, 16, 8566, 16, 8566, 10019, 203, 203, 3639, 26538, 21, 18, 542, 5711, 12, 2704, 2252, 18, 2219, 88, 18, 5711, 2932, 37, 566, 287, 3113, 404, 16, 2593, 10019, 368, 30085, 2643, 50, 203, 3639, 26538, 21, 18, 542, 1528, 2932, 9122, 69, 29277, 285, 695, 1737, 1574, 297, 69, 28540, 1261, 292, 7974, 7070, 1769, 203, 3639, 17871, 21, 18, 1289, 12, 78, 2224, 21, 16, 394, 2358, 18, 2758, 2196, 634, 18, 2941, 18, 2219, 88, 7763, 18, 10368, 4878, 12, 6625, 16, 6437, 16, 300, 21, 16, 300, 21, 10019, 203, 203, 3639, 9390, 3616, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 6418, 16, 6549, 23, 16, 576, 2499, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 23206, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 1528, 2932, 3141, 8863, 203, 3639, 9390, 3616, 21, 18, 1289, 1803, 2223, 12, 2704, 2252, 18, 2219, 88, 18, 2575, 18, 1803, 2223, 1435, 288, 203, 5411, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 203, 7734, 9390, 3616, 21, 19449, 12, 73, 11734, 1769, 203, 5411, 289, 203, 3639, 15549, 203, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 377, 380, 1220, 707, 353, 2566, 628, 3470, 326, 3885, 358, 4046, 326, 646, 18, 203, 377, 380, 9744, 30, 2256, 4269, 5612, 333, 981, 18, 1021, 913, 434, 333, 707, 353, 3712, 203, 377, 380, 960, 7489, 635, 326, 2748, 18451, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
73618411441ea37659033a5d14f8319a4c7f4518
YonathanR11/USB-Antivirus
src/Antivirus/Update.java
[ "MIT" ]
Java
main
null
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { Update dialog = new Update(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
/** * @param args the command line arguments */
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
public static void main(String args[]) { /* Set the Nimbus look and feel */ /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { Update dialog = new Update(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "{", "/* Set the Nimbus look and feel */", "/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */", "try", "{", "for", "(", "javax", ".", "swing", ".", "UIManager", ".", "LookAndFeelInfo", "info", ":", "javax", ".", "swing", ".", "UIManager", ".", "getInstalledLookAndFeels", "(", ")", ")", "{", "if", "(", "\"Nimbus\"", ".", "equals", "(", "info", ".", "getName", "(", ")", ")", ")", "{", "javax", ".", "swing", ".", "UIManager", ".", "setLookAndFeel", "(", "info", ".", "getClassName", "(", ")", ")", ";", "break", ";", "}", "}", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Update", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Update", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Update", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "javax", ".", "swing", ".", "UnsupportedLookAndFeelException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Update", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "/* Create and display the dialog */", "java", ".", "awt", ".", "EventQueue", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "Update", "dialog", "=", "new", "Update", "(", "new", "javax", ".", "swing", ".", "JFrame", "(", ")", ",", "true", ")", ";", "dialog", ".", "addWindowListener", "(", "new", "java", ".", "awt", ".", "event", ".", "WindowAdapter", "(", ")", "{", "@", "Override", "public", "void", "windowClosing", "(", "java", ".", "awt", ".", "event", ".", "WindowEvent", "e", ")", "{", "System", ".", "exit", "(", "0", ")", ";", "}", "}", ")", ";", "dialog", ".", "setVisible", "(", "true", ")", ";", "}", "}", ")", ";", "}" ]
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
[ "//<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 833, 63, 5717, 288, 203, 3639, 1748, 1000, 326, 423, 381, 9274, 2324, 471, 1656, 292, 1195, 203, 3639, 368, 32, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 10176, 471, 1656, 292, 3637, 981, 261, 10444, 13, 14402, 203, 3639, 1748, 971, 423, 381, 9274, 261, 23342, 2544, 3263, 316, 5110, 3174, 1666, 13, 353, 486, 2319, 16, 23449, 598, 326, 805, 2324, 471, 1656, 292, 18, 203, 540, 380, 2457, 3189, 2621, 1062, 2207, 7813, 18, 280, 16066, 18, 832, 19, 19207, 448, 19, 88, 22378, 19, 89, 291, 91, 310, 19, 7330, 464, 3030, 292, 19, 412, 1727, 18, 2620, 7010, 540, 1195, 203, 3639, 775, 288, 203, 5411, 364, 261, 28384, 18, 5328, 310, 18, 5370, 1318, 18, 9794, 1876, 2954, 292, 966, 1123, 294, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 588, 16747, 9794, 1876, 2954, 10558, 10756, 288, 203, 7734, 309, 7566, 50, 381, 9274, 9654, 14963, 12, 1376, 18, 17994, 1435, 3719, 288, 203, 10792, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 1376, 18, 588, 3834, 10663, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 1891, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 10675, 7072, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 1891, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 12195, 9773, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 1891, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 28384, 18, 5328, 310, 18, 8544, 9794, 1876, 2954, 292, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 1891, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 203, 3639, 1748, 1788, 471, 2562, 326, 6176, 1195, 203, 3639, 2252, 18, 2219, 88, 18, 1133, 3183, 18, 14407, 20607, 12, 2704, 10254, 1435, 288, 203, 5411, 1071, 918, 1086, 1435, 288, 203, 7734, 2 ]
[ 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, 26873, 203, 377, 380, 632, 891, 833, 326, 1296, 980, 1775, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0df76fbbd80d94767f496be121081a7e10ef6bc
YonathanR11/USB-Antivirus
src/Antivirus/CambiosDeVersion.java
[ "MIT" ]
Java
initComponents
null
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); materialButton1 = new principal.MaterialButton(); checkBlue1 = new check.CheckBlue(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); materialButton1.setBackground(new java.awt.Color(0, 153, 153)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Cerrar"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); checkBlue1.setText("No volver a mostrar"); jTextArea1.setEditable(false); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(checkBlue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(36, 36, 36) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 116, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(checkBlue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", ".", "WARNING", ":", "Do", "NOT", "modify", "this", "code", ".", "The", "content", "of", "this", "method", "is", "always", "regenerated", "by", "the", "Form", "Editor", "." ]
@SuppressWarnings("unchecked") private void initComponents() { jPanel1 = new javax.swing.JPanel(); materialButton1 = new principal.MaterialButton(); checkBlue1 = new check.CheckBlue(); jScrollPane1 = new javax.swing.JScrollPane(); jTextArea1 = new javax.swing.JTextArea(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); materialButton1.setBackground(new java.awt.Color(0, 153, 153)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Cerrar"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); checkBlue1.setText("No volver a mostrar"); jTextArea1.setEditable(false); jTextArea1.setColumns(20); jTextArea1.setRows(5); jScrollPane1.setViewportView(jTextArea1); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(checkBlue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(36, 36, 36) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 116, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 432, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(checkBlue1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "initComponents", "(", ")", "{", "jPanel1", "=", "new", "javax", ".", "swing", ".", "JPanel", "(", ")", ";", "materialButton1", "=", "new", "principal", ".", "MaterialButton", "(", ")", ";", "checkBlue1", "=", "new", "check", ".", "CheckBlue", "(", ")", ";", "jScrollPane1", "=", "new", "javax", ".", "swing", ".", "JScrollPane", "(", ")", ";", "jTextArea1", "=", "new", "javax", ".", "swing", ".", "JTextArea", "(", ")", ";", "setDefaultCloseOperation", "(", "javax", ".", "swing", ".", "WindowConstants", ".", "DISPOSE_ON_CLOSE", ")", ";", "jPanel1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "materialButton1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "0", ",", "153", ",", "153", ")", ")", ";", "materialButton1", ".", "setForeground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "materialButton1", ".", "setText", "(", "\"Cerrar\"", ")", ";", "materialButton1", ".", "addActionListener", "(", "new", "java", ".", "awt", ".", "event", ".", "ActionListener", "(", ")", "{", "public", "void", "actionPerformed", "(", "java", ".", "awt", ".", "event", ".", "ActionEvent", "evt", ")", "{", "materialButton1ActionPerformed", "(", "evt", ")", ";", "}", "}", ")", ";", "checkBlue1", ".", "setText", "(", "\"No volver a mostrar\"", ")", ";", "jTextArea1", ".", "setEditable", "(", "false", ")", ";", "jTextArea1", ".", "setColumns", "(", "20", ")", ";", "jTextArea1", ".", "setRows", "(", "5", ")", ";", "jScrollPane1", ".", "setViewportView", "(", "jTextArea1", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "jPanel1Layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "jPanel1", ")", ";", "jPanel1", ".", "setLayout", "(", "jPanel1Layout", ")", ";", "jPanel1Layout", ".", "setHorizontalGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addContainerGap", "(", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jScrollPane1", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addComponent", "(", "checkBlue1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addGap", "(", "36", ",", "36", ",", "36", ")", ".", "addComponent", "(", "materialButton1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "95", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addGap", "(", "0", ",", "116", ",", "Short", ".", "MAX_VALUE", ")", ")", ")", ".", "addContainerGap", "(", ")", ")", ")", ";", "jPanel1Layout", ".", "setVerticalGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "TRAILING", ",", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addContainerGap", "(", ")", ".", "addComponent", "(", "jScrollPane1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "432", ",", "Short", ".", "MAX_VALUE", ")", ".", "addPreferredGap", "(", "javax", ".", "swing", ".", "LayoutStyle", ".", "ComponentPlacement", ".", "RELATED", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "BASELINE", ")", ".", "addComponent", "(", "materialButton1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "40", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addComponent", "(", "checkBlue1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ")", ".", "addContainerGap", "(", ")", ")", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "getContentPane", "(", ")", ")", ";", "getContentPane", "(", ")", ".", "setLayout", "(", "layout", ")", ";", "layout", ".", "setHorizontalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "layout", ".", "setVerticalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "pack", "(", ")", ";", "}" ]
This method is called from within the constructor to initialize the form.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", "." ]
[ "// <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 368, 411, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 7823, 3356, 6441, 759, 16652, 17, 16061, 30, 2738, 7171, 203, 565, 3238, 918, 1208, 7171, 1435, 288, 203, 203, 3639, 17871, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 5537, 5621, 203, 3639, 9390, 3616, 21, 273, 394, 8897, 18, 11790, 3616, 5621, 203, 3639, 866, 27986, 21, 273, 394, 866, 18, 1564, 27986, 5621, 203, 3639, 525, 26360, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 26360, 5621, 203, 3639, 525, 1528, 5484, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 1528, 5484, 5621, 203, 203, 3639, 9277, 4605, 2988, 12, 28384, 18, 5328, 310, 18, 3829, 2918, 18, 13498, 23757, 67, 673, 67, 13384, 1769, 203, 203, 3639, 17871, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 203, 3639, 9390, 3616, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 20, 16, 4711, 23, 16, 4711, 23, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 23206, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 1528, 2932, 39, 370, 297, 8863, 203, 3639, 9390, 3616, 21, 18, 1289, 1803, 2223, 12, 2704, 2252, 18, 2219, 88, 18, 2575, 18, 1803, 2223, 1435, 288, 203, 5411, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 203, 7734, 9390, 3616, 21, 19449, 12, 73, 11734, 1769, 203, 5411, 289, 203, 3639, 15549, 203, 203, 3639, 866, 27986, 21, 18, 542, 1528, 2932, 2279, 6626, 502, 279, 312, 538, 313, 297, 8863, 203, 203, 3639, 525, 1528, 5484, 21, 18, 542, 15470, 12, 5743, 1769, 203, 3639, 525, 1528, 5484, 21, 18, 542, 3380, 12, 3462, 1769, 203, 3639, 525, 1528, 5484, 21, 18, 542, 4300, 12, 25, 1769, 203, 3639, 525, 26360, 21, 18, 542, 22743, 1767, 12, 78, 1528, 5484, 21, 1769, 203, 203, 3639, 6863, 18, 5328, 310, 18, 1114, 3744, 17871, 21, 3744, 273, 394, 6863, 18, 5328, 310, 18, 1114, 3744, 12, 78, 5537, 21, 1769, 203, 3639, 17871, 21, 18, 542, 3744, 12, 78, 5537, 21, 3744, 1769, 203, 3639, 17871, 21, 3744, 18, 542, 14457, 1114, 12, 203, 5411, 17871, 21, 3744, 18, 2640, 13056, 1114, 12, 28384, 18, 5328, 310, 18, 1114, 3744, 18, 11535, 18, 900, 30118, 13, 203, 5411, 263, 1289, 1114, 12, 78, 5537, 21, 3744, 18, 2640, 28241, 1114, 1435, 203, 7734, 263, 1289, 2170, 14001, 1435, 203, 7734, 263, 1289, 1114, 12, 78, 5537, 21, 3744, 18, 2640, 13056, 1114, 12, 28384, 18, 5328, 310, 18, 1114, 3744, 18, 11535, 18, 900, 30118, 13, 203, 10792, 263, 1289, 1841, 12, 78, 26360, 21, 13, 203, 10792, 263, 1289, 1114, 12, 78, 5537, 21, 3744, 18, 2640, 28241, 1114, 1435, 203, 13491, 263, 1289, 1841, 12, 1893, 27986, 21,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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, 26873, 203, 377, 380, 1220, 707, 353, 2566, 628, 3470, 326, 3885, 358, 4046, 326, 646, 18, 203, 377, 380, 9744, 30, 2256, 4269, 5612, 333, 981, 18, 1021, 913, 434, 333, 707, 353, 3712, 203, 377, 380, 960, 7489, 635, 326, 2748, 18451, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b0df76fbbd80d94767f496be121081a7e10ef6bc
YonathanR11/USB-Antivirus
src/Antivirus/CambiosDeVersion.java
[ "MIT" ]
Java
main
null
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { CambiosDeVersion dialog = new CambiosDeVersion(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
/** * @param args the command line arguments */
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
public static void main(String args[]) { /* Set the Nimbus look and feel */ /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(CambiosDeVersion.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { CambiosDeVersion dialog = new CambiosDeVersion(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "{", "/* Set the Nimbus look and feel */", "/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */", "try", "{", "for", "(", "javax", ".", "swing", ".", "UIManager", ".", "LookAndFeelInfo", "info", ":", "javax", ".", "swing", ".", "UIManager", ".", "getInstalledLookAndFeels", "(", ")", ")", "{", "if", "(", "\"Nimbus\"", ".", "equals", "(", "info", ".", "getName", "(", ")", ")", ")", "{", "javax", ".", "swing", ".", "UIManager", ".", "setLookAndFeel", "(", "info", ".", "getClassName", "(", ")", ")", ";", "break", ";", "}", "}", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "CambiosDeVersion", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "CambiosDeVersion", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "CambiosDeVersion", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "javax", ".", "swing", ".", "UnsupportedLookAndFeelException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "CambiosDeVersion", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "/* Create and display the dialog */", "java", ".", "awt", ".", "EventQueue", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "CambiosDeVersion", "dialog", "=", "new", "CambiosDeVersion", "(", "new", "javax", ".", "swing", ".", "JFrame", "(", ")", ",", "true", ")", ";", "dialog", ".", "addWindowListener", "(", "new", "java", ".", "awt", ".", "event", ".", "WindowAdapter", "(", ")", "{", "@", "Override", "public", "void", "windowClosing", "(", "java", ".", "awt", ".", "event", ".", "WindowEvent", "e", ")", "{", "System", ".", "exit", "(", "0", ")", ";", "}", "}", ")", ";", "dialog", ".", "setVisible", "(", "true", ")", ";", "}", "}", ")", ";", "}" ]
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
[ "//<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">", "//</editor-fold>" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 833, 63, 5717, 288, 203, 3639, 1748, 1000, 326, 423, 381, 9274, 2324, 471, 1656, 292, 1195, 203, 3639, 368, 32, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 10176, 471, 1656, 292, 3637, 981, 261, 10444, 13, 14402, 203, 3639, 1748, 971, 423, 381, 9274, 261, 23342, 2544, 3263, 316, 5110, 3174, 1666, 13, 353, 486, 2319, 16, 23449, 598, 326, 805, 2324, 471, 1656, 292, 18, 203, 540, 380, 2457, 3189, 2621, 1062, 2207, 7813, 18, 280, 16066, 18, 832, 19, 19207, 448, 19, 88, 22378, 19, 89, 291, 91, 310, 19, 7330, 464, 3030, 292, 19, 412, 1727, 18, 2620, 7010, 540, 1195, 203, 3639, 775, 288, 203, 5411, 364, 261, 28384, 18, 5328, 310, 18, 5370, 1318, 18, 9794, 1876, 2954, 292, 966, 1123, 294, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 588, 16747, 9794, 1876, 2954, 10558, 10756, 288, 203, 7734, 309, 7566, 50, 381, 9274, 9654, 14963, 12, 1376, 18, 17994, 1435, 3719, 288, 203, 10792, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 1376, 18, 588, 3834, 10663, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 39, 2536, 7441, 758, 1444, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 10675, 7072, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 39, 2536, 7441, 758, 1444, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 12195, 9773, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 39, 2536, 7441, 758, 1444, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 28384, 18, 5328, 310, 18, 8544, 9794, 1876, 2954, 292, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 39, 2536, 7441, 758, 1444, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 203, 3639, 1748, 1788, 471, 2562, 326, 6176, 1195, 203, 3639, 2252, 18, 2219, 88, 18, 1133, 3183, 18, 14407, 20607, 12, 2704, 10254, 1435, 288, 203, 5411, 1071, 918, 1086, 1435, 288, 203, 7734, 385, 2536, 7441, 758, 1444, 6176, 273, 394, 385, 2536, 7441, 758, 1444, 12, 2704, 6863, 18, 5328, 310, 18, 46, 3219, 9334, 638, 1769, 203, 7734, 6176, 18, 1289, 3829, 2223, 12, 2704, 2252, 18, 2219, 88, 18, 2575, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26873, 203, 377, 380, 632, 891, 833, 326, 1296, 980, 1775, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
9de03af0fb4600ac0f453cba529333e06361e59a
YonathanR11/USB-Antivirus
src/Antivirus/Info.java
[ "MIT" ]
Java
initComponents
null
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); materialButton2 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(37, 183, 211), 2)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/info.png"))); // NOI18N jPanel1.add(ico, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 90, 90)); jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel1.setText("Si la UNIDAD que seleccionaste es la UNIDAD"); jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 20, -1, -1)); jLabel2.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel2.setText("donde se encuentra el SISTEMA OPERATIVO"); jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 40, -1, -1)); materialButton1.setBackground(new java.awt.Color(37, 183, 211)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Si"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); jPanel1.add(materialButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 100, 90, 47)); jLabel3.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel3.setText("se recomienda no continuar con el analisis."); jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 60, -1, -1)); jLabel4.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel4.setText("¿Deseas continuar?"); jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 80, -1, -1)); materialButton2.setBackground(new java.awt.Color(37, 183, 211)); materialButton2.setForeground(new java.awt.Color(255, 255, 255)); materialButton2.setText("No"); materialButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton2ActionPerformed(evt); } }); jPanel1.add(materialButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 100, 90, 47)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", ".", "WARNING", ":", "Do", "NOT", "modify", "this", "code", ".", "The", "content", "of", "this", "method", "is", "always", "regenerated", "by", "the", "Form", "Editor", "." ]
@SuppressWarnings("unchecked") private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); materialButton2 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(37, 183, 211), 2)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/info.png"))); jPanel1.add(ico, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 10, 90, 90)); jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); jLabel1.setText("Si la UNIDAD que seleccionaste es la UNIDAD"); jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 20, -1, -1)); jLabel2.setFont(new java.awt.Font("Arial", 1, 12)); jLabel2.setText("donde se encuentra el SISTEMA OPERATIVO"); jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 40, -1, -1)); materialButton1.setBackground(new java.awt.Color(37, 183, 211)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Si"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); jPanel1.add(materialButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(90, 100, 90, 47)); jLabel3.setFont(new java.awt.Font("Arial", 1, 12)); jLabel3.setText("se recomienda no continuar con el analisis."); jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 60, -1, -1)); jLabel4.setFont(new java.awt.Font("Arial", 1, 12)); jLabel4.setText("¿Deseas continuar?"); jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 80, -1, -1)); materialButton2.setBackground(new java.awt.Color(37, 183, 211)); materialButton2.setForeground(new java.awt.Color(255, 255, 255)); materialButton2.setText("No"); materialButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton2ActionPerformed(evt); } }); jPanel1.add(materialButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 100, 90, 47)); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 363, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "initComponents", "(", ")", "{", "jPanel1", "=", "new", "javax", ".", "swing", ".", "JPanel", "(", ")", ";", "ico", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "jLabel1", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "jLabel2", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "materialButton1", "=", "new", "principal", ".", "MaterialButton", "(", ")", ";", "jLabel3", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "jLabel4", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "materialButton2", "=", "new", "principal", ".", "MaterialButton", "(", ")", ";", "setDefaultCloseOperation", "(", "javax", ".", "swing", ".", "WindowConstants", ".", "DISPOSE_ON_CLOSE", ")", ";", "setUndecorated", "(", "true", ")", ";", "jPanel1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "jPanel1", ".", "setBorder", "(", "javax", ".", "swing", ".", "BorderFactory", ".", "createLineBorder", "(", "new", "java", ".", "awt", ".", "Color", "(", "37", ",", "183", ",", "211", ")", ",", "2", ")", ")", ";", "jPanel1", ".", "setLayout", "(", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteLayout", "(", ")", ")", ";", "ico", ".", "setHorizontalAlignment", "(", "javax", ".", "swing", ".", "SwingConstants", ".", "CENTER", ")", ";", "ico", ".", "setIcon", "(", "new", "javax", ".", "swing", ".", "ImageIcon", "(", "getClass", "(", ")", ".", "getResource", "(", "\"/img/info.png\"", ")", ")", ")", ";", "jPanel1", ".", "add", "(", "ico", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "10", ",", "10", ",", "90", ",", "90", ")", ")", ";", "jLabel1", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel1", ".", "setText", "(", "\"Si la UNIDAD que seleccionaste es la UNIDAD\"", ")", ";", "jPanel1", ".", "add", "(", "jLabel1", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "90", ",", "20", ",", "-", "1", ",", "-", "1", ")", ")", ";", "jLabel2", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel2", ".", "setText", "(", "\"donde se encuentra el SISTEMA OPERATIVO\"", ")", ";", "jPanel1", ".", "add", "(", "jLabel2", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "100", ",", "40", ",", "-", "1", ",", "-", "1", ")", ")", ";", "materialButton1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "37", ",", "183", ",", "211", ")", ")", ";", "materialButton1", ".", "setForeground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "materialButton1", ".", "setText", "(", "\"Si\"", ")", ";", "materialButton1", ".", "addActionListener", "(", "new", "java", ".", "awt", ".", "event", ".", "ActionListener", "(", ")", "{", "public", "void", "actionPerformed", "(", "java", ".", "awt", ".", "event", ".", "ActionEvent", "evt", ")", "{", "materialButton1ActionPerformed", "(", "evt", ")", ";", "}", "}", ")", ";", "jPanel1", ".", "add", "(", "materialButton1", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "90", ",", "100", ",", "90", ",", "47", ")", ")", ";", "jLabel3", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel3", ".", "setText", "(", "\"se recomienda no continuar con el analisis.\"", ")", ";", "jPanel1", ".", "add", "(", "jLabel3", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "100", ",", "60", ",", "-", "1", ",", "-", "1", ")", ")", ";", "jLabel4", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel4", ".", "setText", "(", "\"¿Deseas continuar?\")", ";", "", "jPanel1", ".", "add", "(", "jLabel4", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "140", ",", "80", ",", "-", "1", ",", "-", "1", ")", ")", ";", "materialButton2", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "37", ",", "183", ",", "211", ")", ")", ";", "materialButton2", ".", "setForeground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "materialButton2", ".", "setText", "(", "\"No\"", ")", ";", "materialButton2", ".", "addActionListener", "(", "new", "java", ".", "awt", ".", "event", ".", "ActionListener", "(", ")", "{", "public", "void", "actionPerformed", "(", "java", ".", "awt", ".", "event", ".", "ActionEvent", "evt", ")", "{", "materialButton2ActionPerformed", "(", "evt", ")", ";", "}", "}", ")", ";", "jPanel1", ".", "add", "(", "materialButton2", ",", "new", "org", ".", "netbeans", ".", "lib", ".", "awtextra", ".", "AbsoluteConstraints", "(", "210", ",", "100", ",", "90", ",", "47", ")", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "getContentPane", "(", ")", ")", ";", "getContentPane", "(", ")", ".", "setLayout", "(", "layout", ")", ";", "layout", ".", "setHorizontalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "363", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "layout", ".", "setVerticalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "pack", "(", ")", ";", "}" ]
This method is called from within the constructor to initialize the form.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", "." ]
[ "// <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents", "// NOI18N", "// NOI18N", "// NOI18N", "// NOI18N", "// NOI18N" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 368, 411, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 7823, 3356, 6441, 759, 16652, 17, 16061, 30, 2738, 7171, 203, 565, 3238, 918, 1208, 7171, 1435, 288, 203, 203, 3639, 17871, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 5537, 5621, 203, 3639, 277, 2894, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 26538, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 26538, 22, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 9390, 3616, 21, 273, 394, 8897, 18, 11790, 3616, 5621, 203, 3639, 26538, 23, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 26538, 24, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 9390, 3616, 22, 273, 394, 8897, 18, 11790, 3616, 5621, 203, 203, 3639, 9277, 4605, 2988, 12, 28384, 18, 5328, 310, 18, 3829, 2918, 18, 13498, 23757, 67, 673, 67, 13384, 1769, 203, 3639, 444, 984, 11880, 690, 12, 3767, 1769, 203, 203, 3639, 17871, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 17871, 21, 18, 542, 8107, 12, 28384, 18, 5328, 310, 18, 8107, 1733, 18, 2640, 1670, 8107, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 6418, 16, 6549, 23, 16, 576, 2499, 3631, 576, 10019, 203, 3639, 17871, 21, 18, 542, 3744, 12, 2704, 2358, 18, 2758, 2196, 634, 18, 2941, 18, 2219, 88, 7763, 18, 10368, 3744, 10663, 203, 203, 3639, 277, 2894, 18, 542, 14457, 11535, 12, 28384, 18, 5328, 310, 18, 6050, 310, 2918, 18, 19835, 1769, 203, 3639, 277, 2894, 18, 542, 5554, 12, 2704, 6863, 18, 5328, 310, 18, 2040, 5554, 12, 588, 797, 7675, 588, 1420, 2932, 19, 6081, 19, 1376, 18, 6446, 6, 3719, 1769, 368, 30085, 2643, 50, 203, 3639, 17871, 21, 18, 1289, 12, 10764, 16, 394, 2358, 18, 2758, 2196, 634, 18, 2941, 18, 2219, 88, 7763, 18, 10368, 4878, 12, 2163, 16, 1728, 16, 8566, 16, 8566, 10019, 203, 203, 3639, 26538, 21, 18, 542, 5711, 12, 2704, 2252, 18, 2219, 88, 18, 5711, 2932, 37, 566, 287, 3113, 404, 16, 2593, 10019, 368, 30085, 2643, 50, 203, 3639, 26538, 21, 18, 542, 1528, 2932, 55, 77, 7125, 5019, 734, 1880, 6597, 357, 24410, 285, 14725, 5001, 7125, 5019, 734, 1880, 8863, 203, 3639, 17871, 21, 18, 1289, 12, 78, 2224, 21, 16, 394, 2358, 18, 2758, 2196, 634, 18, 2941, 18, 2219, 88, 7763, 18, 10368, 4878, 12, 9349, 16, 4200, 16, 300, 21, 16, 300, 21, 10019, 203, 203, 3639, 26538, 22, 18, 542, 5711, 12, 2704, 2252, 18, 2219, 88, 18, 5711, 2932, 37, 566, 287, 3113, 404, 16, 2593, 10019, 368, 30085, 2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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, 26873, 203, 377, 380, 1220, 707, 353, 2566, 628, 3470, 326, 3885, 358, 4046, 326, 646, 18, 203, 377, 380, 9744, 30, 2256, 4269, 5612, 333, 981, 18, 1021, 913, 434, 333, 707, 353, 3712, 203, 377, 380, 960, 7489, 635, 326, 2748, 18451, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
9de03af0fb4600ac0f453cba529333e06361e59a
YonathanR11/USB-Antivirus
src/Antivirus/Info.java
[ "MIT" ]
Java
main
null
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { Info dialog = new Info(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
/** * @param args the command line arguments */
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
public static void main(String args[]) { /* Set the Nimbus look and feel */ /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { Info dialog = new Info(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "{", "/* Set the Nimbus look and feel */", "/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */", "try", "{", "for", "(", "javax", ".", "swing", ".", "UIManager", ".", "LookAndFeelInfo", "info", ":", "javax", ".", "swing", ".", "UIManager", ".", "getInstalledLookAndFeels", "(", ")", ")", "{", "if", "(", "\"Nimbus\"", ".", "equals", "(", "info", ".", "getName", "(", ")", ")", ")", "{", "javax", ".", "swing", ".", "UIManager", ".", "setLookAndFeel", "(", "info", ".", "getClassName", "(", ")", ")", ";", "break", ";", "}", "}", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Info", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Info", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Info", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "javax", ".", "swing", ".", "UnsupportedLookAndFeelException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Info", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "/* Create and display the dialog */", "java", ".", "awt", ".", "EventQueue", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "Info", "dialog", "=", "new", "Info", "(", "new", "javax", ".", "swing", ".", "JFrame", "(", ")", ",", "true", ")", ";", "dialog", ".", "addWindowListener", "(", "new", "java", ".", "awt", ".", "event", ".", "WindowAdapter", "(", ")", "{", "@", "Override", "public", "void", "windowClosing", "(", "java", ".", "awt", ".", "event", ".", "WindowEvent", "e", ")", "{", "System", ".", "exit", "(", "0", ")", ";", "}", "}", ")", ";", "dialog", ".", "setVisible", "(", "true", ")", ";", "}", "}", ")", ";", "}" ]
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
[ "//<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 833, 63, 5717, 288, 203, 3639, 1748, 1000, 326, 423, 381, 9274, 2324, 471, 1656, 292, 1195, 203, 3639, 368, 32, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 10176, 471, 1656, 292, 3637, 981, 261, 10444, 13, 14402, 203, 3639, 1748, 971, 423, 381, 9274, 261, 23342, 2544, 3263, 316, 5110, 3174, 1666, 13, 353, 486, 2319, 16, 23449, 598, 326, 805, 2324, 471, 1656, 292, 18, 203, 540, 380, 2457, 3189, 2621, 1062, 2207, 7813, 18, 280, 16066, 18, 832, 19, 19207, 448, 19, 88, 22378, 19, 89, 291, 91, 310, 19, 7330, 464, 3030, 292, 19, 412, 1727, 18, 2620, 7010, 540, 1195, 203, 3639, 775, 288, 203, 5411, 364, 261, 28384, 18, 5328, 310, 18, 5370, 1318, 18, 9794, 1876, 2954, 292, 966, 1123, 294, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 588, 16747, 9794, 1876, 2954, 10558, 10756, 288, 203, 7734, 309, 7566, 50, 381, 9274, 9654, 14963, 12, 1376, 18, 17994, 1435, 3719, 288, 203, 10792, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 1376, 18, 588, 3834, 10663, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 966, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 10675, 7072, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 966, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 12195, 9773, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 966, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 28384, 18, 5328, 310, 18, 8544, 9794, 1876, 2954, 292, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 966, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 203, 3639, 1748, 1788, 471, 2562, 326, 6176, 1195, 203, 3639, 2252, 18, 2219, 88, 18, 1133, 3183, 18, 14407, 20607, 12, 2704, 10254, 1435, 288, 203, 5411, 1071, 918, 1086, 1435, 288, 203, 7734, 3807, 6176, 273, 394, 3807, 12, 2704, 6863, 18, 5328, 310, 18, 46, 3219, 9334, 638, 1769, 203, 7734, 6176, 18, 1289, 3829, 2223, 12, 2704, 2252, 18, 2219, 88, 18, 2575, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26873, 203, 377, 380, 632, 891, 833, 326, 1296, 980, 1775, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
690bb5a62114513504eac0ca446b16e8d064e2b9
YonathanR11/USB-Antivirus
src/Antivirus/ErrorVacuna.java
[ "MIT" ]
Java
initComponents
null
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 100, 101), 2)); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/error.png"))); // NOI18N jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel1.setText("Selecciona un nivel de vacuna"); materialButton1.setBackground(new java.awt.Color(255, 100, 101)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Aceptar"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(4, 4, 4) .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addGap(0, 8, Short.MAX_VALUE)))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 15, Short.MAX_VALUE)))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", ".", "WARNING", ":", "Do", "NOT", "modify", "this", "code", ".", "The", "content", "of", "this", "method", "is", "always", "regenerated", "by", "the", "Form", "Editor", "." ]
@SuppressWarnings("unchecked") private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 100, 101), 2)); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/error.png"))); jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); jLabel1.setText("Selecciona un nivel de vacuna"); materialButton1.setBackground(new java.awt.Color(255, 100, 101)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Aceptar"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(4, 4, 4) .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addGap(0, 8, Short.MAX_VALUE)))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 15, Short.MAX_VALUE)))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "initComponents", "(", ")", "{", "jPanel1", "=", "new", "javax", ".", "swing", ".", "JPanel", "(", ")", ";", "ico", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "jLabel1", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "materialButton1", "=", "new", "principal", ".", "MaterialButton", "(", ")", ";", "setDefaultCloseOperation", "(", "javax", ".", "swing", ".", "WindowConstants", ".", "DISPOSE_ON_CLOSE", ")", ";", "setUndecorated", "(", "true", ")", ";", "jPanel1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "jPanel1", ".", "setBorder", "(", "javax", ".", "swing", ".", "BorderFactory", ".", "createLineBorder", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "100", ",", "101", ")", ",", "2", ")", ")", ";", "ico", ".", "setHorizontalAlignment", "(", "javax", ".", "swing", ".", "SwingConstants", ".", "CENTER", ")", ";", "ico", ".", "setIcon", "(", "new", "javax", ".", "swing", ".", "ImageIcon", "(", "getClass", "(", ")", ".", "getResource", "(", "\"/img/error.png\"", ")", ")", ")", ";", "jLabel1", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel1", ".", "setText", "(", "\"Selecciona un nivel de vacuna\"", ")", ";", "materialButton1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "100", ",", "101", ")", ")", ";", "materialButton1", ".", "setForeground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "materialButton1", ".", "setText", "(", "\"Aceptar\"", ")", ";", "materialButton1", ".", "addActionListener", "(", "new", "java", ".", "awt", ".", "event", ".", "ActionListener", "(", ")", "{", "public", "void", "actionPerformed", "(", "java", ".", "awt", ".", "event", ".", "ActionEvent", "evt", ")", "{", "materialButton1ActionPerformed", "(", "evt", ")", ";", "}", "}", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "jPanel1Layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "jPanel1", ")", ";", "jPanel1", ".", "setLayout", "(", "jPanel1Layout", ")", ";", "jPanel1Layout", ".", "setHorizontalGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addGap", "(", "4", ",", "4", ",", "4", ")", ".", "addComponent", "(", "ico", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "90", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addPreferredGap", "(", "javax", ".", "swing", ".", "LayoutStyle", ".", "ComponentPlacement", ".", "RELATED", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addGap", "(", "0", ",", "0", ",", "Short", ".", "MAX_VALUE", ")", ".", "addComponent", "(", "materialButton1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "90", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addComponent", "(", "jLabel1", ")", ".", "addGap", "(", "0", ",", "8", ",", "Short", ".", "MAX_VALUE", ")", ")", ")", ")", ")", ";", "jPanel1Layout", ".", "setVerticalGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addContainerGap", "(", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addGap", "(", "0", ",", "0", ",", "Short", ".", "MAX_VALUE", ")", ".", "addComponent", "(", "jLabel1", ")", ".", "addPreferredGap", "(", "javax", ".", "swing", ".", "LayoutStyle", ".", "ComponentPlacement", ".", "UNRELATED", ")", ".", "addComponent", "(", "materialButton1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "46", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addComponent", "(", "ico", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "90", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addGap", "(", "0", ",", "15", ",", "Short", ".", "MAX_VALUE", ")", ")", ")", ")", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "getContentPane", "(", ")", ")", ";", "getContentPane", "(", ")", ".", "setLayout", "(", "layout", ")", ";", "layout", ".", "setHorizontalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "layout", ".", "createSequentialGroup", "(", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addGap", "(", "0", ",", "0", ",", "Short", ".", "MAX_VALUE", ")", ")", ")", ";", "layout", ".", "setVerticalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "pack", "(", ")", ";", "}" ]
This method is called from within the constructor to initialize the form.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", "." ]
[ "// <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents", "// NOI18N", "// NOI18N" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 368, 411, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 7823, 3356, 6441, 759, 16652, 17, 16061, 30, 2738, 7171, 203, 565, 3238, 918, 1208, 7171, 1435, 288, 203, 203, 3639, 17871, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 5537, 5621, 203, 3639, 277, 2894, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 26538, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 9390, 3616, 21, 273, 394, 8897, 18, 11790, 3616, 5621, 203, 203, 3639, 9277, 4605, 2988, 12, 28384, 18, 5328, 310, 18, 3829, 2918, 18, 13498, 23757, 67, 673, 67, 13384, 1769, 203, 3639, 444, 984, 11880, 690, 12, 3767, 1769, 203, 203, 3639, 17871, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 17871, 21, 18, 542, 8107, 12, 28384, 18, 5328, 310, 18, 8107, 1733, 18, 2640, 1670, 8107, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 2130, 16, 13822, 3631, 576, 10019, 203, 203, 3639, 277, 2894, 18, 542, 14457, 11535, 12, 28384, 18, 5328, 310, 18, 6050, 310, 2918, 18, 19835, 1769, 203, 3639, 277, 2894, 18, 542, 5554, 12, 2704, 6863, 18, 5328, 310, 18, 2040, 5554, 12, 588, 797, 7675, 588, 1420, 2932, 19, 6081, 19, 1636, 18, 6446, 6, 3719, 1769, 368, 30085, 2643, 50, 203, 203, 3639, 26538, 21, 18, 542, 5711, 12, 2704, 2252, 18, 2219, 88, 18, 5711, 2932, 37, 566, 287, 3113, 404, 16, 2593, 10019, 368, 30085, 2643, 50, 203, 3639, 26538, 21, 18, 542, 1528, 2932, 1877, 24410, 285, 69, 640, 290, 427, 292, 443, 30602, 31172, 8863, 203, 203, 3639, 9390, 3616, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 2130, 16, 13822, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 23206, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 1528, 2932, 37, 956, 297, 8863, 203, 3639, 9390, 3616, 21, 18, 1289, 1803, 2223, 12, 2704, 2252, 18, 2219, 88, 18, 2575, 18, 1803, 2223, 1435, 288, 203, 5411, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 203, 7734, 9390, 3616, 21, 19449, 12, 73, 11734, 1769, 203, 5411, 289, 203, 3639, 15549, 203, 203, 3639, 6863, 18, 5328, 310, 18, 1114, 3744, 17871, 21, 3744, 273, 394, 6863, 18, 5328, 310, 18, 1114, 3744, 12, 78, 5537, 21, 1769, 203, 3639, 17871, 21, 18, 542, 3744, 12, 78, 5537, 21, 3744, 1769, 203, 3639, 17871, 21, 3744, 18, 542, 14457, 1114, 12, 203, 5411, 17871, 21, 3744, 18, 2640, 13056, 1114, 12, 28384, 18, 5328, 310, 18, 1114, 3744, 18, 11535, 18, 900, 30118, 13, 203, 5411, 263, 1289, 1114, 12, 78, 5537, 21, 3744, 18, 2640, 28241, 1114, 1435, 203, 7734, 263, 1289, 14001, 12, 24, 16, 1059, 16, 1059, 13, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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, 3470, 326, 3885, 358, 4046, 326, 646, 18, 203, 377, 380, 9744, 30, 2256, 4269, 5612, 333, 981, 18, 1021, 913, 434, 333, 707, 353, 3712, 203, 377, 380, 960, 7489, 635, 326, 2748, 18451, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
690bb5a62114513504eac0ca446b16e8d064e2b9
YonathanR11/USB-Antivirus
src/Antivirus/ErrorVacuna.java
[ "MIT" ]
Java
main
null
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { ErrorVacuna dialog = new ErrorVacuna(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
/** * @param args the command line arguments */
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
public static void main(String args[]) { /* Set the Nimbus look and feel */ /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(ErrorVacuna.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { ErrorVacuna dialog = new ErrorVacuna(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "{", "/* Set the Nimbus look and feel */", "/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */", "try", "{", "for", "(", "javax", ".", "swing", ".", "UIManager", ".", "LookAndFeelInfo", "info", ":", "javax", ".", "swing", ".", "UIManager", ".", "getInstalledLookAndFeels", "(", ")", ")", "{", "if", "(", "\"Nimbus\"", ".", "equals", "(", "info", ".", "getName", "(", ")", ")", ")", "{", "javax", ".", "swing", ".", "UIManager", ".", "setLookAndFeel", "(", "info", ".", "getClassName", "(", ")", ")", ";", "break", ";", "}", "}", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "ErrorVacuna", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "ErrorVacuna", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "ErrorVacuna", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "javax", ".", "swing", ".", "UnsupportedLookAndFeelException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "ErrorVacuna", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "/* Create and display the dialog */", "java", ".", "awt", ".", "EventQueue", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "ErrorVacuna", "dialog", "=", "new", "ErrorVacuna", "(", "new", "javax", ".", "swing", ".", "JFrame", "(", ")", ",", "true", ")", ";", "dialog", ".", "addWindowListener", "(", "new", "java", ".", "awt", ".", "event", ".", "WindowAdapter", "(", ")", "{", "@", "Override", "public", "void", "windowClosing", "(", "java", ".", "awt", ".", "event", ".", "WindowEvent", "e", ")", "{", "System", ".", "exit", "(", "0", ")", ";", "}", "}", ")", ";", "dialog", ".", "setVisible", "(", "true", ")", ";", "}", "}", ")", ";", "}" ]
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
[ "//<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>", "//</editor-fold>" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 833, 63, 5717, 288, 203, 3639, 1748, 1000, 326, 423, 381, 9274, 2324, 471, 1656, 292, 1195, 203, 3639, 368, 32, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 10176, 471, 1656, 292, 3637, 981, 261, 10444, 13, 14402, 203, 3639, 1748, 971, 423, 381, 9274, 261, 23342, 2544, 3263, 316, 5110, 3174, 1666, 13, 353, 486, 2319, 16, 23449, 598, 326, 805, 2324, 471, 1656, 292, 18, 203, 540, 380, 2457, 3189, 2621, 1062, 2207, 7813, 18, 280, 16066, 18, 832, 19, 19207, 448, 19, 88, 22378, 19, 89, 291, 91, 310, 19, 7330, 464, 3030, 292, 19, 412, 1727, 18, 2620, 7010, 540, 1195, 203, 3639, 775, 288, 203, 5411, 364, 261, 28384, 18, 5328, 310, 18, 5370, 1318, 18, 9794, 1876, 2954, 292, 966, 1123, 294, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 588, 16747, 9794, 1876, 2954, 10558, 10756, 288, 203, 7734, 309, 7566, 50, 381, 9274, 9654, 14963, 12, 1376, 18, 17994, 1435, 3719, 288, 203, 10792, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 1376, 18, 588, 3834, 10663, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 668, 58, 1077, 31172, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 10675, 7072, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 668, 58, 1077, 31172, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 12195, 9773, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 668, 58, 1077, 31172, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 28384, 18, 5328, 310, 18, 8544, 9794, 1876, 2954, 292, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 668, 58, 1077, 31172, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 203, 3639, 1748, 1788, 471, 2562, 326, 6176, 1195, 203, 3639, 2252, 18, 2219, 88, 18, 1133, 3183, 18, 14407, 20607, 12, 2704, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
[ 1, 26873, 203, 377, 380, 632, 891, 833, 326, 1296, 980, 1775, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f5d5761d120470bb9964b0d70ab866aeef45f1bb
YonathanR11/USB-Antivirus
src/Antivirus/Antivirus.java
[ "MIT" ]
Java
main
null
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } catch (UnsupportedLookAndFeelException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } new Antivirus().setVisible(true); } }); }
/** * @param args the command line arguments */
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
public static void main(String args[]) { /* Set the Nimbus look and feel */ /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Antivirus.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } catch (UnsupportedLookAndFeelException ex) { Logger.getLogger(Antivirus.class.getName()).log(Level.SEVERE, null, ex); } new Antivirus().setVisible(true); } }); }
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "{", "/* Set the Nimbus look and feel */", "/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */", "try", "{", "for", "(", "javax", ".", "swing", ".", "UIManager", ".", "LookAndFeelInfo", "info", ":", "javax", ".", "swing", ".", "UIManager", ".", "getInstalledLookAndFeels", "(", ")", ")", "{", "if", "(", "\"Nimbus\"", ".", "equals", "(", "info", ".", "getName", "(", ")", ")", ")", "{", "javax", ".", "swing", ".", "UIManager", ".", "setLookAndFeel", "(", "info", ".", "getClassName", "(", ")", ")", ";", "break", ";", "}", "}", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "javax", ".", "swing", ".", "UnsupportedLookAndFeelException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "/* Create and display the form */", "java", ".", "awt", ".", "EventQueue", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "try", "{", "UIManager", ".", "setLookAndFeel", "(", "UIManager", ".", "getSystemLookAndFeelClassName", "(", ")", ")", ";", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "UnsupportedLookAndFeelException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Antivirus", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "new", "Antivirus", "(", ")", ".", "setVisible", "(", "true", ")", ";", "}", "}", ")", ";", "}" ]
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
[ "//<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">", "//</editor-fold>" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 833, 63, 5717, 288, 203, 3639, 1748, 1000, 326, 423, 381, 9274, 2324, 471, 1656, 292, 1195, 203, 3639, 368, 32, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 10176, 471, 1656, 292, 3637, 981, 261, 10444, 13, 14402, 203, 3639, 1748, 971, 423, 381, 9274, 261, 23342, 2544, 3263, 316, 5110, 3174, 1666, 13, 353, 486, 2319, 16, 23449, 598, 326, 805, 2324, 471, 1656, 292, 18, 203, 540, 380, 2457, 3189, 2621, 1062, 2207, 7813, 18, 280, 16066, 18, 832, 19, 19207, 448, 19, 88, 22378, 19, 89, 291, 91, 310, 19, 7330, 464, 3030, 292, 19, 412, 1727, 18, 2620, 7010, 540, 1195, 203, 3639, 775, 288, 203, 5411, 364, 261, 28384, 18, 5328, 310, 18, 5370, 1318, 18, 9794, 1876, 2954, 292, 966, 1123, 294, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 588, 16747, 9794, 1876, 2954, 10558, 10756, 288, 203, 7734, 309, 7566, 50, 381, 9274, 9654, 14963, 12, 1376, 18, 17994, 1435, 3719, 288, 203, 10792, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 1376, 18, 588, 3834, 10663, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 14925, 427, 481, 407, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 10675, 7072, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 14925, 427, 481, 407, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 12195, 9773, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 14925, 427, 481, 407, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 28384, 18, 5328, 310, 18, 8544, 9794, 1876, 2954, 292, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 14925, 427, 481, 407, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 203, 3639, 1748, 1788, 471, 2562, 326, 646, 1195, 203, 3639, 2252, 18, 2219, 88, 18, 1133, 3183, 18, 14407, 20607, 12, 2704, 10254, 1435, 288, 203, 5411, 1071, 918, 1086, 1435, 288, 203, 7734, 775, 288, 203, 10792, 6484, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 5370, 1318, 18, 588, 3163, 9794, 1876, 2954, 292, 3834, 10663, 203, 7734, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 10792, 4242, 18, 588, 3328, 12, 14925, 427, 481, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
11a12eca95fb6950d545e486652bcf4cc03b8e51
YonathanR11/USB-Antivirus
src/InstalLite/Setup.java
[ "MIT" ]
Java
main
null
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } catch (UnsupportedLookAndFeelException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } new Setup().setVisible(true); } }); }
/** * @param args the command line arguments */
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
public static void main(String args[]) { /* Set the Nimbus look and feel */ /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Setup.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } catch (UnsupportedLookAndFeelException ex) { Logger.getLogger(Setup.class.getName()).log(Level.SEVERE, null, ex); } new Setup().setVisible(true); } }); }
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "{", "/* Set the Nimbus look and feel */", "/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */", "try", "{", "for", "(", "javax", ".", "swing", ".", "UIManager", ".", "LookAndFeelInfo", "info", ":", "javax", ".", "swing", ".", "UIManager", ".", "getInstalledLookAndFeels", "(", ")", ")", "{", "if", "(", "\"Nimbus\"", ".", "equals", "(", "info", ".", "getName", "(", ")", ")", ")", "{", "javax", ".", "swing", ".", "UIManager", ".", "setLookAndFeel", "(", "info", ".", "getClassName", "(", ")", ")", ";", "break", ";", "}", "}", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "javax", ".", "swing", ".", "UnsupportedLookAndFeelException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "/* Create and display the form */", "java", ".", "awt", ".", "EventQueue", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "try", "{", "UIManager", ".", "setLookAndFeel", "(", "UIManager", ".", "getSystemLookAndFeelClassName", "(", ")", ")", ";", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "UnsupportedLookAndFeelException", "ex", ")", "{", "Logger", ".", "getLogger", "(", "Setup", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "new", "Setup", "(", ")", ".", "setVisible", "(", "true", ")", ";", "}", "}", ")", ";", "}" ]
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
[ "//<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">", "//</editor-fold>" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 833, 63, 5717, 288, 203, 3639, 1748, 1000, 326, 423, 381, 9274, 2324, 471, 1656, 292, 1195, 203, 3639, 368, 32, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 10176, 471, 1656, 292, 3637, 981, 261, 10444, 13, 14402, 203, 3639, 1748, 971, 423, 381, 9274, 261, 23342, 2544, 3263, 316, 5110, 3174, 1666, 13, 353, 486, 2319, 16, 23449, 598, 326, 805, 2324, 471, 1656, 292, 18, 203, 540, 380, 2457, 3189, 2621, 1062, 2207, 7813, 18, 280, 16066, 18, 832, 19, 19207, 448, 19, 88, 22378, 19, 89, 291, 91, 310, 19, 7330, 464, 3030, 292, 19, 412, 1727, 18, 2620, 7010, 540, 1195, 203, 3639, 775, 288, 203, 5411, 364, 261, 28384, 18, 5328, 310, 18, 5370, 1318, 18, 9794, 1876, 2954, 292, 966, 1123, 294, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 588, 16747, 9794, 1876, 2954, 10558, 10756, 288, 203, 7734, 309, 7566, 50, 381, 9274, 9654, 14963, 12, 1376, 18, 17994, 1435, 3719, 288, 203, 10792, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 1376, 18, 588, 3834, 10663, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 7365, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 10675, 7072, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 7365, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 12195, 9773, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 7365, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 28384, 18, 5328, 310, 18, 8544, 9794, 1876, 2954, 292, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 7365, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 203, 3639, 1748, 1788, 471, 2562, 326, 646, 1195, 203, 3639, 2252, 18, 2219, 88, 18, 1133, 3183, 18, 14407, 20607, 12, 2704, 10254, 1435, 288, 203, 5411, 1071, 918, 1086, 1435, 288, 203, 7734, 775, 288, 203, 10792, 6484, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 5370, 1318, 18, 588, 3163, 9794, 1876, 2954, 292, 3834, 10663, 203, 7734, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 10792, 4242, 18, 588, 3328, 12, 7365, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 2355, 18, 1090, 2204, 41, 16, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26873, 203, 377, 380, 632, 891, 833, 326, 1296, 980, 1775, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
71b68ca44abd533566bdf3319fe621fe1871f2e9
YonathanR11/USB-Antivirus
src/Antivirus/Error.java
[ "MIT" ]
Java
initComponents
null
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 100, 101), 2)); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/error.png"))); // NOI18N jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel1.setText("Se esta ejecutando un analisis."); jLabel2.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel2.setText("Intente al terminar"); materialButton1.setBackground(new java.awt.Color(255, 100, 101)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Aceptar"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel2)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18)))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(21, 21, 21) .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(54, 54, 54) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addGap(18, 18, 18) .addComponent(materialButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 47, Short.MAX_VALUE))) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", ".", "WARNING", ":", "Do", "NOT", "modify", "this", "code", ".", "The", "content", "of", "this", "method", "is", "always", "regenerated", "by", "the", "Form", "Editor", "." ]
@SuppressWarnings("unchecked") private void initComponents() { jPanel1 = new javax.swing.JPanel(); ico = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); materialButton1 = new principal.MaterialButton(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setUndecorated(true); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(255, 100, 101), 2)); ico.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); ico.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/error.png"))); jLabel1.setFont(new java.awt.Font("Arial", 1, 12)); jLabel1.setText("Se esta ejecutando un analisis."); jLabel2.setFont(new java.awt.Font("Arial", 1, 12)); jLabel2.setText("Intente al terminar"); materialButton1.setBackground(new java.awt.Color(255, 100, 101)); materialButton1.setForeground(new java.awt.Color(255, 255, 255)); materialButton1.setText("Aceptar"); materialButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { materialButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel2)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(materialButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18)))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(21, 21, 21) .addComponent(ico, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(54, 54, 54) .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel2) .addGap(18, 18, 18) .addComponent(materialButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 47, Short.MAX_VALUE))) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "void", "initComponents", "(", ")", "{", "jPanel1", "=", "new", "javax", ".", "swing", ".", "JPanel", "(", ")", ";", "ico", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "jLabel1", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "jLabel2", "=", "new", "javax", ".", "swing", ".", "JLabel", "(", ")", ";", "materialButton1", "=", "new", "principal", ".", "MaterialButton", "(", ")", ";", "setDefaultCloseOperation", "(", "javax", ".", "swing", ".", "WindowConstants", ".", "DISPOSE_ON_CLOSE", ")", ";", "setUndecorated", "(", "true", ")", ";", "jPanel1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "jPanel1", ".", "setBorder", "(", "javax", ".", "swing", ".", "BorderFactory", ".", "createLineBorder", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "100", ",", "101", ")", ",", "2", ")", ")", ";", "ico", ".", "setHorizontalAlignment", "(", "javax", ".", "swing", ".", "SwingConstants", ".", "CENTER", ")", ";", "ico", ".", "setIcon", "(", "new", "javax", ".", "swing", ".", "ImageIcon", "(", "getClass", "(", ")", ".", "getResource", "(", "\"/img/error.png\"", ")", ")", ")", ";", "jLabel1", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel1", ".", "setText", "(", "\"Se esta ejecutando un analisis.\"", ")", ";", "jLabel2", ".", "setFont", "(", "new", "java", ".", "awt", ".", "Font", "(", "\"Arial\"", ",", "1", ",", "12", ")", ")", ";", "jLabel2", ".", "setText", "(", "\"Intente al terminar\"", ")", ";", "materialButton1", ".", "setBackground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "100", ",", "101", ")", ")", ";", "materialButton1", ".", "setForeground", "(", "new", "java", ".", "awt", ".", "Color", "(", "255", ",", "255", ",", "255", ")", ")", ";", "materialButton1", ".", "setText", "(", "\"Aceptar\"", ")", ";", "materialButton1", ".", "addActionListener", "(", "new", "java", ".", "awt", ".", "event", ".", "ActionListener", "(", ")", "{", "public", "void", "actionPerformed", "(", "java", ".", "awt", ".", "event", ".", "ActionEvent", "evt", ")", "{", "materialButton1ActionPerformed", "(", "evt", ")", ";", "}", "}", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "jPanel1Layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "jPanel1", ")", ";", "jPanel1", ".", "setLayout", "(", "jPanel1Layout", ")", ";", "jPanel1Layout", ".", "setHorizontalGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addContainerGap", "(", ")", ".", "addComponent", "(", "ico", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "90", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addPreferredGap", "(", "javax", ".", "swing", ".", "LayoutStyle", ".", "ComponentPlacement", ".", "UNRELATED", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jLabel1", ")", ".", "addComponent", "(", "jLabel2", ")", ")", ".", "addContainerGap", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ".", "addGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "TRAILING", ",", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addPreferredGap", "(", "javax", ".", "swing", ".", "LayoutStyle", ".", "ComponentPlacement", ".", "RELATED", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ".", "addComponent", "(", "materialButton1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "90", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addGap", "(", "18", ",", "18", ",", "18", ")", ")", ")", ")", ")", ";", "jPanel1Layout", ".", "setVerticalGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addGap", "(", "21", ",", "21", ",", "21", ")", ".", "addComponent", "(", "ico", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ",", "90", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "PREFERRED_SIZE", ")", ".", "addGap", "(", "0", ",", "0", ",", "Short", ".", "MAX_VALUE", ")", ")", ".", "addGroup", "(", "jPanel1Layout", ".", "createSequentialGroup", "(", ")", ".", "addGap", "(", "54", ",", "54", ",", "54", ")", ".", "addComponent", "(", "jLabel1", ")", ".", "addPreferredGap", "(", "javax", ".", "swing", ".", "LayoutStyle", ".", "ComponentPlacement", ".", "RELATED", ")", ".", "addComponent", "(", "jLabel2", ")", ".", "addGap", "(", "18", ",", "18", ",", "18", ")", ".", "addComponent", "(", "materialButton1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "47", ",", "Short", ".", "MAX_VALUE", ")", ")", ")", ".", "addContainerGap", "(", ")", ")", ")", ";", "javax", ".", "swing", ".", "GroupLayout", "layout", "=", "new", "javax", ".", "swing", ".", "GroupLayout", "(", "getContentPane", "(", ")", ")", ";", "getContentPane", "(", ")", ".", "setLayout", "(", "layout", ")", ";", "layout", ".", "setHorizontalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "layout", ".", "setVerticalGroup", "(", "layout", ".", "createParallelGroup", "(", "javax", ".", "swing", ".", "GroupLayout", ".", "Alignment", ".", "LEADING", ")", ".", "addComponent", "(", "jPanel1", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "javax", ".", "swing", ".", "GroupLayout", ".", "DEFAULT_SIZE", ",", "Short", ".", "MAX_VALUE", ")", ")", ";", "pack", "(", ")", ";", "}" ]
This method is called from within the constructor to initialize the form.
[ "This", "method", "is", "called", "from", "within", "the", "constructor", "to", "initialize", "the", "form", "." ]
[ "// <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents", "// NOI18N", "// NOI18N", "// NOI18N" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 29282, 4312, 2932, 5847, 7923, 203, 565, 368, 411, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 7823, 3356, 6441, 759, 16652, 17, 16061, 30, 2738, 7171, 203, 565, 3238, 918, 1208, 7171, 1435, 288, 203, 203, 3639, 17871, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 5537, 5621, 203, 3639, 277, 2894, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 26538, 21, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 26538, 22, 273, 394, 6863, 18, 5328, 310, 18, 46, 2224, 5621, 203, 3639, 9390, 3616, 21, 273, 394, 8897, 18, 11790, 3616, 5621, 203, 203, 3639, 9277, 4605, 2988, 12, 28384, 18, 5328, 310, 18, 3829, 2918, 18, 13498, 23757, 67, 673, 67, 13384, 1769, 203, 3639, 444, 984, 11880, 690, 12, 3767, 1769, 203, 203, 3639, 17871, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 17871, 21, 18, 542, 8107, 12, 28384, 18, 5328, 310, 18, 8107, 1733, 18, 2640, 1670, 8107, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 2130, 16, 13822, 3631, 576, 10019, 203, 203, 3639, 277, 2894, 18, 542, 14457, 11535, 12, 28384, 18, 5328, 310, 18, 6050, 310, 2918, 18, 19835, 1769, 203, 3639, 277, 2894, 18, 542, 5554, 12, 2704, 6863, 18, 5328, 310, 18, 2040, 5554, 12, 588, 797, 7675, 588, 1420, 2932, 19, 6081, 19, 1636, 18, 6446, 6, 3719, 1769, 368, 30085, 2643, 50, 203, 203, 3639, 26538, 21, 18, 542, 5711, 12, 2704, 2252, 18, 2219, 88, 18, 5711, 2932, 37, 566, 287, 3113, 404, 16, 2593, 10019, 368, 30085, 2643, 50, 203, 3639, 26538, 21, 18, 542, 1528, 2932, 1761, 4387, 69, 425, 78, 557, 322, 28630, 640, 392, 287, 19179, 1199, 1769, 203, 203, 3639, 26538, 22, 18, 542, 5711, 12, 2704, 2252, 18, 2219, 88, 18, 5711, 2932, 37, 566, 287, 3113, 404, 16, 2593, 10019, 368, 30085, 2643, 50, 203, 3639, 26538, 22, 18, 542, 1528, 2932, 12105, 73, 524, 16122, 297, 8863, 203, 203, 3639, 9390, 3616, 21, 18, 542, 8199, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 2130, 16, 13822, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 23206, 12, 2704, 2252, 18, 2219, 88, 18, 2957, 12, 10395, 16, 4561, 16, 4561, 10019, 203, 3639, 9390, 3616, 21, 18, 542, 1528, 2932, 37, 956, 297, 8863, 203, 3639, 9390, 3616, 21, 18, 1289, 1803, 2223, 12, 2704, 2252, 18, 2219, 88, 18, 2575, 18, 1803, 2223, 1435, 288, 203, 5411, 1071, 918, 26100, 12, 6290, 18, 2219, 88, 18, 2575, 18, 1803, 1133, 6324, 13, 288, 203, 7734, 9390, 3616, 21, 19449, 12, 73, 11734, 1769, 203, 5411, 289, 203, 3639, 15549, 203, 203, 3639, 6863, 18, 5328, 310, 18, 1114, 3744, 17871, 21, 3744, 273, 394, 6863, 18, 5328, 310, 18, 1114, 3744, 12, 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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, 26873, 203, 377, 380, 1220, 707, 353, 2566, 628, 3470, 326, 3885, 358, 4046, 326, 646, 18, 203, 377, 380, 9744, 30, 2256, 4269, 5612, 333, 981, 18, 1021, 913, 434, 333, 707, 353, 3712, 203, 377, 380, 960, 7489, 635, 326, 2748, 18451, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
8b18ab9890d9386de735d0bc716548e2ec70d03b
YonathanR11/USB-Antivirus
src/Antivirus/creditos.java
[ "MIT" ]
Java
main
null
public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { creditos dialog = new creditos(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
/** * @param args the command line arguments */
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
public static void main(String args[]) { /* Set the Nimbus look and feel */ /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(creditos.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } /* Create and display the dialog */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { creditos dialog = new creditos(new javax.swing.JFrame(), true); dialog.addWindowListener(new java.awt.event.WindowAdapter() { @Override public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } }); dialog.setVisible(true); } }); }
[ "public", "static", "void", "main", "(", "String", "args", "[", "]", ")", "{", "/* Set the Nimbus look and feel */", "/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.\n * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html \n */", "try", "{", "for", "(", "javax", ".", "swing", ".", "UIManager", ".", "LookAndFeelInfo", "info", ":", "javax", ".", "swing", ".", "UIManager", ".", "getInstalledLookAndFeels", "(", ")", ")", "{", "if", "(", "\"Nimbus\"", ".", "equals", "(", "info", ".", "getName", "(", ")", ")", ")", "{", "javax", ".", "swing", ".", "UIManager", ".", "setLookAndFeel", "(", "info", ".", "getClassName", "(", ")", ")", ";", "break", ";", "}", "}", "}", "catch", "(", "ClassNotFoundException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "creditos", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "InstantiationException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "creditos", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "IllegalAccessException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "creditos", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "catch", "(", "javax", ".", "swing", ".", "UnsupportedLookAndFeelException", "ex", ")", "{", "java", ".", "util", ".", "logging", ".", "Logger", ".", "getLogger", "(", "creditos", ".", "class", ".", "getName", "(", ")", ")", ".", "log", "(", "java", ".", "util", ".", "logging", ".", "Level", ".", "SEVERE", ",", "null", ",", "ex", ")", ";", "}", "/* Create and display the dialog */", "java", ".", "awt", ".", "EventQueue", ".", "invokeLater", "(", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "creditos", "dialog", "=", "new", "creditos", "(", "new", "javax", ".", "swing", ".", "JFrame", "(", ")", ",", "true", ")", ";", "dialog", ".", "addWindowListener", "(", "new", "java", ".", "awt", ".", "event", ".", "WindowAdapter", "(", ")", "{", "@", "Override", "public", "void", "windowClosing", "(", "java", ".", "awt", ".", "event", ".", "WindowEvent", "e", ")", "{", "System", ".", "exit", "(", "0", ")", ";", "}", "}", ")", ";", "dialog", ".", "setVisible", "(", "true", ")", ";", "}", "}", ")", ";", "}" ]
@param args the command line arguments
[ "@param", "args", "the", "command", "line", "arguments" ]
[ "//<editor-fold defaultstate=\"collapsed\" desc=\" Look and feel setting code (optional) \">", "//</editor-fold>" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2774, 12, 780, 833, 63, 5717, 288, 203, 3639, 1748, 1000, 326, 423, 381, 9274, 2324, 471, 1656, 292, 1195, 203, 3639, 368, 32, 9177, 17, 16007, 805, 2019, 1546, 1293, 13886, 6, 3044, 1546, 10176, 471, 1656, 292, 3637, 981, 261, 10444, 13, 14402, 203, 3639, 1748, 971, 423, 381, 9274, 261, 23342, 2544, 3263, 316, 5110, 3174, 1666, 13, 353, 486, 2319, 16, 23449, 598, 326, 805, 2324, 471, 1656, 292, 18, 203, 540, 380, 2457, 3189, 2621, 1062, 2207, 7813, 18, 280, 16066, 18, 832, 19, 19207, 448, 19, 88, 22378, 19, 89, 291, 91, 310, 19, 7330, 464, 3030, 292, 19, 412, 1727, 18, 2620, 7010, 540, 1195, 203, 3639, 775, 288, 203, 5411, 364, 261, 28384, 18, 5328, 310, 18, 5370, 1318, 18, 9794, 1876, 2954, 292, 966, 1123, 294, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 588, 16747, 9794, 1876, 2954, 10558, 10756, 288, 203, 7734, 309, 7566, 50, 381, 9274, 9654, 14963, 12, 1376, 18, 17994, 1435, 3719, 288, 203, 10792, 6863, 18, 5328, 310, 18, 5370, 1318, 18, 542, 9794, 1876, 2954, 292, 12, 1376, 18, 588, 3834, 10663, 203, 10792, 898, 31, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 1044, 261, 797, 3990, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 20688, 538, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 10675, 7072, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 20688, 538, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 12195, 9773, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 20688, 538, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 1044, 261, 28384, 18, 5328, 310, 18, 8544, 9794, 1876, 2954, 292, 503, 431, 13, 288, 203, 5411, 2252, 18, 1367, 18, 11167, 18, 3328, 18, 588, 3328, 12, 20688, 538, 18, 1106, 18, 17994, 1435, 2934, 1330, 12, 6290, 18, 1367, 18, 11167, 18, 2355, 18, 1090, 2204, 41, 16, 446, 16, 431, 1769, 203, 3639, 289, 203, 3639, 368, 1757, 9177, 17, 16007, 34, 203, 203, 3639, 1748, 1788, 471, 2562, 326, 6176, 1195, 203, 3639, 2252, 18, 2219, 88, 18, 1133, 3183, 18, 14407, 20607, 12, 2704, 10254, 1435, 288, 203, 5411, 1071, 918, 1086, 1435, 288, 203, 7734, 12896, 538, 6176, 273, 394, 12896, 538, 12, 2704, 6863, 18, 5328, 310, 18, 46, 3219, 9334, 638, 1769, 203, 7734, 6176, 18, 1289, 3829, 2223, 12, 2704, 2252, 18, 2219, 88, 18, 2575, 18, 3829, 4216, 1435, 288, 203, 10792, 632, 6618, 203, 10792, 1071, 918, 2742, 15745, 12, 6290, 18, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26873, 203, 377, 380, 632, 891, 833, 326, 1296, 980, 1775, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
1a011635f9fec5b599513d268ec4950b8bec0679
team3663/Neon
src/team3663/neon/commands/C_CameraDetectHotGoal.java
[ "BSD-3-Clause" ]
Java
isFinished
null
protected boolean isFinished() { if (Timer.getFPGATimestamp() > endTime) return true; if (imageProcess2.hotTargetFound()) return true; imageProcess2.processCameraImage(Robot3663.dontUseCamera, false, false, false, 1); return imageProcess2.hotTargetFound(); }
// Make this return true when this Command no longer needs to run execute()
Make this return true when this Command no longer needs to run execute()
[ "Make", "this", "return", "true", "when", "this", "Command", "no", "longer", "needs", "to", "run", "execute", "()" ]
protected boolean isFinished() { if (Timer.getFPGATimestamp() > endTime) return true; if (imageProcess2.hotTargetFound()) return true; imageProcess2.processCameraImage(Robot3663.dontUseCamera, false, false, false, 1); return imageProcess2.hotTargetFound(); }
[ "protected", "boolean", "isFinished", "(", ")", "{", "if", "(", "Timer", ".", "getFPGATimestamp", "(", ")", ">", "endTime", ")", "return", "true", ";", "if", "(", "imageProcess2", ".", "hotTargetFound", "(", ")", ")", "return", "true", ";", "imageProcess2", ".", "processCameraImage", "(", "Robot3663", ".", "dontUseCamera", ",", "false", ",", "false", ",", "false", ",", "1", ")", ";", "return", "imageProcess2", ".", "hotTargetFound", "(", ")", ";", "}" ]
Make this return true when this Command no longer needs to run execute()
[ "Make", "this", "return", "true", "when", "this", "Command", "no", "longer", "needs", "to", "run", "execute", "()" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 1250, 353, 10577, 1435, 288, 203, 7010, 3639, 309, 261, 6777, 18, 588, 42, 18679, 789, 2796, 1435, 405, 13859, 13, 203, 5411, 327, 638, 31, 203, 540, 203, 3639, 309, 261, 2730, 2227, 22, 18, 15224, 2326, 2043, 10756, 203, 5411, 327, 638, 31, 203, 540, 203, 3639, 1316, 2227, 22, 18, 2567, 16521, 2040, 12, 20605, 5718, 4449, 18, 72, 1580, 3727, 16521, 16, 629, 16, 629, 16, 629, 16, 404, 1769, 203, 540, 203, 3639, 327, 1316, 2227, 22, 18, 15224, 2326, 2043, 5621, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 4344, 333, 327, 638, 1347, 333, 3498, 1158, 7144, 4260, 358, 1086, 1836, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
829a36ec22f1222e26297020407d454a21545a0c
team3663/Neon
src/team3663/neon/commands/C_GetValues.java
[ "BSD-3-Clause" ]
Java
initialize
null
protected void initialize() { param1 = SmartDashboard.getNumber("param1"); param2 = SmartDashboard.getNumber("param2"); param3 = SmartDashboard.getNumber("param3"); param4 = SmartDashboard.getNumber("param4"); command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3); }
// Called just before this Command runs the first time
Called just before this Command runs the first time
[ "Called", "just", "before", "this", "Command", "runs", "the", "first", "time" ]
protected void initialize() { param1 = SmartDashboard.getNumber("param1"); param2 = SmartDashboard.getNumber("param2"); param3 = SmartDashboard.getNumber("param3"); param4 = SmartDashboard.getNumber("param4"); command = new C_DriveBasedOnEncoderWithTwist(param1, param2, param3); }
[ "protected", "void", "initialize", "(", ")", "{", "param1", "=", "SmartDashboard", ".", "getNumber", "(", "\"param1\"", ")", ";", "param2", "=", "SmartDashboard", ".", "getNumber", "(", "\"param2\"", ")", ";", "param3", "=", "SmartDashboard", ".", "getNumber", "(", "\"param3\"", ")", ";", "param4", "=", "SmartDashboard", ".", "getNumber", "(", "\"param4\"", ")", ";", "command", "=", "new", "C_DriveBasedOnEncoderWithTwist", "(", "param1", ",", "param2", ",", "param3", ")", ";", "}" ]
Called just before this Command runs the first time
[ "Called", "just", "before", "this", "Command", "runs", "the", "first", "time" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 918, 4046, 1435, 288, 3639, 203, 3639, 579, 21, 273, 19656, 14830, 18, 588, 1854, 2932, 891, 21, 8863, 203, 3639, 579, 22, 273, 19656, 14830, 18, 588, 1854, 2932, 891, 22, 8863, 203, 3639, 579, 23, 273, 19656, 14830, 18, 588, 1854, 2932, 891, 23, 8863, 203, 3639, 579, 24, 273, 19656, 14830, 18, 588, 1854, 2932, 891, 24, 8863, 203, 3639, 1296, 273, 394, 385, 67, 24681, 9802, 1398, 7204, 1190, 23539, 376, 12, 891, 21, 16, 579, 22, 16, 579, 23, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 759, 11782, 2537, 1865, 333, 3498, 7597, 326, 1122, 813, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5566f2cdbb2d60842fa2ee17bcbd94f008586be7
team3663/Neon
src/team3663/neon/subsystems/ImageProcessing2.java
[ "BSD-3-Clause" ]
Java
scoreCompare
null
boolean scoreCompare(Scores scores, boolean vertical) { boolean isTarget = true; isTarget &= scores.rectangularity > RECTANGULARITY_LIMIT; if(vertical){ isTarget &= scores.aspectRatioVertical > ASPECT_RATIO_LIMIT; } else { isTarget &= scores.aspectRatioHorizontal > ASPECT_RATIO_LIMIT; } return isTarget; }
/** * Compares scores to defined limits and returns true if the particle appears to be a target * * @param scores The structure containing the scores to compare * @param outer True if the particle should be treated as an outer target, false to treat it as a center target * * @return True if the particle meets all limits, false otherwise */
Compares scores to defined limits and returns true if the particle appears to be a target @param scores The structure containing the scores to compare @param outer True if the particle should be treated as an outer target, false to treat it as a center target @return True if the particle meets all limits, false otherwise
[ "Compares", "scores", "to", "defined", "limits", "and", "returns", "true", "if", "the", "particle", "appears", "to", "be", "a", "target", "@param", "scores", "The", "structure", "containing", "the", "scores", "to", "compare", "@param", "outer", "True", "if", "the", "particle", "should", "be", "treated", "as", "an", "outer", "target", "false", "to", "treat", "it", "as", "a", "center", "target", "@return", "True", "if", "the", "particle", "meets", "all", "limits", "false", "otherwise" ]
boolean scoreCompare(Scores scores, boolean vertical) { boolean isTarget = true; isTarget &= scores.rectangularity > RECTANGULARITY_LIMIT; if(vertical){ isTarget &= scores.aspectRatioVertical > ASPECT_RATIO_LIMIT; } else { isTarget &= scores.aspectRatioHorizontal > ASPECT_RATIO_LIMIT; } return isTarget; }
[ "boolean", "scoreCompare", "(", "Scores", "scores", ",", "boolean", "vertical", ")", "{", "boolean", "isTarget", "=", "true", ";", "isTarget", "&=", "scores", ".", "rectangularity", ">", "RECTANGULARITY_LIMIT", ";", "if", "(", "vertical", ")", "{", "isTarget", "&=", "scores", ".", "aspectRatioVertical", ">", "ASPECT_RATIO_LIMIT", ";", "}", "else", "{", "isTarget", "&=", "scores", ".", "aspectRatioHorizontal", ">", "ASPECT_RATIO_LIMIT", ";", "}", "return", "isTarget", ";", "}" ]
Compares scores to defined limits and returns true if the particle appears to be a target @param scores The structure containing the scores to compare @param outer True if the particle should be treated as an outer target, false to treat it as a center target
[ "Compares", "scores", "to", "defined", "limits", "and", "returns", "true", "if", "the", "particle", "appears", "to", "be", "a", "target", "@param", "scores", "The", "structure", "containing", "the", "scores", "to", "compare", "@param", "outer", "True", "if", "the", "particle", "should", "be", "treated", "as", "an", "outer", "target", "false", "to", "treat", "it", "as", "a", "center", "target" ]
[]
[ { "param": "scores", "type": "Scores" }, { "param": "vertical", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "scores", "type": "Scores", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "vertical", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1250, 4462, 8583, 12, 20037, 8474, 16, 1250, 9768, 13, 203, 565, 288, 203, 202, 6494, 353, 2326, 273, 638, 31, 203, 203, 202, 291, 2326, 12058, 8474, 18, 2607, 539, 12976, 405, 2438, 1268, 11694, 985, 4107, 67, 8283, 31, 203, 202, 430, 12, 17824, 15329, 203, 5411, 353, 2326, 12058, 8474, 18, 23579, 8541, 15704, 405, 5355, 1423, 1268, 67, 54, 789, 4294, 67, 8283, 31, 203, 202, 97, 469, 288, 203, 5411, 353, 2326, 12058, 8474, 18, 23579, 8541, 14457, 405, 5355, 1423, 1268, 67, 54, 789, 4294, 67, 8283, 31, 203, 202, 97, 203, 203, 202, 2463, 353, 2326, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 5427, 4807, 8474, 358, 2553, 8181, 471, 1135, 638, 309, 326, 20036, 14606, 358, 506, 279, 1018, 203, 377, 380, 203, 377, 380, 632, 891, 8474, 1021, 3695, 4191, 326, 8474, 358, 3400, 203, 377, 380, 632, 891, 6390, 1053, 309, 326, 20036, 1410, 506, 13974, 487, 392, 6390, 1018, 16, 629, 358, 10116, 518, 487, 279, 4617, 1018, 203, 377, 380, 203, 377, 380, 632, 2463, 1053, 309, 326, 20036, 1791, 2413, 777, 8181, 16, 629, 3541, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5566f2cdbb2d60842fa2ee17bcbd94f008586be7
team3663/Neon
src/team3663/neon/subsystems/ImageProcessing2.java
[ "BSD-3-Clause" ]
Java
scoreRectangularity
null
double scoreRectangularity(ParticleAnalysisReport report) { if(report.boundingRectWidth*report.boundingRectHeight !=0) { return 100*report.particleArea/(report.boundingRectWidth*report.boundingRectHeight); } else { return 0; } }
/** * Computes a score (0-100) estimating how rectangular the particle is by comparing the area of the particle * to the area of the bounding box surrounding it. A perfect rectangle would cover the entire bounding box. * * @param report The Particle Analysis Report for the particle to score * @return The rectangularity score (0-100) */
Computes a score (0-100) estimating how rectangular the particle is by comparing the area of the particle to the area of the bounding box surrounding it. A perfect rectangle would cover the entire bounding box. @param report The Particle Analysis Report for the particle to score @return The rectangularity score (0-100)
[ "Computes", "a", "score", "(", "0", "-", "100", ")", "estimating", "how", "rectangular", "the", "particle", "is", "by", "comparing", "the", "area", "of", "the", "particle", "to", "the", "area", "of", "the", "bounding", "box", "surrounding", "it", ".", "A", "perfect", "rectangle", "would", "cover", "the", "entire", "bounding", "box", ".", "@param", "report", "The", "Particle", "Analysis", "Report", "for", "the", "particle", "to", "score", "@return", "The", "rectangularity", "score", "(", "0", "-", "100", ")" ]
double scoreRectangularity(ParticleAnalysisReport report) { if(report.boundingRectWidth*report.boundingRectHeight !=0) { return 100*report.particleArea/(report.boundingRectWidth*report.boundingRectHeight); } else { return 0; } }
[ "double", "scoreRectangularity", "(", "ParticleAnalysisReport", "report", ")", "{", "if", "(", "report", ".", "boundingRectWidth", "*", "report", ".", "boundingRectHeight", "!=", "0", ")", "{", "return", "100", "*", "report", ".", "particleArea", "/", "(", "report", ".", "boundingRectWidth", "*", "report", ".", "boundingRectHeight", ")", ";", "}", "else", "{", "return", "0", ";", "}", "}" ]
Computes a score (0-100) estimating how rectangular the particle is by comparing the area of the particle to the area of the bounding box surrounding it.
[ "Computes", "a", "score", "(", "0", "-", "100", ")", "estimating", "how", "rectangular", "the", "particle", "is", "by", "comparing", "the", "area", "of", "the", "particle", "to", "the", "area", "of", "the", "bounding", "box", "surrounding", "it", "." ]
[]
[ { "param": "report", "type": "ParticleAnalysisReport" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "report", "type": "ParticleAnalysisReport", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1645, 4462, 6120, 539, 12976, 12, 1988, 3711, 9418, 4820, 2605, 13, 203, 565, 288, 203, 3639, 309, 12, 6006, 18, 3653, 310, 6120, 2384, 14, 6006, 18, 3653, 310, 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036, 353, 635, 17553, 326, 5091, 434, 326, 20036, 203, 377, 380, 358, 326, 5091, 434, 326, 7552, 3919, 29071, 518, 18, 432, 24746, 11845, 4102, 5590, 326, 7278, 7552, 3919, 18, 203, 377, 380, 203, 377, 380, 632, 891, 2605, 1021, 6393, 3711, 16318, 8706, 364, 326, 20036, 358, 4462, 203, 377, 380, 632, 2463, 1021, 4917, 539, 12976, 4462, 261, 20, 17, 6625, 13, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
5566f2cdbb2d60842fa2ee17bcbd94f008586be7
team3663/Neon
src/team3663/neon/subsystems/ImageProcessing2.java
[ "BSD-3-Clause" ]
Java
hotOrNot
null
boolean hotOrNot(TargetReport target) { boolean isHot = true; isHot &= target.tapeWidthScore >= TAPE_WIDTH_LIMIT; isHot &= target.verticalScore >= VERTICAL_SCORE_LIMIT; isHot &= (target.leftScore > LR_SCORE_LIMIT) | (target.rightScore > LR_SCORE_LIMIT); return isHot; }
/** * Takes in a report on a target and compares the scores to the defined score limits to evaluate * if the target is a hot target or not. * * Returns True if the target is hot. False if it is not. */
Takes in a report on a target and compares the scores to the defined score limits to evaluate if the target is a hot target or not. Returns True if the target is hot. False if it is not.
[ "Takes", "in", "a", "report", "on", "a", "target", "and", "compares", "the", "scores", "to", "the", "defined", "score", "limits", "to", "evaluate", "if", "the", "target", "is", "a", "hot", "target", "or", "not", ".", "Returns", "True", "if", "the", "target", "is", "hot", ".", "False", "if", "it", "is", "not", "." ]
boolean hotOrNot(TargetReport target) { boolean isHot = true; isHot &= target.tapeWidthScore >= TAPE_WIDTH_LIMIT; isHot &= target.verticalScore >= VERTICAL_SCORE_LIMIT; isHot &= (target.leftScore > LR_SCORE_LIMIT) | (target.rightScore > LR_SCORE_LIMIT); return isHot; }
[ "boolean", "hotOrNot", "(", "TargetReport", "target", ")", "{", "boolean", "isHot", "=", "true", ";", "isHot", "&=", "target", ".", "tapeWidthScore", ">=", "TAPE_WIDTH_LIMIT", ";", "isHot", "&=", "target", ".", "verticalScore", ">=", "VERTICAL_SCORE_LIMIT", ";", "isHot", "&=", "(", "target", ".", "leftScore", ">", "LR_SCORE_LIMIT", ")", "|", "(", "target", ".", "rightScore", ">", "LR_SCORE_LIMIT", ")", ";", "return", "isHot", ";", "}" ]
Takes in a report on a target and compares the scores to the defined score limits to evaluate if the target is a hot target or not.
[ "Takes", "in", "a", "report", "on", "a", "target", "and", "compares", "the", "scores", "to", "the", "defined", "score", "limits", "to", "evaluate", "if", "the", "target", "is", "a", "hot", "target", "or", "not", "." ]
[]
[ { "param": "target", "type": "TargetReport" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "target", "type": "TargetReport", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1250, 12811, 1162, 1248, 12, 2326, 4820, 1018, 13, 203, 565, 288, 203, 3639, 1250, 353, 25270, 273, 638, 31, 203, 203, 3639, 353, 25270, 12058, 1018, 18, 88, 1273, 2384, 7295, 1545, 399, 37, 1423, 67, 10023, 67, 8283, 31, 203, 3639, 353, 25270, 12058, 1018, 18, 17824, 7295, 1545, 29109, 67, 28520, 67, 8283, 31, 203, 3639, 353, 25270, 12058, 261, 3299, 18, 4482, 7295, 405, 511, 54, 67, 28520, 67, 8283, 13, 571, 261, 3299, 18, 4083, 7295, 405, 511, 54, 67, 28520, 67, 8283, 1769, 203, 203, 3639, 327, 353, 25270, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 23004, 316, 279, 2605, 603, 279, 1018, 471, 20670, 326, 8474, 358, 326, 2553, 4462, 8181, 358, 5956, 203, 377, 380, 309, 326, 1018, 353, 279, 12811, 1018, 578, 486, 18, 203, 377, 380, 203, 377, 380, 2860, 1053, 309, 326, 1018, 353, 12811, 18, 1083, 309, 518, 353, 486, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
1b882fc10902c9853e669d7bbc2d4906713a42e3
phuongdt88/t5AdminPanel
app/models/GoogleDrive.java
[ "Apache-2.0" ]
Java
insertPermission
Permission
private static Permission insertPermission(Drive service, String fileId) { Permission newPermission = new Permission(); newPermission.setValue(USER_EMAIL); newPermission.setType("user"); newPermission.setRole("writer"); try { return service.permissions().insert(fileId, newPermission).setSendNotificationEmails(false).execute(); } catch (IOException e) { System.out.println("An error occurred: " + e); } return null; }
/** * Insert a new permission. * * @param service Drive API service instance. * @param fileId ID of the file to insert permission for. * @param value User or group e-mail address, domain name or {@code null} "default" type. * @param type The value "user", "group", "domain" or "default". * @param role The value "owner", "writer" or "reader". * @return The inserted permission if successful, {@code null} otherwise. */
Insert a new permission. @param service Drive API service instance. @param fileId ID of the file to insert permission for. @param value User or group e-mail address, domain name or null "default" type.
[ "Insert", "a", "new", "permission", ".", "@param", "service", "Drive", "API", "service", "instance", ".", "@param", "fileId", "ID", "of", "the", "file", "to", "insert", "permission", "for", ".", "@param", "value", "User", "or", "group", "e", "-", "mail", "address", "domain", "name", "or", "null", "\"", "default", "\"", "type", "." ]
private static Permission insertPermission(Drive service, String fileId) { Permission newPermission = new Permission(); newPermission.setValue(USER_EMAIL); newPermission.setType("user"); newPermission.setRole("writer"); try { return service.permissions().insert(fileId, newPermission).setSendNotificationEmails(false).execute(); } catch (IOException e) { System.out.println("An error occurred: " + e); } return null; }
[ "private", "static", "Permission", "insertPermission", "(", "Drive", "service", ",", "String", "fileId", ")", "{", "Permission", "newPermission", "=", "new", "Permission", "(", ")", ";", "newPermission", ".", "setValue", "(", "USER_EMAIL", ")", ";", "newPermission", ".", "setType", "(", "\"user\"", ")", ";", "newPermission", ".", "setRole", "(", "\"writer\"", ")", ";", "try", "{", "return", "service", ".", "permissions", "(", ")", ".", "insert", "(", "fileId", ",", "newPermission", ")", ".", "setSendNotificationEmails", "(", "false", ")", ".", "execute", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "System", ".", "out", ".", "println", "(", "\"An error occurred: \"", "+", "e", ")", ";", "}", "return", "null", ";", "}" ]
Insert a new permission.
[ "Insert", "a", "new", "permission", "." ]
[]
[ { "param": "service", "type": "Drive" }, { "param": "fileId", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "service", "type": "Drive", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "fileId", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 8509, 2243, 5041, 12, 24681, 1156, 16, 514, 21223, 13, 288, 203, 565, 8509, 394, 5041, 273, 394, 8509, 5621, 203, 203, 565, 394, 5041, 18, 542, 620, 12, 4714, 67, 14686, 1769, 203, 565, 394, 5041, 18, 542, 559, 2932, 1355, 8863, 203, 565, 394, 5041, 18, 542, 2996, 2932, 6299, 8863, 203, 565, 775, 288, 203, 1377, 327, 1156, 18, 9612, 7675, 6387, 12, 768, 548, 16, 394, 5041, 2934, 542, 3826, 4386, 26614, 12, 5743, 2934, 8837, 5621, 203, 565, 289, 1044, 261, 14106, 425, 13, 288, 203, 1377, 2332, 18, 659, 18, 8222, 2932, 979, 555, 7841, 30, 315, 397, 425, 1769, 203, 565, 289, 203, 565, 327, 446, 31, 203, 225, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 282, 380, 8040, 279, 394, 4132, 18, 203, 282, 380, 203, 282, 380, 632, 891, 1156, 11473, 688, 1491, 1156, 791, 18, 203, 282, 380, 632, 891, 21223, 1599, 434, 326, 585, 358, 2243, 4132, 364, 18, 203, 282, 380, 632, 891, 460, 2177, 578, 1041, 425, 17, 4408, 1758, 16, 2461, 508, 578, 8901, 710, 446, 97, 203, 225, 315, 1886, 6, 618, 18, 203, 282, 380, 632, 891, 618, 1021, 460, 315, 1355, 3113, 315, 1655, 3113, 315, 4308, 6, 578, 315, 1886, 9654, 203, 282, 380, 632, 891, 2478, 1021, 460, 315, 8443, 3113, 315, 6299, 6, 578, 315, 10530, 9654, 203, 282, 380, 632, 2463, 1021, 9564, 4132, 309, 6873, 16, 8901, 710, 446, 97, 3541, 18, 203, 282, 1195, 2 ]
56781966f5f3de666ae43117cd646ffbfac5f24d
phuongdt88/t5AdminPanel
test/IntegrationTest.java
[ "Apache-2.0" ]
Java
test
null
@Test public void test() { running(testServer(9000, fakeApplication(inMemoryDatabase())), HTMLUNIT, new Callback<TestBrowser>() { public void invoke(TestBrowser browser) { // browser.goTo("http://localhost:9000"); // assertTrue(browser.pageSource().contains("Tribal Rivals - Admin Panel")); } }); }
/** * add your integration test here * in this example we just check if the welcome page is being shown */
add your integration test here in this example we just check if the welcome page is being shown
[ "add", "your", "integration", "test", "here", "in", "this", "example", "we", "just", "check", "if", "the", "welcome", "page", "is", "being", "shown" ]
@Test public void test() { running(testServer(9000, fakeApplication(inMemoryDatabase())), HTMLUNIT, new Callback<TestBrowser>() { public void invoke(TestBrowser browser) { } }); }
[ "@", "Test", "public", "void", "test", "(", ")", "{", "running", "(", "testServer", "(", "9000", ",", "fakeApplication", "(", "inMemoryDatabase", "(", ")", ")", ")", ",", "HTMLUNIT", ",", "new", "Callback", "<", "TestBrowser", ">", "(", ")", "{", "public", "void", "invoke", "(", "TestBrowser", "browser", ")", "{", "}", "}", ")", ";", "}" ]
add your integration test here in this example we just check if the welcome page is being shown
[ "add", "your", "integration", "test", "here", "in", "this", "example", "we", "just", "check", "if", "the", "welcome", "page", "is", "being", "shown" ]
[ "// browser.goTo(\"http://localhost:9000\");", "// assertTrue(browser.pageSource().contains(\"Tribal Rivals - Admin Panel\"));" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1842, 1435, 288, 203, 3639, 3549, 12, 3813, 2081, 12, 29, 3784, 16, 10517, 3208, 12, 267, 6031, 4254, 10756, 3631, 3982, 15736, 16, 394, 8444, 32, 4709, 9132, 34, 1435, 288, 203, 5411, 1071, 918, 4356, 12, 4709, 9132, 4748, 13, 288, 203, 759, 7734, 4748, 18, 3240, 774, 2932, 2505, 2207, 13014, 30, 29, 3784, 8863, 203, 759, 7734, 1815, 5510, 12, 11213, 18, 2433, 1830, 7675, 12298, 2932, 1070, 495, 287, 534, 427, 1031, 300, 7807, 23641, 7923, 1769, 203, 5411, 289, 203, 3639, 15549, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 527, 3433, 12040, 1842, 2674, 203, 377, 380, 316, 333, 3454, 732, 2537, 866, 309, 326, 28329, 1363, 353, 3832, 12188, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a27694366f3eb26a736f963ccc475f7c0c1ff914
BenFheng/main
src/test/java/seedu/expensela/logic/LogicManagerTest.java
[ "MIT" ]
Java
assertCommandSuccess
null
private void assertCommandSuccess(String inputCommand, String expectedMessage, Model expectedModel) throws CommandException, ParseException { CommandResult result = logic.execute(inputCommand); assertEquals(expectedMessage, result.getFeedbackToUser()); assertEquals(expectedModel, model); }
/** * Executes the command and confirms that * - no exceptions are thrown <br> * - the feedback message is equal to {@code expectedMessage} <br> * - the internal model manager state is the same as that in {@code expectedModel} <br> * @see #assertCommandFailure(String, Class, String, Model) */
Executes the command and confirms that - no exceptions are thrown - the feedback message is equal to expectedMessage - the internal model manager state is the same as that in expectedModel @see #assertCommandFailure(String, Class, String, Model)
[ "Executes", "the", "command", "and", "confirms", "that", "-", "no", "exceptions", "are", "thrown", "-", "the", "feedback", "message", "is", "equal", "to", "expectedMessage", "-", "the", "internal", "model", "manager", "state", "is", "the", "same", "as", "that", "in", "expectedModel", "@see", "#assertCommandFailure", "(", "String", "Class", "String", "Model", ")" ]
private void assertCommandSuccess(String inputCommand, String expectedMessage, Model expectedModel) throws CommandException, ParseException { CommandResult result = logic.execute(inputCommand); assertEquals(expectedMessage, result.getFeedbackToUser()); assertEquals(expectedModel, model); }
[ "private", "void", "assertCommandSuccess", "(", "String", "inputCommand", ",", "String", "expectedMessage", ",", "Model", "expectedModel", ")", "throws", "CommandException", ",", "ParseException", "{", "CommandResult", "result", "=", "logic", ".", "execute", "(", "inputCommand", ")", ";", "assertEquals", "(", "expectedMessage", ",", "result", ".", "getFeedbackToUser", "(", ")", ")", ";", "assertEquals", "(", "expectedModel", ",", "model", ")", ";", "}" ]
Executes the command and confirms that - no exceptions are thrown <br> - the feedback message is equal to {@code expectedMessage} <br> - the internal model manager state is the same as that in {@code expectedModel} <br> @see #assertCommandFailure(String, Class, String, Model)
[ "Executes", "the", "command", "and", "confirms", "that", "-", "no", "exceptions", "are", "thrown", "<br", ">", "-", "the", "feedback", "message", "is", "equal", "to", "{", "@code", "expectedMessage", "}", "<br", ">", "-", "the", "internal", "model", "manager", "state", "is", "the", "same", "as", "that", "in", "{", "@code", "expectedModel", "}", "<br", ">", "@see", "#assertCommandFailure", "(", "String", "Class", "String", "Model", ")" ]
[]
[ { "param": "inputCommand", "type": "String" }, { "param": "expectedMessage", "type": "String" }, { "param": "expectedModel", "type": "Model" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inputCommand", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedMessage", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedModel", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1815, 2189, 4510, 12, 780, 810, 2189, 16, 514, 2665, 1079, 16, 203, 5411, 3164, 2665, 1488, 13, 1216, 3498, 503, 16, 10616, 288, 203, 3639, 3498, 1253, 563, 273, 4058, 18, 8837, 12, 2630, 2189, 1769, 203, 3639, 1815, 8867, 12, 3825, 1079, 16, 563, 18, 588, 15888, 774, 1299, 10663, 203, 3639, 1815, 8867, 12, 3825, 1488, 16, 938, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 3889, 993, 326, 1296, 471, 2195, 481, 959, 716, 203, 377, 380, 300, 1158, 4798, 854, 6718, 411, 2848, 34, 203, 377, 380, 300, 326, 10762, 883, 353, 3959, 358, 8901, 710, 2665, 1079, 97, 411, 2848, 34, 203, 377, 380, 300, 326, 2713, 938, 3301, 919, 353, 326, 1967, 487, 716, 316, 8901, 710, 2665, 1488, 97, 411, 2848, 34, 203, 377, 380, 632, 5946, 468, 11231, 2189, 5247, 12, 780, 16, 1659, 16, 514, 16, 3164, 13, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a27694366f3eb26a736f963ccc475f7c0c1ff914
BenFheng/main
src/test/java/seedu/expensela/logic/LogicManagerTest.java
[ "MIT" ]
Java
assertCommandFailure
null
private void assertCommandFailure(String inputCommand, Class<? extends Throwable> expectedException, String expectedMessage) { Model expectedModel = new ModelManager(model.getExpenseLa(), new UserPrefs(), new GlobalData()); assertCommandFailure(inputCommand, expectedException, expectedMessage, expectedModel); }
/** * Executes the command, confirms that the exception is thrown and that the result message is correct. * @see #assertCommandFailure(String, Class, String, Model) */
Executes the command, confirms that the exception is thrown and that the result message is correct. @see #assertCommandFailure(String, Class, String, Model)
[ "Executes", "the", "command", "confirms", "that", "the", "exception", "is", "thrown", "and", "that", "the", "result", "message", "is", "correct", ".", "@see", "#assertCommandFailure", "(", "String", "Class", "String", "Model", ")" ]
private void assertCommandFailure(String inputCommand, Class<? extends Throwable> expectedException, String expectedMessage) { Model expectedModel = new ModelManager(model.getExpenseLa(), new UserPrefs(), new GlobalData()); assertCommandFailure(inputCommand, expectedException, expectedMessage, expectedModel); }
[ "private", "void", "assertCommandFailure", "(", "String", "inputCommand", ",", "Class", "<", "?", "extends", "Throwable", ">", "expectedException", ",", "String", "expectedMessage", ")", "{", "Model", "expectedModel", "=", "new", "ModelManager", "(", "model", ".", "getExpenseLa", "(", ")", ",", "new", "UserPrefs", "(", ")", ",", "new", "GlobalData", "(", ")", ")", ";", "assertCommandFailure", "(", "inputCommand", ",", "expectedException", ",", "expectedMessage", ",", "expectedModel", ")", ";", "}" ]
Executes the command, confirms that the exception is thrown and that the result message is correct.
[ "Executes", "the", "command", "confirms", "that", "the", "exception", "is", "thrown", "and", "that", "the", "result", "message", "is", "correct", "." ]
[]
[ { "param": "inputCommand", "type": "String" }, { "param": "expectedException", "type": "Class<? extends Throwable>" }, { "param": "expectedMessage", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inputCommand", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedException", "type": "Class<? extends Throwable>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedMessage", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1815, 2189, 5247, 12, 780, 810, 2189, 16, 1659, 12880, 3231, 4206, 34, 2665, 503, 16, 203, 5411, 514, 2665, 1079, 13, 288, 203, 3639, 3164, 2665, 1488, 273, 394, 3164, 1318, 12, 2284, 18, 588, 424, 1907, 307, 30745, 9334, 394, 2177, 1386, 2556, 9334, 394, 8510, 751, 10663, 203, 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195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
a27694366f3eb26a736f963ccc475f7c0c1ff914
BenFheng/main
src/test/java/seedu/expensela/logic/LogicManagerTest.java
[ "MIT" ]
Java
assertCommandFailure
null
private void assertCommandFailure(String inputCommand, Class<? extends Throwable> expectedException, String expectedMessage, Model expectedModel) { assertThrows(expectedException, expectedMessage, () -> logic.execute(inputCommand)); assertEquals(expectedModel, model); }
/** * Executes the command and confirms that * - the {@code expectedException} is thrown <br> * - the resulting error message is equal to {@code expectedMessage} <br> * - the internal model manager state is the same as that in {@code expectedModel} <br> * @see #assertCommandSuccess(String, String, Model) */
Executes the command and confirms that - the expectedException is thrown - the resulting error message is equal to expectedMessage - the internal model manager state is the same as that in expectedModel @see #assertCommandSuccess(String, String, Model)
[ "Executes", "the", "command", "and", "confirms", "that", "-", "the", "expectedException", "is", "thrown", "-", "the", "resulting", "error", "message", "is", "equal", "to", "expectedMessage", "-", "the", "internal", "model", "manager", "state", "is", "the", "same", "as", "that", "in", "expectedModel", "@see", "#assertCommandSuccess", "(", "String", "String", "Model", ")" ]
private void assertCommandFailure(String inputCommand, Class<? extends Throwable> expectedException, String expectedMessage, Model expectedModel) { assertThrows(expectedException, expectedMessage, () -> logic.execute(inputCommand)); assertEquals(expectedModel, model); }
[ "private", "void", "assertCommandFailure", "(", "String", "inputCommand", ",", "Class", "<", "?", "extends", "Throwable", ">", "expectedException", ",", "String", "expectedMessage", ",", "Model", "expectedModel", ")", "{", "assertThrows", "(", "expectedException", ",", "expectedMessage", ",", "(", ")", "->", "logic", ".", "execute", "(", "inputCommand", ")", ")", ";", "assertEquals", "(", "expectedModel", ",", "model", ")", ";", "}" ]
Executes the command and confirms that - the {@code expectedException} is thrown <br> - the resulting error message is equal to {@code expectedMessage} <br> - the internal model manager state is the same as that in {@code expectedModel} <br> @see #assertCommandSuccess(String, String, Model)
[ "Executes", "the", "command", "and", "confirms", "that", "-", "the", "{", "@code", "expectedException", "}", "is", "thrown", "<br", ">", "-", "the", "resulting", "error", "message", "is", "equal", "to", "{", "@code", "expectedMessage", "}", "<br", ">", "-", "the", "internal", "model", "manager", "state", "is", "the", "same", "as", "that", "in", "{", "@code", "expectedModel", "}", "<br", ">", "@see", "#assertCommandSuccess", "(", "String", "String", "Model", ")" ]
[]
[ { "param": "inputCommand", "type": "String" }, { "param": "expectedException", "type": "Class<? extends Throwable>" }, { "param": "expectedMessage", "type": "String" }, { "param": "expectedModel", "type": "Model" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "inputCommand", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedException", "type": "Class<? extends Throwable>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedMessage", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedModel", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1815, 2189, 5247, 12, 780, 810, 2189, 16, 1659, 12880, 3231, 4206, 34, 2665, 503, 16, 203, 5411, 514, 2665, 1079, 16, 3164, 2665, 1488, 13, 288, 203, 3639, 1815, 21845, 12, 3825, 503, 16, 2665, 1079, 16, 1832, 317, 4058, 18, 8837, 12, 2630, 2189, 10019, 203, 3639, 1815, 8867, 12, 3825, 1488, 16, 938, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 3889, 993, 326, 1296, 471, 2195, 481, 959, 716, 203, 377, 380, 300, 326, 8901, 710, 2665, 503, 97, 353, 6718, 411, 2848, 34, 203, 377, 380, 300, 326, 8156, 555, 883, 353, 3959, 358, 8901, 710, 2665, 1079, 97, 411, 2848, 34, 203, 377, 380, 300, 326, 2713, 938, 3301, 919, 353, 326, 1967, 487, 716, 316, 8901, 710, 2665, 1488, 97, 411, 2848, 34, 203, 377, 380, 632, 5946, 468, 11231, 2189, 4510, 12, 780, 16, 514, 16, 3164, 13, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cc0dd96a82196d95a914641efb7a44102021c89a
BenFheng/main
src/main/java/seedu/expensela/model/transaction/DateEqualsKeywordPredicate.java
[ "MIT" ]
Java
test
null
@Override public boolean test(Transaction transaction) { String transactionDateString = transaction.getDate().transactionDate.toString(); if (keyword.get(0).equals("ALL")) { return true; } return keyword.stream() .anyMatch(keyword -> StringUtil.equals(transactionDateString.split("-")[0] + "-" + transactionDateString.split("-")[1], keyword)); }
/** * Tests that a {@code Transaction}'s {@code Date}'s year and month matches the * year and month of the given keyword. * @param transaction * @return */
Tests that a Transaction's Date's year and month matches the year and month of the given keyword. @param transaction @return
[ "Tests", "that", "a", "Transaction", "'", "s", "Date", "'", "s", "year", "and", "month", "matches", "the", "year", "and", "month", "of", "the", "given", "keyword", ".", "@param", "transaction", "@return" ]
@Override public boolean test(Transaction transaction) { String transactionDateString = transaction.getDate().transactionDate.toString(); if (keyword.get(0).equals("ALL")) { return true; } return keyword.stream() .anyMatch(keyword -> StringUtil.equals(transactionDateString.split("-")[0] + "-" + transactionDateString.split("-")[1], keyword)); }
[ "@", "Override", "public", "boolean", "test", "(", "Transaction", "transaction", ")", "{", "String", "transactionDateString", "=", "transaction", ".", "getDate", "(", ")", ".", "transactionDate", ".", "toString", "(", ")", ";", "if", "(", "keyword", ".", "get", "(", "0", ")", ".", "equals", "(", "\"ALL\"", ")", ")", "{", "return", "true", ";", "}", "return", "keyword", ".", "stream", "(", ")", ".", "anyMatch", "(", "keyword", "->", "StringUtil", ".", "equals", "(", "transactionDateString", ".", "split", "(", "\"-\"", ")", "[", "0", "]", "+", "\"-\"", "+", "transactionDateString", ".", "split", "(", "\"-\"", ")", "[", "1", "]", ",", "keyword", ")", ")", ";", "}" ]
Tests that a {@code Transaction}'s {@code Date}'s year and month matches the year and month of the given keyword.
[ "Tests", "that", "a", "{", "@code", "Transaction", "}", "'", "s", "{", "@code", "Date", "}", "'", "s", "year", "and", "month", "matches", "the", "year", "and", "month", "of", "the", "given", "keyword", "." ]
[]
[ { "param": "transaction", "type": "Transaction" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "transaction", "type": "Transaction", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 1250, 1842, 12, 3342, 2492, 13, 288, 203, 3639, 514, 2492, 1626, 780, 273, 2492, 18, 588, 1626, 7675, 7958, 1626, 18, 10492, 5621, 203, 3639, 309, 261, 11041, 18, 588, 12, 20, 2934, 14963, 2932, 4685, 6, 3719, 288, 203, 5411, 327, 638, 31, 203, 3639, 289, 203, 3639, 327, 4932, 18, 3256, 1435, 203, 7734, 263, 2273, 2060, 12, 11041, 317, 14205, 18, 14963, 12, 7958, 1626, 780, 18, 4939, 2932, 17, 7923, 63, 20, 65, 397, 7514, 203, 13491, 397, 2492, 1626, 780, 18, 4939, 2932, 17, 7923, 63, 21, 6487, 4932, 10019, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 7766, 87, 716, 279, 8901, 710, 5947, 1713, 87, 8901, 710, 2167, 1713, 87, 3286, 471, 3138, 1885, 326, 203, 377, 380, 3286, 471, 3138, 434, 326, 864, 4932, 18, 203, 377, 380, 632, 891, 2492, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
9f8df4d2b2a7cbdeb28695a2a410a66497934c1f
BenFheng/main
src/main/java/seedu/expensela/ui/MonthlyDataPanel.java
[ "MIT" ]
Java
drawCircle
null
private void drawCircle(double budget, double expense) { if (budget == 0 && expense == 0) { budget = 1; expense = 1; } double angle = 360 - expense / budget * 360; double overlayAngle = 0; if (angle < 0) { angle = 0; } Paint fill; Paint overlay = Color.web("#619196"); if (angle > 180) { fill = Color.web("#BAFFC9"); } else if (angle > 90) { fill = Color.web("FFFFBA"); } else { overlayAngle = expense / budget * 360; angle = 100; fill = Color.web("#FFB3BA"); } outer.setRadiusX(55); outer.setRadiusY(55); outer.setStartAngle(90); outer.setLength(angle); outer.setType(ArcType.ROUND); outer.setFill(fill); outerOverlay.setRadiusX(60); outerOverlay.setRadiusY(60); outerOverlay.setStartAngle(90); outerOverlay.setLength(-overlayAngle); outerOverlay.setType(ArcType.ROUND); outerOverlay.setFill(overlay); inner.setRadiusX(40); inner.setRadiusY(40); inner.setStartAngle(0); inner.setLength(360); inner.setType(ArcType.ROUND); inner.setFill(overlay); int percentage = 100 - (int) (expense * 100 / budget); if (percentage < 0) { percentage = 0; } String displayedPercentage = percentage + "%"; circleLabel.setText(displayedPercentage); }
/** * Draw circle object representation of ratio of expense and budget * @param budget * @param expense */
Draw circle object representation of ratio of expense and budget @param budget @param expense
[ "Draw", "circle", "object", "representation", "of", "ratio", "of", "expense", "and", "budget", "@param", "budget", "@param", "expense" ]
private void drawCircle(double budget, double expense) { if (budget == 0 && expense == 0) { budget = 1; expense = 1; } double angle = 360 - expense / budget * 360; double overlayAngle = 0; if (angle < 0) { angle = 0; } Paint fill; Paint overlay = Color.web("#619196"); if (angle > 180) { fill = Color.web("#BAFFC9"); } else if (angle > 90) { fill = Color.web("FFFFBA"); } else { overlayAngle = expense / budget * 360; angle = 100; fill = Color.web("#FFB3BA"); } outer.setRadiusX(55); outer.setRadiusY(55); outer.setStartAngle(90); outer.setLength(angle); outer.setType(ArcType.ROUND); outer.setFill(fill); outerOverlay.setRadiusX(60); outerOverlay.setRadiusY(60); outerOverlay.setStartAngle(90); outerOverlay.setLength(-overlayAngle); outerOverlay.setType(ArcType.ROUND); outerOverlay.setFill(overlay); inner.setRadiusX(40); inner.setRadiusY(40); inner.setStartAngle(0); inner.setLength(360); inner.setType(ArcType.ROUND); inner.setFill(overlay); int percentage = 100 - (int) (expense * 100 / budget); if (percentage < 0) { percentage = 0; } String displayedPercentage = percentage + "%"; circleLabel.setText(displayedPercentage); }
[ "private", "void", "drawCircle", "(", "double", "budget", ",", "double", "expense", ")", "{", "if", "(", "budget", "==", "0", "&&", "expense", "==", "0", ")", "{", "budget", "=", "1", ";", "expense", "=", "1", ";", "}", "double", "angle", "=", "360", "-", "expense", "/", "budget", "*", "360", ";", "double", "overlayAngle", "=", "0", ";", "if", "(", "angle", "<", "0", ")", "{", "angle", "=", "0", ";", "}", "Paint", "fill", ";", "Paint", "overlay", "=", "Color", ".", "web", "(", "\"#619196\"", ")", ";", "if", "(", "angle", ">", "180", ")", "{", "fill", "=", "Color", ".", "web", "(", "\"#BAFFC9\"", ")", ";", "}", "else", "if", "(", "angle", ">", "90", ")", "{", "fill", "=", "Color", ".", "web", "(", "\"FFFFBA\"", ")", ";", "}", "else", "{", "overlayAngle", "=", "expense", "/", "budget", "*", "360", ";", "angle", "=", "100", ";", "fill", "=", "Color", ".", "web", "(", "\"#FFB3BA\"", ")", ";", "}", "outer", ".", "setRadiusX", "(", "55", ")", ";", "outer", ".", "setRadiusY", "(", "55", ")", ";", "outer", ".", "setStartAngle", "(", "90", ")", ";", "outer", ".", "setLength", "(", "angle", ")", ";", "outer", ".", "setType", "(", "ArcType", ".", "ROUND", ")", ";", "outer", ".", "setFill", "(", "fill", ")", ";", "outerOverlay", ".", "setRadiusX", "(", "60", ")", ";", "outerOverlay", ".", "setRadiusY", "(", "60", ")", ";", "outerOverlay", ".", "setStartAngle", "(", "90", ")", ";", "outerOverlay", ".", "setLength", "(", "-", "overlayAngle", ")", ";", "outerOverlay", ".", "setType", "(", "ArcType", ".", "ROUND", ")", ";", "outerOverlay", ".", "setFill", "(", "overlay", ")", ";", "inner", ".", "setRadiusX", "(", "40", ")", ";", "inner", ".", "setRadiusY", "(", "40", ")", ";", "inner", ".", "setStartAngle", "(", "0", ")", ";", "inner", ".", "setLength", "(", "360", ")", ";", "inner", ".", "setType", "(", "ArcType", ".", "ROUND", ")", ";", "inner", ".", "setFill", "(", "overlay", ")", ";", "int", "percentage", "=", "100", "-", "(", "int", ")", "(", "expense", "*", "100", "/", "budget", ")", ";", "if", "(", "percentage", "<", "0", ")", "{", "percentage", "=", "0", ";", "}", "String", "displayedPercentage", "=", "percentage", "+", "\"%\"", ";", "circleLabel", ".", "setText", "(", "displayedPercentage", ")", ";", "}" ]
Draw circle object representation of ratio of expense and budget @param budget @param expense
[ "Draw", "circle", "object", "representation", "of", "ratio", "of", "expense", "and", "budget", "@param", "budget", "@param", "expense" ]
[]
[ { "param": "budget", "type": "double" }, { "param": "expense", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "budget", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expense", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 3724, 19490, 12, 9056, 15051, 16, 1645, 1329, 3558, 13, 288, 203, 3639, 309, 261, 70, 8562, 422, 374, 597, 1329, 3558, 422, 374, 13, 288, 203, 5411, 15051, 273, 404, 31, 203, 5411, 1329, 3558, 273, 404, 31, 203, 3639, 289, 203, 3639, 1645, 5291, 273, 12360, 300, 1329, 3558, 342, 15051, 380, 12360, 31, 203, 3639, 1645, 9218, 8467, 273, 374, 31, 203, 3639, 309, 261, 4341, 411, 374, 13, 288, 203, 5411, 5291, 273, 374, 31, 203, 3639, 289, 203, 3639, 30001, 3636, 31, 203, 3639, 30001, 9218, 273, 5563, 18, 4875, 2932, 7, 26, 3657, 28644, 8863, 203, 3639, 309, 261, 4341, 405, 9259, 13, 288, 203, 5411, 3636, 273, 5563, 18, 4875, 2932, 7, 12536, 2246, 39, 29, 8863, 203, 3639, 289, 469, 309, 261, 4341, 405, 8566, 13, 288, 203, 5411, 3636, 273, 5563, 18, 4875, 2932, 8998, 12536, 8863, 203, 3639, 289, 469, 288, 203, 5411, 9218, 8467, 273, 1329, 3558, 342, 15051, 380, 12360, 31, 203, 5411, 5291, 273, 2130, 31, 203, 5411, 3636, 273, 5563, 18, 4875, 2932, 7, 2246, 38, 23, 12536, 8863, 203, 3639, 289, 203, 3639, 6390, 18, 542, 10196, 60, 12, 2539, 1769, 203, 3639, 6390, 18, 542, 10196, 61, 12, 2539, 1769, 203, 3639, 6390, 18, 542, 1685, 8467, 12, 9349, 1769, 203, 3639, 6390, 18, 542, 1782, 12, 4341, 1769, 203, 3639, 6390, 18, 542, 559, 12, 14598, 559, 18, 15092, 1769, 203, 3639, 6390, 18, 542, 8026, 12, 5935, 1769, 203, 3639, 6390, 11627, 18, 542, 10196, 60, 12, 4848, 1769, 203, 3639, 6390, 11627, 18, 542, 10196, 61, 12, 4848, 1769, 203, 3639, 6390, 11627, 18, 542, 1685, 8467, 12, 9349, 1769, 203, 3639, 6390, 11627, 18, 542, 1782, 19236, 17312, 8467, 1769, 203, 3639, 6390, 11627, 18, 542, 559, 12, 14598, 559, 18, 15092, 1769, 203, 3639, 6390, 11627, 18, 542, 8026, 12, 17312, 1769, 203, 3639, 3443, 18, 542, 10196, 60, 12, 7132, 1769, 203, 3639, 3443, 18, 542, 10196, 61, 12, 7132, 1769, 203, 3639, 3443, 18, 542, 1685, 8467, 12, 20, 1769, 203, 3639, 3443, 18, 542, 1782, 12, 29751, 1769, 203, 3639, 3443, 18, 542, 559, 12, 14598, 559, 18, 15092, 1769, 203, 3639, 3443, 18, 542, 8026, 12, 17312, 1769, 203, 3639, 509, 11622, 273, 2130, 300, 261, 474, 13, 261, 338, 1907, 307, 380, 2130, 342, 15051, 1769, 203, 3639, 309, 261, 18687, 411, 374, 13, 288, 203, 5411, 11622, 273, 374, 31, 203, 3639, 289, 203, 3639, 514, 10453, 16397, 273, 11622, 397, 2213, 14432, 203, 3639, 12470, 2224, 18, 542, 1528, 12, 5417, 329, 16397, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 10184, 12470, 733, 4335, 434, 7169, 434, 1329, 3558, 471, 15051, 203, 377, 380, 632, 891, 15051, 203, 377, 380, 632, 891, 1329, 3558, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
8a0abeceb66e7f3a6104923d6e773b6496377d9a
BenFheng/main
src/main/java/seedu/expensela/logic/parser/ExpenseLaParser.java
[ "MIT" ]
Java
parseCommand
Command
public Command parseCommand(String userInput) throws ParseException { final Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput.trim()); if (!matcher.matches()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE)); } final String commandWord = matcher.group("commandWord"); final String arguments = matcher.group("arguments"); switch (commandWord) { case AddCommand.COMMAND_WORD: return new AddCommandParser().parse(arguments); case EditCommand.COMMAND_WORD: return new EditCommandParser().parse(arguments); case DeleteCommand.COMMAND_WORD: return new DeleteCommandParser().parse(arguments); case ClearCommand.COMMAND_WORD: return new ClearCommand(); case FindCommand.COMMAND_WORD: return new FindCommandParser().parse(arguments); case FilterCommand.COMMAND_WORD: return new FilterCommandParser().parse(arguments); case ListCommand.COMMAND_WORD: return new ListCommand(); case ExitCommand.COMMAND_WORD: return new ExitCommand(); case HelpCommand.COMMAND_WORD: return new HelpCommand(); case ResetBalanceCommand.COMMAND_WORD: return new ResetBalanceCommand(); case BudgetCommand.COMMAND_WORD: return new BudgetCommandParser().parse(arguments); case ToggleViewCommand.COMMAND_WORD: return new ToggleViewCommand(); case ClearRecurringCommand.COMMAND_WORD: return new ClearRecurringCommand(); case ExportCommand.COMMAND_WORD: return new ExportCommand(); case ImportCommand.COMMAND_WORD: return new ImportCommandParser().parse(arguments); default: throw new ParseException(MESSAGE_UNKNOWN_COMMAND); } }
/** * Parses user input into command for execution. * * @param userInput full user input string * @return the command based on the user input * @throws ParseException if the user input does not conform the expected format */
Parses user input into command for execution. @param userInput full user input string @return the command based on the user input @throws ParseException if the user input does not conform the expected format
[ "Parses", "user", "input", "into", "command", "for", "execution", ".", "@param", "userInput", "full", "user", "input", "string", "@return", "the", "command", "based", "on", "the", "user", "input", "@throws", "ParseException", "if", "the", "user", "input", "does", "not", "conform", "the", "expected", "format" ]
public Command parseCommand(String userInput) throws ParseException { final Matcher matcher = BASIC_COMMAND_FORMAT.matcher(userInput.trim()); if (!matcher.matches()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, HelpCommand.MESSAGE_USAGE)); } final String commandWord = matcher.group("commandWord"); final String arguments = matcher.group("arguments"); switch (commandWord) { case AddCommand.COMMAND_WORD: return new AddCommandParser().parse(arguments); case EditCommand.COMMAND_WORD: return new EditCommandParser().parse(arguments); case DeleteCommand.COMMAND_WORD: return new DeleteCommandParser().parse(arguments); case ClearCommand.COMMAND_WORD: return new ClearCommand(); case FindCommand.COMMAND_WORD: return new FindCommandParser().parse(arguments); case FilterCommand.COMMAND_WORD: return new FilterCommandParser().parse(arguments); case ListCommand.COMMAND_WORD: return new ListCommand(); case ExitCommand.COMMAND_WORD: return new ExitCommand(); case HelpCommand.COMMAND_WORD: return new HelpCommand(); case ResetBalanceCommand.COMMAND_WORD: return new ResetBalanceCommand(); case BudgetCommand.COMMAND_WORD: return new BudgetCommandParser().parse(arguments); case ToggleViewCommand.COMMAND_WORD: return new ToggleViewCommand(); case ClearRecurringCommand.COMMAND_WORD: return new ClearRecurringCommand(); case ExportCommand.COMMAND_WORD: return new ExportCommand(); case ImportCommand.COMMAND_WORD: return new ImportCommandParser().parse(arguments); default: throw new ParseException(MESSAGE_UNKNOWN_COMMAND); } }
[ "public", "Command", "parseCommand", "(", "String", "userInput", ")", "throws", "ParseException", "{", "final", "Matcher", "matcher", "=", "BASIC_COMMAND_FORMAT", ".", "matcher", "(", "userInput", ".", "trim", "(", ")", ")", ";", "if", "(", "!", "matcher", ".", "matches", "(", ")", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_COMMAND_FORMAT", ",", "HelpCommand", ".", "MESSAGE_USAGE", ")", ")", ";", "}", "final", "String", "commandWord", "=", "matcher", ".", "group", "(", "\"commandWord\"", ")", ";", "final", "String", "arguments", "=", "matcher", ".", "group", "(", "\"arguments\"", ")", ";", "switch", "(", "commandWord", ")", "{", "case", "AddCommand", ".", "COMMAND_WORD", ":", "return", "new", "AddCommandParser", "(", ")", ".", "parse", "(", "arguments", ")", ";", "case", "EditCommand", ".", "COMMAND_WORD", ":", "return", "new", "EditCommandParser", "(", ")", ".", "parse", "(", "arguments", ")", ";", "case", "DeleteCommand", ".", "COMMAND_WORD", ":", "return", "new", "DeleteCommandParser", "(", ")", ".", "parse", "(", "arguments", ")", ";", "case", "ClearCommand", ".", "COMMAND_WORD", ":", "return", "new", "ClearCommand", "(", ")", ";", "case", "FindCommand", ".", "COMMAND_WORD", ":", "return", "new", "FindCommandParser", "(", ")", ".", "parse", "(", "arguments", ")", ";", "case", "FilterCommand", ".", "COMMAND_WORD", ":", "return", "new", "FilterCommandParser", "(", ")", ".", "parse", "(", "arguments", ")", ";", "case", "ListCommand", ".", "COMMAND_WORD", ":", "return", "new", "ListCommand", "(", ")", ";", "case", "ExitCommand", ".", "COMMAND_WORD", ":", "return", "new", "ExitCommand", "(", ")", ";", "case", "HelpCommand", ".", "COMMAND_WORD", ":", "return", "new", "HelpCommand", "(", ")", ";", "case", "ResetBalanceCommand", ".", "COMMAND_WORD", ":", "return", "new", "ResetBalanceCommand", "(", ")", ";", "case", "BudgetCommand", ".", "COMMAND_WORD", ":", "return", "new", "BudgetCommandParser", "(", ")", ".", "parse", "(", "arguments", ")", ";", "case", "ToggleViewCommand", ".", "COMMAND_WORD", ":", "return", "new", "ToggleViewCommand", "(", ")", ";", "case", "ClearRecurringCommand", ".", "COMMAND_WORD", ":", "return", "new", "ClearRecurringCommand", "(", ")", ";", "case", "ExportCommand", ".", "COMMAND_WORD", ":", "return", "new", "ExportCommand", "(", ")", ";", "case", "ImportCommand", ".", "COMMAND_WORD", ":", "return", "new", "ImportCommandParser", "(", ")", ".", "parse", "(", "arguments", ")", ";", "default", ":", "throw", "new", "ParseException", "(", "MESSAGE_UNKNOWN_COMMAND", ")", ";", "}", "}" ]
Parses user input into command for execution.
[ "Parses", "user", "input", "into", "command", "for", "execution", "." ]
[]
[ { "param": "userInput", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "userInput", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 3498, 1109, 2189, 12, 780, 729, 1210, 13, 1216, 10616, 288, 203, 3639, 727, 9757, 4546, 273, 28143, 18118, 67, 19104, 67, 7254, 18, 22761, 12, 1355, 1210, 18, 5290, 10663, 203, 3639, 309, 16051, 22761, 18, 8436, 10756, 288, 203, 5411, 604, 394, 10616, 12, 780, 18, 2139, 12, 8723, 67, 9347, 67, 19104, 67, 7254, 16, 11288, 2189, 18, 8723, 67, 29550, 10019, 203, 3639, 289, 203, 203, 3639, 727, 514, 1296, 3944, 273, 4546, 18, 1655, 2932, 3076, 3944, 8863, 203, 3639, 727, 514, 1775, 273, 4546, 18, 1655, 2932, 7099, 8863, 203, 3639, 1620, 261, 3076, 3944, 13, 288, 203, 203, 3639, 648, 1436, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 1436, 2189, 2678, 7675, 2670, 12, 7099, 1769, 203, 203, 3639, 648, 15328, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 15328, 2189, 2678, 7675, 2670, 12, 7099, 1769, 203, 203, 3639, 648, 2504, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 2504, 2189, 2678, 7675, 2670, 12, 7099, 1769, 203, 203, 3639, 648, 10121, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 10121, 2189, 5621, 203, 203, 3639, 648, 4163, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 4163, 2189, 2678, 7675, 2670, 12, 7099, 1769, 203, 203, 3639, 648, 4008, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 4008, 2189, 2678, 7675, 2670, 12, 7099, 1769, 203, 203, 3639, 648, 987, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 987, 2189, 5621, 203, 203, 3639, 648, 9500, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 9500, 2189, 5621, 203, 203, 3639, 648, 11288, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 11288, 2189, 5621, 203, 203, 3639, 648, 7151, 13937, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 7151, 13937, 2189, 5621, 203, 203, 3639, 648, 25099, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 25099, 2189, 2678, 7675, 2670, 12, 7099, 1769, 203, 203, 3639, 648, 399, 9891, 1767, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 399, 9891, 1767, 2189, 5621, 203, 203, 3639, 648, 10121, 426, 21179, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 10121, 426, 21179, 2189, 5621, 203, 203, 3639, 648, 11054, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 11054, 2189, 5621, 203, 203, 3639, 648, 6164, 2189, 18, 19104, 67, 7952, 30, 203, 5411, 327, 394, 6164, 2189, 2678, 7675, 2670, 12, 7099, 1769, 203, 203, 3639, 805, 30, 203, 5411, 604, 394, 10616, 12, 8723, 67, 14737, 67, 19104, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2280, 2420, 729, 810, 1368, 1296, 364, 4588, 18, 203, 377, 380, 203, 377, 380, 632, 891, 729, 1210, 1983, 729, 810, 533, 203, 377, 380, 632, 2463, 326, 1296, 2511, 603, 326, 729, 810, 203, 377, 380, 632, 15069, 10616, 309, 326, 729, 810, 1552, 486, 20156, 326, 2665, 740, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
93ca585c33ef84125c08f7b18294a136e1c48466
BenFheng/main
src/main/java/seedu/expensela/logic/commands/ExportCommand.java
[ "MIT" ]
Java
buildStringFromTransaction
StringBuilder
private StringBuilder buildStringFromTransaction(Transaction transaction, StringBuilder sb) { String name = transaction.getName().toString(); String amount = transaction.getAmount().toString().replace(",", ""); String date = transaction.getDate().toString(); String remark = transaction.getRemark().toString(); String category = transaction.getCategory().toString(); sb.append(name); sb.append(","); sb.append(amount); sb.append(","); sb.append(date); sb.append(","); sb.append(remark); sb.append(","); sb.append(category); sb.append("\n"); return sb; }
/** * Inputs details of transaction into String Builder in required format for csv. * @param transaction * @param sb The String Builder object used to convert to csv file. * @return The String Builder object after transaction details added. */
Inputs details of transaction into String Builder in required format for csv. @param transaction @param sb The String Builder object used to convert to csv file. @return The String Builder object after transaction details added.
[ "Inputs", "details", "of", "transaction", "into", "String", "Builder", "in", "required", "format", "for", "csv", ".", "@param", "transaction", "@param", "sb", "The", "String", "Builder", "object", "used", "to", "convert", "to", "csv", "file", ".", "@return", "The", "String", "Builder", "object", "after", "transaction", "details", "added", "." ]
private StringBuilder buildStringFromTransaction(Transaction transaction, StringBuilder sb) { String name = transaction.getName().toString(); String amount = transaction.getAmount().toString().replace(",", ""); String date = transaction.getDate().toString(); String remark = transaction.getRemark().toString(); String category = transaction.getCategory().toString(); sb.append(name); sb.append(","); sb.append(amount); sb.append(","); sb.append(date); sb.append(","); sb.append(remark); sb.append(","); sb.append(category); sb.append("\n"); return sb; }
[ "private", "StringBuilder", "buildStringFromTransaction", "(", "Transaction", "transaction", ",", "StringBuilder", "sb", ")", "{", "String", "name", "=", "transaction", ".", "getName", "(", ")", ".", "toString", "(", ")", ";", "String", "amount", "=", "transaction", ".", "getAmount", "(", ")", ".", "toString", "(", ")", ".", "replace", "(", "\",\"", ",", "\"\"", ")", ";", "String", "date", "=", "transaction", ".", "getDate", "(", ")", ".", "toString", "(", ")", ";", "String", "remark", "=", "transaction", ".", "getRemark", "(", ")", ".", "toString", "(", ")", ";", "String", "category", "=", "transaction", ".", "getCategory", "(", ")", ".", "toString", "(", ")", ";", "sb", ".", "append", "(", "name", ")", ";", "sb", ".", "append", "(", "\",\"", ")", ";", "sb", ".", "append", "(", "amount", ")", ";", "sb", ".", "append", "(", "\",\"", ")", ";", "sb", ".", "append", "(", "date", ")", ";", "sb", ".", "append", "(", "\",\"", ")", ";", "sb", ".", "append", "(", "remark", ")", ";", "sb", ".", "append", "(", "\",\"", ")", ";", "sb", ".", "append", "(", "category", ")", ";", "sb", ".", "append", "(", "\"\\n\"", ")", ";", "return", "sb", ";", "}" ]
Inputs details of transaction into String Builder in required format for csv.
[ "Inputs", "details", "of", "transaction", "into", "String", "Builder", "in", "required", "format", "for", "csv", "." ]
[]
[ { "param": "transaction", "type": "Transaction" }, { "param": "sb", "type": "StringBuilder" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "transaction", "type": "Transaction", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "sb", "type": "StringBuilder", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 3225, 1361, 780, 1265, 3342, 12, 3342, 2492, 16, 3225, 2393, 13, 288, 203, 3639, 514, 508, 273, 2492, 18, 17994, 7675, 10492, 5621, 203, 3639, 514, 3844, 273, 2492, 18, 588, 6275, 7675, 10492, 7675, 2079, 2932, 16, 3113, 1408, 1769, 203, 3639, 514, 1509, 273, 2492, 18, 588, 1626, 7675, 10492, 5621, 203, 3639, 514, 849, 1313, 273, 2492, 18, 588, 1933, 1313, 7675, 10492, 5621, 203, 3639, 514, 3150, 273, 2492, 18, 588, 4457, 7675, 10492, 5621, 203, 203, 3639, 2393, 18, 6923, 12, 529, 1769, 203, 3639, 2393, 18, 6923, 2932, 16, 8863, 203, 3639, 2393, 18, 6923, 12, 8949, 1769, 203, 3639, 2393, 18, 6923, 2932, 16, 8863, 203, 3639, 2393, 18, 6923, 12, 712, 1769, 203, 3639, 2393, 18, 6923, 2932, 16, 8863, 203, 3639, 2393, 18, 6923, 12, 2764, 1313, 1769, 203, 3639, 2393, 18, 6923, 2932, 16, 8863, 203, 3639, 2393, 18, 6923, 12, 4743, 1769, 203, 3639, 2393, 18, 6923, 31458, 82, 8863, 203, 203, 3639, 327, 2393, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 24472, 3189, 434, 2492, 1368, 514, 5008, 316, 1931, 740, 364, 6101, 18, 203, 377, 380, 632, 891, 2492, 203, 377, 380, 632, 891, 2393, 1021, 514, 5008, 733, 1399, 358, 1765, 358, 6101, 585, 18, 203, 377, 380, 632, 2463, 1021, 514, 5008, 733, 1839, 2492, 3189, 3096, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
280feb80a5e4620ff39368257ba2e09ad6770457
BenFheng/main
src/main/java/seedu/expensela/logic/parser/ImportCommandParser.java
[ "MIT" ]
Java
parse
ImportCommand
public ImportCommand parse(String args) throws ParseException { try { String importFilePath = ParserUtil.parseImport(args); return new ImportCommand(importFilePath); } catch (ParseException pe) { throw new ParseException( String.format(MESSAGE_FAILED_IMPORT, ImportCommand.MESSAGE_USAGE), pe); } }
/** * Parses the given {@code String} of arguments in the context of the ImportCommand * and returns a ImportCommand object for execution. * @throws ParseException if the user input does not conform the expected format */
Parses the given String of arguments in the context of the ImportCommand and returns a ImportCommand object for execution. @throws ParseException if the user input does not conform the expected format
[ "Parses", "the", "given", "String", "of", "arguments", "in", "the", "context", "of", "the", "ImportCommand", "and", "returns", "a", "ImportCommand", "object", "for", "execution", ".", "@throws", "ParseException", "if", "the", "user", "input", "does", "not", "conform", "the", "expected", "format" ]
public ImportCommand parse(String args) throws ParseException { try { String importFilePath = ParserUtil.parseImport(args); return new ImportCommand(importFilePath); } catch (ParseException pe) { throw new ParseException( String.format(MESSAGE_FAILED_IMPORT, ImportCommand.MESSAGE_USAGE), pe); } }
[ "public", "ImportCommand", "parse", "(", "String", "args", ")", "throws", "ParseException", "{", "try", "{", "String", "importFilePath", "=", "ParserUtil", ".", "parseImport", "(", "args", ")", ";", "return", "new", "ImportCommand", "(", "importFilePath", ")", ";", "}", "catch", "(", "ParseException", "pe", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_FAILED_IMPORT", ",", "ImportCommand", ".", "MESSAGE_USAGE", ")", ",", "pe", ")", ";", "}", "}" ]
Parses the given {@code String} of arguments in the context of the ImportCommand and returns a ImportCommand object for execution.
[ "Parses", "the", "given", "{", "@code", "String", "}", "of", "arguments", "in", "the", "context", "of", "the", "ImportCommand", "and", "returns", "a", "ImportCommand", "object", "for", "execution", "." ]
[]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 6164, 2189, 1109, 12, 780, 833, 13, 1216, 10616, 288, 203, 3639, 775, 288, 203, 5411, 514, 1930, 5598, 273, 6783, 1304, 18, 2670, 5010, 12, 1968, 1769, 203, 5411, 327, 394, 6164, 2189, 12, 5666, 5598, 1769, 203, 3639, 289, 1044, 261, 13047, 2804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069, 10616, 309, 326, 729, 810, 1552, 486, 20156, 326, 2665, 740, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
48832d339bad4c63eb2834e35b8612e3b5418122
BenFheng/main
src/main/java/seedu/expensela/model/ModelManager.java
[ "MIT" ]
Java
updateMonthlyData
null
public void updateMonthlyData(boolean positive, double amount) { if (this.expenseLa.getMonthlyData() == null) { return; } if (positive) { this.expenseLa.getMonthlyData() .setIncome(new Income(DECIMAL_FORMATTER.format( this.expenseLa.getMonthlyData().getIncome().incomeAmount + amount))); } else { this.expenseLa.getMonthlyData() .setExpense(new Expense(DECIMAL_FORMATTER.format( this.expenseLa.getMonthlyData().getExpense().expenseAmount + amount))); } }
/** * Update monthly data depending whether it is a positive transaction and the amount * @param positive whether transaction is income or expense * @param amount positive for transaction insertion, negative for deletion */
Update monthly data depending whether it is a positive transaction and the amount @param positive whether transaction is income or expense @param amount positive for transaction insertion, negative for deletion
[ "Update", "monthly", "data", "depending", "whether", "it", "is", "a", "positive", "transaction", "and", "the", "amount", "@param", "positive", "whether", "transaction", "is", "income", "or", "expense", "@param", "amount", "positive", "for", "transaction", "insertion", "negative", "for", "deletion" ]
public void updateMonthlyData(boolean positive, double amount) { if (this.expenseLa.getMonthlyData() == null) { return; } if (positive) { this.expenseLa.getMonthlyData() .setIncome(new Income(DECIMAL_FORMATTER.format( this.expenseLa.getMonthlyData().getIncome().incomeAmount + amount))); } else { this.expenseLa.getMonthlyData() .setExpense(new Expense(DECIMAL_FORMATTER.format( this.expenseLa.getMonthlyData().getExpense().expenseAmount + amount))); } }
[ "public", "void", "updateMonthlyData", "(", "boolean", "positive", ",", "double", "amount", ")", "{", "if", "(", "this", ".", "expenseLa", ".", "getMonthlyData", "(", ")", "==", "null", ")", "{", "return", ";", "}", "if", "(", "positive", ")", "{", "this", ".", "expenseLa", ".", "getMonthlyData", "(", ")", ".", "setIncome", "(", "new", "Income", "(", "DECIMAL_FORMATTER", ".", "format", "(", "this", ".", "expenseLa", ".", "getMonthlyData", "(", ")", ".", "getIncome", "(", ")", ".", "incomeAmount", "+", "amount", ")", ")", ")", ";", "}", "else", "{", "this", ".", "expenseLa", ".", "getMonthlyData", "(", ")", ".", "setExpense", "(", "new", "Expense", "(", "DECIMAL_FORMATTER", ".", "format", "(", "this", ".", "expenseLa", ".", "getMonthlyData", "(", ")", ".", "getExpense", "(", ")", ".", "expenseAmount", "+", "amount", ")", ")", ")", ";", "}", "}" ]
Update monthly data depending whether it is a positive transaction and the amount @param positive whether transaction is income or expense @param amount positive for transaction insertion, negative for deletion
[ "Update", "monthly", "data", "depending", "whether", "it", "is", "a", "positive", "transaction", "and", "the", "amount", "@param", "positive", "whether", "transaction", "is", "income", "or", "expense", "@param", "amount", "positive", "for", "transaction", "insertion", "negative", "for", "deletion" ]
[]
[ { "param": "positive", "type": "boolean" }, { "param": "amount", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "positive", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "amount", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1089, 5445, 715, 751, 12, 6494, 6895, 16, 1645, 3844, 13, 288, 203, 3639, 309, 261, 2211, 18, 338, 1907, 307, 30745, 18, 588, 5445, 715, 751, 1435, 422, 446, 13, 288, 203, 5411, 327, 31, 203, 3639, 289, 203, 3639, 309, 261, 21094, 13, 288, 203, 5411, 333, 18, 338, 1907, 307, 30745, 18, 588, 5445, 715, 751, 1435, 203, 10792, 263, 542, 382, 5624, 12, 2704, 657, 5624, 12, 23816, 67, 7254, 2560, 18, 2139, 12, 203, 21821, 333, 18, 338, 1907, 307, 30745, 18, 588, 5445, 715, 751, 7675, 588, 382, 5624, 7675, 267, 5624, 6275, 397, 3844, 3719, 1769, 203, 3639, 289, 469, 288, 203, 5411, 333, 18, 338, 1907, 307, 30745, 18, 588, 5445, 715, 751, 1435, 203, 10792, 263, 542, 424, 1907, 307, 12, 2704, 1312, 1907, 307, 12, 23816, 67, 7254, 2560, 18, 2139, 12, 203, 18701, 333, 18, 338, 1907, 307, 30745, 18, 588, 5445, 715, 751, 7675, 588, 424, 1907, 307, 7675, 338, 1907, 307, 6275, 397, 3844, 3719, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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364, 10899, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
48832d339bad4c63eb2834e35b8612e3b5418122
BenFheng/main
src/main/java/seedu/expensela/model/ModelManager.java
[ "MIT" ]
Java
updateFilteredTransactionList
null
@Override public void updateFilteredTransactionList(Predicate<Transaction> predicate1, Predicate<Transaction> predicate2) { if (predicate1 != null && predicate2 != null) { Predicate<Transaction> predicate = predicate1.and(predicate2); filteredTransactions.setPredicate(predicate); } else if (predicate1 != null && predicate2 == null) { filteredTransactions.setPredicate(predicate1); } else if (predicate1 == null && predicate2 != null) { filteredTransactions.setPredicate(predicate2); } else { throw new NullPointerException(); } }
/** * Applies setPredicate(predicate) to 2 different filteredLists and then making filteredTransactions * a filteredList containing the elements list 1 and 2 have in common. */
Applies setPredicate(predicate) to 2 different filteredLists and then making filteredTransactions a filteredList containing the elements list 1 and 2 have in common.
[ "Applies", "setPredicate", "(", "predicate", ")", "to", "2", "different", "filteredLists", "and", "then", "making", "filteredTransactions", "a", "filteredList", "containing", "the", "elements", "list", "1", "and", "2", "have", "in", "common", "." ]
@Override public void updateFilteredTransactionList(Predicate<Transaction> predicate1, Predicate<Transaction> predicate2) { if (predicate1 != null && predicate2 != null) { Predicate<Transaction> predicate = predicate1.and(predicate2); filteredTransactions.setPredicate(predicate); } else if (predicate1 != null && predicate2 == null) { filteredTransactions.setPredicate(predicate1); } else if (predicate1 == null && predicate2 != null) { filteredTransactions.setPredicate(predicate2); } else { throw new NullPointerException(); } }
[ "@", "Override", "public", "void", "updateFilteredTransactionList", "(", "Predicate", "<", "Transaction", ">", "predicate1", ",", "Predicate", "<", "Transaction", ">", "predicate2", ")", "{", "if", "(", "predicate1", "!=", "null", "&&", "predicate2", "!=", "null", ")", "{", "Predicate", "<", "Transaction", ">", "predicate", "=", "predicate1", ".", "and", "(", "predicate2", ")", ";", "filteredTransactions", ".", "setPredicate", "(", "predicate", ")", ";", "}", "else", "if", "(", "predicate1", "!=", "null", "&&", "predicate2", "==", "null", ")", "{", "filteredTransactions", ".", "setPredicate", "(", "predicate1", ")", ";", "}", "else", "if", "(", "predicate1", "==", "null", "&&", "predicate2", "!=", "null", ")", "{", "filteredTransactions", ".", "setPredicate", "(", "predicate2", ")", ";", "}", "else", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "}" ]
Applies setPredicate(predicate) to 2 different filteredLists and then making filteredTransactions a filteredList containing the elements list 1 and 2 have in common.
[ "Applies", "setPredicate", "(", "predicate", ")", "to", "2", "different", "filteredLists", "and", "then", "making", "filteredTransactions", "a", "filteredList", "containing", "the", "elements", "list", "1", "and", "2", "have", "in", "common", "." ]
[]
[ { "param": "predicate1", "type": "Predicate<Transaction>" }, { "param": "predicate2", "type": "Predicate<Transaction>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "predicate1", "type": "Predicate<Transaction>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "predicate2", "type": "Predicate<Transaction>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 6618, 203, 565, 1071, 918, 1089, 14478, 3342, 682, 12, 8634, 32, 3342, 34, 5641, 21, 16, 10202, 32, 3342, 34, 5641, 22, 13, 288, 203, 3639, 309, 261, 18344, 21, 480, 446, 597, 5641, 22, 480, 446, 13, 288, 203, 5411, 10202, 32, 3342, 34, 5641, 273, 5641, 21, 18, 464, 12, 18344, 22, 1769, 203, 5411, 5105, 14186, 18, 542, 8634, 12, 18344, 1769, 203, 3639, 289, 469, 309, 261, 18344, 21, 480, 446, 597, 5641, 22, 422, 446, 13, 288, 203, 5411, 5105, 14186, 18, 542, 8634, 12, 18344, 21, 1769, 203, 3639, 289, 469, 309, 261, 18344, 21, 422, 446, 597, 5641, 22, 480, 446, 13, 288, 203, 5411, 5105, 14186, 18, 542, 8634, 12, 18344, 22, 1769, 203, 3639, 289, 469, 288, 203, 5411, 604, 394, 10108, 5621, 203, 3639, 289, 203, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 565, 380, 1716, 5259, 444, 8634, 12, 18344, 13, 358, 576, 3775, 5105, 7432, 471, 1508, 10480, 5105, 14186, 203, 377, 380, 279, 5105, 682, 4191, 326, 2186, 666, 404, 471, 576, 1240, 316, 2975, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
48832d339bad4c63eb2834e35b8612e3b5418122
BenFheng/main
src/main/java/seedu/expensela/model/ModelManager.java
[ "MIT" ]
Java
updateTotalBalance
null
private void updateTotalBalance(boolean positive, double amount) { if (positive) { globalData.setTotalBalance( new Balance(DECIMAL_FORMATTER.format(globalData.getTotalBalance().balanceAmount + amount)) ); } else { globalData.setTotalBalance( new Balance(DECIMAL_FORMATTER.format(globalData.getTotalBalance().balanceAmount - amount)) ); } }
/** * update balance given positive or not and amount * @param positive * @param amount */
update balance given positive or not and amount @param positive @param amount
[ "update", "balance", "given", "positive", "or", "not", "and", "amount", "@param", "positive", "@param", "amount" ]
private void updateTotalBalance(boolean positive, double amount) { if (positive) { globalData.setTotalBalance( new Balance(DECIMAL_FORMATTER.format(globalData.getTotalBalance().balanceAmount + amount)) ); } else { globalData.setTotalBalance( new Balance(DECIMAL_FORMATTER.format(globalData.getTotalBalance().balanceAmount - amount)) ); } }
[ "private", "void", "updateTotalBalance", "(", "boolean", "positive", ",", "double", "amount", ")", "{", "if", "(", "positive", ")", "{", "globalData", ".", "setTotalBalance", "(", "new", "Balance", "(", "DECIMAL_FORMATTER", ".", "format", "(", "globalData", ".", "getTotalBalance", "(", ")", ".", "balanceAmount", "+", "amount", ")", ")", ")", ";", "}", "else", "{", "globalData", ".", "setTotalBalance", "(", "new", "Balance", "(", "DECIMAL_FORMATTER", ".", "format", "(", "globalData", ".", "getTotalBalance", "(", ")", ".", "balanceAmount", "-", "amount", ")", ")", ")", ";", "}", "}" ]
update balance given positive or not and amount @param positive @param amount
[ "update", "balance", "given", "positive", "or", "not", "and", "amount", "@param", "positive", "@param", "amount" ]
[]
[ { "param": "positive", "type": "boolean" }, { "param": "amount", "type": "double" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "positive", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "amount", "type": "double", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1089, 5269, 13937, 12, 6494, 6895, 16, 1645, 3844, 13, 288, 203, 3639, 309, 261, 21094, 13, 288, 203, 5411, 2552, 751, 18, 542, 5269, 13937, 12, 203, 10792, 394, 30918, 12, 23816, 67, 7254, 2560, 18, 2139, 12, 6347, 751, 18, 588, 5269, 13937, 7675, 12296, 6275, 397, 3844, 3719, 203, 5411, 11272, 203, 3639, 289, 469, 288, 203, 5411, 2552, 751, 18, 542, 5269, 13937, 12, 203, 10792, 394, 30918, 12, 23816, 67, 7254, 2560, 18, 2139, 12, 6347, 751, 18, 588, 5269, 13937, 7675, 12296, 6275, 300, 3844, 3719, 203, 5411, 11272, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1089, 11013, 864, 6895, 578, 486, 471, 3844, 203, 377, 380, 632, 891, 6895, 203, 377, 380, 632, 891, 3844, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
48832d339bad4c63eb2834e35b8612e3b5418122
BenFheng/main
src/main/java/seedu/expensela/model/ModelManager.java
[ "MIT" ]
Java
isTodaysMonth
null
private boolean isTodaysMonth(LocalDate date) { if (date.getMonth().equals(LocalDate.now().getMonth())) { return true; } else { return false; } }
/** * Check if the date from transaction is in today's month * @param date * @return booelan */
Check if the date from transaction is in today's month @param date @return booelan
[ "Check", "if", "the", "date", "from", "transaction", "is", "in", "today", "'", "s", "month", "@param", "date", "@return", "booelan" ]
private boolean isTodaysMonth(LocalDate date) { if (date.getMonth().equals(LocalDate.now().getMonth())) { return true; } else { return false; } }
[ "private", "boolean", "isTodaysMonth", "(", "LocalDate", "date", ")", "{", "if", "(", "date", ".", "getMonth", "(", ")", ".", "equals", "(", "LocalDate", ".", "now", "(", ")", ".", "getMonth", "(", ")", ")", ")", "{", "return", "true", ";", "}", "else", "{", "return", "false", ";", "}", "}" ]
Check if the date from transaction is in today's month @param date @return booelan
[ "Check", "if", "the", "date", "from", "transaction", "is", "in", "today", "'", "s", "month", "@param", "date", "@return", "booelan" ]
[]
[ { "param": "date", "type": "LocalDate" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "date", "type": "LocalDate", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 1250, 353, 56, 369, 8271, 5445, 12, 2042, 1626, 1509, 13, 288, 203, 3639, 309, 261, 712, 18, 588, 5445, 7675, 14963, 12, 2042, 1626, 18, 3338, 7675, 588, 5445, 1435, 3719, 288, 203, 5411, 327, 638, 31, 203, 3639, 289, 469, 288, 203, 5411, 327, 629, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2073, 309, 326, 1509, 628, 2492, 353, 316, 10074, 1807, 3138, 203, 377, 380, 632, 891, 1509, 203, 377, 380, 632, 2463, 800, 83, 292, 304, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6490e4d401700aeba3172582561b96c36484d25
BenFheng/main
src/main/java/seedu/expensela/ui/MainWindow.java
[ "MIT" ]
Java
fillInnerParts
null
void fillInnerParts() { transactionListPanel = new TransactionListPanel(logic.getFilteredTransactionList()); monthlyDataPanel = new MonthlyDataPanel(logic.getMonthlyData(), logic.getTotalBalance()); chartAnalyticsPanel = new ChartAnalyticsPanel(logic.getFilteredTransactionList(), logic.getIsFilterMonth()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().add(transactionListPanel.getRoot()); monthlyDataPlaceholder.getChildren().add(monthlyDataPanel.getRoot()); filterPanel = new FilterPanel(logic.getFilter()); // instantiate filterPanel filterPanelPlaceholder.getChildren().add(filterPanel.getRoot()); resultDisplay = new ResultDisplay(); resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot()); StatusBarFooter statusBarFooter = new StatusBarFooter(logic.getExpenseLaFilePath()); statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot()); CommandBox commandBox = new CommandBox(this::executeCommand, logic); commandBoxPlaceholder.getChildren().add(commandBox.getRoot()); }
/** * Fills up all the placeholders of this window. */
Fills up all the placeholders of this window.
[ "Fills", "up", "all", "the", "placeholders", "of", "this", "window", "." ]
void fillInnerParts() { transactionListPanel = new TransactionListPanel(logic.getFilteredTransactionList()); monthlyDataPanel = new MonthlyDataPanel(logic.getMonthlyData(), logic.getTotalBalance()); chartAnalyticsPanel = new ChartAnalyticsPanel(logic.getFilteredTransactionList(), logic.getIsFilterMonth()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().add(transactionListPanel.getRoot()); monthlyDataPlaceholder.getChildren().add(monthlyDataPanel.getRoot()); filterPanel = new FilterPanel(logic.getFilter()); filterPanelPlaceholder.getChildren().add(filterPanel.getRoot()); resultDisplay = new ResultDisplay(); resultDisplayPlaceholder.getChildren().add(resultDisplay.getRoot()); StatusBarFooter statusBarFooter = new StatusBarFooter(logic.getExpenseLaFilePath()); statusbarPlaceholder.getChildren().add(statusBarFooter.getRoot()); CommandBox commandBox = new CommandBox(this::executeCommand, logic); commandBoxPlaceholder.getChildren().add(commandBox.getRoot()); }
[ "void", "fillInnerParts", "(", ")", "{", "transactionListPanel", "=", "new", "TransactionListPanel", "(", "logic", ".", "getFilteredTransactionList", "(", ")", ")", ";", "monthlyDataPanel", "=", "new", "MonthlyDataPanel", "(", "logic", ".", "getMonthlyData", "(", ")", ",", "logic", ".", "getTotalBalance", "(", ")", ")", ";", "chartAnalyticsPanel", "=", "new", "ChartAnalyticsPanel", "(", "logic", ".", "getFilteredTransactionList", "(", ")", ",", "logic", ".", "getIsFilterMonth", "(", ")", ")", ";", "transactionListAndChartAnalyticsPanelPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "transactionListPanel", ".", "getRoot", "(", ")", ")", ";", "monthlyDataPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "monthlyDataPanel", ".", "getRoot", "(", ")", ")", ";", "filterPanel", "=", "new", "FilterPanel", "(", "logic", ".", "getFilter", "(", ")", ")", ";", "filterPanelPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "filterPanel", ".", "getRoot", "(", ")", ")", ";", "resultDisplay", "=", "new", "ResultDisplay", "(", ")", ";", "resultDisplayPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "resultDisplay", ".", "getRoot", "(", ")", ")", ";", "StatusBarFooter", "statusBarFooter", "=", "new", "StatusBarFooter", "(", "logic", ".", "getExpenseLaFilePath", "(", ")", ")", ";", "statusbarPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "statusBarFooter", ".", "getRoot", "(", ")", ")", ";", "CommandBox", "commandBox", "=", "new", "CommandBox", "(", "this", "::", "executeCommand", ",", "logic", ")", ";", "commandBoxPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "commandBox", ".", "getRoot", "(", ")", ")", ";", "}" ]
Fills up all the placeholders of this window.
[ "Fills", "up", "all", "the", "placeholders", "of", "this", "window", "." ]
[ "// instantiate filterPanel" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 918, 3636, 2857, 4305, 1435, 288, 203, 3639, 2492, 682, 5537, 273, 394, 5947, 682, 5537, 12, 28339, 18, 588, 14478, 3342, 682, 10663, 203, 3639, 31114, 751, 5537, 273, 394, 10337, 715, 751, 5537, 12, 28339, 18, 588, 5445, 715, 751, 9334, 4058, 18, 588, 5269, 13937, 10663, 203, 3639, 4980, 15675, 5537, 273, 394, 14804, 15675, 5537, 12, 28339, 18, 588, 14478, 3342, 682, 9334, 4058, 18, 588, 2520, 1586, 5445, 10663, 203, 3639, 2492, 682, 1876, 7984, 15675, 5537, 14038, 18, 588, 4212, 7675, 1289, 12, 7958, 682, 5537, 18, 588, 2375, 10663, 203, 3639, 31114, 751, 14038, 18, 588, 4212, 7675, 1289, 12, 7496, 715, 751, 5537, 18, 588, 2375, 10663, 203, 203, 3639, 1034, 5537, 273, 394, 4008, 5537, 12, 28339, 18, 588, 1586, 10663, 368, 10275, 1034, 5537, 203, 3639, 1034, 5537, 14038, 18, 588, 4212, 7675, 1289, 12, 2188, 5537, 18, 588, 2375, 10663, 203, 203, 3639, 563, 4236, 273, 394, 3438, 4236, 5621, 203, 3639, 563, 4236, 14038, 18, 588, 4212, 7675, 1289, 12, 2088, 4236, 18, 588, 2375, 10663, 203, 203, 3639, 2685, 5190, 13787, 1267, 5190, 13787, 273, 394, 2685, 5190, 13787, 12, 28339, 18, 588, 424, 1907, 307, 30745, 5598, 10663, 203, 3639, 1267, 3215, 14038, 18, 588, 4212, 7675, 1289, 12, 2327, 5190, 13787, 18, 588, 2375, 10663, 203, 203, 3639, 3498, 3514, 1296, 3514, 273, 394, 3498, 3514, 12, 2211, 2866, 8837, 2189, 16, 4058, 1769, 203, 3639, 1296, 3514, 14038, 18, 588, 4212, 7675, 1289, 12, 3076, 3514, 18, 588, 2375, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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-100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
b6490e4d401700aeba3172582561b96c36484d25
BenFheng/main
src/main/java/seedu/expensela/ui/MainWindow.java
[ "MIT" ]
Java
executeCommand
CommandResult
private CommandResult executeCommand(String commandText) throws CommandException, ParseException { try { CommandResult commandResult = logic.execute(commandText); logger.info("Result: " + commandResult.getFeedbackToUser()); monthlyDataPlaceholder.getChildren().clear(); monthlyDataPanel = new MonthlyDataPanel(logic.getMonthlyData(), logic.getTotalBalance()); monthlyDataPlaceholder.getChildren().add(monthlyDataPanel.getRoot()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().clear(); if (logic.getToggleView().getIsViewList()) { transactionListPanel = new TransactionListPanel(logic.getFilteredTransactionList()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().add(transactionListPanel.getRoot()); } else { chartAnalyticsPanel = new ChartAnalyticsPanel(logic.getFilteredTransactionList(), logic.getIsFilterMonth()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().add(chartAnalyticsPanel.getRoot()); } resultDisplay.setFeedbackToUser(commandResult.getFeedbackToUser()); // updating filterPanel filterPanelPlaceholder.getChildren().clear(); filterPanel = new FilterPanel(logic.getFilter()); filterPanelPlaceholder.getChildren().add(filterPanel.getRoot()); if (commandResult.isShowHelp()) { handleHelp(); } if (commandResult.isExit()) { handleExit(); } return commandResult; } catch (CommandException | ParseException e) { logger.info("Invalid command: " + commandText); resultDisplay.setFeedbackToUser(e.getMessage()); throw e; } }
/** * Executes the command and returns the result. * * @see seedu.expensela.logic.Logic#execute(String) */
Executes the command and returns the result.
[ "Executes", "the", "command", "and", "returns", "the", "result", "." ]
private CommandResult executeCommand(String commandText) throws CommandException, ParseException { try { CommandResult commandResult = logic.execute(commandText); logger.info("Result: " + commandResult.getFeedbackToUser()); monthlyDataPlaceholder.getChildren().clear(); monthlyDataPanel = new MonthlyDataPanel(logic.getMonthlyData(), logic.getTotalBalance()); monthlyDataPlaceholder.getChildren().add(monthlyDataPanel.getRoot()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().clear(); if (logic.getToggleView().getIsViewList()) { transactionListPanel = new TransactionListPanel(logic.getFilteredTransactionList()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().add(transactionListPanel.getRoot()); } else { chartAnalyticsPanel = new ChartAnalyticsPanel(logic.getFilteredTransactionList(), logic.getIsFilterMonth()); transactionListAndChartAnalyticsPanelPlaceholder.getChildren().add(chartAnalyticsPanel.getRoot()); } resultDisplay.setFeedbackToUser(commandResult.getFeedbackToUser()); filterPanelPlaceholder.getChildren().clear(); filterPanel = new FilterPanel(logic.getFilter()); filterPanelPlaceholder.getChildren().add(filterPanel.getRoot()); if (commandResult.isShowHelp()) { handleHelp(); } if (commandResult.isExit()) { handleExit(); } return commandResult; } catch (CommandException | ParseException e) { logger.info("Invalid command: " + commandText); resultDisplay.setFeedbackToUser(e.getMessage()); throw e; } }
[ "private", "CommandResult", "executeCommand", "(", "String", "commandText", ")", "throws", "CommandException", ",", "ParseException", "{", "try", "{", "CommandResult", "commandResult", "=", "logic", ".", "execute", "(", "commandText", ")", ";", "logger", ".", "info", "(", "\"Result: \"", "+", "commandResult", ".", "getFeedbackToUser", "(", ")", ")", ";", "monthlyDataPlaceholder", ".", "getChildren", "(", ")", ".", "clear", "(", ")", ";", "monthlyDataPanel", "=", "new", "MonthlyDataPanel", "(", "logic", ".", "getMonthlyData", "(", ")", ",", "logic", ".", "getTotalBalance", "(", ")", ")", ";", "monthlyDataPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "monthlyDataPanel", ".", "getRoot", "(", ")", ")", ";", "transactionListAndChartAnalyticsPanelPlaceholder", ".", "getChildren", "(", ")", ".", "clear", "(", ")", ";", "if", "(", "logic", ".", "getToggleView", "(", ")", ".", "getIsViewList", "(", ")", ")", "{", "transactionListPanel", "=", "new", "TransactionListPanel", "(", "logic", ".", "getFilteredTransactionList", "(", ")", ")", ";", "transactionListAndChartAnalyticsPanelPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "transactionListPanel", ".", "getRoot", "(", ")", ")", ";", "}", "else", "{", "chartAnalyticsPanel", "=", "new", "ChartAnalyticsPanel", "(", "logic", ".", "getFilteredTransactionList", "(", ")", ",", "logic", ".", "getIsFilterMonth", "(", ")", ")", ";", "transactionListAndChartAnalyticsPanelPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "chartAnalyticsPanel", ".", "getRoot", "(", ")", ")", ";", "}", "resultDisplay", ".", "setFeedbackToUser", "(", "commandResult", ".", "getFeedbackToUser", "(", ")", ")", ";", "filterPanelPlaceholder", ".", "getChildren", "(", ")", ".", "clear", "(", ")", ";", "filterPanel", "=", "new", "FilterPanel", "(", "logic", ".", "getFilter", "(", ")", ")", ";", "filterPanelPlaceholder", ".", "getChildren", "(", ")", ".", "add", "(", "filterPanel", ".", "getRoot", "(", ")", ")", ";", "if", "(", "commandResult", ".", "isShowHelp", "(", ")", ")", "{", "handleHelp", "(", ")", ";", "}", "if", "(", "commandResult", ".", "isExit", "(", ")", ")", "{", "handleExit", "(", ")", ";", "}", "return", "commandResult", ";", "}", "catch", "(", "CommandException", "|", "ParseException", "e", ")", "{", "logger", ".", "info", "(", "\"Invalid command: \"", "+", "commandText", ")", ";", "resultDisplay", ".", "setFeedbackToUser", "(", "e", ".", "getMessage", "(", ")", ")", ";", "throw", "e", ";", "}", "}" ]
Executes the command and returns the result.
[ "Executes", "the", "command", "and", "returns", "the", "result", "." ]
[ "// updating filterPanel" ]
[ { "param": "commandText", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "commandText", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 3498, 1253, 21120, 12, 780, 1296, 1528, 13, 1216, 3498, 503, 16, 10616, 288, 203, 3639, 775, 288, 203, 5411, 3498, 1253, 1296, 1253, 273, 4058, 18, 8837, 12, 3076, 1528, 1769, 203, 5411, 1194, 18, 1376, 2932, 1253, 30, 315, 397, 1296, 1253, 18, 588, 15888, 774, 1299, 10663, 203, 5411, 31114, 751, 14038, 18, 588, 4212, 7675, 8507, 5621, 203, 5411, 31114, 751, 5537, 273, 394, 10337, 715, 751, 5537, 12, 28339, 18, 588, 5445, 715, 751, 9334, 4058, 18, 588, 5269, 13937, 10663, 203, 5411, 31114, 751, 14038, 18, 588, 4212, 7675, 1289, 12, 7496, 715, 751, 5537, 18, 588, 2375, 10663, 203, 203, 5411, 2492, 682, 1876, 7984, 15675, 5537, 14038, 18, 588, 4212, 7675, 8507, 5621, 203, 5411, 309, 261, 28339, 18, 588, 17986, 1767, 7675, 588, 2520, 1767, 682, 10756, 288, 203, 7734, 2492, 682, 5537, 273, 394, 5947, 682, 5537, 12, 28339, 18, 588, 14478, 3342, 682, 10663, 203, 7734, 2492, 682, 1876, 7984, 15675, 5537, 14038, 18, 588, 4212, 7675, 1289, 12, 7958, 682, 5537, 18, 588, 2375, 10663, 203, 5411, 289, 469, 288, 203, 7734, 4980, 15675, 5537, 273, 394, 14804, 15675, 5537, 12, 28339, 18, 588, 14478, 3342, 682, 9334, 203, 13491, 4058, 18, 588, 2520, 1586, 5445, 10663, 203, 7734, 2492, 682, 1876, 7984, 15675, 5537, 14038, 18, 588, 4212, 7675, 1289, 12, 11563, 15675, 5537, 18, 588, 2375, 10663, 203, 5411, 289, 203, 203, 5411, 563, 4236, 18, 542, 15888, 774, 1299, 12, 3076, 1253, 18, 588, 15888, 774, 1299, 10663, 203, 203, 5411, 368, 9702, 1034, 5537, 203, 5411, 1034, 5537, 14038, 18, 588, 4212, 7675, 8507, 5621, 203, 5411, 1034, 5537, 273, 394, 4008, 5537, 12, 28339, 18, 588, 1586, 10663, 203, 5411, 1034, 5537, 14038, 18, 588, 4212, 7675, 1289, 12, 2188, 5537, 18, 588, 2375, 10663, 203, 203, 5411, 309, 261, 3076, 1253, 18, 291, 5706, 6696, 10756, 288, 203, 7734, 1640, 6696, 5621, 203, 5411, 289, 203, 203, 5411, 309, 261, 3076, 1253, 18, 291, 6767, 10756, 288, 203, 7734, 1640, 6767, 5621, 203, 5411, 289, 203, 203, 5411, 327, 1296, 1253, 31, 203, 3639, 289, 1044, 261, 2189, 503, 571, 10616, 425, 13, 288, 203, 5411, 1194, 18, 1376, 2932, 1941, 1296, 30, 315, 397, 1296, 1528, 1769, 203, 5411, 563, 4236, 18, 542, 15888, 774, 1299, 12, 73, 18, 24906, 10663, 203, 5411, 604, 425, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 3889, 993, 326, 1296, 471, 1135, 326, 563, 18, 203, 377, 380, 203, 377, 380, 632, 5946, 5009, 89, 18, 2749, 773, 292, 69, 18, 28339, 18, 20556, 7, 8837, 12, 780, 13, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
9a9430c8b46bd0f5b6061c9f3213483a2e7f2fca
BenFheng/main
src/main/java/seedu/expensela/model/GlobalData.java
[ "MIT" ]
Java
resetData
null
public void resetData(ReadOnlyGlobalData globalData) { requireNonNull(globalData); setLastUpdatedDate(globalData.getLastUpdatedDate()); setRecurringBudget(globalData.getRecurringBudget()); setRecurringTransactionsList(globalData.getRecurringTransactionList()); setTotalBalance(globalData.getTotalBalance()); }
/** * Resets the existing data of this {@code UserPrefs} with {@code newUserPrefs}. */
Resets the existing data of this UserPrefs with newUserPrefs.
[ "Resets", "the", "existing", "data", "of", "this", "UserPrefs", "with", "newUserPrefs", "." ]
public void resetData(ReadOnlyGlobalData globalData) { requireNonNull(globalData); setLastUpdatedDate(globalData.getLastUpdatedDate()); setRecurringBudget(globalData.getRecurringBudget()); setRecurringTransactionsList(globalData.getRecurringTransactionList()); setTotalBalance(globalData.getTotalBalance()); }
[ "public", "void", "resetData", "(", "ReadOnlyGlobalData", "globalData", ")", "{", "requireNonNull", "(", "globalData", ")", ";", "setLastUpdatedDate", "(", "globalData", ".", "getLastUpdatedDate", "(", ")", ")", ";", "setRecurringBudget", "(", "globalData", ".", "getRecurringBudget", "(", ")", ")", ";", "setRecurringTransactionsList", "(", "globalData", ".", "getRecurringTransactionList", "(", ")", ")", ";", "setTotalBalance", "(", "globalData", ".", "getTotalBalance", "(", ")", ")", ";", "}" ]
Resets the existing data of this {@code UserPrefs} with {@code newUserPrefs}.
[ "Resets", "the", "existing", "data", "of", "this", "{", "@code", "UserPrefs", "}", "with", "{", "@code", "newUserPrefs", "}", "." ]
[]
[ { "param": "globalData", "type": "ReadOnlyGlobalData" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "globalData", "type": "ReadOnlyGlobalData", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2715, 751, 12, 12066, 5160, 751, 2552, 751, 13, 288, 203, 3639, 10134, 12, 6347, 751, 1769, 203, 3639, 17764, 7381, 1626, 12, 6347, 751, 18, 588, 3024, 7381, 1626, 10663, 203, 3639, 444, 426, 21179, 16124, 12, 6347, 751, 18, 588, 426, 21179, 16124, 10663, 203, 3639, 444, 426, 21179, 14186, 682, 12, 6347, 751, 18, 588, 426, 21179, 3342, 682, 10663, 203, 3639, 25015, 13937, 12, 6347, 751, 18, 588, 5269, 13937, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1124, 2413, 326, 2062, 501, 434, 333, 8901, 710, 2177, 1386, 2556, 97, 598, 8901, 710, 394, 1299, 1386, 2556, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
138f273b81615e389892a69f3ccc6d32bb03149f
BenFheng/main
src/main/java/seedu/expensela/model/transaction/TransactionList.java
[ "MIT" ]
Java
add
null
public void add(Transaction toAdd) { requireNonNull(toAdd); if (contains(toAdd)) { throw new DuplicateTransactionException(); } internalList.add(toAdd); FXCollections.sort(internalList); }
/** * Adds a transaction to the list. * The transaction must not already exist in the list. */
Adds a transaction to the list. The transaction must not already exist in the list.
[ "Adds", "a", "transaction", "to", "the", "list", ".", "The", "transaction", "must", "not", "already", "exist", "in", "the", "list", "." ]
public void add(Transaction toAdd) { requireNonNull(toAdd); if (contains(toAdd)) { throw new DuplicateTransactionException(); } internalList.add(toAdd); FXCollections.sort(internalList); }
[ "public", "void", "add", "(", "Transaction", "toAdd", ")", "{", "requireNonNull", "(", "toAdd", ")", ";", "if", "(", "contains", "(", "toAdd", ")", ")", "{", "throw", "new", "DuplicateTransactionException", "(", ")", ";", "}", "internalList", ".", "add", "(", "toAdd", ")", ";", "FXCollections", ".", "sort", "(", "internalList", ")", ";", "}" ]
Adds a transaction to the list.
[ "Adds", "a", "transaction", "to", "the", "list", "." ]
[]
[ { "param": "toAdd", "type": "Transaction" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "toAdd", "type": "Transaction", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 527, 12, 3342, 25607, 13, 288, 203, 3639, 10134, 12, 869, 986, 1769, 203, 3639, 309, 261, 12298, 12, 869, 986, 3719, 288, 203, 5411, 604, 394, 19072, 3342, 503, 5621, 203, 3639, 289, 203, 3639, 2713, 682, 18, 1289, 12, 869, 986, 1769, 203, 3639, 478, 60, 15150, 18, 3804, 12, 7236, 682, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 15605, 279, 2492, 358, 326, 666, 18, 203, 377, 380, 1021, 2492, 1297, 486, 1818, 1005, 316, 326, 666, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
138f273b81615e389892a69f3ccc6d32bb03149f
BenFheng/main
src/main/java/seedu/expensela/model/transaction/TransactionList.java
[ "MIT" ]
Java
remove
null
public void remove(Transaction toRemove) { requireNonNull(toRemove); if (!internalList.remove(toRemove)) { throw new TransactionNotFoundException(); } FXCollections.sort(internalList); }
/** * Removes the equivalent transaction from the list. * The transaction must exist in the list. */
Removes the equivalent transaction from the list. The transaction must exist in the list.
[ "Removes", "the", "equivalent", "transaction", "from", "the", "list", ".", "The", "transaction", "must", "exist", "in", "the", "list", "." ]
public void remove(Transaction toRemove) { requireNonNull(toRemove); if (!internalList.remove(toRemove)) { throw new TransactionNotFoundException(); } FXCollections.sort(internalList); }
[ "public", "void", "remove", "(", "Transaction", "toRemove", ")", "{", "requireNonNull", "(", "toRemove", ")", ";", "if", "(", "!", "internalList", ".", "remove", "(", "toRemove", ")", ")", "{", "throw", "new", "TransactionNotFoundException", "(", ")", ";", "}", "FXCollections", ".", "sort", "(", "internalList", ")", ";", "}" ]
Removes the equivalent transaction from the list.
[ "Removes", "the", "equivalent", "transaction", "from", "the", "list", "." ]
[]
[ { "param": "toRemove", "type": "Transaction" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "toRemove", "type": "Transaction", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 1206, 12, 3342, 23511, 13, 288, 203, 3639, 10134, 12, 869, 3288, 1769, 203, 3639, 309, 16051, 7236, 682, 18, 4479, 12, 869, 3288, 3719, 288, 203, 5411, 604, 394, 5947, 3990, 5621, 203, 3639, 289, 203, 3639, 478, 60, 15150, 18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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
0f4bb43f7d4e4b1f664b931cec6b610cbc476e90
BenFheng/main
src/main/java/seedu/expensela/model/ExpenseLa.java
[ "MIT" ]
Java
resetData
null
public void resetData(ReadOnlyExpenseLa newData) { requireNonNull(newData); setTransactions(newData.getTransactionList()); setMonthlyData(newData.getMonthlyData()); setFilter(newData.getFilter()); }
/** * Resets the existing data of this {@code ExpenseLa} with {@code newData}. */
Resets the existing data of this ExpenseLa with newData.
[ "Resets", "the", "existing", "data", "of", "this", "ExpenseLa", "with", "newData", "." ]
public void resetData(ReadOnlyExpenseLa newData) { requireNonNull(newData); setTransactions(newData.getTransactionList()); setMonthlyData(newData.getMonthlyData()); setFilter(newData.getFilter()); }
[ "public", "void", "resetData", "(", "ReadOnlyExpenseLa", "newData", ")", "{", "requireNonNull", "(", "newData", ")", ";", "setTransactions", "(", "newData", ".", "getTransactionList", "(", ")", ")", ";", "setMonthlyData", "(", "newData", ".", "getMonthlyData", "(", ")", ")", ";", "setFilter", "(", "newData", ".", "getFilter", "(", ")", ")", ";", "}" ]
Resets the existing data of this {@code ExpenseLa} with {@code newData}.
[ "Resets", "the", "existing", "data", "of", "this", "{", "@code", "ExpenseLa", "}", "with", "{", "@code", "newData", "}", "." ]
[]
[ { "param": "newData", "type": "ReadOnlyExpenseLa" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "newData", "type": "ReadOnlyExpenseLa", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2715, 751, 12, 12066, 424, 1907, 307, 30745, 16026, 13, 288, 203, 3639, 10134, 12, 2704, 751, 1769, 203, 203, 3639, 444, 14186, 12, 2704, 751, 18, 588, 3342, 682, 10663, 203, 3639, 444, 5445, 715, 751, 12, 2704, 751, 18, 588, 5445, 715, 751, 10663, 203, 3639, 22855, 12, 2704, 751, 18, 588, 1586, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1124, 2413, 326, 2062, 501, 434, 333, 8901, 710, 1312, 1907, 307, 30745, 97, 598, 8901, 710, 16026, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
185ab87c4012e36207c93e30fffffa46e5c550d9
BenFheng/main
src/main/java/seedu/expensela/model/transaction/Category.java
[ "MIT" ]
Java
isValidCategory
null
public static boolean isValidCategory(String test) { for (CategoryEnum c : CategoryEnum.values()) { if (c.name().equalsIgnoreCase(test)) { return true; } } return false; }
/** * Returns true if a given string is a valid category. */
Returns true if a given string is a valid category.
[ "Returns", "true", "if", "a", "given", "string", "is", "a", "valid", "category", "." ]
public static boolean isValidCategory(String test) { for (CategoryEnum c : CategoryEnum.values()) { if (c.name().equalsIgnoreCase(test)) { return true; } } return false; }
[ "public", "static", "boolean", "isValidCategory", "(", "String", "test", ")", "{", "for", "(", "CategoryEnum", "c", ":", "CategoryEnum", ".", "values", "(", ")", ")", "{", "if", "(", "c", ".", "name", "(", ")", ".", "equalsIgnoreCase", "(", "test", ")", ")", "{", "return", "true", ";", "}", "}", "return", "false", ";", "}" ]
Returns true if a given string is a valid category.
[ "Returns", "true", "if", "a", "given", "string", "is", "a", "valid", "category", "." ]
[]
[ { "param": "test", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "test", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1250, 4908, 4457, 12, 780, 1842, 13, 288, 203, 3639, 364, 261, 4457, 3572, 276, 294, 9856, 3572, 18, 2372, 10756, 288, 203, 5411, 309, 261, 71, 18, 529, 7675, 14963, 5556, 12, 3813, 3719, 288, 203, 7734, 327, 638, 31, 203, 5411, 289, 203, 3639, 289, 203, 3639, 327, 629, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2860, 638, 309, 279, 864, 533, 353, 279, 923, 3150, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
632af36c26a8023b9736953ae936dc26078c0edc
BenFheng/main
src/test/java/seedu/expensela/logic/commands/DeleteCommandTest.java
[ "MIT" ]
Java
showNoTransaction
null
private void showNoTransaction(Model model) { model.updateFilteredTransactionList(p -> false, null); assertTrue(model.getFilteredTransactionList().isEmpty()); }
/** * Updates {@code model}'s filtered list to show no one. */
Updates model's filtered list to show no one.
[ "Updates", "model", "'", "s", "filtered", "list", "to", "show", "no", "one", "." ]
private void showNoTransaction(Model model) { model.updateFilteredTransactionList(p -> false, null); assertTrue(model.getFilteredTransactionList().isEmpty()); }
[ "private", "void", "showNoTransaction", "(", "Model", "model", ")", "{", "model", ".", "updateFilteredTransactionList", "(", "p", "->", "false", ",", "null", ")", ";", "assertTrue", "(", "model", ".", "getFilteredTransactionList", "(", ")", ".", "isEmpty", "(", ")", ")", ";", "}" ]
Updates {@code model}'s filtered list to show no one.
[ "Updates", "{", "@code", "model", "}", "'", "s", "filtered", "list", "to", "show", "no", "one", "." ]
[]
[ { "param": "model", "type": "Model" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "model", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 2405, 2279, 3342, 12, 1488, 938, 13, 288, 203, 3639, 938, 18, 2725, 14478, 3342, 682, 12, 84, 317, 629, 16, 446, 1769, 203, 203, 3639, 1815, 5510, 12, 2284, 18, 588, 14478, 3342, 682, 7675, 291, 1921, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 15419, 8901, 710, 938, 1713, 87, 5105, 666, 358, 2405, 1158, 1245, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f5ca2cd3499ca2f9232d6b21317763fc6dfd0c25
BenFheng/main
src/main/java/seedu/expensela/logic/parser/ParserUtil.java
[ "MIT" ]
Java
parseName
Name
public static Name parseName(String name) throws ParseException { requireNonNull(name); String trimmedName = name.trim(); return new Name(trimmedName); }
/** * Parses a {@code String name} into a {@code Name}. * Leading and trailing whitespaces will be trimmed. * * @throws ParseException if the given {@code name} is invalid. */
Parses a String name into a Name. Leading and trailing whitespaces will be trimmed. @throws ParseException if the given name is invalid.
[ "Parses", "a", "String", "name", "into", "a", "Name", ".", "Leading", "and", "trailing", "whitespaces", "will", "be", "trimmed", ".", "@throws", "ParseException", "if", "the", "given", "name", "is", "invalid", "." ]
public static Name parseName(String name) throws ParseException { requireNonNull(name); String trimmedName = name.trim(); return new Name(trimmedName); }
[ "public", "static", "Name", "parseName", "(", "String", "name", ")", "throws", "ParseException", "{", "requireNonNull", "(", "name", ")", ";", "String", "trimmedName", "=", "name", ".", "trim", "(", ")", ";", "return", "new", "Name", "(", "trimmedName", ")", ";", "}" ]
Parses a {@code String name} into a {@code Name}.
[ "Parses", "a", "{", "@code", "String", "name", "}", "into", "a", "{", "@code", "Name", "}", "." ]
[]
[ { "param": "name", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "name", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 1770, 1109, 461, 12, 780, 508, 13, 1216, 10616, 288, 203, 3639, 10134, 12, 529, 1769, 203, 3639, 514, 12350, 461, 273, 508, 18, 5290, 5621, 203, 3639, 327, 394, 1770, 12, 5290, 2937, 461, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2280, 2420, 279, 8901, 710, 514, 508, 97, 1368, 279, 8901, 710, 1770, 5496, 203, 377, 380, 511, 684, 310, 471, 7341, 28186, 903, 506, 12350, 18, 203, 377, 380, 203, 377, 380, 632, 15069, 10616, 309, 326, 864, 8901, 710, 508, 97, 353, 2057, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f5ca2cd3499ca2f9232d6b21317763fc6dfd0c25
BenFheng/main
src/main/java/seedu/expensela/logic/parser/ParserUtil.java
[ "MIT" ]
Java
parseAmount
Amount
public static Amount parseAmount(String amount, boolean isPositiveIncome) throws ParseException { requireNonNull(amount); String trimmedAmount = amount.trim(); if (!Amount.isValidAmount(trimmedAmount)) { throw new ParseException(Amount.MESSAGE_CONSTRAINTS); } return new Amount(trimmedAmount, isPositiveIncome); }
/** * Parses a {@code String amount} into a {@code Amount}. * Leading and trailing whitespaces will be trimmed. * * @throws ParseException if the given {@code Amount} is invalid. */
Parses a String amount into a Amount. Leading and trailing whitespaces will be trimmed. @throws ParseException if the given Amount is invalid.
[ "Parses", "a", "String", "amount", "into", "a", "Amount", ".", "Leading", "and", "trailing", "whitespaces", "will", "be", "trimmed", ".", "@throws", "ParseException", "if", "the", "given", "Amount", "is", "invalid", "." ]
public static Amount parseAmount(String amount, boolean isPositiveIncome) throws ParseException { requireNonNull(amount); String trimmedAmount = amount.trim(); if (!Amount.isValidAmount(trimmedAmount)) { throw new ParseException(Amount.MESSAGE_CONSTRAINTS); } return new Amount(trimmedAmount, isPositiveIncome); }
[ "public", "static", "Amount", "parseAmount", "(", "String", "amount", ",", "boolean", "isPositiveIncome", ")", "throws", "ParseException", "{", "requireNonNull", "(", "amount", ")", ";", "String", "trimmedAmount", "=", "amount", ".", "trim", "(", ")", ";", "if", "(", "!", "Amount", ".", "isValidAmount", "(", "trimmedAmount", ")", ")", "{", "throw", "new", "ParseException", "(", "Amount", ".", "MESSAGE_CONSTRAINTS", ")", ";", "}", "return", "new", "Amount", "(", "trimmedAmount", ",", "isPositiveIncome", ")", ";", "}" ]
Parses a {@code String amount} into a {@code Amount}.
[ "Parses", "a", "{", "@code", "String", "amount", "}", "into", "a", "{", "@code", "Amount", "}", "." ]
[]
[ { "param": "amount", "type": "String" }, { "param": "isPositiveIncome", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "amount", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "isPositiveIncome", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 16811, 1109, 6275, 12, 780, 3844, 16, 1250, 353, 14900, 382, 5624, 13, 1216, 10616, 288, 203, 3639, 10134, 12, 8949, 1769, 203, 3639, 514, 12350, 6275, 273, 3844, 18, 5290, 5621, 203, 3639, 309, 16051, 6275, 18, 26810, 6275, 12, 5290, 2937, 6275, 3719, 288, 203, 5411, 604, 394, 10616, 12, 6275, 18, 8723, 67, 15199, 55, 1769, 203, 3639, 289, 203, 3639, 327, 394, 16811, 12, 5290, 2937, 6275, 16, 353, 14900, 382, 5624, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2280, 2420, 279, 8901, 710, 514, 3844, 97, 1368, 279, 8901, 710, 16811, 5496, 203, 377, 380, 511, 684, 310, 471, 7341, 28186, 903, 506, 12350, 18, 203, 377, 380, 203, 377, 380, 632, 15069, 10616, 309, 326, 864, 8901, 710, 16811, 97, 353, 2057, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f5ca2cd3499ca2f9232d6b21317763fc6dfd0c25
BenFheng/main
src/main/java/seedu/expensela/logic/parser/ParserUtil.java
[ "MIT" ]
Java
parseBudget
Budget
public static Budget parseBudget(String budget) throws ParseException { requireNonNull(budget); String trimmedBudget = budget.trim(); if (!Budget.isValidAmount(trimmedBudget)) { throw new ParseException(Budget.MESSAGE_CONSTRAINTS); } return new Budget(trimmedBudget); }
/** * Parses a {@code String budget} into a {@code Budget}. * Leading and trailing whitespaces will be trimmed. * * @throws ParseException if the given {@code Budget} is invalid. */
Parses a String budget into a Budget. Leading and trailing whitespaces will be trimmed. @throws ParseException if the given Budget is invalid.
[ "Parses", "a", "String", "budget", "into", "a", "Budget", ".", "Leading", "and", "trailing", "whitespaces", "will", "be", "trimmed", ".", "@throws", "ParseException", "if", "the", "given", "Budget", "is", "invalid", "." ]
public static Budget parseBudget(String budget) throws ParseException { requireNonNull(budget); String trimmedBudget = budget.trim(); if (!Budget.isValidAmount(trimmedBudget)) { throw new ParseException(Budget.MESSAGE_CONSTRAINTS); } return new Budget(trimmedBudget); }
[ "public", "static", "Budget", "parseBudget", "(", "String", "budget", ")", "throws", "ParseException", "{", "requireNonNull", "(", "budget", ")", ";", "String", "trimmedBudget", "=", "budget", ".", "trim", "(", ")", ";", "if", "(", "!", "Budget", ".", "isValidAmount", "(", "trimmedBudget", ")", ")", "{", "throw", "new", "ParseException", "(", "Budget", ".", "MESSAGE_CONSTRAINTS", ")", ";", "}", "return", "new", "Budget", "(", "trimmedBudget", ")", ";", "}" ]
Parses a {@code String budget} into a {@code Budget}.
[ "Parses", "a", "{", "@code", "String", "budget", "}", "into", "a", "{", "@code", "Budget", "}", "." ]
[]
[ { "param": "budget", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "budget", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 25099, 1109, 16124, 12, 780, 15051, 13, 1216, 10616, 288, 203, 3639, 10134, 12, 70, 8562, 1769, 203, 3639, 514, 12350, 16124, 273, 15051, 18, 5290, 5621, 203, 3639, 309, 16051, 16124, 18, 26810, 6275, 12, 5290, 2937, 16124, 3719, 288, 203, 5411, 604, 394, 10616, 12, 16124, 18, 8723, 67, 15199, 55, 1769, 203, 3639, 289, 203, 3639, 327, 394, 25099, 12, 5290, 2937, 16124, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2280, 2420, 279, 8901, 710, 514, 15051, 97, 1368, 279, 8901, 710, 25099, 5496, 203, 377, 380, 511, 684, 310, 471, 7341, 28186, 903, 506, 12350, 18, 203, 377, 380, 203, 377, 380, 632, 15069, 10616, 309, 326, 864, 8901, 710, 25099, 97, 353, 2057, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
f5ca2cd3499ca2f9232d6b21317763fc6dfd0c25
BenFheng/main
src/main/java/seedu/expensela/logic/parser/ParserUtil.java
[ "MIT" ]
Java
parseImport
String
public static String parseImport(String importString) throws ParseException { String trimmedImportString = importString.trim(); if (trimmedImportString.equals("")) { throw new ParseException(MESSAGE_INVALID_IMPORT); } return trimmedImportString; }
/** * Parses {@code String importString} and returns it. Leading and trailing whitespaces will be * trimmed. * @throws ParseException if the specified string is invalid (blank). */
Parses String importString and returns it. Leading and trailing whitespaces will be trimmed. @throws ParseException if the specified string is invalid (blank).
[ "Parses", "String", "importString", "and", "returns", "it", ".", "Leading", "and", "trailing", "whitespaces", "will", "be", "trimmed", ".", "@throws", "ParseException", "if", "the", "specified", "string", "is", "invalid", "(", "blank", ")", "." ]
public static String parseImport(String importString) throws ParseException { String trimmedImportString = importString.trim(); if (trimmedImportString.equals("")) { throw new ParseException(MESSAGE_INVALID_IMPORT); } return trimmedImportString; }
[ "public", "static", "String", "parseImport", "(", "String", "importString", ")", "throws", "ParseException", "{", "String", "trimmedImportString", "=", "importString", ".", "trim", "(", ")", ";", "if", "(", "trimmedImportString", ".", "equals", "(", "\"\"", ")", ")", "{", "throw", "new", "ParseException", "(", "MESSAGE_INVALID_IMPORT", ")", ";", "}", "return", "trimmedImportString", ";", "}" ]
Parses {@code String importString} and returns it.
[ "Parses", "{", "@code", "String", "importString", "}", "and", "returns", "it", "." ]
[]
[ { "param": "importString", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "importString", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 514, 1109, 5010, 12, 780, 1930, 780, 13, 1216, 10616, 288, 203, 3639, 514, 12350, 5010, 780, 273, 1930, 780, 18, 5290, 5621, 203, 3639, 309, 261, 5290, 2937, 5010, 780, 18, 14963, 2932, 6, 3719, 288, 203, 5411, 604, 394, 10616, 12, 8723, 67, 9347, 67, 20445, 1769, 203, 3639, 289, 203, 3639, 327, 12350, 5010, 780, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2280, 2420, 8901, 710, 514, 1930, 780, 97, 471, 1135, 518, 18, 511, 684, 310, 471, 7341, 28186, 903, 506, 203, 377, 380, 12350, 18, 203, 377, 380, 632, 15069, 10616, 309, 326, 1269, 533, 353, 2057, 261, 12111, 2934, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
921e273d055fd95f22ed38e198558a3b37f23427
BenFheng/main
src/main/java/seedu/expensela/ui/CategoryLabelMaker.java
[ "MIT" ]
Java
initMapCategoryColour
null
public static void initMapCategoryColour() { if (mapCategoryColour.size() > 0) { return; } mapCategoryColour.put("shopping", BACKGROUND_COLOR_RED); mapCategoryColour.put("health", BACKGROUND_COLOR_PINK); mapCategoryColour.put("food", BACKGROUND_COLOR_GREEN); mapCategoryColour.put("transport", BACKGROUND_COLOR_BLUE); mapCategoryColour.put("groceries", BACKGROUND_COLOR_LIGHT_GREEN); mapCategoryColour.put("recreation", BACKGROUND_COLOR_YELLOW); mapCategoryColour.put("utilities", BACKGROUND_COLOR_GREY); mapCategoryColour.put("income", BACKGROUND_COLOR_NAVY_BLUE); // Miscellaneous mapCategoryColour.put("misc", BACKGROUND_COLOR_ORANGE); // All mapCategoryColour.put("all", BACKGROUND_COLOR_PURPLE); mapCategoryColour.put("category: shopping", BACKGROUND_COLOR_RED); mapCategoryColour.put("category: health", BACKGROUND_COLOR_PINK); mapCategoryColour.put("category: food", BACKGROUND_COLOR_GREEN); mapCategoryColour.put("category: transport", BACKGROUND_COLOR_BLUE); mapCategoryColour.put("category: groceries", BACKGROUND_COLOR_LIGHT_GREEN); mapCategoryColour.put("category: recreation", BACKGROUND_COLOR_YELLOW); mapCategoryColour.put("category: utilities", BACKGROUND_COLOR_GREY); mapCategoryColour.put("category: income", BACKGROUND_COLOR_NAVY_BLUE); // Miscellaneous mapCategoryColour.put("category: misc", BACKGROUND_COLOR_ORANGE); // All mapCategoryColour.put("category: all", BACKGROUND_COLOR_PURPLE); }
/** * Initialises the Category-Colour map if it hasn't been initialised yet */
Initialises the Category-Colour map if it hasn't been initialised yet
[ "Initialises", "the", "Category", "-", "Colour", "map", "if", "it", "hasn", "'", "t", "been", "initialised", "yet" ]
public static void initMapCategoryColour() { if (mapCategoryColour.size() > 0) { return; } mapCategoryColour.put("shopping", BACKGROUND_COLOR_RED); mapCategoryColour.put("health", BACKGROUND_COLOR_PINK); mapCategoryColour.put("food", BACKGROUND_COLOR_GREEN); mapCategoryColour.put("transport", BACKGROUND_COLOR_BLUE); mapCategoryColour.put("groceries", BACKGROUND_COLOR_LIGHT_GREEN); mapCategoryColour.put("recreation", BACKGROUND_COLOR_YELLOW); mapCategoryColour.put("utilities", BACKGROUND_COLOR_GREY); mapCategoryColour.put("income", BACKGROUND_COLOR_NAVY_BLUE); mapCategoryColour.put("misc", BACKGROUND_COLOR_ORANGE); mapCategoryColour.put("all", BACKGROUND_COLOR_PURPLE); mapCategoryColour.put("category: shopping", BACKGROUND_COLOR_RED); mapCategoryColour.put("category: health", BACKGROUND_COLOR_PINK); mapCategoryColour.put("category: food", BACKGROUND_COLOR_GREEN); mapCategoryColour.put("category: transport", BACKGROUND_COLOR_BLUE); mapCategoryColour.put("category: groceries", BACKGROUND_COLOR_LIGHT_GREEN); mapCategoryColour.put("category: recreation", BACKGROUND_COLOR_YELLOW); mapCategoryColour.put("category: utilities", BACKGROUND_COLOR_GREY); mapCategoryColour.put("category: income", BACKGROUND_COLOR_NAVY_BLUE); mapCategoryColour.put("category: misc", BACKGROUND_COLOR_ORANGE); mapCategoryColour.put("category: all", BACKGROUND_COLOR_PURPLE); }
[ "public", "static", "void", "initMapCategoryColour", "(", ")", "{", "if", "(", "mapCategoryColour", ".", "size", "(", ")", ">", "0", ")", "{", "return", ";", "}", "mapCategoryColour", ".", "put", "(", "\"shopping\"", ",", "BACKGROUND_COLOR_RED", ")", ";", "mapCategoryColour", ".", "put", "(", "\"health\"", ",", "BACKGROUND_COLOR_PINK", ")", ";", "mapCategoryColour", ".", "put", "(", "\"food\"", ",", "BACKGROUND_COLOR_GREEN", ")", ";", "mapCategoryColour", ".", "put", "(", "\"transport\"", ",", "BACKGROUND_COLOR_BLUE", ")", ";", "mapCategoryColour", ".", "put", "(", "\"groceries\"", ",", "BACKGROUND_COLOR_LIGHT_GREEN", ")", ";", "mapCategoryColour", ".", "put", "(", "\"recreation\"", ",", "BACKGROUND_COLOR_YELLOW", ")", ";", "mapCategoryColour", ".", "put", "(", "\"utilities\"", ",", "BACKGROUND_COLOR_GREY", ")", ";", "mapCategoryColour", ".", "put", "(", "\"income\"", ",", "BACKGROUND_COLOR_NAVY_BLUE", ")", ";", "mapCategoryColour", ".", "put", "(", "\"misc\"", ",", "BACKGROUND_COLOR_ORANGE", ")", ";", "mapCategoryColour", ".", "put", "(", "\"all\"", ",", "BACKGROUND_COLOR_PURPLE", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: shopping\"", ",", "BACKGROUND_COLOR_RED", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: health\"", ",", "BACKGROUND_COLOR_PINK", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: food\"", ",", "BACKGROUND_COLOR_GREEN", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: transport\"", ",", "BACKGROUND_COLOR_BLUE", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: groceries\"", ",", "BACKGROUND_COLOR_LIGHT_GREEN", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: recreation\"", ",", "BACKGROUND_COLOR_YELLOW", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: utilities\"", ",", "BACKGROUND_COLOR_GREY", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: income\"", ",", "BACKGROUND_COLOR_NAVY_BLUE", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: misc\"", ",", "BACKGROUND_COLOR_ORANGE", ")", ";", "mapCategoryColour", ".", "put", "(", "\"category: all\"", ",", "BACKGROUND_COLOR_PURPLE", ")", ";", "}" ]
Initialises the Category-Colour map if it hasn't been initialised yet
[ "Initialises", "the", "Category", "-", "Colour", "map", "if", "it", "hasn", "'", "t", "been", "initialised", "yet" ]
[ "// Miscellaneous", "// All", "// Miscellaneous", "// All" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 1208, 863, 4457, 26404, 1435, 288, 203, 3639, 309, 261, 1458, 4457, 26404, 18, 1467, 1435, 405, 374, 13, 288, 203, 5411, 327, 31, 203, 3639, 289, 203, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 5020, 1382, 3113, 29226, 67, 10989, 67, 5879, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 13267, 3113, 29226, 67, 10989, 67, 52, 8476, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 617, 369, 3113, 29226, 67, 10989, 67, 29500, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 13049, 3113, 29226, 67, 10989, 67, 14618, 1821, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 25420, 2750, 606, 3113, 29226, 67, 10989, 67, 23516, 67, 29500, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 266, 17169, 3113, 29226, 67, 10989, 67, 61, 2247, 4130, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 1367, 1961, 3113, 29226, 67, 10989, 67, 43, 862, 61, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 267, 5624, 3113, 29226, 67, 10989, 67, 50, 5856, 61, 67, 14618, 1821, 1769, 203, 203, 3639, 368, 16584, 3855, 15522, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 23667, 3113, 29226, 67, 10989, 67, 916, 8357, 1769, 203, 203, 3639, 368, 4826, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 454, 3113, 29226, 67, 10989, 67, 52, 1099, 30099, 1769, 203, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 12122, 1382, 3113, 29226, 67, 10989, 67, 5879, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 8437, 3113, 29226, 67, 10989, 67, 52, 8476, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 284, 4773, 3113, 29226, 67, 10989, 67, 29500, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 4736, 3113, 29226, 67, 10989, 67, 14618, 1821, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 314, 303, 2750, 606, 3113, 29226, 67, 10989, 67, 23516, 67, 29500, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 283, 17169, 3113, 29226, 67, 10989, 67, 61, 2247, 4130, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 22538, 3113, 29226, 67, 10989, 67, 43, 862, 61, 1769, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 316, 5624, 3113, 29226, 67, 10989, 67, 50, 5856, 61, 67, 14618, 1821, 1769, 203, 203, 3639, 368, 16584, 3855, 15522, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 20448, 3113, 29226, 67, 10989, 67, 916, 8357, 1769, 203, 203, 3639, 368, 4826, 203, 3639, 852, 4457, 26404, 18, 458, 2932, 4743, 30, 777, 3113, 29226, 67, 10989, 67, 52, 1099, 30099, 1769, 203, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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, 380, 10188, 6141, 326, 9856, 17, 26404, 852, 309, 518, 13342, 1404, 2118, 30372, 4671, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
7cae358d2553b4063341f7d576b29e48e5f9653d
BenFheng/main
src/main/java/seedu/expensela/model/UserPrefs.java
[ "MIT" ]
Java
resetData
null
public void resetData(ReadOnlyUserPrefs newUserPrefs) { requireNonNull(newUserPrefs); setGuiSettings(newUserPrefs.getGuiSettings()); setExpenseLaFilePath(newUserPrefs.getExpenseLaFilePath()); setGlobalDataFilePath(newUserPrefs.getGlobalDataFilePath()); }
/** * Resets the existing data of this {@code UserPrefs} with {@code newUserPrefs}. */
Resets the existing data of this UserPrefs with newUserPrefs.
[ "Resets", "the", "existing", "data", "of", "this", "UserPrefs", "with", "newUserPrefs", "." ]
public void resetData(ReadOnlyUserPrefs newUserPrefs) { requireNonNull(newUserPrefs); setGuiSettings(newUserPrefs.getGuiSettings()); setExpenseLaFilePath(newUserPrefs.getExpenseLaFilePath()); setGlobalDataFilePath(newUserPrefs.getGlobalDataFilePath()); }
[ "public", "void", "resetData", "(", "ReadOnlyUserPrefs", "newUserPrefs", ")", "{", "requireNonNull", "(", "newUserPrefs", ")", ";", "setGuiSettings", "(", "newUserPrefs", ".", "getGuiSettings", "(", ")", ")", ";", "setExpenseLaFilePath", "(", "newUserPrefs", ".", "getExpenseLaFilePath", "(", ")", ")", ";", "setGlobalDataFilePath", "(", "newUserPrefs", ".", "getGlobalDataFilePath", "(", ")", ")", ";", "}" ]
Resets the existing data of this {@code UserPrefs} with {@code newUserPrefs}.
[ "Resets", "the", "existing", "data", "of", "this", "{", "@code", "UserPrefs", "}", "with", "{", "@code", "newUserPrefs", "}", "." ]
[]
[ { "param": "newUserPrefs", "type": "ReadOnlyUserPrefs" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "newUserPrefs", "type": "ReadOnlyUserPrefs", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 918, 2715, 751, 12, 12066, 1299, 1386, 2556, 394, 1299, 1386, 2556, 13, 288, 203, 3639, 10134, 12, 2704, 1299, 1386, 2556, 1769, 203, 3639, 444, 18070, 2628, 12, 2704, 1299, 1386, 2556, 18, 588, 18070, 2628, 10663, 203, 3639, 444, 424, 1907, 307, 30745, 5598, 12, 2704, 1299, 1386, 2556, 18, 588, 424, 1907, 307, 30745, 5598, 10663, 203, 3639, 444, 5160, 751, 5598, 12, 2704, 1299, 1386, 2556, 18, 588, 5160, 751, 5598, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 1124, 2413, 326, 2062, 501, 434, 333, 8901, 710, 2177, 1386, 2556, 97, 598, 8901, 710, 394, 1299, 1386, 2556, 5496, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
db5cc12b8dc9b5804248fdd76a523160b0cd0ff2
BenFheng/main
src/test/java/seedu/expensela/logic/commands/EditCommandTest.java
[ "MIT" ]
Java
execute_invalidTransactionIndexFilteredList_failure
null
@Test public void execute_invalidTransactionIndexFilteredList_failure() { showTransactionAtIndex(model, INDEX_FIRST_TRANSACTION); Index outOfBoundIndex = INDEX_SECOND_TRANSACTION; // ensures that outOfBoundIndex is still in bounds of expense la list assertTrue(outOfBoundIndex.getZeroBased() < model.getExpenseLa().getTransactionList().size()); EditCommand editCommand = new EditCommand(outOfBoundIndex, new EditTransactionDescriptorBuilder().withName(VALID_NAME_AIRPODS).build()); assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_TRANSACTION_DISPLAYED_INDEX); }
/** * Edit filtered list where index is larger than size of filtered list, * but smaller than size of expense la */
Edit filtered list where index is larger than size of filtered list, but smaller than size of expense la
[ "Edit", "filtered", "list", "where", "index", "is", "larger", "than", "size", "of", "filtered", "list", "but", "smaller", "than", "size", "of", "expense", "la" ]
@Test public void execute_invalidTransactionIndexFilteredList_failure() { showTransactionAtIndex(model, INDEX_FIRST_TRANSACTION); Index outOfBoundIndex = INDEX_SECOND_TRANSACTION; assertTrue(outOfBoundIndex.getZeroBased() < model.getExpenseLa().getTransactionList().size()); EditCommand editCommand = new EditCommand(outOfBoundIndex, new EditTransactionDescriptorBuilder().withName(VALID_NAME_AIRPODS).build()); assertCommandFailure(editCommand, model, Messages.MESSAGE_INVALID_TRANSACTION_DISPLAYED_INDEX); }
[ "@", "Test", "public", "void", "execute_invalidTransactionIndexFilteredList_failure", "(", ")", "{", "showTransactionAtIndex", "(", "model", ",", "INDEX_FIRST_TRANSACTION", ")", ";", "Index", "outOfBoundIndex", "=", "INDEX_SECOND_TRANSACTION", ";", "assertTrue", "(", "outOfBoundIndex", ".", "getZeroBased", "(", ")", "<", "model", ".", "getExpenseLa", "(", ")", ".", "getTransactionList", "(", ")", ".", "size", "(", ")", ")", ";", "EditCommand", "editCommand", "=", "new", "EditCommand", "(", "outOfBoundIndex", ",", "new", "EditTransactionDescriptorBuilder", "(", ")", ".", "withName", "(", "VALID_NAME_AIRPODS", ")", ".", "build", "(", ")", ")", ";", "assertCommandFailure", "(", "editCommand", ",", "model", ",", "Messages", ".", "MESSAGE_INVALID_TRANSACTION_DISPLAYED_INDEX", ")", ";", "}" ]
Edit filtered list where index is larger than size of filtered list, but smaller than size of expense la
[ "Edit", "filtered", "list", "where", "index", "is", "larger", "than", "size", "of", "filtered", "list", "but", "smaller", "than", "size", "of", "expense", "la" ]
[ "// ensures that outOfBoundIndex is still in bounds of expense la list" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 4709, 203, 565, 1071, 918, 1836, 67, 5387, 3342, 1016, 14478, 682, 67, 12251, 1435, 288, 203, 3639, 2405, 3342, 24499, 12, 2284, 16, 12425, 67, 15354, 67, 22364, 1769, 203, 3639, 3340, 596, 951, 3499, 1016, 273, 12425, 67, 16328, 67, 22364, 31, 203, 3639, 368, 11932, 716, 596, 951, 3499, 1016, 353, 4859, 316, 4972, 434, 1329, 3558, 7125, 666, 203, 3639, 1815, 5510, 12, 659, 951, 3499, 1016, 18, 588, 7170, 9802, 1435, 411, 938, 18, 588, 424, 1907, 307, 30745, 7675, 588, 3342, 682, 7675, 1467, 10663, 203, 203, 3639, 15328, 2189, 3874, 2189, 273, 394, 15328, 2189, 12, 659, 951, 3499, 1016, 16, 203, 7734, 394, 15328, 3342, 3187, 1263, 7675, 1918, 461, 12, 5063, 67, 1985, 67, 37, 7937, 52, 1212, 55, 2934, 3510, 10663, 203, 203, 3639, 1815, 2189, 5247, 12, 4619, 2189, 16, 938, 16, 4838, 18, 8723, 67, 9347, 67, 22364, 67, 17463, 2056, 67, 9199, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 15328, 5105, 666, 1625, 770, 353, 10974, 2353, 963, 434, 5105, 666, 16, 203, 377, 380, 1496, 10648, 2353, 963, 434, 1329, 3558, 7125, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
388c976c41349dabb12d75cbc936a8601e847269
BenFheng/main
src/main/java/seedu/expensela/logic/parser/AddCommandParser.java
[ "MIT" ]
Java
parse
AddCommand
public AddCommand parse(String args) throws ParseException { boolean isNotIncome = true; ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_AMOUNT, PREFIX_DATE, PREFIX_REMARK, PREFIX_CATEGORY, PREFIX_INCOME, PREFIX_RECURRING); if (!arePrefixesPresent(argMultimap, PREFIX_INCOME)) { isNotIncome = false; } if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_AMOUNT) || !argMultimap.getPreamble().isEmpty()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE)); } try { Name name; if (argMultimap.getValue(PREFIX_NAME).get().length() <= 44) { name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()); } else { throw new ParseException("Name is too long!"); } Amount amount = ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get(), isNotIncome); if (!(Double.parseDouble(argMultimap.getValue(PREFIX_AMOUNT).get()) < 1000000)) { throw new ParseException("Transaction amount cannot be 1 million dollars or more!"); } if (Double.parseDouble(argMultimap.getValue(PREFIX_AMOUNT).get()) <= 0) { throw new ParseException("Transaction amount cannot be less than 0!"); } //Set date to today's date first Date date = ParserUtil.parseDate(LocalDate.now().toString()); if (arePrefixesPresent(argMultimap, PREFIX_DATE)) { //If date is present, set it to today's date date = ParserUtil.parseDate(argMultimap.getValue(PREFIX_DATE).get()); //Checks if date exceeds today's date if (LocalDate.parse(argMultimap.getValue(PREFIX_DATE).get()).isAfter(LocalDate.now())) { throw new ParseException("Date input cannot be a date in the future (after today)"); } if (LocalDate.parse(argMultimap.getValue(PREFIX_DATE).get()).getYear() < 1900) { throw new ParseException("Date is too far in the past!"); } } Remark remark; if (arePrefixesPresent(argMultimap, PREFIX_REMARK)) { remark = ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK).get()); } else { remark = ParserUtil.parseRemark(" "); } Category category; if (arePrefixesPresent(argMultimap, PREFIX_CATEGORY)) { category = ParserUtil.parseCategory(argMultimap.getValue(PREFIX_CATEGORY).get()); } else { category = ParserUtil.parseCategory("MISC"); } Transaction transaction = new Transaction(name, amount, date, remark, category); if (arePrefixesPresent(argMultimap, PREFIX_RECURRING)) { transaction.setIsRecurring(); } return new AddCommand(transaction); } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } }
/** * Parses the given {@code String} of arguments in the context of the AddCommand * and returns an AddCommand object for execution. * @throws ParseException if the user input does not conform the expected format */
Parses the given String of arguments in the context of the AddCommand and returns an AddCommand object for execution. @throws ParseException if the user input does not conform the expected format
[ "Parses", "the", "given", "String", "of", "arguments", "in", "the", "context", "of", "the", "AddCommand", "and", "returns", "an", "AddCommand", "object", "for", "execution", ".", "@throws", "ParseException", "if", "the", "user", "input", "does", "not", "conform", "the", "expected", "format" ]
public AddCommand parse(String args) throws ParseException { boolean isNotIncome = true; ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_AMOUNT, PREFIX_DATE, PREFIX_REMARK, PREFIX_CATEGORY, PREFIX_INCOME, PREFIX_RECURRING); if (!arePrefixesPresent(argMultimap, PREFIX_INCOME)) { isNotIncome = false; } if (!arePrefixesPresent(argMultimap, PREFIX_NAME, PREFIX_AMOUNT) || !argMultimap.getPreamble().isEmpty()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, AddCommand.MESSAGE_USAGE)); } try { Name name; if (argMultimap.getValue(PREFIX_NAME).get().length() <= 44) { name = ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get()); } else { throw new ParseException("Name is too long!"); } Amount amount = ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get(), isNotIncome); if (!(Double.parseDouble(argMultimap.getValue(PREFIX_AMOUNT).get()) < 1000000)) { throw new ParseException("Transaction amount cannot be 1 million dollars or more!"); } if (Double.parseDouble(argMultimap.getValue(PREFIX_AMOUNT).get()) <= 0) { throw new ParseException("Transaction amount cannot be less than 0!"); } Date date = ParserUtil.parseDate(LocalDate.now().toString()); if (arePrefixesPresent(argMultimap, PREFIX_DATE)) { date = ParserUtil.parseDate(argMultimap.getValue(PREFIX_DATE).get()); if (LocalDate.parse(argMultimap.getValue(PREFIX_DATE).get()).isAfter(LocalDate.now())) { throw new ParseException("Date input cannot be a date in the future (after today)"); } if (LocalDate.parse(argMultimap.getValue(PREFIX_DATE).get()).getYear() < 1900) { throw new ParseException("Date is too far in the past!"); } } Remark remark; if (arePrefixesPresent(argMultimap, PREFIX_REMARK)) { remark = ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK).get()); } else { remark = ParserUtil.parseRemark(" "); } Category category; if (arePrefixesPresent(argMultimap, PREFIX_CATEGORY)) { category = ParserUtil.parseCategory(argMultimap.getValue(PREFIX_CATEGORY).get()); } else { category = ParserUtil.parseCategory("MISC"); } Transaction transaction = new Transaction(name, amount, date, remark, category); if (arePrefixesPresent(argMultimap, PREFIX_RECURRING)) { transaction.setIsRecurring(); } return new AddCommand(transaction); } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } }
[ "public", "AddCommand", "parse", "(", "String", "args", ")", "throws", "ParseException", "{", "boolean", "isNotIncome", "=", "true", ";", "ArgumentMultimap", "argMultimap", "=", "ArgumentTokenizer", ".", "tokenize", "(", "args", ",", "PREFIX_NAME", ",", "PREFIX_AMOUNT", ",", "PREFIX_DATE", ",", "PREFIX_REMARK", ",", "PREFIX_CATEGORY", ",", "PREFIX_INCOME", ",", "PREFIX_RECURRING", ")", ";", "if", "(", "!", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_INCOME", ")", ")", "{", "isNotIncome", "=", "false", ";", "}", "if", "(", "!", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_NAME", ",", "PREFIX_AMOUNT", ")", "||", "!", "argMultimap", ".", "getPreamble", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_COMMAND_FORMAT", ",", "AddCommand", ".", "MESSAGE_USAGE", ")", ")", ";", "}", "try", "{", "Name", "name", ";", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_NAME", ")", ".", "get", "(", ")", ".", "length", "(", ")", "<=", "44", ")", "{", "name", "=", "ParserUtil", ".", "parseName", "(", "argMultimap", ".", "getValue", "(", "PREFIX_NAME", ")", ".", "get", "(", ")", ")", ";", "}", "else", "{", "throw", "new", "ParseException", "(", "\"Name is too long!\"", ")", ";", "}", "Amount", "amount", "=", "ParserUtil", ".", "parseAmount", "(", "argMultimap", ".", "getValue", "(", "PREFIX_AMOUNT", ")", ".", "get", "(", ")", ",", "isNotIncome", ")", ";", "if", "(", "!", "(", "Double", ".", "parseDouble", "(", "argMultimap", ".", "getValue", "(", "PREFIX_AMOUNT", ")", ".", "get", "(", ")", ")", "<", "1000000", ")", ")", "{", "throw", "new", "ParseException", "(", "\"Transaction amount cannot be 1 million dollars or more!\"", ")", ";", "}", "if", "(", "Double", ".", "parseDouble", "(", "argMultimap", ".", "getValue", "(", "PREFIX_AMOUNT", ")", ".", "get", "(", ")", ")", "<=", "0", ")", "{", "throw", "new", "ParseException", "(", "\"Transaction amount cannot be less than 0!\"", ")", ";", "}", "Date", "date", "=", "ParserUtil", ".", "parseDate", "(", "LocalDate", ".", "now", "(", ")", ".", "toString", "(", ")", ")", ";", "if", "(", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_DATE", ")", ")", "{", "date", "=", "ParserUtil", ".", "parseDate", "(", "argMultimap", ".", "getValue", "(", "PREFIX_DATE", ")", ".", "get", "(", ")", ")", ";", "if", "(", "LocalDate", ".", "parse", "(", "argMultimap", ".", "getValue", "(", "PREFIX_DATE", ")", ".", "get", "(", ")", ")", ".", "isAfter", "(", "LocalDate", ".", "now", "(", ")", ")", ")", "{", "throw", "new", "ParseException", "(", "\"Date input cannot be a date in the future (after today)\"", ")", ";", "}", "if", "(", "LocalDate", ".", "parse", "(", "argMultimap", ".", "getValue", "(", "PREFIX_DATE", ")", ".", "get", "(", ")", ")", ".", "getYear", "(", ")", "<", "1900", ")", "{", "throw", "new", "ParseException", "(", "\"Date is too far in the past!\"", ")", ";", "}", "}", "Remark", "remark", ";", "if", "(", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_REMARK", ")", ")", "{", "remark", "=", "ParserUtil", ".", "parseRemark", "(", "argMultimap", ".", "getValue", "(", "PREFIX_REMARK", ")", ".", "get", "(", ")", ")", ";", "}", "else", "{", "remark", "=", "ParserUtil", ".", "parseRemark", "(", "\" \"", ")", ";", "}", "Category", "category", ";", "if", "(", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_CATEGORY", ")", ")", "{", "category", "=", "ParserUtil", ".", "parseCategory", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "get", "(", ")", ")", ";", "}", "else", "{", "category", "=", "ParserUtil", ".", "parseCategory", "(", "\"MISC\"", ")", ";", "}", "Transaction", "transaction", "=", "new", "Transaction", "(", "name", ",", "amount", ",", "date", ",", "remark", ",", "category", ")", ";", "if", "(", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_RECURRING", ")", ")", "{", "transaction", ".", "setIsRecurring", "(", ")", ";", "}", "return", "new", "AddCommand", "(", "transaction", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "throw", "new", "ParseException", "(", "e", ".", "getMessage", "(", ")", ")", ";", "}", "}" ]
Parses the given {@code String} of arguments in the context of the AddCommand and returns an AddCommand object for execution.
[ "Parses", "the", "given", "{", "@code", "String", "}", "of", "arguments", "in", "the", "context", "of", "the", "AddCommand", "and", "returns", "an", "AddCommand", "object", "for", "execution", "." ]
[ "//Set date to today's date first", "//If date is present, set it to today's date", "//Checks if date exceeds today's date" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1436, 2189, 1109, 12, 780, 833, 13, 1216, 10616, 288, 203, 203, 3639, 1250, 8827, 382, 5624, 273, 638, 31, 203, 203, 3639, 5067, 22020, 1501, 22020, 273, 203, 7734, 5067, 10524, 18, 2316, 554, 12, 1968, 16, 17154, 67, 1985, 16, 17154, 67, 2192, 51, 5321, 16, 17154, 67, 4594, 16, 17154, 67, 862, 12693, 16, 203, 13491, 17154, 67, 24847, 16, 17154, 67, 706, 3865, 958, 16, 17154, 67, 862, 7509, 54, 1360, 1769, 203, 203, 3639, 309, 16051, 834, 11700, 6351, 12, 3175, 22020, 16, 17154, 67, 706, 3865, 958, 3719, 288, 203, 5411, 8827, 382, 5624, 273, 629, 31, 203, 3639, 289, 203, 203, 3639, 309, 16051, 834, 11700, 6351, 12, 3175, 22020, 16, 17154, 67, 1985, 16, 17154, 67, 2192, 51, 5321, 13, 203, 7734, 747, 401, 3175, 22020, 18, 588, 52, 793, 7119, 7675, 291, 1921, 10756, 288, 203, 5411, 604, 394, 10616, 12, 780, 18, 2139, 12, 8723, 67, 9347, 67, 19104, 67, 7254, 16, 1436, 2189, 18, 8723, 67, 29550, 10019, 203, 3639, 289, 203, 203, 3639, 775, 288, 203, 5411, 1770, 508, 31, 203, 203, 5411, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 1985, 2934, 588, 7675, 2469, 1435, 1648, 13291, 13, 288, 203, 7734, 508, 273, 6783, 1304, 18, 2670, 461, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 1985, 2934, 588, 10663, 203, 5411, 289, 469, 288, 203, 7734, 604, 394, 10616, 2932, 461, 353, 4885, 1525, 4442, 1769, 203, 5411, 289, 203, 203, 5411, 16811, 3844, 273, 6783, 1304, 18, 2670, 6275, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 2192, 51, 5321, 2934, 588, 9334, 8827, 382, 5624, 1769, 203, 203, 5411, 309, 16051, 12, 5265, 18, 2670, 5265, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 2192, 51, 5321, 2934, 588, 10756, 411, 15088, 3719, 288, 203, 7734, 604, 394, 10616, 2932, 3342, 3844, 2780, 506, 404, 312, 737, 285, 302, 22382, 5913, 578, 1898, 4442, 1769, 203, 5411, 289, 203, 203, 5411, 309, 261, 5265, 18, 2670, 5265, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 2192, 51, 5321, 2934, 588, 10756, 1648, 374, 13, 288, 203, 7734, 604, 394, 10616, 2932, 3342, 3844, 2780, 506, 5242, 2353, 374, 4442, 1769, 203, 5411, 289, 203, 203, 5411, 368, 694, 1509, 358, 10074, 1807, 1509, 1122, 203, 5411, 2167, 1509, 273, 6783, 1304, 18, 2670, 1626, 12, 2042, 1626, 18, 3338, 7675, 10492, 10663, 203, 5411, 309, 261, 834, 11700, 6351, 12, 3175, 22020, 16, 17154, 67, 4594, 3719, 288, 203, 7734, 368, 2047, 1509, 353, 3430, 16, 444, 518, 358, 10074, 1807, 1509, 203, 7734, 1509, 273, 6783, 1304, 18, 2670, 1626, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 4594, 2934, 588, 10663, 203, 203, 7734, 368, 4081, 309, 1509, 14399, 10074, 1807, 1509, 203, 7734, 309, 261, 2042, 1626, 18, 2670, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 4594, 2934, 588, 1435, 2934, 291, 4436, 12, 2042, 1626, 18, 3338, 1435, 3719, 288, 203, 10792, 604, 394, 10616, 2932, 1626, 810, 2780, 506, 279, 1509, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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, 203, 377, 380, 632, 15069, 10616, 309, 326, 729, 810, 1552, 486, 20156, 326, 2665, 740, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
015f7c42730df699f89619a6bd5176e049dd4285
BenFheng/main
src/main/java/seedu/expensela/logic/parser/FilterCommandParser.java
[ "MIT" ]
Java
parse
FilterCommand
public FilterCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_MONTH, PREFIX_CATEGORY); // missing both category and month if (!(argMultimap.getValue(PREFIX_CATEGORY).isPresent() || argMultimap.getValue(PREFIX_MONTH).isPresent())) { throw new ParseException(String.format(MESSAGE_INVALID_FILTER, FilterCommand.MESSAGE_USAGE)); } // invalid category if (argMultimap.getValue(PREFIX_CATEGORY).isPresent() && !isValidCategory(argMultimap.getValue(PREFIX_CATEGORY).get().trim().toUpperCase())) { throw new ParseException(String.format(MESSAGE_INVALID_FILTER, FilterCommand.MESSAGE_USAGE)); } // invalid month if (argMultimap.getValue(PREFIX_MONTH).isPresent() && !isValidMonth(argMultimap.getValue(PREFIX_MONTH).get().trim())) { throw new ParseException(String.format(MESSAGE_INVALID_FILTER, FilterCommand.MESSAGE_USAGE)); } try { if (argMultimap.getValue(PREFIX_CATEGORY).isPresent() && argMultimap.getValue(PREFIX_MONTH).isPresent()) { // get category filter String cat = argMultimap.getValue(PREFIX_CATEGORY).get().trim().toUpperCase(); // sends the next word after "date" to see if it matches any transaction dates String date = argMultimap.getValue(PREFIX_MONTH).get().trim(); // removes the day in the string version of transaction date, so we filter by month String dateMinusDay; if (date.toUpperCase().equals("ALL")) { dateMinusDay = "ALL"; } else { dateMinusDay = date.split("-")[0] + "-" + date.split("-")[1]; } return new FilterCommand(new CategoryEqualsKeywordPredicate(Arrays.asList(cat)), new DateEqualsKeywordPredicate(Arrays.asList(dateMinusDay))); } else if (argMultimap.getValue(PREFIX_CATEGORY).isPresent() && !argMultimap.getValue(PREFIX_MONTH).isPresent()) { // get category filter String cat = argMultimap.getValue(PREFIX_CATEGORY).get().trim().toUpperCase(); // set date as all transaction dates String dateMinusDay = "ALL"; return new FilterCommand(new CategoryEqualsKeywordPredicate(Arrays.asList(cat)), new DateEqualsKeywordPredicate(Arrays.asList(dateMinusDay))); } else if (!argMultimap.getValue(PREFIX_CATEGORY).isPresent() && argMultimap.getValue(PREFIX_MONTH).isPresent()) { // get category filter String cat = "ALL"; // sends the next word after "date" to see if it matches any transaction dates String date = argMultimap.getValue(PREFIX_MONTH).get().trim(); // removes the day in the string version of transaction date, so we filter by month String dateMinusDay; if (date.toUpperCase().equals("ALL")) { dateMinusDay = "ALL"; } else { dateMinusDay = date.split("-")[0] + "-" + date.split("-")[1]; } return new FilterCommand(new CategoryEqualsKeywordPredicate(Arrays.asList(cat)), new DateEqualsKeywordPredicate(Arrays.asList(dateMinusDay))); } } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FilterCommand.MESSAGE_USAGE)); }
/** * Parses the given {@code String} of arguments in the context of the FilterCommand * and returns a FilterCommand object for execution. * @throws ParseException if the user input does not conform the expected format */
Parses the given String of arguments in the context of the FilterCommand and returns a FilterCommand object for execution. @throws ParseException if the user input does not conform the expected format
[ "Parses", "the", "given", "String", "of", "arguments", "in", "the", "context", "of", "the", "FilterCommand", "and", "returns", "a", "FilterCommand", "object", "for", "execution", ".", "@throws", "ParseException", "if", "the", "user", "input", "does", "not", "conform", "the", "expected", "format" ]
public FilterCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_MONTH, PREFIX_CATEGORY); if (!(argMultimap.getValue(PREFIX_CATEGORY).isPresent() || argMultimap.getValue(PREFIX_MONTH).isPresent())) { throw new ParseException(String.format(MESSAGE_INVALID_FILTER, FilterCommand.MESSAGE_USAGE)); } if (argMultimap.getValue(PREFIX_CATEGORY).isPresent() && !isValidCategory(argMultimap.getValue(PREFIX_CATEGORY).get().trim().toUpperCase())) { throw new ParseException(String.format(MESSAGE_INVALID_FILTER, FilterCommand.MESSAGE_USAGE)); } if (argMultimap.getValue(PREFIX_MONTH).isPresent() && !isValidMonth(argMultimap.getValue(PREFIX_MONTH).get().trim())) { throw new ParseException(String.format(MESSAGE_INVALID_FILTER, FilterCommand.MESSAGE_USAGE)); } try { if (argMultimap.getValue(PREFIX_CATEGORY).isPresent() && argMultimap.getValue(PREFIX_MONTH).isPresent()) { String cat = argMultimap.getValue(PREFIX_CATEGORY).get().trim().toUpperCase(); String date = argMultimap.getValue(PREFIX_MONTH).get().trim(); String dateMinusDay; if (date.toUpperCase().equals("ALL")) { dateMinusDay = "ALL"; } else { dateMinusDay = date.split("-")[0] + "-" + date.split("-")[1]; } return new FilterCommand(new CategoryEqualsKeywordPredicate(Arrays.asList(cat)), new DateEqualsKeywordPredicate(Arrays.asList(dateMinusDay))); } else if (argMultimap.getValue(PREFIX_CATEGORY).isPresent() && !argMultimap.getValue(PREFIX_MONTH).isPresent()) { String cat = argMultimap.getValue(PREFIX_CATEGORY).get().trim().toUpperCase(); String dateMinusDay = "ALL"; return new FilterCommand(new CategoryEqualsKeywordPredicate(Arrays.asList(cat)), new DateEqualsKeywordPredicate(Arrays.asList(dateMinusDay))); } else if (!argMultimap.getValue(PREFIX_CATEGORY).isPresent() && argMultimap.getValue(PREFIX_MONTH).isPresent()) { String cat = "ALL"; String date = argMultimap.getValue(PREFIX_MONTH).get().trim(); String dateMinusDay; if (date.toUpperCase().equals("ALL")) { dateMinusDay = "ALL"; } else { dateMinusDay = date.split("-")[0] + "-" + date.split("-")[1]; } return new FilterCommand(new CategoryEqualsKeywordPredicate(Arrays.asList(cat)), new DateEqualsKeywordPredicate(Arrays.asList(dateMinusDay))); } } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, FilterCommand.MESSAGE_USAGE)); }
[ "public", "FilterCommand", "parse", "(", "String", "args", ")", "throws", "ParseException", "{", "ArgumentMultimap", "argMultimap", "=", "ArgumentTokenizer", ".", "tokenize", "(", "args", ",", "PREFIX_MONTH", ",", "PREFIX_CATEGORY", ")", ";", "if", "(", "!", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "isPresent", "(", ")", "||", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "isPresent", "(", ")", ")", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_FILTER", ",", "FilterCommand", ".", "MESSAGE_USAGE", ")", ")", ";", "}", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "isPresent", "(", ")", "&&", "!", "isValidCategory", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "get", "(", ")", ".", "trim", "(", ")", ".", "toUpperCase", "(", ")", ")", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_FILTER", ",", "FilterCommand", ".", "MESSAGE_USAGE", ")", ")", ";", "}", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "isPresent", "(", ")", "&&", "!", "isValidMonth", "(", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "get", "(", ")", ".", "trim", "(", ")", ")", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_FILTER", ",", "FilterCommand", ".", "MESSAGE_USAGE", ")", ")", ";", "}", "try", "{", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "isPresent", "(", ")", "&&", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "isPresent", "(", ")", ")", "{", "String", "cat", "=", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "get", "(", ")", ".", "trim", "(", ")", ".", "toUpperCase", "(", ")", ";", "String", "date", "=", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "get", "(", ")", ".", "trim", "(", ")", ";", "String", "dateMinusDay", ";", "if", "(", "date", ".", "toUpperCase", "(", ")", ".", "equals", "(", "\"ALL\"", ")", ")", "{", "dateMinusDay", "=", "\"ALL\"", ";", "}", "else", "{", "dateMinusDay", "=", "date", ".", "split", "(", "\"-\"", ")", "[", "0", "]", "+", "\"-\"", "+", "date", ".", "split", "(", "\"-\"", ")", "[", "1", "]", ";", "}", "return", "new", "FilterCommand", "(", "new", "CategoryEqualsKeywordPredicate", "(", "Arrays", ".", "asList", "(", "cat", ")", ")", ",", "new", "DateEqualsKeywordPredicate", "(", "Arrays", ".", "asList", "(", "dateMinusDay", ")", ")", ")", ";", "}", "else", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "isPresent", "(", ")", "&&", "!", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "isPresent", "(", ")", ")", "{", "String", "cat", "=", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "get", "(", ")", ".", "trim", "(", ")", ".", "toUpperCase", "(", ")", ";", "String", "dateMinusDay", "=", "\"ALL\"", ";", "return", "new", "FilterCommand", "(", "new", "CategoryEqualsKeywordPredicate", "(", "Arrays", ".", "asList", "(", "cat", ")", ")", ",", "new", "DateEqualsKeywordPredicate", "(", "Arrays", ".", "asList", "(", "dateMinusDay", ")", ")", ")", ";", "}", "else", "if", "(", "!", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "isPresent", "(", ")", "&&", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "isPresent", "(", ")", ")", "{", "String", "cat", "=", "\"ALL\"", ";", "String", "date", "=", "argMultimap", ".", "getValue", "(", "PREFIX_MONTH", ")", ".", "get", "(", ")", ".", "trim", "(", ")", ";", "String", "dateMinusDay", ";", "if", "(", "date", ".", "toUpperCase", "(", ")", ".", "equals", "(", "\"ALL\"", ")", ")", "{", "dateMinusDay", "=", "\"ALL\"", ";", "}", "else", "{", "dateMinusDay", "=", "date", ".", "split", "(", "\"-\"", ")", "[", "0", "]", "+", "\"-\"", "+", "date", ".", "split", "(", "\"-\"", ")", "[", "1", "]", ";", "}", "return", "new", "FilterCommand", "(", "new", "CategoryEqualsKeywordPredicate", "(", "Arrays", ".", "asList", "(", "cat", ")", ")", ",", "new", "DateEqualsKeywordPredicate", "(", "Arrays", ".", "asList", "(", "dateMinusDay", ")", ")", ")", ";", "}", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "throw", "new", "ParseException", "(", "e", ".", "getMessage", "(", ")", ")", ";", "}", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_COMMAND_FORMAT", ",", "FilterCommand", ".", "MESSAGE_USAGE", ")", ")", ";", "}" ]
Parses the given {@code String} of arguments in the context of the FilterCommand and returns a FilterCommand object for execution.
[ "Parses", "the", "given", "{", "@code", "String", "}", "of", "arguments", "in", "the", "context", "of", "the", "FilterCommand", "and", "returns", "a", "FilterCommand", "object", "for", "execution", "." ]
[ "// missing both category and month", "// invalid category", "// invalid month", "// get category filter", "// sends the next word after \"date\" to see if it matches any transaction dates", "// removes the day in the string version of transaction date, so we filter by month", "// get category filter", "// set date as all transaction dates", "// get category filter", "// sends the next word after \"date\" to see if it matches any transaction dates", "// removes the day in the string version of transaction date, so we filter by month" ]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 4008, 2189, 1109, 12, 780, 833, 13, 1216, 10616, 288, 203, 203, 3639, 5067, 22020, 1501, 22020, 273, 203, 7734, 5067, 10524, 18, 2316, 554, 12, 1968, 16, 17154, 67, 13942, 16, 17154, 67, 24847, 1769, 203, 203, 3639, 368, 3315, 3937, 3150, 471, 3138, 203, 3639, 309, 16051, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 24847, 2934, 291, 6351, 1435, 747, 1501, 22020, 18, 24805, 12, 6307, 67, 13942, 2934, 291, 6351, 1435, 3719, 288, 203, 5411, 604, 394, 10616, 12, 780, 18, 2139, 12, 8723, 67, 9347, 67, 11126, 16, 4008, 2189, 18, 8723, 67, 29550, 10019, 203, 3639, 289, 203, 203, 3639, 368, 2057, 3150, 203, 3639, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 24847, 2934, 291, 6351, 1435, 203, 7734, 597, 401, 26810, 4457, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 24847, 2934, 588, 7675, 5290, 7675, 869, 8915, 1435, 3719, 288, 203, 5411, 604, 394, 10616, 12, 780, 18, 2139, 12, 8723, 67, 9347, 67, 11126, 16, 4008, 2189, 18, 8723, 67, 29550, 10019, 203, 3639, 289, 203, 203, 3639, 368, 2057, 3138, 203, 3639, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 13942, 2934, 291, 6351, 1435, 203, 7734, 597, 401, 26810, 5445, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 13942, 2934, 588, 7675, 5290, 1435, 3719, 288, 203, 5411, 604, 394, 10616, 12, 780, 18, 2139, 12, 8723, 67, 9347, 67, 11126, 16, 4008, 2189, 18, 8723, 67, 29550, 10019, 203, 3639, 289, 203, 203, 3639, 775, 288, 203, 5411, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 24847, 2934, 291, 6351, 1435, 597, 1501, 22020, 18, 24805, 12, 6307, 67, 13942, 2934, 291, 6351, 10756, 288, 203, 7734, 368, 336, 3150, 1034, 203, 7734, 514, 6573, 273, 1501, 22020, 18, 24805, 12, 6307, 67, 24847, 2934, 588, 7675, 5290, 7675, 869, 8915, 5621, 203, 203, 7734, 368, 9573, 326, 1024, 2076, 1839, 315, 712, 6, 358, 2621, 309, 518, 1885, 1281, 2492, 7811, 203, 7734, 514, 1509, 273, 1501, 22020, 18, 24805, 12, 6307, 67, 13942, 2934, 588, 7675, 5290, 5621, 203, 7734, 368, 7157, 326, 2548, 316, 326, 533, 1177, 434, 2492, 1509, 16, 1427, 732, 1034, 635, 3138, 203, 7734, 514, 1509, 18434, 4245, 31, 203, 7734, 309, 261, 712, 18, 869, 8915, 7675, 14963, 2932, 4685, 6, 3719, 288, 203, 10792, 1509, 18434, 4245, 273, 315, 4685, 14432, 203, 7734, 289, 469, 288, 203, 10792, 1509, 18434, 4245, 273, 1509, 18, 4939, 2932, 17, 7923, 63, 20, 65, 397, 7514, 397, 1509, 18, 4939, 2932, 17, 7923, 63, 21, 15533, 203, 7734, 289, 203, 7734, 327, 394, 4008, 2189, 12, 2704, 9856, 8867, 8736, 8634, 12, 12726, 18, 345, 682, 12, 2574, 13, 3631, 203, 13491, 394, 2167, 8867, 8736, 8634, 12, 12726, 18, 345, 682, 12, 712, 18434, 4245, 3719, 1769, 203, 5411, 289, 469, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 24847, 2934, 291, 6351, 1435, 203, 10792, 597, 401, 3175, 22020, 18, 24805, 12, 6307, 67, 13942, 2934, 291, 6351, 10756, 288, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26873, 203, 377, 380, 2280, 2420, 326, 864, 8901, 710, 514, 97, 434, 1775, 316, 326, 819, 434, 326, 4008, 2189, 203, 377, 380, 471, 1135, 279, 4008, 2189, 733, 364, 4588, 18, 203, 377, 380, 632, 15069, 10616, 309, 326, 729, 810, 1552, 486, 20156, 326, 2665, 740, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
015f7c42730df699f89619a6bd5176e049dd4285
BenFheng/main
src/main/java/seedu/expensela/logic/parser/FilterCommandParser.java
[ "MIT" ]
Java
isValidCategory
null
public boolean isValidCategory(String input) { switch(input) { case("FOOD"): return true; case("SHOPPING"): return true; case("TRANSPORT"): return true; case("GROCERIES"): return true; case("HEALTH"): return true; case("RECREATION"): return true; case("MISC"): return true; case("UTILITIES"): return true; case("INCOME"): return true; case("ALL"): return true; default: return false; } }
/** * Checks if the category input by the user is valid * @param input * @return */
Checks if the category input by the user is valid @param input @return
[ "Checks", "if", "the", "category", "input", "by", "the", "user", "is", "valid", "@param", "input", "@return" ]
public boolean isValidCategory(String input) { switch(input) { case("FOOD"): return true; case("SHOPPING"): return true; case("TRANSPORT"): return true; case("GROCERIES"): return true; case("HEALTH"): return true; case("RECREATION"): return true; case("MISC"): return true; case("UTILITIES"): return true; case("INCOME"): return true; case("ALL"): return true; default: return false; } }
[ "public", "boolean", "isValidCategory", "(", "String", "input", ")", "{", "switch", "(", "input", ")", "{", "case", "(", "\"FOOD\"", ")", ":", "return", "true", ";", "case", "(", "\"SHOPPING\"", ")", ":", "return", "true", ";", "case", "(", "\"TRANSPORT\"", ")", ":", "return", "true", ";", "case", "(", "\"GROCERIES\"", ")", ":", "return", "true", ";", "case", "(", "\"HEALTH\"", ")", ":", "return", "true", ";", "case", "(", "\"RECREATION\"", ")", ":", "return", "true", ";", "case", "(", "\"MISC\"", ")", ":", "return", "true", ";", "case", "(", "\"UTILITIES\"", ")", ":", "return", "true", ";", "case", "(", "\"INCOME\"", ")", ":", "return", "true", ";", "case", "(", "\"ALL\"", ")", ":", "return", "true", ";", "default", ":", "return", "false", ";", "}", "}" ]
Checks if the category input by the user is valid @param input @return
[ "Checks", "if", "the", "category", "input", "by", "the", "user", "is", "valid", "@param", "input", "@return" ]
[]
[ { "param": "input", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "input", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 4908, 4457, 12, 780, 810, 13, 288, 203, 3639, 1620, 12, 2630, 13, 288, 203, 3639, 648, 2932, 3313, 1212, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 2664, 3665, 20002, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 8989, 31943, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 43, 1457, 39, 654, 8805, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 3900, 1013, 2455, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 862, 5458, 2689, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 7492, 2312, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 1693, 2627, 25673, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 706, 3865, 958, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 648, 2932, 4685, 6, 4672, 203, 5411, 327, 638, 31, 203, 3639, 805, 30, 203, 5411, 327, 629, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 13074, 309, 326, 3150, 810, 635, 326, 729, 353, 923, 203, 377, 380, 632, 891, 810, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
015f7c42730df699f89619a6bd5176e049dd4285
BenFheng/main
src/main/java/seedu/expensela/logic/parser/FilterCommandParser.java
[ "MIT" ]
Java
isValidMonth
null
public boolean isValidMonth(String input) { try { if (input.equals("ALL")) { return true; } String inputYear = input.split("-")[0]; int inputYearInteger = Integer.parseInt(inputYear); String inputMonth = input.split("-")[1]; int inputMonthInteger = Integer.parseInt(inputMonth); if (inputYear.length() != 4) { return false; } if (inputYearInteger < 1900) { return false; } if (inputMonth == null) { return false; } if (inputMonth.length() != 2) { return false; } if (inputMonthInteger < 1 || inputMonthInteger > 12) { return false; } } catch (Exception e) { return false; } return true; }
/** * Checks if the month inputted by the user is valid. * @param input * @return */
Checks if the month inputted by the user is valid. @param input @return
[ "Checks", "if", "the", "month", "inputted", "by", "the", "user", "is", "valid", ".", "@param", "input", "@return" ]
public boolean isValidMonth(String input) { try { if (input.equals("ALL")) { return true; } String inputYear = input.split("-")[0]; int inputYearInteger = Integer.parseInt(inputYear); String inputMonth = input.split("-")[1]; int inputMonthInteger = Integer.parseInt(inputMonth); if (inputYear.length() != 4) { return false; } if (inputYearInteger < 1900) { return false; } if (inputMonth == null) { return false; } if (inputMonth.length() != 2) { return false; } if (inputMonthInteger < 1 || inputMonthInteger > 12) { return false; } } catch (Exception e) { return false; } return true; }
[ "public", "boolean", "isValidMonth", "(", "String", "input", ")", "{", "try", "{", "if", "(", "input", ".", "equals", "(", "\"ALL\"", ")", ")", "{", "return", "true", ";", "}", "String", "inputYear", "=", "input", ".", "split", "(", "\"-\"", ")", "[", "0", "]", ";", "int", "inputYearInteger", "=", "Integer", ".", "parseInt", "(", "inputYear", ")", ";", "String", "inputMonth", "=", "input", ".", "split", "(", "\"-\"", ")", "[", "1", "]", ";", "int", "inputMonthInteger", "=", "Integer", ".", "parseInt", "(", "inputMonth", ")", ";", "if", "(", "inputYear", ".", "length", "(", ")", "!=", "4", ")", "{", "return", "false", ";", "}", "if", "(", "inputYearInteger", "<", "1900", ")", "{", "return", "false", ";", "}", "if", "(", "inputMonth", "==", "null", ")", "{", "return", "false", ";", "}", "if", "(", "inputMonth", ".", "length", "(", ")", "!=", "2", ")", "{", "return", "false", ";", "}", "if", "(", "inputMonthInteger", "<", "1", "||", "inputMonthInteger", ">", "12", ")", "{", "return", "false", ";", "}", "}", "catch", "(", "Exception", "e", ")", "{", "return", "false", ";", "}", "return", "true", ";", "}" ]
Checks if the month inputted by the user is valid.
[ "Checks", "if", "the", "month", "inputted", "by", "the", "user", "is", "valid", "." ]
[]
[ { "param": "input", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "input", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 4908, 5445, 12, 780, 810, 13, 288, 203, 3639, 775, 288, 203, 5411, 309, 261, 2630, 18, 14963, 2932, 4685, 6, 3719, 288, 203, 7734, 327, 638, 31, 203, 5411, 289, 203, 5411, 514, 810, 5593, 273, 810, 18, 4939, 2932, 17, 7923, 63, 20, 15533, 203, 5411, 509, 810, 5593, 4522, 273, 2144, 18, 2670, 1702, 12, 2630, 5593, 1769, 203, 5411, 514, 810, 5445, 273, 810, 18, 4939, 2932, 17, 7923, 63, 21, 15533, 203, 5411, 509, 810, 5445, 4522, 273, 2144, 18, 2670, 1702, 12, 2630, 5445, 1769, 203, 5411, 309, 261, 2630, 5593, 18, 2469, 1435, 480, 1059, 13, 288, 203, 7734, 327, 629, 31, 203, 5411, 289, 203, 5411, 309, 261, 2630, 5593, 4522, 411, 5342, 713, 13, 288, 203, 7734, 327, 629, 31, 203, 5411, 289, 203, 5411, 309, 261, 2630, 5445, 422, 446, 13, 288, 203, 7734, 327, 629, 31, 203, 5411, 289, 203, 5411, 309, 261, 2630, 5445, 18, 2469, 1435, 480, 576, 13, 288, 203, 7734, 327, 629, 31, 203, 5411, 289, 203, 5411, 309, 261, 2630, 5445, 4522, 411, 404, 747, 810, 5445, 4522, 405, 2593, 13, 288, 203, 7734, 327, 629, 31, 203, 5411, 289, 203, 3639, 289, 1044, 261, 503, 425, 13, 288, 203, 5411, 327, 629, 31, 203, 3639, 289, 203, 3639, 327, 638, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 13074, 309, 326, 3138, 810, 2344, 635, 326, 729, 353, 923, 18, 203, 377, 380, 632, 891, 810, 203, 377, 380, 632, 2463, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
1c1a326d554c5146dcce580c0ce1f3f56e72e432
BenFheng/main
src/main/java/seedu/expensela/storage/JsonAdaptedMonthlyData.java
[ "MIT" ]
Java
toModelType
MonthlyData
public MonthlyData toModelType() throws IllegalValueException { if (budget == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Budget.class.getSimpleName())); } if (!Budget.isValidAmount(budget)) { throw new IllegalValueException(Budget.MESSAGE_CONSTRAINTS); } final Budget modelBudget = new Budget(budget); if (expense == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Expense.class.getSimpleName())); } if (!Expense.isValidAmount(expense)) { throw new IllegalValueException(Expense.MESSAGE_CONSTRAINTS); } final Expense modelExpense = new Expense(expense); if (income == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Income.class.getSimpleName())); } if (!Income.isValidAmount(income)) { throw new IllegalValueException(Income.MESSAGE_CONSTRAINTS); } final Income modelIncome = new Income(income); return new MonthlyData("1", modelBudget, modelExpense, modelIncome); }
/** * Converts this Jackson-friendly adapted monthly data object into the model's {@code MonthlyData} object. * * @throws IllegalValueException if there were any data constraints violated in the adapted transaction. */
Converts this Jackson-friendly adapted monthly data object into the model's MonthlyData object. @throws IllegalValueException if there were any data constraints violated in the adapted transaction.
[ "Converts", "this", "Jackson", "-", "friendly", "adapted", "monthly", "data", "object", "into", "the", "model", "'", "s", "MonthlyData", "object", ".", "@throws", "IllegalValueException", "if", "there", "were", "any", "data", "constraints", "violated", "in", "the", "adapted", "transaction", "." ]
public MonthlyData toModelType() throws IllegalValueException { if (budget == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Budget.class.getSimpleName())); } if (!Budget.isValidAmount(budget)) { throw new IllegalValueException(Budget.MESSAGE_CONSTRAINTS); } final Budget modelBudget = new Budget(budget); if (expense == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Expense.class.getSimpleName())); } if (!Expense.isValidAmount(expense)) { throw new IllegalValueException(Expense.MESSAGE_CONSTRAINTS); } final Expense modelExpense = new Expense(expense); if (income == null) { throw new IllegalValueException(String.format(MISSING_FIELD_MESSAGE_FORMAT, Income.class.getSimpleName())); } if (!Income.isValidAmount(income)) { throw new IllegalValueException(Income.MESSAGE_CONSTRAINTS); } final Income modelIncome = new Income(income); return new MonthlyData("1", modelBudget, modelExpense, modelIncome); }
[ "public", "MonthlyData", "toModelType", "(", ")", "throws", "IllegalValueException", "{", "if", "(", "budget", "==", "null", ")", "{", "throw", "new", "IllegalValueException", "(", "String", ".", "format", "(", "MISSING_FIELD_MESSAGE_FORMAT", ",", "Budget", ".", "class", ".", "getSimpleName", "(", ")", ")", ")", ";", "}", "if", "(", "!", "Budget", ".", "isValidAmount", "(", "budget", ")", ")", "{", "throw", "new", "IllegalValueException", "(", "Budget", ".", "MESSAGE_CONSTRAINTS", ")", ";", "}", "final", "Budget", "modelBudget", "=", "new", "Budget", "(", "budget", ")", ";", "if", "(", "expense", "==", "null", ")", "{", "throw", "new", "IllegalValueException", "(", "String", ".", "format", "(", "MISSING_FIELD_MESSAGE_FORMAT", ",", "Expense", ".", "class", ".", "getSimpleName", "(", ")", ")", ")", ";", "}", "if", "(", "!", "Expense", ".", "isValidAmount", "(", "expense", ")", ")", "{", "throw", "new", "IllegalValueException", "(", "Expense", ".", "MESSAGE_CONSTRAINTS", ")", ";", "}", "final", "Expense", "modelExpense", "=", "new", "Expense", "(", "expense", ")", ";", "if", "(", "income", "==", "null", ")", "{", "throw", "new", "IllegalValueException", "(", "String", ".", "format", "(", "MISSING_FIELD_MESSAGE_FORMAT", ",", "Income", ".", "class", ".", "getSimpleName", "(", ")", ")", ")", ";", "}", "if", "(", "!", "Income", ".", "isValidAmount", "(", "income", ")", ")", "{", "throw", "new", "IllegalValueException", "(", "Income", ".", "MESSAGE_CONSTRAINTS", ")", ";", "}", "final", "Income", "modelIncome", "=", "new", "Income", "(", "income", ")", ";", "return", "new", "MonthlyData", "(", "\"1\"", ",", "modelBudget", ",", "modelExpense", ",", "modelIncome", ")", ";", "}" ]
Converts this Jackson-friendly adapted monthly data object into the model's {@code MonthlyData} object.
[ "Converts", "this", "Jackson", "-", "friendly", "adapted", "monthly", "data", "object", "into", "the", "model", "'", "s", "{", "@code", "MonthlyData", "}", "object", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 10337, 715, 751, 358, 1488, 559, 1435, 1216, 2141, 9738, 288, 203, 203, 3639, 309, 261, 70, 8562, 422, 446, 13, 288, 203, 5411, 604, 394, 2141, 9738, 12, 780, 18, 2139, 12, 19466, 67, 6776, 67, 8723, 67, 7254, 16, 25099, 18, 1106, 18, 588, 5784, 461, 1435, 10019, 203, 3639, 289, 203, 3639, 309, 16051, 16124, 18, 26810, 6275, 12, 70, 8562, 3719, 288, 203, 5411, 604, 394, 2141, 9738, 12, 16124, 18, 8723, 67, 15199, 55, 1769, 203, 3639, 289, 203, 3639, 727, 25099, 938, 16124, 273, 394, 25099, 12, 70, 8562, 1769, 203, 203, 3639, 309, 261, 338, 1907, 307, 422, 446, 13, 288, 203, 5411, 604, 394, 2141, 9738, 12, 780, 18, 2139, 12, 19466, 67, 6776, 67, 8723, 67, 7254, 16, 1312, 1907, 307, 18, 1106, 18, 588, 5784, 461, 1435, 10019, 203, 3639, 289, 203, 3639, 309, 16051, 424, 1907, 307, 18, 26810, 6275, 12, 338, 1907, 307, 3719, 288, 203, 5411, 604, 394, 2141, 9738, 12, 424, 1907, 307, 18, 8723, 67, 15199, 55, 1769, 203, 3639, 289, 203, 3639, 727, 1312, 1907, 307, 938, 424, 1907, 307, 273, 394, 1312, 1907, 307, 12, 338, 1907, 307, 1769, 203, 203, 3639, 309, 261, 267, 5624, 422, 446, 13, 288, 203, 5411, 604, 394, 2141, 9738, 12, 780, 18, 2139, 12, 19466, 67, 6776, 67, 8723, 67, 7254, 16, 657, 5624, 18, 1106, 18, 588, 5784, 461, 1435, 10019, 203, 3639, 289, 203, 3639, 309, 16051, 382, 5624, 18, 26810, 6275, 12, 267, 5624, 3719, 288, 203, 5411, 604, 394, 2141, 9738, 12, 382, 5624, 18, 8723, 67, 15199, 55, 1769, 203, 3639, 289, 203, 3639, 727, 657, 5624, 938, 382, 5624, 273, 394, 657, 5624, 12, 267, 5624, 1769, 203, 203, 3639, 327, 394, 10337, 715, 751, 2932, 21, 3113, 938, 16124, 16, 938, 424, 1907, 307, 16, 938, 382, 5624, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 20377, 333, 804, 23764, 17, 29111, 28345, 31114, 501, 733, 1368, 326, 938, 1807, 8901, 710, 10337, 715, 751, 97, 733, 18, 203, 377, 380, 203, 377, 380, 632, 15069, 2141, 9738, 309, 1915, 4591, 1281, 501, 6237, 26889, 316, 326, 28345, 2492, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
2c7017861e2c7abf81ef639c21fd89aa042b62f6
BenFheng/main
src/main/java/seedu/expensela/ui/CommandBox.java
[ "MIT" ]
Java
handleCommandEntered
null
@FXML private void handleCommandEntered() { try { String command = commandTextField.getText(); commandExecutor.execute(command); logic.deleteFromCommandHistory(command); logic.addToCommandHistory(command); offset = -1; commandTextField.setText(""); } catch (CommandException | ParseException e) { setStyleToIndicateCommandFailure(); } }
/** * Handles the Enter button pressed event. */
Handles the Enter button pressed event.
[ "Handles", "the", "Enter", "button", "pressed", "event", "." ]
@FXML private void handleCommandEntered() { try { String command = commandTextField.getText(); commandExecutor.execute(command); logic.deleteFromCommandHistory(command); logic.addToCommandHistory(command); offset = -1; commandTextField.setText(""); } catch (CommandException | ParseException e) { setStyleToIndicateCommandFailure(); } }
[ "@", "FXML", "private", "void", "handleCommandEntered", "(", ")", "{", "try", "{", "String", "command", "=", "commandTextField", ".", "getText", "(", ")", ";", "commandExecutor", ".", "execute", "(", "command", ")", ";", "logic", ".", "deleteFromCommandHistory", "(", "command", ")", ";", "logic", ".", "addToCommandHistory", "(", "command", ")", ";", "offset", "=", "-", "1", ";", "commandTextField", ".", "setText", "(", "\"\"", ")", ";", "}", "catch", "(", "CommandException", "|", "ParseException", "e", ")", "{", "setStyleToIndicateCommandFailure", "(", ")", ";", "}", "}" ]
Handles the Enter button pressed event.
[ "Handles", "the", "Enter", "button", "pressed", "event", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 632, 42, 4201, 203, 565, 3238, 918, 1640, 2189, 10237, 329, 1435, 288, 203, 3639, 775, 288, 203, 5411, 514, 1296, 273, 1296, 16157, 18, 588, 1528, 5621, 203, 5411, 1296, 6325, 18, 8837, 12, 3076, 1769, 203, 5411, 4058, 18, 3733, 1265, 2189, 5623, 12, 3076, 1769, 203, 5411, 4058, 18, 1289, 774, 2189, 5623, 12, 3076, 1769, 203, 5411, 1384, 273, 300, 21, 31, 203, 5411, 1296, 16157, 18, 542, 1528, 2932, 8863, 203, 3639, 289, 1044, 261, 2189, 503, 571, 10616, 425, 13, 288, 203, 5411, 18995, 774, 3866, 2659, 2189, 5247, 5621, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 27020, 326, 15439, 3568, 19504, 871, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d07a48872aa01549dc2f1b073339e52280289696
BenFheng/main
src/main/java/seedu/expensela/MainApp.java
[ "MIT" ]
Java
initModelManager
Model
private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs, ReadOnlyGlobalData globalData) { Optional<ReadOnlyExpenseLa> expenseLaOptional; ReadOnlyExpenseLa initialData; try { expenseLaOptional = storage.readExpenseLa(); if (!expenseLaOptional.isPresent()) { logger.info("Data file not found. Will be starting with a sample ExpenseLa"); } initialData = expenseLaOptional.orElseGet(SampleDataUtil::getSampleExpenseLa); } catch (DataConversionException e) { logger.warning("Data file not in the correct format. Will be starting with an empty ExpenseLa"); initialData = new ExpenseLa(); } catch (IOException e) { logger.warning("Problem while reading from the file. Will be starting with an empty ExpenseLa"); initialData = new ExpenseLa(); } return new ModelManager(initialData, userPrefs, globalData); }
/** * Returns a {@code ModelManager} with the data from {@code storage}'s expensela and {@code userPrefs}. <br> * The data from the sample expensela will be used instead if {@code storage}'s expensela is not found, * or an empty expensela will be used instead if errors occur when reading {@code storage}'s expensela. */
Returns a ModelManager with the data from storage's expensela and userPrefs. The data from the sample expensela will be used instead if storage's expensela is not found, or an empty expensela will be used instead if errors occur when reading storage's expensela.
[ "Returns", "a", "ModelManager", "with", "the", "data", "from", "storage", "'", "s", "expensela", "and", "userPrefs", ".", "The", "data", "from", "the", "sample", "expensela", "will", "be", "used", "instead", "if", "storage", "'", "s", "expensela", "is", "not", "found", "or", "an", "empty", "expensela", "will", "be", "used", "instead", "if", "errors", "occur", "when", "reading", "storage", "'", "s", "expensela", "." ]
private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs, ReadOnlyGlobalData globalData) { Optional<ReadOnlyExpenseLa> expenseLaOptional; ReadOnlyExpenseLa initialData; try { expenseLaOptional = storage.readExpenseLa(); if (!expenseLaOptional.isPresent()) { logger.info("Data file not found. Will be starting with a sample ExpenseLa"); } initialData = expenseLaOptional.orElseGet(SampleDataUtil::getSampleExpenseLa); } catch (DataConversionException e) { logger.warning("Data file not in the correct format. Will be starting with an empty ExpenseLa"); initialData = new ExpenseLa(); } catch (IOException e) { logger.warning("Problem while reading from the file. Will be starting with an empty ExpenseLa"); initialData = new ExpenseLa(); } return new ModelManager(initialData, userPrefs, globalData); }
[ "private", "Model", "initModelManager", "(", "Storage", "storage", ",", "ReadOnlyUserPrefs", "userPrefs", ",", "ReadOnlyGlobalData", "globalData", ")", "{", "Optional", "<", "ReadOnlyExpenseLa", ">", "expenseLaOptional", ";", "ReadOnlyExpenseLa", "initialData", ";", "try", "{", "expenseLaOptional", "=", "storage", ".", "readExpenseLa", "(", ")", ";", "if", "(", "!", "expenseLaOptional", ".", "isPresent", "(", ")", ")", "{", "logger", ".", "info", "(", "\"Data file not found. Will be starting with a sample ExpenseLa\"", ")", ";", "}", "initialData", "=", "expenseLaOptional", ".", "orElseGet", "(", "SampleDataUtil", "::", "getSampleExpenseLa", ")", ";", "}", "catch", "(", "DataConversionException", "e", ")", "{", "logger", ".", "warning", "(", "\"Data file not in the correct format. Will be starting with an empty ExpenseLa\"", ")", ";", "initialData", "=", "new", "ExpenseLa", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "logger", ".", "warning", "(", "\"Problem while reading from the file. Will be starting with an empty ExpenseLa\"", ")", ";", "initialData", "=", "new", "ExpenseLa", "(", ")", ";", "}", "return", "new", "ModelManager", "(", "initialData", ",", "userPrefs", ",", "globalData", ")", ";", "}" ]
Returns a {@code ModelManager} with the data from {@code storage}'s expensela and {@code userPrefs}.
[ "Returns", "a", "{", "@code", "ModelManager", "}", "with", "the", "data", "from", "{", "@code", "storage", "}", "'", "s", "expensela", "and", "{", "@code", "userPrefs", "}", "." ]
[]
[ { "param": "storage", "type": "Storage" }, { "param": "userPrefs", "type": "ReadOnlyUserPrefs" }, { "param": "globalData", "type": "ReadOnlyGlobalData" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "storage", "type": "Storage", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "userPrefs", "type": "ReadOnlyUserPrefs", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "globalData", "type": "ReadOnlyGlobalData", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 3164, 1208, 1488, 1318, 12, 3245, 2502, 16, 20617, 1299, 1386, 2556, 729, 1386, 2556, 16, 20617, 5160, 751, 2552, 751, 13, 288, 203, 3639, 4055, 32, 12066, 424, 1907, 307, 30745, 34, 1329, 3558, 30745, 6542, 31, 203, 3639, 20617, 424, 1907, 307, 30745, 2172, 751, 31, 203, 3639, 775, 288, 203, 5411, 1329, 3558, 30745, 6542, 273, 2502, 18, 896, 424, 1907, 307, 30745, 5621, 203, 5411, 309, 16051, 338, 1907, 307, 30745, 6542, 18, 291, 6351, 10756, 288, 203, 7734, 1194, 18, 1376, 2932, 751, 585, 486, 1392, 18, 9980, 506, 5023, 598, 279, 3296, 1312, 1907, 307, 30745, 8863, 203, 5411, 289, 203, 5411, 2172, 751, 273, 1329, 3558, 30745, 6542, 18, 280, 12427, 967, 12, 8504, 751, 1304, 2866, 588, 8504, 424, 1907, 307, 30745, 1769, 203, 3639, 289, 1044, 261, 751, 6814, 503, 425, 13, 288, 203, 5411, 1194, 18, 8551, 2932, 751, 585, 486, 316, 326, 3434, 740, 18, 9980, 506, 5023, 598, 392, 1008, 1312, 1907, 307, 30745, 8863, 203, 5411, 2172, 751, 273, 394, 1312, 1907, 307, 30745, 5621, 203, 3639, 289, 1044, 261, 14106, 425, 13, 288, 203, 5411, 1194, 18, 8551, 2932, 13719, 1323, 6453, 628, 326, 585, 18, 9980, 506, 5023, 598, 392, 1008, 1312, 1907, 307, 30745, 8863, 203, 5411, 2172, 751, 273, 394, 1312, 1907, 307, 30745, 5621, 203, 3639, 289, 203, 203, 3639, 327, 394, 3164, 1318, 12, 6769, 751, 16, 729, 1386, 2556, 16, 2552, 751, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2860, 279, 8901, 710, 3164, 1318, 97, 598, 326, 501, 628, 8901, 710, 2502, 1713, 87, 1329, 773, 292, 69, 471, 8901, 710, 729, 1386, 2556, 5496, 411, 2848, 34, 203, 377, 380, 1021, 501, 628, 326, 3296, 1329, 773, 292, 69, 903, 506, 1399, 3560, 309, 8901, 710, 2502, 1713, 87, 1329, 773, 292, 69, 353, 486, 1392, 16, 203, 377, 380, 578, 392, 1008, 1329, 773, 292, 69, 903, 506, 1399, 3560, 309, 1334, 3334, 1347, 6453, 8901, 710, 2502, 1713, 87, 1329, 773, 292, 69, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d07a48872aa01549dc2f1b073339e52280289696
BenFheng/main
src/main/java/seedu/expensela/MainApp.java
[ "MIT" ]
Java
dateCheck
null
private void dateCheck(Model model) { LocalDate today = LocalDate.now(); GlobalData globalData = model.getGlobalData(); if (globalData.getLastUpdatedDate().isBefore(today)) { int from = 0; if (today.getMonthValue() > globalData.getLastUpdatedDate().getMonthValue()) { model.setMonthlyData(new MonthlyData("1", globalData.getRecurringBudget())); from = 1; } else { from = globalData.getLastUpdatedDate().getDayOfMonth(); } int to = today.getDayOfMonth(); for (Transaction t : globalData.getRecurringTransactionList()) { if (t.getDate().transactionDate.getDayOfMonth() > from && t.getDate().transactionDate.getDayOfMonth() <= to) { model.addTransaction(new Transaction( t.getName(), t.getAmount(), t.getDate(), t.getRemark(), t.getCategory() )); } } } globalData.setLastUpdatedDate(LocalDate.now()); }
/** * Perform a check on when was the last time user updates the app and updates * budget and transaction accordingly from recurring budget variable and recurring transactions * list * @param model */
Perform a check on when was the last time user updates the app and updates budget and transaction accordingly from recurring budget variable and recurring transactions list @param model
[ "Perform", "a", "check", "on", "when", "was", "the", "last", "time", "user", "updates", "the", "app", "and", "updates", "budget", "and", "transaction", "accordingly", "from", "recurring", "budget", "variable", "and", "recurring", "transactions", "list", "@param", "model" ]
private void dateCheck(Model model) { LocalDate today = LocalDate.now(); GlobalData globalData = model.getGlobalData(); if (globalData.getLastUpdatedDate().isBefore(today)) { int from = 0; if (today.getMonthValue() > globalData.getLastUpdatedDate().getMonthValue()) { model.setMonthlyData(new MonthlyData("1", globalData.getRecurringBudget())); from = 1; } else { from = globalData.getLastUpdatedDate().getDayOfMonth(); } int to = today.getDayOfMonth(); for (Transaction t : globalData.getRecurringTransactionList()) { if (t.getDate().transactionDate.getDayOfMonth() > from && t.getDate().transactionDate.getDayOfMonth() <= to) { model.addTransaction(new Transaction( t.getName(), t.getAmount(), t.getDate(), t.getRemark(), t.getCategory() )); } } } globalData.setLastUpdatedDate(LocalDate.now()); }
[ "private", "void", "dateCheck", "(", "Model", "model", ")", "{", "LocalDate", "today", "=", "LocalDate", ".", "now", "(", ")", ";", "GlobalData", "globalData", "=", "model", ".", "getGlobalData", "(", ")", ";", "if", "(", "globalData", ".", "getLastUpdatedDate", "(", ")", ".", "isBefore", "(", "today", ")", ")", "{", "int", "from", "=", "0", ";", "if", "(", "today", ".", "getMonthValue", "(", ")", ">", "globalData", ".", "getLastUpdatedDate", "(", ")", ".", "getMonthValue", "(", ")", ")", "{", "model", ".", "setMonthlyData", "(", "new", "MonthlyData", "(", "\"1\"", ",", "globalData", ".", "getRecurringBudget", "(", ")", ")", ")", ";", "from", "=", "1", ";", "}", "else", "{", "from", "=", "globalData", ".", "getLastUpdatedDate", "(", ")", ".", "getDayOfMonth", "(", ")", ";", "}", "int", "to", "=", "today", ".", "getDayOfMonth", "(", ")", ";", "for", "(", "Transaction", "t", ":", "globalData", ".", "getRecurringTransactionList", "(", ")", ")", "{", "if", "(", "t", ".", "getDate", "(", ")", ".", "transactionDate", ".", "getDayOfMonth", "(", ")", ">", "from", "&&", "t", ".", "getDate", "(", ")", ".", "transactionDate", ".", "getDayOfMonth", "(", ")", "<=", "to", ")", "{", "model", ".", "addTransaction", "(", "new", "Transaction", "(", "t", ".", "getName", "(", ")", ",", "t", ".", "getAmount", "(", ")", ",", "t", ".", "getDate", "(", ")", ",", "t", ".", "getRemark", "(", ")", ",", "t", ".", "getCategory", "(", ")", ")", ")", ";", "}", "}", "}", "globalData", ".", "setLastUpdatedDate", "(", "LocalDate", ".", "now", "(", ")", ")", ";", "}" ]
Perform a check on when was the last time user updates the app and updates budget and transaction accordingly from recurring budget variable and recurring transactions list @param model
[ "Perform", "a", "check", "on", "when", "was", "the", "last", "time", "user", "updates", "the", "app", "and", "updates", "budget", "and", "transaction", "accordingly", "from", "recurring", "budget", "variable", "and", "recurring", "transactions", "list", "@param", "model" ]
[]
[ { "param": "model", "type": "Model" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "model", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 1509, 1564, 12, 1488, 938, 13, 288, 203, 3639, 15815, 10074, 273, 15815, 18, 3338, 5621, 203, 3639, 8510, 751, 2552, 751, 273, 938, 18, 588, 5160, 751, 5621, 203, 3639, 309, 261, 6347, 751, 18, 588, 3024, 7381, 1626, 7675, 291, 4649, 12, 30064, 3719, 288, 203, 5411, 509, 628, 273, 374, 31, 203, 5411, 309, 261, 30064, 18, 588, 5445, 620, 1435, 405, 2552, 751, 18, 588, 3024, 7381, 1626, 7675, 588, 5445, 620, 10756, 288, 203, 7734, 938, 18, 542, 5445, 715, 751, 12, 2704, 10337, 715, 751, 2932, 21, 3113, 2552, 751, 18, 588, 426, 21179, 16124, 1435, 10019, 203, 7734, 628, 273, 404, 31, 203, 5411, 289, 469, 288, 203, 7734, 628, 273, 2552, 751, 18, 588, 3024, 7381, 1626, 7675, 588, 4245, 14941, 5621, 203, 5411, 289, 203, 5411, 509, 358, 273, 10074, 18, 588, 4245, 14941, 5621, 203, 5411, 364, 261, 3342, 268, 294, 2552, 751, 18, 588, 426, 21179, 3342, 682, 10756, 288, 203, 7734, 309, 261, 88, 18, 588, 1626, 7675, 7958, 1626, 18, 588, 4245, 14941, 1435, 405, 628, 203, 13491, 597, 268, 18, 588, 1626, 7675, 7958, 1626, 18, 588, 4245, 14941, 1435, 1648, 358, 13, 288, 203, 10792, 938, 18, 1289, 3342, 12, 2704, 5947, 12, 203, 18701, 268, 18, 17994, 9334, 268, 18, 588, 6275, 9334, 268, 18, 588, 1626, 9334, 268, 18, 588, 1933, 1313, 9334, 268, 18, 588, 4457, 1435, 203, 10792, 262, 1769, 203, 7734, 289, 203, 5411, 289, 203, 3639, 289, 203, 3639, 2552, 751, 18, 542, 3024, 7381, 1626, 12, 2042, 1626, 18, 3338, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 11217, 279, 866, 603, 1347, 1703, 326, 1142, 813, 729, 4533, 326, 595, 471, 4533, 203, 377, 380, 15051, 471, 2492, 15905, 628, 26043, 15051, 2190, 471, 26043, 8938, 203, 377, 380, 666, 203, 377, 380, 632, 891, 938, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d07a48872aa01549dc2f1b073339e52280289696
BenFheng/main
src/main/java/seedu/expensela/MainApp.java
[ "MIT" ]
Java
initPrefs
UserPrefs
protected UserPrefs initPrefs(UserPrefsStorage storage) { Path prefsFilePath = storage.getUserPrefsFilePath(); logger.info("Using prefs file : " + prefsFilePath); UserPrefs initializedPrefs; try { Optional<UserPrefs> prefsOptional = storage.readUserPrefs(); initializedPrefs = prefsOptional.orElse(new UserPrefs()); } catch (DataConversionException e) { logger.warning("UserPrefs file at " + prefsFilePath + " is not in the correct format. " + "Using default user prefs"); initializedPrefs = new UserPrefs(); } catch (IOException e) { logger.warning("Problem while reading from the file. Will be starting with an empty ExpenseLa"); initializedPrefs = new UserPrefs(); } //Update prefs file in case it was missing to begin with or there are new/unused fields try { storage.saveUserPrefs(initializedPrefs); } catch (IOException e) { logger.warning("Failed to save config file : " + StringUtil.getDetails(e)); } return initializedPrefs; }
/** * Returns a {@code UserPrefs} using the file at {@code storage}'s user prefs file path, * or a new {@code UserPrefs} with default configuration if errors occur when * reading from the file. */
Returns a UserPrefs using the file at storage's user prefs file path, or a new UserPrefs with default configuration if errors occur when reading from the file.
[ "Returns", "a", "UserPrefs", "using", "the", "file", "at", "storage", "'", "s", "user", "prefs", "file", "path", "or", "a", "new", "UserPrefs", "with", "default", "configuration", "if", "errors", "occur", "when", "reading", "from", "the", "file", "." ]
protected UserPrefs initPrefs(UserPrefsStorage storage) { Path prefsFilePath = storage.getUserPrefsFilePath(); logger.info("Using prefs file : " + prefsFilePath); UserPrefs initializedPrefs; try { Optional<UserPrefs> prefsOptional = storage.readUserPrefs(); initializedPrefs = prefsOptional.orElse(new UserPrefs()); } catch (DataConversionException e) { logger.warning("UserPrefs file at " + prefsFilePath + " is not in the correct format. " + "Using default user prefs"); initializedPrefs = new UserPrefs(); } catch (IOException e) { logger.warning("Problem while reading from the file. Will be starting with an empty ExpenseLa"); initializedPrefs = new UserPrefs(); } try { storage.saveUserPrefs(initializedPrefs); } catch (IOException e) { logger.warning("Failed to save config file : " + StringUtil.getDetails(e)); } return initializedPrefs; }
[ "protected", "UserPrefs", "initPrefs", "(", "UserPrefsStorage", "storage", ")", "{", "Path", "prefsFilePath", "=", "storage", ".", "getUserPrefsFilePath", "(", ")", ";", "logger", ".", "info", "(", "\"Using prefs file : \"", "+", "prefsFilePath", ")", ";", "UserPrefs", "initializedPrefs", ";", "try", "{", "Optional", "<", "UserPrefs", ">", "prefsOptional", "=", "storage", ".", "readUserPrefs", "(", ")", ";", "initializedPrefs", "=", "prefsOptional", ".", "orElse", "(", "new", "UserPrefs", "(", ")", ")", ";", "}", "catch", "(", "DataConversionException", "e", ")", "{", "logger", ".", "warning", "(", "\"UserPrefs file at \"", "+", "prefsFilePath", "+", "\" is not in the correct format. \"", "+", "\"Using default user prefs\"", ")", ";", "initializedPrefs", "=", "new", "UserPrefs", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "logger", ".", "warning", "(", "\"Problem while reading from the file. Will be starting with an empty ExpenseLa\"", ")", ";", "initializedPrefs", "=", "new", "UserPrefs", "(", ")", ";", "}", "try", "{", "storage", ".", "saveUserPrefs", "(", "initializedPrefs", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "logger", ".", "warning", "(", "\"Failed to save config file : \"", "+", "StringUtil", ".", "getDetails", "(", "e", ")", ")", ";", "}", "return", "initializedPrefs", ";", "}" ]
Returns a {@code UserPrefs} using the file at {@code storage}'s user prefs file path, or a new {@code UserPrefs} with default configuration if errors occur when reading from the file.
[ "Returns", "a", "{", "@code", "UserPrefs", "}", "using", "the", "file", "at", "{", "@code", "storage", "}", "'", "s", "user", "prefs", "file", "path", "or", "a", "new", "{", "@code", "UserPrefs", "}", "with", "default", "configuration", "if", "errors", "occur", "when", "reading", "from", "the", "file", "." ]
[ "//Update prefs file in case it was missing to begin with or there are new/unused fields" ]
[ { "param": "storage", "type": "UserPrefsStorage" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "storage", "type": "UserPrefsStorage", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 2177, 1386, 2556, 1208, 1386, 2556, 12, 1299, 1386, 2556, 3245, 2502, 13, 288, 203, 3639, 2666, 15503, 5598, 273, 2502, 18, 588, 1299, 1386, 2556, 5598, 5621, 203, 3639, 1194, 18, 1376, 2932, 7736, 15503, 585, 294, 315, 397, 15503, 5598, 1769, 203, 203, 3639, 2177, 1386, 2556, 6454, 1386, 2556, 31, 203, 3639, 775, 288, 203, 5411, 4055, 32, 1299, 1386, 2556, 34, 15503, 6542, 273, 2502, 18, 896, 1299, 1386, 2556, 5621, 203, 5411, 6454, 1386, 2556, 273, 15503, 6542, 18, 280, 12427, 12, 2704, 2177, 1386, 2556, 10663, 203, 3639, 289, 1044, 261, 751, 6814, 503, 425, 13, 288, 203, 5411, 1194, 18, 8551, 2932, 1299, 1386, 2556, 585, 622, 315, 397, 15503, 5598, 397, 315, 353, 486, 316, 326, 3434, 740, 18, 315, 203, 10792, 397, 315, 7736, 805, 729, 15503, 8863, 203, 5411, 6454, 1386, 2556, 273, 394, 2177, 1386, 2556, 5621, 203, 3639, 289, 1044, 261, 14106, 425, 13, 288, 203, 5411, 1194, 18, 8551, 2932, 13719, 1323, 6453, 628, 326, 585, 18, 9980, 506, 5023, 598, 392, 1008, 1312, 1907, 307, 30745, 8863, 203, 5411, 6454, 1386, 2556, 273, 394, 2177, 1386, 2556, 5621, 203, 3639, 289, 203, 203, 3639, 368, 1891, 15503, 585, 316, 648, 518, 1703, 3315, 358, 2376, 598, 578, 1915, 854, 394, 19, 14375, 1466, 203, 3639, 775, 288, 203, 5411, 2502, 18, 5688, 1299, 1386, 2556, 12, 13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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2860, 279, 8901, 710, 2177, 1386, 2556, 97, 1450, 326, 585, 622, 8901, 710, 2502, 1713, 87, 729, 15503, 585, 589, 16, 203, 377, 380, 578, 279, 394, 8901, 710, 2177, 1386, 2556, 97, 598, 805, 1664, 309, 1334, 3334, 1347, 203, 377, 380, 6453, 628, 326, 585, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
d07a48872aa01549dc2f1b073339e52280289696
BenFheng/main
src/main/java/seedu/expensela/MainApp.java
[ "MIT" ]
Java
initGlobalData
GlobalData
protected GlobalData initGlobalData(GlobalDataStorage storage) { Path globalDataFilePath = storage.getGlobalDataFilePath(); logger.info("Using global data file : " + globalDataFilePath); GlobalData initializedGlobalData; try { Optional<GlobalData> globalDataOptional = storage.readGlobalData(); initializedGlobalData = globalDataOptional.orElse(new GlobalData()); } catch (DataConversionException e) { logger.warning("UserPrefs file at " + globalDataFilePath + " is not in the correct format. " + "Using default global data"); initializedGlobalData = new GlobalData(); } catch (IOException e) { logger.warning("Problem while reading from the file. Will be starting with an empty ExpenseLa"); initializedGlobalData = new GlobalData(); } //Update prefs file in case it was missing to begin with or there are new/unused fields try { storage.saveGlobalData(initializedGlobalData); } catch (IOException e) { logger.warning("Failed to save config file : " + StringUtil.getDetails(e)); } return initializedGlobalData; }
/** * Returns a {@code GlobalData} using the file at {@code storage}'s global data's file path, * or a new {@code GlobalData} with default configuration if errors occur when * reading from the file. */
Returns a GlobalData using the file at storage's global data's file path, or a new GlobalData with default configuration if errors occur when reading from the file.
[ "Returns", "a", "GlobalData", "using", "the", "file", "at", "storage", "'", "s", "global", "data", "'", "s", "file", "path", "or", "a", "new", "GlobalData", "with", "default", "configuration", "if", "errors", "occur", "when", "reading", "from", "the", "file", "." ]
protected GlobalData initGlobalData(GlobalDataStorage storage) { Path globalDataFilePath = storage.getGlobalDataFilePath(); logger.info("Using global data file : " + globalDataFilePath); GlobalData initializedGlobalData; try { Optional<GlobalData> globalDataOptional = storage.readGlobalData(); initializedGlobalData = globalDataOptional.orElse(new GlobalData()); } catch (DataConversionException e) { logger.warning("UserPrefs file at " + globalDataFilePath + " is not in the correct format. " + "Using default global data"); initializedGlobalData = new GlobalData(); } catch (IOException e) { logger.warning("Problem while reading from the file. Will be starting with an empty ExpenseLa"); initializedGlobalData = new GlobalData(); } try { storage.saveGlobalData(initializedGlobalData); } catch (IOException e) { logger.warning("Failed to save config file : " + StringUtil.getDetails(e)); } return initializedGlobalData; }
[ "protected", "GlobalData", "initGlobalData", "(", "GlobalDataStorage", "storage", ")", "{", "Path", "globalDataFilePath", "=", "storage", ".", "getGlobalDataFilePath", "(", ")", ";", "logger", ".", "info", "(", "\"Using global data file : \"", "+", "globalDataFilePath", ")", ";", "GlobalData", "initializedGlobalData", ";", "try", "{", "Optional", "<", "GlobalData", ">", "globalDataOptional", "=", "storage", ".", "readGlobalData", "(", ")", ";", "initializedGlobalData", "=", "globalDataOptional", ".", "orElse", "(", "new", "GlobalData", "(", ")", ")", ";", "}", "catch", "(", "DataConversionException", "e", ")", "{", "logger", ".", "warning", "(", "\"UserPrefs file at \"", "+", "globalDataFilePath", "+", "\" is not in the correct format. \"", "+", "\"Using default global data\"", ")", ";", "initializedGlobalData", "=", "new", "GlobalData", "(", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "logger", ".", "warning", "(", "\"Problem while reading from the file. Will be starting with an empty ExpenseLa\"", ")", ";", "initializedGlobalData", "=", "new", "GlobalData", "(", ")", ";", "}", "try", "{", "storage", ".", "saveGlobalData", "(", "initializedGlobalData", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "logger", ".", "warning", "(", "\"Failed to save config file : \"", "+", "StringUtil", ".", "getDetails", "(", "e", ")", ")", ";", "}", "return", "initializedGlobalData", ";", "}" ]
Returns a {@code GlobalData} using the file at {@code storage}'s global data's file path, or a new {@code GlobalData} with default configuration if errors occur when reading from the file.
[ "Returns", "a", "{", "@code", "GlobalData", "}", "using", "the", "file", "at", "{", "@code", "storage", "}", "'", "s", "global", "data", "'", "s", "file", "path", "or", "a", "new", "{", "@code", "GlobalData", "}", "with", "default", "configuration", "if", "errors", "occur", "when", "reading", "from", "the", "file", "." ]
[ "//Update prefs file in case it was missing to begin with or there are new/unused fields" ]
[ { "param": "storage", "type": "GlobalDataStorage" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "storage", "type": "GlobalDataStorage", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 4750, 8510, 751, 1208, 5160, 751, 12, 5160, 751, 3245, 2502, 13, 288, 203, 3639, 2666, 2552, 751, 5598, 273, 2502, 18, 588, 5160, 751, 5598, 5621, 203, 3639, 1194, 18, 1376, 2932, 7736, 2552, 501, 585, 294, 315, 397, 2552, 751, 5598, 1769, 203, 203, 3639, 8510, 751, 6454, 5160, 751, 31, 203, 3639, 775, 288, 203, 5411, 4055, 32, 5160, 751, 34, 2552, 751, 6542, 273, 2502, 18, 896, 5160, 751, 5621, 203, 5411, 6454, 5160, 751, 273, 2552, 751, 6542, 18, 280, 12427, 12, 2704, 8510, 751, 10663, 203, 3639, 289, 1044, 261, 751, 6814, 503, 425, 13, 288, 203, 5411, 1194, 18, 8551, 2932, 1299, 1386, 2556, 585, 622, 315, 397, 2552, 751, 5598, 397, 315, 353, 486, 316, 326, 3434, 740, 18, 315, 203, 10792, 397, 315, 7736, 805, 2552, 501, 8863, 203, 5411, 6454, 5160, 751, 273, 394, 8510, 751, 5621, 203, 3639, 289, 1044, 261, 14106, 425, 13, 288, 203, 5411, 1194, 18, 8551, 2932, 13719, 1323, 6453, 628, 326, 585, 18, 9980, 506, 5023, 598, 392, 1008, 1312, 1907, 307, 30745, 8863, 203, 5411, 6454, 5160, 751, 273, 394, 8510, 751, 5621, 203, 3639, 289, 203, 203, 3639, 368, 1891, 15503, 585, 316, 648, 518, 1703, 3315, 358, 2376, 598, 578, 1915, 854, 394, 19, 14375, 1466, 203, 3639, 775, 288, 203, 5411, 2502, 18, 5688, 5160, 751, 12, 13227, 5160, 751, 1769, 203, 3639, 289, 1044, 261, 14106, 425, 13, 288, 203, 5411, 1194, 18, 8551, 2932, 2925, 358, 1923, 642, 585, 294, 315, 397, 14205, 18, 588, 3790, 12, 73, 10019, 203, 3639, 289, 203, 203, 3639, 327, 6454, 5160, 751, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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, 377, 380, 578, 279, 394, 8901, 710, 8510, 751, 97, 598, 805, 1664, 309, 1334, 3334, 1347, 203, 377, 380, 6453, 628, 326, 585, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
844a002fe1e77c72c53d35437a1369e679b7c512
BenFheng/main
src/main/java/seedu/expensela/model/Filter.java
[ "MIT" ]
Java
isFilterMonth
null
public boolean isFilterMonth() { if (getDateMonth().equals("ALL")) { return false; } else { return true; } }
/** * Checks if filter is currently by month or not * @return true is currently filtered by month, else false */
Checks if filter is currently by month or not @return true is currently filtered by month, else false
[ "Checks", "if", "filter", "is", "currently", "by", "month", "or", "not", "@return", "true", "is", "currently", "filtered", "by", "month", "else", "false" ]
public boolean isFilterMonth() { if (getDateMonth().equals("ALL")) { return false; } else { return true; } }
[ "public", "boolean", "isFilterMonth", "(", ")", "{", "if", "(", "getDateMonth", "(", ")", ".", "equals", "(", "\"ALL\"", ")", ")", "{", "return", "false", ";", "}", "else", "{", "return", "true", ";", "}", "}" ]
Checks if filter is currently by month or not @return true is currently filtered by month, else false
[ "Checks", "if", "filter", "is", "currently", "by", "month", "or", "not", "@return", "true", "is", "currently", "filtered", "by", "month", "else", "false" ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1250, 353, 1586, 5445, 1435, 288, 203, 3639, 309, 261, 588, 1626, 5445, 7675, 14963, 2932, 4685, 6, 3719, 288, 203, 5411, 327, 629, 31, 203, 3639, 289, 469, 288, 203, 5411, 327, 638, 31, 203, 3639, 289, 203, 565, 289, 2, 0, 0,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100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3c286cf4c5c0c78bda97e864c1d15b2e4b79593e
BenFheng/main
src/main/java/seedu/expensela/logic/commands/ImportCommand.java
[ "MIT" ]
Java
buildTransactionFromString
Transaction
private Transaction buildTransactionFromString(String string) { String[] transactionParam = string.split(","); Name name = new Name(transactionParam[0]); String[] splitAmount = transactionParam[1].split(""); Amount amount = null; String inputAmount = ""; if (splitAmount[0].equals("-")) { for (int i = 3; i < splitAmount.length; i++) { inputAmount += splitAmount[i]; } amount = new Amount(inputAmount, false); } else if (splitAmount[0].equals("+")) { for (int i = 3; i < splitAmount.length; i++) { inputAmount += splitAmount[i]; } amount = new Amount(inputAmount, true); } Date date = new Date(transactionParam[2]); Remark remark = new Remark(transactionParam[3]); Category category = new Category(transactionParam[4]); Transaction newTransaction = new Transaction(name, amount, date, remark, category); return newTransaction; }
/** * Creates a new transaction from line of CSV file * @param string String from csv * @return A transaction object after it is created with the right parameters */
Creates a new transaction from line of CSV file @param string String from csv @return A transaction object after it is created with the right parameters
[ "Creates", "a", "new", "transaction", "from", "line", "of", "CSV", "file", "@param", "string", "String", "from", "csv", "@return", "A", "transaction", "object", "after", "it", "is", "created", "with", "the", "right", "parameters" ]
private Transaction buildTransactionFromString(String string) { String[] transactionParam = string.split(","); Name name = new Name(transactionParam[0]); String[] splitAmount = transactionParam[1].split(""); Amount amount = null; String inputAmount = ""; if (splitAmount[0].equals("-")) { for (int i = 3; i < splitAmount.length; i++) { inputAmount += splitAmount[i]; } amount = new Amount(inputAmount, false); } else if (splitAmount[0].equals("+")) { for (int i = 3; i < splitAmount.length; i++) { inputAmount += splitAmount[i]; } amount = new Amount(inputAmount, true); } Date date = new Date(transactionParam[2]); Remark remark = new Remark(transactionParam[3]); Category category = new Category(transactionParam[4]); Transaction newTransaction = new Transaction(name, amount, date, remark, category); return newTransaction; }
[ "private", "Transaction", "buildTransactionFromString", "(", "String", "string", ")", "{", "String", "[", "]", "transactionParam", "=", "string", ".", "split", "(", "\",\"", ")", ";", "Name", "name", "=", "new", "Name", "(", "transactionParam", "[", "0", "]", ")", ";", "String", "[", "]", "splitAmount", "=", "transactionParam", "[", "1", "]", ".", "split", "(", "\"\"", ")", ";", "Amount", "amount", "=", "null", ";", "String", "inputAmount", "=", "\"\"", ";", "if", "(", "splitAmount", "[", "0", "]", ".", "equals", "(", "\"-\"", ")", ")", "{", "for", "(", "int", "i", "=", "3", ";", "i", "<", "splitAmount", ".", "length", ";", "i", "++", ")", "{", "inputAmount", "+=", "splitAmount", "[", "i", "]", ";", "}", "amount", "=", "new", "Amount", "(", "inputAmount", ",", "false", ")", ";", "}", "else", "if", "(", "splitAmount", "[", "0", "]", ".", "equals", "(", "\"+\"", ")", ")", "{", "for", "(", "int", "i", "=", "3", ";", "i", "<", "splitAmount", ".", "length", ";", "i", "++", ")", "{", "inputAmount", "+=", "splitAmount", "[", "i", "]", ";", "}", "amount", "=", "new", "Amount", "(", "inputAmount", ",", "true", ")", ";", "}", "Date", "date", "=", "new", "Date", "(", "transactionParam", "[", "2", "]", ")", ";", "Remark", "remark", "=", "new", "Remark", "(", "transactionParam", "[", "3", "]", ")", ";", "Category", "category", "=", "new", "Category", "(", "transactionParam", "[", "4", "]", ")", ";", "Transaction", "newTransaction", "=", "new", "Transaction", "(", "name", ",", "amount", ",", "date", ",", "remark", ",", "category", ")", ";", "return", "newTransaction", ";", "}" ]
Creates a new transaction from line of CSV file @param string String from csv @return A transaction object after it is created with the right parameters
[ "Creates", "a", "new", "transaction", "from", "line", "of", "CSV", "file", "@param", "string", "String", "from", "csv", "@return", "A", "transaction", "object", "after", "it", "is", "created", "with", "the", "right", "parameters" ]
[]
[ { "param": "string", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "string", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 5947, 1361, 3342, 9193, 12, 780, 533, 13, 288, 203, 3639, 514, 8526, 2492, 786, 273, 533, 18, 4939, 2932, 16, 8863, 203, 3639, 1770, 508, 273, 394, 1770, 12, 7958, 786, 63, 20, 19226, 203, 3639, 514, 8526, 1416, 6275, 273, 2492, 786, 63, 21, 8009, 4939, 2932, 8863, 203, 3639, 16811, 3844, 273, 446, 31, 203, 3639, 514, 810, 6275, 273, 1408, 31, 203, 3639, 309, 261, 4939, 6275, 63, 20, 8009, 14963, 2932, 10951, 3719, 288, 203, 5411, 364, 261, 474, 277, 273, 890, 31, 277, 411, 1416, 6275, 18, 2469, 31, 277, 27245, 288, 203, 7734, 810, 6275, 1011, 1416, 6275, 63, 77, 15533, 203, 5411, 289, 203, 5411, 3844, 273, 394, 16811, 12, 2630, 6275, 16, 629, 1769, 203, 3639, 289, 469, 309, 261, 4939, 6275, 63, 20, 8009, 14963, 2932, 9078, 3719, 288, 203, 5411, 364, 261, 474, 277, 273, 890, 31, 277, 411, 1416, 6275, 18, 2469, 31, 277, 27245, 288, 203, 7734, 810, 6275, 1011, 1416, 6275, 63, 77, 15533, 203, 5411, 289, 203, 5411, 3844, 273, 394, 16811, 12, 2630, 6275, 16, 638, 1769, 203, 3639, 289, 203, 3639, 2167, 1509, 273, 394, 2167, 12, 7958, 786, 63, 22, 19226, 203, 3639, 2663, 1313, 849, 1313, 273, 394, 2663, 1313, 12, 7958, 786, 63, 23, 19226, 203, 3639, 9856, 3150, 273, 394, 9856, 12, 7958, 786, 63, 24, 19226, 203, 203, 3639, 5947, 394, 3342, 273, 394, 5947, 12, 529, 16, 3844, 16, 1509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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 10210, 279, 394, 2492, 628, 980, 434, 10381, 585, 203, 377, 380, 632, 891, 533, 514, 628, 6101, 203, 377, 380, 632, 2463, 432, 2492, 733, 1839, 518, 353, 2522, 598, 326, 2145, 1472, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
57b70a77026ec0e5dd1a67e8539be05ed9630baa
BenFheng/main
src/main/java/seedu/expensela/storage/JsonSerializableExpenseLa.java
[ "MIT" ]
Java
toModelType
ExpenseLa
public ExpenseLa toModelType() throws IllegalValueException { ExpenseLa expenseLa = new ExpenseLa(); for (JsonAdaptedTransaction jsonAdaptedTransaction : transactions) { Transaction transaction = jsonAdaptedTransaction.toModelType(); if (expenseLa.hasTransaction(transaction)) { throw new IllegalValueException(MESSAGE_DUPLICATE_TRANSACTION); } expenseLa.addTransaction(transaction); } MonthlyData monthlyData = this.monthlyData.toModelType(); expenseLa.setMonthlyData(monthlyData); return expenseLa; }
/** * Converts this expenseLa into the model's {@code ExpenseLa} object. * * @throws IllegalValueException if there were any data constraints violated. */
Converts this expenseLa into the model's ExpenseLa object. @throws IllegalValueException if there were any data constraints violated.
[ "Converts", "this", "expenseLa", "into", "the", "model", "'", "s", "ExpenseLa", "object", ".", "@throws", "IllegalValueException", "if", "there", "were", "any", "data", "constraints", "violated", "." ]
public ExpenseLa toModelType() throws IllegalValueException { ExpenseLa expenseLa = new ExpenseLa(); for (JsonAdaptedTransaction jsonAdaptedTransaction : transactions) { Transaction transaction = jsonAdaptedTransaction.toModelType(); if (expenseLa.hasTransaction(transaction)) { throw new IllegalValueException(MESSAGE_DUPLICATE_TRANSACTION); } expenseLa.addTransaction(transaction); } MonthlyData monthlyData = this.monthlyData.toModelType(); expenseLa.setMonthlyData(monthlyData); return expenseLa; }
[ "public", "ExpenseLa", "toModelType", "(", ")", "throws", "IllegalValueException", "{", "ExpenseLa", "expenseLa", "=", "new", "ExpenseLa", "(", ")", ";", "for", "(", "JsonAdaptedTransaction", "jsonAdaptedTransaction", ":", "transactions", ")", "{", "Transaction", "transaction", "=", "jsonAdaptedTransaction", ".", "toModelType", "(", ")", ";", "if", "(", "expenseLa", ".", "hasTransaction", "(", "transaction", ")", ")", "{", "throw", "new", "IllegalValueException", "(", "MESSAGE_DUPLICATE_TRANSACTION", ")", ";", "}", "expenseLa", ".", "addTransaction", "(", "transaction", ")", ";", "}", "MonthlyData", "monthlyData", "=", "this", ".", "monthlyData", ".", "toModelType", "(", ")", ";", "expenseLa", ".", "setMonthlyData", "(", "monthlyData", ")", ";", "return", "expenseLa", ";", "}" ]
Converts this expenseLa into the model's {@code ExpenseLa} object.
[ "Converts", "this", "expenseLa", "into", "the", "model", "'", "s", "{", "@code", "ExpenseLa", "}", "object", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 1312, 1907, 307, 30745, 358, 1488, 559, 1435, 1216, 2141, 9738, 288, 203, 3639, 1312, 1907, 307, 30745, 1329, 3558, 30745, 273, 394, 1312, 1907, 307, 30745, 5621, 203, 3639, 364, 261, 3185, 13716, 329, 3342, 1163, 13716, 329, 3342, 294, 8938, 13, 288, 203, 5411, 5947, 2492, 273, 1163, 13716, 329, 3342, 18, 869, 1488, 559, 5621, 203, 5411, 309, 261, 338, 1907, 307, 30745, 18, 5332, 3342, 12, 7958, 3719, 288, 203, 7734, 604, 394, 2141, 9738, 12, 8723, 67, 30387, 26042, 67, 22364, 1769, 203, 5411, 289, 203, 5411, 1329, 3558, 30745, 18, 1289, 3342, 12, 7958, 1769, 203, 3639, 289, 203, 3639, 10337, 715, 751, 31114, 751, 273, 333, 18, 7496, 715, 751, 18, 869, 1488, 559, 5621, 203, 3639, 1329, 3558, 30745, 18, 542, 5445, 715, 751, 12, 7496, 715, 751, 1769, 203, 3639, 327, 1329, 3558, 30745, 31, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 20377, 333, 1329, 3558, 30745, 1368, 326, 938, 1807, 8901, 710, 1312, 1907, 307, 30745, 97, 733, 18, 203, 377, 380, 203, 377, 380, 632, 15069, 2141, 9738, 309, 1915, 4591, 1281, 501, 6237, 26889, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cc205a88ef2074b2b568cd8f61c341ff69c47d84
BenFheng/main
src/main/java/seedu/expensela/storage/JsonSerializableGlobalData.java
[ "MIT" ]
Java
toModelType
GlobalData
public GlobalData toModelType() throws IllegalValueException { GlobalData globalData = new GlobalData(); for (JsonAdaptedTransaction jsonAdaptedTransaction : transactions) { Transaction transaction = jsonAdaptedTransaction.toModelType(); globalData.addTransaction(transaction); } globalData.setRecurringBudget(!budget.equals("null") ? new Budget(budget) : null); globalData.setLastUpdatedDate(LocalDate.parse(date)); globalData.setTotalBalance(new Balance(totalBalance)); return globalData; }
/** * Converts this globalData into the model's {@code GlobalData} object. * * @throws IllegalValueException if there were any data constraints violated. */
Converts this globalData into the model's GlobalData object. @throws IllegalValueException if there were any data constraints violated.
[ "Converts", "this", "globalData", "into", "the", "model", "'", "s", "GlobalData", "object", ".", "@throws", "IllegalValueException", "if", "there", "were", "any", "data", "constraints", "violated", "." ]
public GlobalData toModelType() throws IllegalValueException { GlobalData globalData = new GlobalData(); for (JsonAdaptedTransaction jsonAdaptedTransaction : transactions) { Transaction transaction = jsonAdaptedTransaction.toModelType(); globalData.addTransaction(transaction); } globalData.setRecurringBudget(!budget.equals("null") ? new Budget(budget) : null); globalData.setLastUpdatedDate(LocalDate.parse(date)); globalData.setTotalBalance(new Balance(totalBalance)); return globalData; }
[ "public", "GlobalData", "toModelType", "(", ")", "throws", "IllegalValueException", "{", "GlobalData", "globalData", "=", "new", "GlobalData", "(", ")", ";", "for", "(", "JsonAdaptedTransaction", "jsonAdaptedTransaction", ":", "transactions", ")", "{", "Transaction", "transaction", "=", "jsonAdaptedTransaction", ".", "toModelType", "(", ")", ";", "globalData", ".", "addTransaction", "(", "transaction", ")", ";", "}", "globalData", ".", "setRecurringBudget", "(", "!", "budget", ".", "equals", "(", "\"null\"", ")", "?", "new", "Budget", "(", "budget", ")", ":", "null", ")", ";", "globalData", ".", "setLastUpdatedDate", "(", "LocalDate", ".", "parse", "(", "date", ")", ")", ";", "globalData", ".", "setTotalBalance", "(", "new", "Balance", "(", "totalBalance", ")", ")", ";", "return", "globalData", ";", "}" ]
Converts this globalData into the model's {@code GlobalData} object.
[ "Converts", "this", "globalData", "into", "the", "model", "'", "s", "{", "@code", "GlobalData", "}", "object", "." ]
[]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 8510, 751, 358, 1488, 559, 1435, 1216, 2141, 9738, 288, 203, 3639, 8510, 751, 2552, 751, 273, 394, 8510, 751, 5621, 203, 3639, 364, 261, 3185, 13716, 329, 3342, 1163, 13716, 329, 3342, 294, 8938, 13, 288, 203, 5411, 5947, 2492, 273, 1163, 13716, 329, 3342, 18, 869, 1488, 559, 5621, 203, 5411, 2552, 751, 18, 1289, 3342, 12, 7958, 1769, 203, 3639, 289, 203, 3639, 2552, 751, 18, 542, 426, 21179, 16124, 12, 5, 70, 8562, 18, 14963, 2932, 2011, 7923, 692, 394, 25099, 12, 70, 8562, 13, 294, 446, 1769, 203, 3639, 2552, 751, 18, 542, 3024, 7381, 1626, 12, 2042, 1626, 18, 2670, 12, 712, 10019, 203, 3639, 2552, 751, 18, 542, 5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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 20377, 333, 2552, 751, 1368, 326, 938, 1807, 8901, 710, 8510, 751, 97, 733, 18, 203, 377, 380, 203, 377, 380, 632, 15069, 2141, 9738, 309, 1915, 4591, 1281, 501, 6237, 26889, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cc53efea3c8742df85686c4f5d2f81eb8959a628
BenFheng/main
src/test/java/seedu/expensela/logic/commands/CommandTestUtil.java
[ "MIT" ]
Java
assertCommandSuccess
null
public static void assertCommandSuccess(Command command, Model actualModel, CommandResult expectedCommandResult, Model expectedModel) { try { CommandResult result = command.execute(actualModel); assertEquals(expectedCommandResult, result); assertEquals(expectedModel.getExpenseLa(), actualModel.getExpenseLa()); } catch (CommandException ce) { throw new AssertionError("Execution of command should not fail.", ce); } }
/** * Executes the given {@code command}, confirms that <br> * - the returned {@link CommandResult} matches {@code expectedCommandResult} <br> * - the {@code actualModel} matches {@code expectedModel} */
Executes the given command, confirms that - the returned CommandResult matches expectedCommandResult - the actualModel matches expectedModel
[ "Executes", "the", "given", "command", "confirms", "that", "-", "the", "returned", "CommandResult", "matches", "expectedCommandResult", "-", "the", "actualModel", "matches", "expectedModel" ]
public static void assertCommandSuccess(Command command, Model actualModel, CommandResult expectedCommandResult, Model expectedModel) { try { CommandResult result = command.execute(actualModel); assertEquals(expectedCommandResult, result); assertEquals(expectedModel.getExpenseLa(), actualModel.getExpenseLa()); } catch (CommandException ce) { throw new AssertionError("Execution of command should not fail.", ce); } }
[ "public", "static", "void", "assertCommandSuccess", "(", "Command", "command", ",", "Model", "actualModel", ",", "CommandResult", "expectedCommandResult", ",", "Model", "expectedModel", ")", "{", "try", "{", "CommandResult", "result", "=", "command", ".", "execute", "(", "actualModel", ")", ";", "assertEquals", "(", "expectedCommandResult", ",", "result", ")", ";", "assertEquals", "(", "expectedModel", ".", "getExpenseLa", "(", ")", ",", "actualModel", ".", "getExpenseLa", "(", ")", ")", ";", "}", "catch", "(", "CommandException", "ce", ")", "{", "throw", "new", "AssertionError", "(", "\"Execution of command should not fail.\"", ",", "ce", ")", ";", "}", "}" ]
Executes the given {@code command}, confirms that <br> - the returned {@link CommandResult} matches {@code expectedCommandResult} <br> - the {@code actualModel} matches {@code expectedModel}
[ "Executes", "the", "given", "{", "@code", "command", "}", "confirms", "that", "<br", ">", "-", "the", "returned", "{", "@link", "CommandResult", "}", "matches", "{", "@code", "expectedCommandResult", "}", "<br", ">", "-", "the", "{", "@code", "actualModel", "}", "matches", "{", "@code", "expectedModel", "}" ]
[]
[ { "param": "command", "type": "Command" }, { "param": "actualModel", "type": "Model" }, { "param": "expectedCommandResult", "type": "CommandResult" }, { "param": "expectedModel", "type": "Model" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "command", "type": "Command", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "actualModel", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedCommandResult", "type": "CommandResult", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedModel", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 1815, 2189, 4510, 12, 2189, 1296, 16, 3164, 3214, 1488, 16, 3498, 1253, 2665, 2189, 1253, 16, 203, 5411, 3164, 2665, 1488, 13, 288, 203, 3639, 775, 288, 203, 5411, 3498, 1253, 563, 273, 1296, 18, 8837, 12, 18672, 1488, 1769, 203, 5411, 1815, 8867, 12, 3825, 2189, 1253, 16, 563, 1769, 203, 5411, 1815, 8867, 12, 3825, 1488, 18, 588, 424, 1907, 307, 30745, 9334, 3214, 1488, 18, 588, 424, 1907, 307, 30745, 10663, 203, 3639, 289, 1044, 261, 2189, 503, 5898, 13, 288, 203, 5411, 604, 394, 12068, 2932, 3210, 434, 1296, 1410, 486, 2321, 1199, 16, 5898, 1769, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 3889, 993, 326, 864, 8901, 710, 1296, 5779, 2195, 481, 959, 716, 411, 2848, 34, 203, 377, 380, 300, 326, 2106, 8901, 1232, 3498, 1253, 97, 1885, 8901, 710, 2665, 2189, 1253, 97, 411, 2848, 34, 203, 377, 380, 300, 326, 8901, 710, 3214, 1488, 97, 1885, 8901, 710, 2665, 1488, 97, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cc53efea3c8742df85686c4f5d2f81eb8959a628
BenFheng/main
src/test/java/seedu/expensela/logic/commands/CommandTestUtil.java
[ "MIT" ]
Java
assertCommandFailure
null
public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) { // we are unable to defensively copy the model for comparison later, so we can // only do so by copying its components. ExpenseLa expectedExpenseLa = new ExpenseLa(actualModel.getExpenseLa()); List<Transaction> expectedFilteredList = new ArrayList<>(actualModel.getFilteredTransactionList()); assertThrows(CommandException.class, expectedMessage, () -> command.execute(actualModel)); assertEquals(expectedExpenseLa, actualModel.getExpenseLa()); assertEquals(expectedFilteredList, actualModel.getFilteredTransactionList()); }
/** * Executes the given {@code command}, confirms that <br> * - a {@code CommandException} is thrown <br> * - the CommandException message matches {@code expectedMessage} <br> * - the address book, filtered transaction list and selected transaction in {@code actualModel} remain unchanged */
Executes the given command, confirms that - a CommandException is thrown - the CommandException message matches expectedMessage - the address book, filtered transaction list and selected transaction in actualModel remain unchanged
[ "Executes", "the", "given", "command", "confirms", "that", "-", "a", "CommandException", "is", "thrown", "-", "the", "CommandException", "message", "matches", "expectedMessage", "-", "the", "address", "book", "filtered", "transaction", "list", "and", "selected", "transaction", "in", "actualModel", "remain", "unchanged" ]
public static void assertCommandFailure(Command command, Model actualModel, String expectedMessage) { ExpenseLa expectedExpenseLa = new ExpenseLa(actualModel.getExpenseLa()); List<Transaction> expectedFilteredList = new ArrayList<>(actualModel.getFilteredTransactionList()); assertThrows(CommandException.class, expectedMessage, () -> command.execute(actualModel)); assertEquals(expectedExpenseLa, actualModel.getExpenseLa()); assertEquals(expectedFilteredList, actualModel.getFilteredTransactionList()); }
[ "public", "static", "void", "assertCommandFailure", "(", "Command", "command", ",", "Model", "actualModel", ",", "String", "expectedMessage", ")", "{", "ExpenseLa", "expectedExpenseLa", "=", "new", "ExpenseLa", "(", "actualModel", ".", "getExpenseLa", "(", ")", ")", ";", "List", "<", "Transaction", ">", "expectedFilteredList", "=", "new", "ArrayList", "<", ">", "(", "actualModel", ".", "getFilteredTransactionList", "(", ")", ")", ";", "assertThrows", "(", "CommandException", ".", "class", ",", "expectedMessage", ",", "(", ")", "->", "command", ".", "execute", "(", "actualModel", ")", ")", ";", "assertEquals", "(", "expectedExpenseLa", ",", "actualModel", ".", "getExpenseLa", "(", ")", ")", ";", "assertEquals", "(", "expectedFilteredList", ",", "actualModel", ".", "getFilteredTransactionList", "(", ")", ")", ";", "}" ]
Executes the given {@code command}, confirms that <br> - a {@code CommandException} is thrown <br> - the CommandException message matches {@code expectedMessage} <br> - the address book, filtered transaction list and selected transaction in {@code actualModel} remain unchanged
[ "Executes", "the", "given", "{", "@code", "command", "}", "confirms", "that", "<br", ">", "-", "a", "{", "@code", "CommandException", "}", "is", "thrown", "<br", ">", "-", "the", "CommandException", "message", "matches", "{", "@code", "expectedMessage", "}", "<br", ">", "-", "the", "address", "book", "filtered", "transaction", "list", "and", "selected", "transaction", "in", "{", "@code", "actualModel", "}", "remain", "unchanged" ]
[ "// we are unable to defensively copy the model for comparison later, so we can", "// only do so by copying its components." ]
[ { "param": "command", "type": "Command" }, { "param": "actualModel", "type": "Model" }, { "param": "expectedMessage", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "command", "type": "Command", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "actualModel", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "expectedMessage", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 1815, 2189, 5247, 12, 2189, 1296, 16, 3164, 3214, 1488, 16, 514, 2665, 1079, 13, 288, 203, 3639, 368, 732, 854, 13496, 358, 1652, 773, 4492, 1610, 326, 938, 364, 5826, 5137, 16, 1427, 732, 848, 203, 3639, 368, 1338, 741, 1427, 635, 8933, 2097, 4085, 18, 203, 3639, 1312, 1907, 307, 30745, 2665, 424, 1907, 307, 30745, 273, 394, 1312, 1907, 307, 30745, 12, 18672, 1488, 18, 588, 424, 1907, 307, 30745, 10663, 203, 3639, 987, 32, 3342, 34, 2665, 14478, 682, 273, 394, 2407, 29667, 12, 18672, 1488, 18, 588, 14478, 3342, 682, 10663, 203, 203, 3639, 1815, 21845, 12, 2189, 503, 18, 1106, 16, 2665, 1079, 16, 1832, 317, 1296, 18, 8837, 12, 18672, 1488, 10019, 203, 3639, 1815, 8867, 12, 3825, 424, 1907, 307, 30745, 16, 3214, 1488, 18, 588, 424, 1907, 307, 30745, 10663, 203, 3639, 1815, 8867, 12, 3825, 14478, 682, 16, 3214, 1488, 18, 588, 14478, 3342, 682, 10663, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,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, 380, 300, 326, 1758, 6978, 16, 5105, 2492, 666, 471, 3170, 2492, 316, 8901, 710, 3214, 1488, 97, 7232, 14827, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
cc53efea3c8742df85686c4f5d2f81eb8959a628
BenFheng/main
src/test/java/seedu/expensela/logic/commands/CommandTestUtil.java
[ "MIT" ]
Java
showTransactionAtIndex
null
public static void showTransactionAtIndex(Model model, Index targetIndex) { assertTrue(targetIndex.getZeroBased() < model.getFilteredTransactionList().size()); Transaction transaction = model.getFilteredTransactionList().get(targetIndex.getZeroBased()); final String[] splitName = transaction.getName().transactionName.split("\\s+"); model.updateFilteredTransactionList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])), null); assertEquals(1, model.getFilteredTransactionList().size()); }
/** * Updates {@code model}'s filtered list to show only the transaction at the given {@code targetIndex} in the * {@code model}'s address book. */
Updates model's filtered list to show only the transaction at the given targetIndex in the model's address book.
[ "Updates", "model", "'", "s", "filtered", "list", "to", "show", "only", "the", "transaction", "at", "the", "given", "targetIndex", "in", "the", "model", "'", "s", "address", "book", "." ]
public static void showTransactionAtIndex(Model model, Index targetIndex) { assertTrue(targetIndex.getZeroBased() < model.getFilteredTransactionList().size()); Transaction transaction = model.getFilteredTransactionList().get(targetIndex.getZeroBased()); final String[] splitName = transaction.getName().transactionName.split("\\s+"); model.updateFilteredTransactionList(new NameContainsKeywordsPredicate(Arrays.asList(splitName[0])), null); assertEquals(1, model.getFilteredTransactionList().size()); }
[ "public", "static", "void", "showTransactionAtIndex", "(", "Model", "model", ",", "Index", "targetIndex", ")", "{", "assertTrue", "(", "targetIndex", ".", "getZeroBased", "(", ")", "<", "model", ".", "getFilteredTransactionList", "(", ")", ".", "size", "(", ")", ")", ";", "Transaction", "transaction", "=", "model", ".", "getFilteredTransactionList", "(", ")", ".", "get", "(", "targetIndex", ".", "getZeroBased", "(", ")", ")", ";", "final", "String", "[", "]", "splitName", "=", "transaction", ".", "getName", "(", ")", ".", "transactionName", ".", "split", "(", "\"\\\\s+\"", ")", ";", "model", ".", "updateFilteredTransactionList", "(", "new", "NameContainsKeywordsPredicate", "(", "Arrays", ".", "asList", "(", "splitName", "[", "0", "]", ")", ")", ",", "null", ")", ";", "assertEquals", "(", "1", ",", "model", ".", "getFilteredTransactionList", "(", ")", ".", "size", "(", ")", ")", ";", "}" ]
Updates {@code model}'s filtered list to show only the transaction at the given {@code targetIndex} in the {@code model}'s address book.
[ "Updates", "{", "@code", "model", "}", "'", "s", "filtered", "list", "to", "show", "only", "the", "transaction", "at", "the", "given", "{", "@code", "targetIndex", "}", "in", "the", "{", "@code", "model", "}", "'", "s", "address", "book", "." ]
[]
[ { "param": "model", "type": "Model" }, { "param": "targetIndex", "type": "Index" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "model", "type": "Model", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null }, { "identifier": "targetIndex", "type": "Index", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 760, 918, 2405, 3342, 24499, 12, 1488, 938, 16, 3340, 1018, 1016, 13, 288, 203, 3639, 1815, 5510, 12, 3299, 1016, 18, 588, 7170, 9802, 1435, 411, 938, 18, 588, 14478, 3342, 682, 7675, 1467, 10663, 203, 203, 3639, 5947, 2492, 273, 938, 18, 588, 14478, 3342, 682, 7675, 588, 12, 3299, 1016, 18, 588, 7170, 9802, 10663, 203, 3639, 727, 514, 8526, 1416, 461, 273, 2492, 18, 17994, 7675, 7958, 461, 18, 4939, 2932, 1695, 87, 15, 8863, 203, 3639, 938, 18, 2725, 14478, 3342, 682, 12, 2704, 1770, 10846, 14149, 8634, 12, 12726, 18, 345, 682, 12,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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 15419, 8901, 710, 938, 1713, 87, 5105, 666, 358, 2405, 1338, 326, 2492, 622, 326, 864, 8901, 710, 1018, 1016, 97, 316, 326, 203, 377, 380, 8901, 710, 938, 1713, 87, 1758, 6978, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3956028efb7ca5ed8fc3fac5df5f0890c7abe39b
BenFheng/main
src/main/java/seedu/expensela/ui/ChartAnalyticsPanel.java
[ "MIT" ]
Java
chooseFxml
String
private static String chooseFxml(boolean isFilterMonth) { if (isFilterMonth) { return GraphByWeek_Fxml; } else { return GraphByMonth_Fxml; } }
/** * Choose which FXML file to use based on whether filter is by month * @param isFilterMonth True if filter is by month * @return String of which FXML to use */
Choose which FXML file to use based on whether filter is by month @param isFilterMonth True if filter is by month @return String of which FXML to use
[ "Choose", "which", "FXML", "file", "to", "use", "based", "on", "whether", "filter", "is", "by", "month", "@param", "isFilterMonth", "True", "if", "filter", "is", "by", "month", "@return", "String", "of", "which", "FXML", "to", "use" ]
private static String chooseFxml(boolean isFilterMonth) { if (isFilterMonth) { return GraphByWeek_Fxml; } else { return GraphByMonth_Fxml; } }
[ "private", "static", "String", "chooseFxml", "(", "boolean", "isFilterMonth", ")", "{", "if", "(", "isFilterMonth", ")", "{", "return", "GraphByWeek_Fxml", ";", "}", "else", "{", "return", "GraphByMonth_Fxml", ";", "}", "}" ]
Choose which FXML file to use based on whether filter is by month @param isFilterMonth True if filter is by month @return String of which FXML to use
[ "Choose", "which", "FXML", "file", "to", "use", "based", "on", "whether", "filter", "is", "by", "month", "@param", "isFilterMonth", "True", "if", "filter", "is", "by", "month", "@return", "String", "of", "which", "FXML", "to", "use" ]
[]
[ { "param": "isFilterMonth", "type": "boolean" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "isFilterMonth", "type": "boolean", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 760, 514, 9876, 42, 2902, 12, 6494, 353, 1586, 5445, 13, 288, 203, 3639, 309, 261, 291, 1586, 5445, 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353, 635, 3138, 203, 377, 380, 632, 891, 353, 1586, 5445, 1053, 309, 1034, 353, 635, 3138, 203, 377, 380, 632, 2463, 514, 434, 1492, 478, 4201, 358, 999, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3956028efb7ca5ed8fc3fac5df5f0890c7abe39b
BenFheng/main
src/main/java/seedu/expensela/ui/ChartAnalyticsPanel.java
[ "MIT" ]
Java
graphByCategory
null
private void graphByCategory(ObservableList<Transaction> transactionList) { ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList(); ArrayList<String> categories = new ArrayList<String>(); ArrayList<Double> amounts = new ArrayList<Double>(); for (Transaction transaction : transactionList) { String category = transaction.getCategory().toString(); if (category.equals("INCOME") || transaction.getAmount().positive) { continue; } Amount amount = transaction.getAmount(); double amountDouble = amount.transactionAmount; if (categories.contains(category)) { int index = categories.indexOf(category); double newCategoryAmount = amountDouble + amounts.get(index); amounts.set(index, newCategoryAmount); } else { categories.add(category); int index = categories.size() - 1; amounts.add(index, amountDouble); } } double totalAmount = 0; for (int i = 0; i < categories.size(); i++) { pieChartData.add(new PieChart.Data(categories.get(i), amounts.get(i))); totalAmount += amounts.get(i); } double finalTotalAmount = totalAmount; pieChartData.forEach(data -> data.nameProperty().bind( Bindings.concat(data.getName(), ":\n", String.format("%.1f%%", 100 * data.getPieValue() / finalTotalAmount)) ) ); pieChart.setData(pieChartData); pieChart.setTitle("Expense by Category"); }
/** * Creates a pie chart which displays the expenditure by category * @param transactionList */
Creates a pie chart which displays the expenditure by category @param transactionList
[ "Creates", "a", "pie", "chart", "which", "displays", "the", "expenditure", "by", "category", "@param", "transactionList" ]
private void graphByCategory(ObservableList<Transaction> transactionList) { ObservableList<PieChart.Data> pieChartData = FXCollections.observableArrayList(); ArrayList<String> categories = new ArrayList<String>(); ArrayList<Double> amounts = new ArrayList<Double>(); for (Transaction transaction : transactionList) { String category = transaction.getCategory().toString(); if (category.equals("INCOME") || transaction.getAmount().positive) { continue; } Amount amount = transaction.getAmount(); double amountDouble = amount.transactionAmount; if (categories.contains(category)) { int index = categories.indexOf(category); double newCategoryAmount = amountDouble + amounts.get(index); amounts.set(index, newCategoryAmount); } else { categories.add(category); int index = categories.size() - 1; amounts.add(index, amountDouble); } } double totalAmount = 0; for (int i = 0; i < categories.size(); i++) { pieChartData.add(new PieChart.Data(categories.get(i), amounts.get(i))); totalAmount += amounts.get(i); } double finalTotalAmount = totalAmount; pieChartData.forEach(data -> data.nameProperty().bind( Bindings.concat(data.getName(), ":\n", String.format("%.1f%%", 100 * data.getPieValue() / finalTotalAmount)) ) ); pieChart.setData(pieChartData); pieChart.setTitle("Expense by Category"); }
[ "private", "void", "graphByCategory", "(", "ObservableList", "<", "Transaction", ">", "transactionList", ")", "{", "ObservableList", "<", "PieChart", ".", "Data", ">", "pieChartData", "=", "FXCollections", ".", "observableArrayList", "(", ")", ";", "ArrayList", "<", "String", ">", "categories", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "ArrayList", "<", "Double", ">", "amounts", "=", "new", "ArrayList", "<", "Double", ">", "(", ")", ";", "for", "(", "Transaction", "transaction", ":", "transactionList", ")", "{", "String", "category", "=", "transaction", ".", "getCategory", "(", ")", ".", "toString", "(", ")", ";", "if", "(", "category", ".", "equals", "(", "\"INCOME\"", ")", "||", "transaction", ".", "getAmount", "(", ")", ".", "positive", ")", "{", "continue", ";", "}", "Amount", "amount", "=", "transaction", ".", "getAmount", "(", ")", ";", "double", "amountDouble", "=", "amount", ".", "transactionAmount", ";", "if", "(", "categories", ".", "contains", "(", "category", ")", ")", "{", "int", "index", "=", "categories", ".", "indexOf", "(", "category", ")", ";", "double", "newCategoryAmount", "=", "amountDouble", "+", "amounts", ".", "get", "(", "index", ")", ";", "amounts", ".", "set", "(", "index", ",", "newCategoryAmount", ")", ";", "}", "else", "{", "categories", ".", "add", "(", "category", ")", ";", "int", "index", "=", "categories", ".", "size", "(", ")", "-", "1", ";", "amounts", ".", "add", "(", "index", ",", "amountDouble", ")", ";", "}", "}", "double", "totalAmount", "=", "0", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "categories", ".", "size", "(", ")", ";", "i", "++", ")", "{", "pieChartData", ".", "add", "(", "new", "PieChart", ".", "Data", "(", "categories", ".", "get", "(", "i", ")", ",", "amounts", ".", "get", "(", "i", ")", ")", ")", ";", "totalAmount", "+=", "amounts", ".", "get", "(", "i", ")", ";", "}", "double", "finalTotalAmount", "=", "totalAmount", ";", "pieChartData", ".", "forEach", "(", "data", "->", "data", ".", "nameProperty", "(", ")", ".", "bind", "(", "Bindings", ".", "concat", "(", "data", ".", "getName", "(", ")", ",", "\":\\n\"", ",", "String", ".", "format", "(", "\"%.1f%%\"", ",", "100", "*", "data", ".", "getPieValue", "(", ")", "/", "finalTotalAmount", ")", ")", ")", ")", ";", "pieChart", ".", "setData", "(", "pieChartData", ")", ";", "pieChart", ".", "setTitle", "(", "\"Expense by Category\"", ")", ";", "}" ]
Creates a pie chart which displays the expenditure by category @param transactionList
[ "Creates", "a", "pie", "chart", "which", "displays", "the", "expenditure", "by", "category", "@param", "transactionList" ]
[]
[ { "param": "transactionList", "type": "ObservableList<Transaction>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "transactionList", "type": "ObservableList<Transaction>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 2667, 858, 4457, 12, 15279, 682, 32, 3342, 34, 2492, 682, 13, 288, 203, 3639, 4310, 682, 32, 52, 1385, 7984, 18, 751, 34, 293, 1385, 7984, 751, 273, 478, 60, 15150, 18, 12199, 16845, 19558, 5621, 203, 3639, 2407, 32, 780, 34, 6477, 273, 394, 2407, 32, 780, 34, 5621, 203, 3639, 2407, 32, 5265, 34, 30980, 273, 394, 2407, 32, 5265, 34, 5621, 203, 203, 3639, 364, 261, 3342, 2492, 294, 2492, 682, 13, 288, 203, 5411, 514, 3150, 273, 2492, 18, 588, 4457, 7675, 10492, 5621, 203, 5411, 309, 261, 4743, 18, 14963, 2932, 706, 3865, 958, 7923, 747, 2492, 18, 588, 6275, 7675, 21094, 13, 288, 203, 7734, 1324, 31, 203, 5411, 289, 203, 5411, 16811, 3844, 273, 2492, 18, 588, 6275, 5621, 203, 5411, 1645, 3844, 5265, 273, 3844, 18, 7958, 6275, 31, 203, 5411, 309, 261, 8995, 18, 12298, 12, 4743, 3719, 288, 203, 7734, 509, 770, 273, 6477, 18, 31806, 12, 4743, 1769, 203, 7734, 1645, 394, 4457, 6275, 273, 3844, 5265, 397, 30980, 18, 588, 12, 1615, 1769, 203, 7734, 30980, 18, 542, 12, 1615, 16, 394, 4457, 6275, 1769, 203, 5411, 289, 469, 288, 203, 7734, 6477, 18, 1289, 12, 4743, 1769, 203, 7734, 509, 770, 273, 6477, 18, 1467, 1435, 300, 404, 31, 203, 7734, 30980, 18, 1289, 12, 1615, 16, 3844, 5265, 1769, 203, 5411, 289, 203, 3639, 289, 203, 203, 3639, 1645, 2078, 6275, 273, 374, 31, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 6477, 18, 1467, 5621, 277, 27245, 288, 203, 5411, 293, 1385, 7984, 751, 18, 1289, 12, 2704, 453, 1385, 7984, 18, 751, 12, 8995, 18, 588, 12, 77, 3631, 30980, 18, 588, 12, 77, 3719, 1769, 203, 5411, 2078, 6275, 1011, 30980, 18, 588, 12, 77, 1769, 203, 3639, 289, 203, 203, 3639, 1645, 727, 5269, 6275, 273, 2078, 6275, 31, 203, 3639, 293, 1385, 7984, 751, 18, 1884, 3442, 12, 892, 317, 203, 7734, 501, 18, 529, 1396, 7675, 4376, 12, 203, 13491, 6936, 899, 18, 16426, 12, 892, 18, 17994, 9334, 315, 5581, 82, 3113, 203, 27573, 514, 18, 2139, 27188, 18, 21, 74, 11438, 3113, 2130, 380, 501, 18, 588, 52, 1385, 620, 1435, 342, 727, 5269, 6275, 3719, 203, 7734, 262, 203, 3639, 11272, 203, 203, 3639, 293, 1385, 7984, 18, 542, 751, 12, 84, 1385, 7984, 751, 1769, 203, 3639, 293, 1385, 7984, 18, 542, 4247, 2932, 424, 1907, 307, 635, 9856, 8863, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 10210, 279, 293, 1385, 4980, 1492, 22461, 326, 431, 1302, 305, 594, 635, 3150, 203, 377, 380, 632, 891, 2492, 682, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3956028efb7ca5ed8fc3fac5df5f0890c7abe39b
BenFheng/main
src/main/java/seedu/expensela/ui/ChartAnalyticsPanel.java
[ "MIT" ]
Java
graphByWeek
null
private void graphByWeek(ObservableList<Transaction> transactionList) { xAxis.setLabel("Day"); xAxis.getCategories().addAll("Week 1", "Week 2", "Week 3", "Week 4", "Week 5"); yAxis.setLabel("Total Expenditure"); stackedBarChart.setTitle("Expenditure This Month by Day of the Week"); double[][] spentByWeekAndDay = new double[5][7]; for (Transaction transaction : transactionList) { Amount amount = transaction.getAmount(); String categoryString = transaction.getCategory().toString(); LocalDate transactionLocalDate = transaction.getDate().transactionDate; int weekIndex = (transactionLocalDate.getDayOfMonth() - 1) / 7; DayOfWeek day = transactionLocalDate.getDayOfWeek(); if (amount.positive || categoryString.equals("INCOME")) { continue; } switch (day.toString()) { case "MONDAY": spentByWeekAndDay[weekIndex][0] += amount.transactionAmount; break; case "TUESDAY": spentByWeekAndDay[weekIndex][1] += amount.transactionAmount; break; case "WEDNESDAY": spentByWeekAndDay[weekIndex][2] += amount.transactionAmount; break; case "THURSDAY": spentByWeekAndDay[weekIndex][3] += amount.transactionAmount; break; case "FRIDAY": spentByWeekAndDay[weekIndex][4] += amount.transactionAmount; break; case "SATURDAY": spentByWeekAndDay[weekIndex][5] += amount.transactionAmount; break; case "SUNDAY": spentByWeekAndDay[weekIndex][6] += amount.transactionAmount; break; default: continue; } } XYChart.Series<String, Number> seriesWeek1 = new XYChart.Series(); seriesWeek1.setName("Week 1"); XYChart.Series<String, Number> seriesWeek2 = new XYChart.Series(); seriesWeek2.setName("Week 2"); XYChart.Series<String, Number> seriesWeek3 = new XYChart.Series(); seriesWeek3.setName("Week 3"); XYChart.Series<String, Number> seriesWeek4 = new XYChart.Series(); seriesWeek4.setName("Week 4"); XYChart.Series<String, Number> seriesWeek5 = new XYChart.Series(); seriesWeek5.setName("Week 5"); String[] dayOfWeek = {"MON", "TUES", "WED", "THURS", "FRI", "SAT", "SUN"}; for (int i = 0; i < 7; i++) { seriesWeek1.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[0][i])); seriesWeek2.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[1][i])); seriesWeek3.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[2][i])); seriesWeek4.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[3][i])); seriesWeek5.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[4][i])); } stackedBarChart.getData().addAll(seriesWeek1, seriesWeek2, seriesWeek3, seriesWeek4, seriesWeek5); }
/** * Creates a stacked bar chart, X axis is days of the week and Y axis is total expenditure, stacked by weeks. * @param transactionList Transaction List filtered by a certain month. */
Creates a stacked bar chart, X axis is days of the week and Y axis is total expenditure, stacked by weeks. @param transactionList Transaction List filtered by a certain month.
[ "Creates", "a", "stacked", "bar", "chart", "X", "axis", "is", "days", "of", "the", "week", "and", "Y", "axis", "is", "total", "expenditure", "stacked", "by", "weeks", ".", "@param", "transactionList", "Transaction", "List", "filtered", "by", "a", "certain", "month", "." ]
private void graphByWeek(ObservableList<Transaction> transactionList) { xAxis.setLabel("Day"); xAxis.getCategories().addAll("Week 1", "Week 2", "Week 3", "Week 4", "Week 5"); yAxis.setLabel("Total Expenditure"); stackedBarChart.setTitle("Expenditure This Month by Day of the Week"); double[][] spentByWeekAndDay = new double[5][7]; for (Transaction transaction : transactionList) { Amount amount = transaction.getAmount(); String categoryString = transaction.getCategory().toString(); LocalDate transactionLocalDate = transaction.getDate().transactionDate; int weekIndex = (transactionLocalDate.getDayOfMonth() - 1) / 7; DayOfWeek day = transactionLocalDate.getDayOfWeek(); if (amount.positive || categoryString.equals("INCOME")) { continue; } switch (day.toString()) { case "MONDAY": spentByWeekAndDay[weekIndex][0] += amount.transactionAmount; break; case "TUESDAY": spentByWeekAndDay[weekIndex][1] += amount.transactionAmount; break; case "WEDNESDAY": spentByWeekAndDay[weekIndex][2] += amount.transactionAmount; break; case "THURSDAY": spentByWeekAndDay[weekIndex][3] += amount.transactionAmount; break; case "FRIDAY": spentByWeekAndDay[weekIndex][4] += amount.transactionAmount; break; case "SATURDAY": spentByWeekAndDay[weekIndex][5] += amount.transactionAmount; break; case "SUNDAY": spentByWeekAndDay[weekIndex][6] += amount.transactionAmount; break; default: continue; } } XYChart.Series<String, Number> seriesWeek1 = new XYChart.Series(); seriesWeek1.setName("Week 1"); XYChart.Series<String, Number> seriesWeek2 = new XYChart.Series(); seriesWeek2.setName("Week 2"); XYChart.Series<String, Number> seriesWeek3 = new XYChart.Series(); seriesWeek3.setName("Week 3"); XYChart.Series<String, Number> seriesWeek4 = new XYChart.Series(); seriesWeek4.setName("Week 4"); XYChart.Series<String, Number> seriesWeek5 = new XYChart.Series(); seriesWeek5.setName("Week 5"); String[] dayOfWeek = {"MON", "TUES", "WED", "THURS", "FRI", "SAT", "SUN"}; for (int i = 0; i < 7; i++) { seriesWeek1.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[0][i])); seriesWeek2.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[1][i])); seriesWeek3.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[2][i])); seriesWeek4.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[3][i])); seriesWeek5.getData().add(new XYChart.Data(dayOfWeek[i], spentByWeekAndDay[4][i])); } stackedBarChart.getData().addAll(seriesWeek1, seriesWeek2, seriesWeek3, seriesWeek4, seriesWeek5); }
[ "private", "void", "graphByWeek", "(", "ObservableList", "<", "Transaction", ">", "transactionList", ")", "{", "xAxis", ".", "setLabel", "(", "\"Day\"", ")", ";", "xAxis", ".", "getCategories", "(", ")", ".", "addAll", "(", "\"Week 1\"", ",", "\"Week 2\"", ",", "\"Week 3\"", ",", "\"Week 4\"", ",", "\"Week 5\"", ")", ";", "yAxis", ".", "setLabel", "(", "\"Total Expenditure\"", ")", ";", "stackedBarChart", ".", "setTitle", "(", "\"Expenditure This Month by Day of the Week\"", ")", ";", "double", "[", "]", "[", "]", "spentByWeekAndDay", "=", "new", "double", "[", "5", "]", "[", "7", "]", ";", "for", "(", "Transaction", "transaction", ":", "transactionList", ")", "{", "Amount", "amount", "=", "transaction", ".", "getAmount", "(", ")", ";", "String", "categoryString", "=", "transaction", ".", "getCategory", "(", ")", ".", "toString", "(", ")", ";", "LocalDate", "transactionLocalDate", "=", "transaction", ".", "getDate", "(", ")", ".", "transactionDate", ";", "int", "weekIndex", "=", "(", "transactionLocalDate", ".", "getDayOfMonth", "(", ")", "-", "1", ")", "/", "7", ";", "DayOfWeek", "day", "=", "transactionLocalDate", ".", "getDayOfWeek", "(", ")", ";", "if", "(", "amount", ".", "positive", "||", "categoryString", ".", "equals", "(", "\"INCOME\"", ")", ")", "{", "continue", ";", "}", "switch", "(", "day", ".", "toString", "(", ")", ")", "{", "case", "\"MONDAY\"", ":", "spentByWeekAndDay", "[", "weekIndex", "]", "[", "0", "]", "+=", "amount", ".", "transactionAmount", ";", "break", ";", "case", "\"TUESDAY\"", ":", "spentByWeekAndDay", "[", "weekIndex", "]", "[", "1", "]", "+=", "amount", ".", "transactionAmount", ";", "break", ";", "case", "\"WEDNESDAY\"", ":", "spentByWeekAndDay", "[", "weekIndex", "]", "[", "2", "]", "+=", "amount", ".", "transactionAmount", ";", "break", ";", "case", "\"THURSDAY\"", ":", "spentByWeekAndDay", "[", "weekIndex", "]", "[", "3", "]", "+=", "amount", ".", "transactionAmount", ";", "break", ";", "case", "\"FRIDAY\"", ":", "spentByWeekAndDay", "[", "weekIndex", "]", "[", "4", "]", "+=", "amount", ".", "transactionAmount", ";", "break", ";", "case", "\"SATURDAY\"", ":", "spentByWeekAndDay", "[", "weekIndex", "]", "[", "5", "]", "+=", "amount", ".", "transactionAmount", ";", "break", ";", "case", "\"SUNDAY\"", ":", "spentByWeekAndDay", "[", "weekIndex", "]", "[", "6", "]", "+=", "amount", ".", "transactionAmount", ";", "break", ";", "default", ":", "continue", ";", "}", "}", "XYChart", ".", "Series", "<", "String", ",", "Number", ">", "seriesWeek1", "=", "new", "XYChart", ".", "Series", "(", ")", ";", "seriesWeek1", ".", "setName", "(", "\"Week 1\"", ")", ";", "XYChart", ".", "Series", "<", "String", ",", "Number", ">", "seriesWeek2", "=", "new", "XYChart", ".", "Series", "(", ")", ";", "seriesWeek2", ".", "setName", "(", "\"Week 2\"", ")", ";", "XYChart", ".", "Series", "<", "String", ",", "Number", ">", "seriesWeek3", "=", "new", "XYChart", ".", "Series", "(", ")", ";", "seriesWeek3", ".", "setName", "(", "\"Week 3\"", ")", ";", "XYChart", ".", "Series", "<", "String", ",", "Number", ">", "seriesWeek4", "=", "new", "XYChart", ".", "Series", "(", ")", ";", "seriesWeek4", ".", "setName", "(", "\"Week 4\"", ")", ";", "XYChart", ".", "Series", "<", "String", ",", "Number", ">", "seriesWeek5", "=", "new", "XYChart", ".", "Series", "(", ")", ";", "seriesWeek5", ".", "setName", "(", "\"Week 5\"", ")", ";", "String", "[", "]", "dayOfWeek", "=", "{", "\"MON\"", ",", "\"TUES\"", ",", "\"WED\"", ",", "\"THURS\"", ",", "\"FRI\"", ",", "\"SAT\"", ",", "\"SUN\"", "}", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "7", ";", "i", "++", ")", "{", "seriesWeek1", ".", "getData", "(", ")", ".", "add", "(", "new", "XYChart", ".", "Data", "(", "dayOfWeek", "[", "i", "]", ",", "spentByWeekAndDay", "[", "0", "]", "[", "i", "]", ")", ")", ";", "seriesWeek2", ".", "getData", "(", ")", ".", "add", "(", "new", "XYChart", ".", "Data", "(", "dayOfWeek", "[", "i", "]", ",", "spentByWeekAndDay", "[", "1", "]", "[", "i", "]", ")", ")", ";", "seriesWeek3", ".", "getData", "(", ")", ".", "add", "(", "new", "XYChart", ".", "Data", "(", "dayOfWeek", "[", "i", "]", ",", "spentByWeekAndDay", "[", "2", "]", "[", "i", "]", ")", ")", ";", "seriesWeek4", ".", "getData", "(", ")", ".", "add", "(", "new", "XYChart", ".", "Data", "(", "dayOfWeek", "[", "i", "]", ",", "spentByWeekAndDay", "[", "3", "]", "[", "i", "]", ")", ")", ";", "seriesWeek5", ".", "getData", "(", ")", ".", "add", "(", "new", "XYChart", ".", "Data", "(", "dayOfWeek", "[", "i", "]", ",", "spentByWeekAndDay", "[", "4", "]", "[", "i", "]", ")", ")", ";", "}", "stackedBarChart", ".", "getData", "(", ")", ".", "addAll", "(", "seriesWeek1", ",", "seriesWeek2", ",", "seriesWeek3", ",", "seriesWeek4", ",", "seriesWeek5", ")", ";", "}" ]
Creates a stacked bar chart, X axis is days of the week and Y axis is total expenditure, stacked by weeks.
[ "Creates", "a", "stacked", "bar", "chart", "X", "axis", "is", "days", "of", "the", "week", "and", "Y", "axis", "is", "total", "expenditure", "stacked", "by", "weeks", "." ]
[]
[ { "param": "transactionList", "type": "ObservableList<Transaction>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "transactionList", "type": "ObservableList<Transaction>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 2667, 858, 6630, 12, 15279, 682, 32, 3342, 34, 2492, 682, 13, 288, 203, 3639, 21149, 18, 542, 2224, 2932, 4245, 8863, 203, 3639, 21149, 18, 588, 10487, 7675, 1289, 1595, 2932, 6630, 404, 3113, 315, 6630, 576, 3113, 315, 6630, 890, 3113, 315, 6630, 1059, 3113, 315, 6630, 1381, 8863, 203, 3639, 18390, 18, 542, 2224, 2932, 5269, 1312, 1302, 305, 594, 8863, 203, 3639, 25776, 5190, 7984, 18, 542, 4247, 2932, 424, 1302, 305, 594, 1220, 10337, 635, 13735, 434, 326, 10527, 8863, 203, 203, 3639, 1645, 63, 6362, 65, 26515, 858, 6630, 1876, 4245, 273, 394, 1645, 63, 25, 6362, 27, 15533, 203, 203, 3639, 364, 261, 3342, 2492, 294, 2492, 682, 13, 288, 203, 5411, 16811, 3844, 273, 2492, 18, 588, 6275, 5621, 203, 5411, 514, 3150, 780, 273, 2492, 18, 588, 4457, 7675, 10492, 5621, 203, 5411, 15815, 2492, 2042, 1626, 273, 2492, 18, 588, 1626, 7675, 7958, 1626, 31, 203, 5411, 509, 4860, 1016, 273, 261, 7958, 2042, 1626, 18, 588, 4245, 14941, 1435, 300, 404, 13, 342, 2371, 31, 203, 5411, 13735, 12250, 2548, 273, 2492, 2042, 1626, 18, 588, 23944, 5621, 203, 203, 5411, 309, 261, 8949, 18, 21094, 747, 3150, 780, 18, 14963, 2932, 706, 3865, 958, 6, 3719, 288, 203, 7734, 1324, 31, 203, 5411, 289, 203, 203, 5411, 1620, 261, 2881, 18, 10492, 10756, 288, 203, 5411, 648, 315, 17667, 10339, 6877, 203, 7734, 26515, 858, 6630, 1876, 4245, 63, 10741, 1016, 6362, 20, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 7734, 898, 31, 203, 5411, 648, 315, 56, 1821, 9903, 5255, 6877, 203, 7734, 26515, 858, 6630, 1876, 4245, 63, 10741, 1016, 6362, 21, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 7734, 898, 31, 203, 5411, 648, 315, 59, 2056, 50, 3991, 10339, 6877, 203, 7734, 26515, 858, 6630, 1876, 4245, 63, 10741, 1016, 6362, 22, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 7734, 898, 31, 203, 5411, 648, 315, 2455, 1099, 9903, 5255, 6877, 203, 7734, 26515, 858, 6630, 1876, 4245, 63, 10741, 1016, 6362, 23, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 7734, 898, 31, 203, 5411, 648, 315, 9981, 734, 5255, 6877, 203, 7734, 26515, 858, 6630, 1876, 4245, 63, 10741, 1016, 6362, 24, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 7734, 898, 31, 203, 5411, 648, 315, 55, 789, 1099, 10339, 6877, 203, 7734, 26515, 858, 6630, 1876, 4245, 63, 10741, 1016, 6362, 25, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 7734, 898, 31, 203, 5411, 648, 315, 55, 5240, 5255, 6877, 203, 7734, 26515, 858, 6630, 1876, 4245, 63, 10741, 1016, 6362, 26, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 7734, 898, 31, 203, 5411, 805, 30, 203, 7734, 1324, 31, 203, 5411, 289, 203, 3639, 289, 203, 203, 3639, 18774, 7984, 18, 6485, 32, 780, 16, 3588, 34, 4166, 6630, 21, 273, 394, 18774, 7984, 18, 6485, 5621, 203, 3639, 4166, 6630, 21, 18, 542, 461, 2932, 6630, 404, 8863, 203, 3639, 18774, 7984, 18, 6485, 32, 780, 16, 2 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26873, 203, 377, 380, 10210, 279, 25776, 4653, 4980, 16, 1139, 2654, 353, 4681, 434, 326, 4860, 471, 1624, 2654, 353, 2078, 431, 1302, 305, 594, 16, 25776, 635, 17314, 18, 203, 377, 380, 632, 891, 2492, 682, 5947, 987, 5105, 635, 279, 8626, 3138, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
3956028efb7ca5ed8fc3fac5df5f0890c7abe39b
BenFheng/main
src/main/java/seedu/expensela/ui/ChartAnalyticsPanel.java
[ "MIT" ]
Java
graphByMonth
null
private void graphByMonth(ObservableList<Transaction> transactionList) { xAxis.setLabel("Month"); yAxis.setLabel("Total Expenditure"); barChart.setTitle("Expenditure This Year and Last Year By Month"); double[][] spentByYearAndMonth = new double[2][12]; int currYear = LocalDate.now().getYear(); for (Transaction transaction : transactionList) { Amount amount = transaction.getAmount(); String categoryString = transaction.getCategory().toString(); LocalDate transactionLocalDate = transaction.getDate().transactionDate; if (amount.positive || categoryString.equals("INCOME")) { continue; } else if (transactionLocalDate.getYear() < currYear - 1) { break; } int yearIndex = currYear - transactionLocalDate.getYear(); int month = transactionLocalDate.getMonthValue(); spentByYearAndMonth[yearIndex][month - 1] += amount.transactionAmount; } XYChart.Series<String, Number> seriesPrevYear = new XYChart.Series(); seriesPrevYear.setName(currYear - 1 + ""); XYChart.Series<String, Number> seriesCurrYear = new XYChart.Series(); seriesCurrYear.setName(currYear + ""); String[] months = {"Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sep", "Oct", "Nov", "Dec"}; for (int i = 0; i < 12; i++) { seriesPrevYear.getData().add(new XYChart.Data(months[i], spentByYearAndMonth[1][i])); seriesCurrYear.getData().add(new XYChart.Data(months[i], spentByYearAndMonth[0][i])); } barChart.getData().addAll(seriesPrevYear, seriesCurrYear); }
/** * Creates a stacked bar chart, X axis is months of the year and Y axis is total expenditure. * Stacks last year's and this year's transactions. * @param transactionList Transaction List filtered by a certain month. */
Creates a stacked bar chart, X axis is months of the year and Y axis is total expenditure. Stacks last year's and this year's transactions. @param transactionList Transaction List filtered by a certain month.
[ "Creates", "a", "stacked", "bar", "chart", "X", "axis", "is", "months", "of", "the", "year", "and", "Y", "axis", "is", "total", "expenditure", ".", "Stacks", "last", "year", "'", "s", "and", "this", "year", "'", "s", "transactions", ".", "@param", "transactionList", "Transaction", "List", "filtered", "by", "a", "certain", "month", "." ]
private void graphByMonth(ObservableList<Transaction> transactionList) { xAxis.setLabel("Month"); yAxis.setLabel("Total Expenditure"); barChart.setTitle("Expenditure This Year and Last Year By Month"); double[][] spentByYearAndMonth = new double[2][12]; int currYear = LocalDate.now().getYear(); for (Transaction transaction : transactionList) { Amount amount = transaction.getAmount(); String categoryString = transaction.getCategory().toString(); LocalDate transactionLocalDate = transaction.getDate().transactionDate; if (amount.positive || categoryString.equals("INCOME")) { continue; } else if (transactionLocalDate.getYear() < currYear - 1) { break; } int yearIndex = currYear - transactionLocalDate.getYear(); int month = transactionLocalDate.getMonthValue(); spentByYearAndMonth[yearIndex][month - 1] += amount.transactionAmount; } XYChart.Series<String, Number> seriesPrevYear = new XYChart.Series(); seriesPrevYear.setName(currYear - 1 + ""); XYChart.Series<String, Number> seriesCurrYear = new XYChart.Series(); seriesCurrYear.setName(currYear + ""); String[] months = {"Jan", "Feb", "Mar", "Apr", "May", "June", "July", "Aug", "Sep", "Oct", "Nov", "Dec"}; for (int i = 0; i < 12; i++) { seriesPrevYear.getData().add(new XYChart.Data(months[i], spentByYearAndMonth[1][i])); seriesCurrYear.getData().add(new XYChart.Data(months[i], spentByYearAndMonth[0][i])); } barChart.getData().addAll(seriesPrevYear, seriesCurrYear); }
[ "private", "void", "graphByMonth", "(", "ObservableList", "<", "Transaction", ">", "transactionList", ")", "{", "xAxis", ".", "setLabel", "(", "\"Month\"", ")", ";", "yAxis", ".", "setLabel", "(", "\"Total Expenditure\"", ")", ";", "barChart", ".", "setTitle", "(", "\"Expenditure This Year and Last Year By Month\"", ")", ";", "double", "[", "]", "[", "]", "spentByYearAndMonth", "=", "new", "double", "[", "2", "]", "[", "12", "]", ";", "int", "currYear", "=", "LocalDate", ".", "now", "(", ")", ".", "getYear", "(", ")", ";", "for", "(", "Transaction", "transaction", ":", "transactionList", ")", "{", "Amount", "amount", "=", "transaction", ".", "getAmount", "(", ")", ";", "String", "categoryString", "=", "transaction", ".", "getCategory", "(", ")", ".", "toString", "(", ")", ";", "LocalDate", "transactionLocalDate", "=", "transaction", ".", "getDate", "(", ")", ".", "transactionDate", ";", "if", "(", "amount", ".", "positive", "||", "categoryString", ".", "equals", "(", "\"INCOME\"", ")", ")", "{", "continue", ";", "}", "else", "if", "(", "transactionLocalDate", ".", "getYear", "(", ")", "<", "currYear", "-", "1", ")", "{", "break", ";", "}", "int", "yearIndex", "=", "currYear", "-", "transactionLocalDate", ".", "getYear", "(", ")", ";", "int", "month", "=", "transactionLocalDate", ".", "getMonthValue", "(", ")", ";", "spentByYearAndMonth", "[", "yearIndex", "]", "[", "month", "-", "1", "]", "+=", "amount", ".", "transactionAmount", ";", "}", "XYChart", ".", "Series", "<", "String", ",", "Number", ">", "seriesPrevYear", "=", "new", "XYChart", ".", "Series", "(", ")", ";", "seriesPrevYear", ".", "setName", "(", "currYear", "-", "1", "+", "\"\"", ")", ";", "XYChart", ".", "Series", "<", "String", ",", "Number", ">", "seriesCurrYear", "=", "new", "XYChart", ".", "Series", "(", ")", ";", "seriesCurrYear", ".", "setName", "(", "currYear", "+", "\"\"", ")", ";", "String", "[", "]", "months", "=", "{", "\"Jan\"", ",", "\"Feb\"", ",", "\"Mar\"", ",", "\"Apr\"", ",", "\"May\"", ",", "\"June\"", ",", "\"July\"", ",", "\"Aug\"", ",", "\"Sep\"", ",", "\"Oct\"", ",", "\"Nov\"", ",", "\"Dec\"", "}", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "12", ";", "i", "++", ")", "{", "seriesPrevYear", ".", "getData", "(", ")", ".", "add", "(", "new", "XYChart", ".", "Data", "(", "months", "[", "i", "]", ",", "spentByYearAndMonth", "[", "1", "]", "[", "i", "]", ")", ")", ";", "seriesCurrYear", ".", "getData", "(", ")", ".", "add", "(", "new", "XYChart", ".", "Data", "(", "months", "[", "i", "]", ",", "spentByYearAndMonth", "[", "0", "]", "[", "i", "]", ")", ")", ";", "}", "barChart", ".", "getData", "(", ")", ".", "addAll", "(", "seriesPrevYear", ",", "seriesCurrYear", ")", ";", "}" ]
Creates a stacked bar chart, X axis is months of the year and Y axis is total expenditure.
[ "Creates", "a", "stacked", "bar", "chart", "X", "axis", "is", "months", "of", "the", "year", "and", "Y", "axis", "is", "total", "expenditure", "." ]
[]
[ { "param": "transactionList", "type": "ObservableList<Transaction>" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "transactionList", "type": "ObservableList<Transaction>", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 3238, 918, 2667, 858, 5445, 12, 15279, 682, 32, 3342, 34, 2492, 682, 13, 288, 203, 3639, 21149, 18, 542, 2224, 2932, 5445, 8863, 203, 3639, 18390, 18, 542, 2224, 2932, 5269, 1312, 1302, 305, 594, 8863, 203, 3639, 4653, 7984, 18, 542, 4247, 2932, 424, 1302, 305, 594, 1220, 16666, 471, 6825, 16666, 2525, 10337, 8863, 203, 203, 3639, 1645, 63, 6362, 65, 26515, 858, 5593, 1876, 5445, 273, 394, 1645, 63, 22, 6362, 2138, 15533, 203, 3639, 509, 4306, 5593, 273, 15815, 18, 3338, 7675, 588, 5593, 5621, 203, 203, 3639, 364, 261, 3342, 2492, 294, 2492, 682, 13, 288, 203, 5411, 16811, 3844, 273, 2492, 18, 588, 6275, 5621, 203, 5411, 514, 3150, 780, 273, 2492, 18, 588, 4457, 7675, 10492, 5621, 203, 5411, 15815, 2492, 2042, 1626, 273, 2492, 18, 588, 1626, 7675, 7958, 1626, 31, 203, 5411, 309, 261, 8949, 18, 21094, 747, 3150, 780, 18, 14963, 2932, 706, 3865, 958, 6, 3719, 288, 203, 7734, 1324, 31, 203, 5411, 289, 469, 309, 261, 7958, 2042, 1626, 18, 588, 5593, 1435, 411, 4306, 5593, 300, 404, 13, 288, 203, 7734, 898, 31, 203, 5411, 289, 203, 203, 5411, 509, 3286, 1016, 273, 4306, 5593, 300, 2492, 2042, 1626, 18, 588, 5593, 5621, 203, 5411, 509, 3138, 273, 2492, 2042, 1626, 18, 588, 5445, 620, 5621, 203, 5411, 26515, 858, 5593, 1876, 5445, 63, 6874, 1016, 6362, 7496, 300, 404, 65, 1011, 3844, 18, 7958, 6275, 31, 203, 3639, 289, 203, 203, 3639, 18774, 7984, 18, 6485, 32, 780, 16, 3588, 34, 4166, 9958, 5593, 273, 394, 18774, 7984, 18, 6485, 5621, 203, 3639, 4166, 9958, 5593, 18, 542, 461, 12, 17016, 5593, 300, 404, 397, 1408, 1769, 203, 3639, 18774, 7984, 18, 6485, 32, 780, 16, 3588, 34, 4166, 20143, 5593, 273, 394, 18774, 7984, 18, 6485, 5621, 203, 3639, 4166, 20143, 5593, 18, 542, 461, 12, 17016, 5593, 397, 1408, 1769, 203, 203, 3639, 514, 8526, 8846, 273, 12528, 46, 304, 3113, 315, 2954, 70, 3113, 315, 49, 297, 3113, 315, 37, 683, 3113, 315, 49, 528, 3113, 315, 46, 7556, 3113, 315, 46, 332, 93, 3113, 315, 37, 637, 3113, 315, 5097, 3113, 315, 19320, 3113, 315, 50, 1527, 3113, 315, 1799, 6, 20451, 203, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 2593, 31, 277, 27245, 288, 203, 5411, 4166, 9958, 5593, 18, 588, 751, 7675, 1289, 12, 2704, 18774, 7984, 18, 751, 12, 27584, 63, 77, 6487, 26515, 858, 5593, 1876, 5445, 63, 21, 6362, 77, 5717, 1769, 203, 5411, 4166, 20143, 5593, 18, 588, 751, 7675, 1289, 12, 2704, 18774, 7984, 18, 751, 12, 27584, 63, 77, 6487, 26515, 858, 5593, 1876, 5445, 63, 20, 6362, 77, 5717, 1769, 203, 3639, 289, 203, 203, 3639, 4653, 7984, 18, 588, 751, 7675, 1289, 1595, 12, 10222, 9958, 5593, 16, 4166, 20143, 5593, 1769, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 10210, 279, 25776, 4653, 4980, 16, 1139, 2654, 353, 8846, 434, 326, 3286, 471, 1624, 2654, 353, 2078, 431, 1302, 305, 594, 18, 203, 377, 380, 7283, 87, 1142, 3286, 1807, 471, 333, 3286, 1807, 8938, 18, 203, 377, 380, 632, 891, 2492, 682, 5947, 987, 5105, 635, 279, 8626, 3138, 18, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
4a39316e8817b59a36d198723125cc59a9482a38
BenFheng/main
src/main/java/seedu/expensela/logic/parser/EditCommandParser.java
[ "MIT" ]
Java
parse
EditCommand
public EditCommand parse(String args) throws ParseException { requireNonNull(args); ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_AMOUNT, PREFIX_DATE, PREFIX_REMARK, PREFIX_CATEGORY, PREFIX_INCOME); Index index; boolean isIncome = false; try { index = ParserUtil.parseIndex(argMultimap.getPreamble()); } catch (ParseException pe) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE), pe); } EditCommand.EditTransactionDescriptor editTransactionDescriptor = new EditTransactionDescriptor(); try { if (argMultimap.getValue(PREFIX_INCOME).isPresent()) { isIncome = true; } if (argMultimap.getValue(PREFIX_NAME).isPresent()) { editTransactionDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get())); if (argMultimap.getValue(PREFIX_NAME).get().length() > 44) { throw new ParseException("Name is too long!"); } } if (argMultimap.getValue(PREFIX_AMOUNT).isPresent()) { editTransactionDescriptor.setAmount(ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get(), isIncome)); if (Double.parseDouble(argMultimap.getValue(PREFIX_AMOUNT).get()) > 999999) { throw new ParseException("Income cannot be 1 million dollars or more!"); } } if (argMultimap.getValue(PREFIX_DATE).isPresent()) { editTransactionDescriptor.setDate(ParserUtil.parseDate(argMultimap.getValue(PREFIX_DATE).get())); if (LocalDate.parse(argMultimap.getValue(PREFIX_DATE).get()).isAfter(LocalDate.now())) { throw new ParseException("Date input cannot be a date in the future (after today)"); } } if (argMultimap.getValue(PREFIX_REMARK).isPresent()) { editTransactionDescriptor.setRemark(ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK).get())); } if (argMultimap.getValue(PREFIX_CATEGORY).isPresent()) { editTransactionDescriptor .setCategory(ParserUtil.parseCategory(argMultimap.getValue(PREFIX_CATEGORY).get())); } if (!editTransactionDescriptor.isAnyFieldEdited()) { throw new ParseException(EditCommand.MESSAGE_NOT_EDITED); } return new EditCommand(index, editTransactionDescriptor); } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } }
/** * Parses the given {@code String} of arguments in the context of the EditCommand * and returns an EditCommand object for execution. * @throws ParseException if the user input does not conform the expected format */
Parses the given String of arguments in the context of the EditCommand and returns an EditCommand object for execution. @throws ParseException if the user input does not conform the expected format
[ "Parses", "the", "given", "String", "of", "arguments", "in", "the", "context", "of", "the", "EditCommand", "and", "returns", "an", "EditCommand", "object", "for", "execution", ".", "@throws", "ParseException", "if", "the", "user", "input", "does", "not", "conform", "the", "expected", "format" ]
public EditCommand parse(String args) throws ParseException { requireNonNull(args); ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_NAME, PREFIX_AMOUNT, PREFIX_DATE, PREFIX_REMARK, PREFIX_CATEGORY, PREFIX_INCOME); Index index; boolean isIncome = false; try { index = ParserUtil.parseIndex(argMultimap.getPreamble()); } catch (ParseException pe) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, EditCommand.MESSAGE_USAGE), pe); } EditCommand.EditTransactionDescriptor editTransactionDescriptor = new EditTransactionDescriptor(); try { if (argMultimap.getValue(PREFIX_INCOME).isPresent()) { isIncome = true; } if (argMultimap.getValue(PREFIX_NAME).isPresent()) { editTransactionDescriptor.setName(ParserUtil.parseName(argMultimap.getValue(PREFIX_NAME).get())); if (argMultimap.getValue(PREFIX_NAME).get().length() > 44) { throw new ParseException("Name is too long!"); } } if (argMultimap.getValue(PREFIX_AMOUNT).isPresent()) { editTransactionDescriptor.setAmount(ParserUtil.parseAmount(argMultimap.getValue(PREFIX_AMOUNT).get(), isIncome)); if (Double.parseDouble(argMultimap.getValue(PREFIX_AMOUNT).get()) > 999999) { throw new ParseException("Income cannot be 1 million dollars or more!"); } } if (argMultimap.getValue(PREFIX_DATE).isPresent()) { editTransactionDescriptor.setDate(ParserUtil.parseDate(argMultimap.getValue(PREFIX_DATE).get())); if (LocalDate.parse(argMultimap.getValue(PREFIX_DATE).get()).isAfter(LocalDate.now())) { throw new ParseException("Date input cannot be a date in the future (after today)"); } } if (argMultimap.getValue(PREFIX_REMARK).isPresent()) { editTransactionDescriptor.setRemark(ParserUtil.parseRemark(argMultimap.getValue(PREFIX_REMARK).get())); } if (argMultimap.getValue(PREFIX_CATEGORY).isPresent()) { editTransactionDescriptor .setCategory(ParserUtil.parseCategory(argMultimap.getValue(PREFIX_CATEGORY).get())); } if (!editTransactionDescriptor.isAnyFieldEdited()) { throw new ParseException(EditCommand.MESSAGE_NOT_EDITED); } return new EditCommand(index, editTransactionDescriptor); } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } }
[ "public", "EditCommand", "parse", "(", "String", "args", ")", "throws", "ParseException", "{", "requireNonNull", "(", "args", ")", ";", "ArgumentMultimap", "argMultimap", "=", "ArgumentTokenizer", ".", "tokenize", "(", "args", ",", "PREFIX_NAME", ",", "PREFIX_AMOUNT", ",", "PREFIX_DATE", ",", "PREFIX_REMARK", ",", "PREFIX_CATEGORY", ",", "PREFIX_INCOME", ")", ";", "Index", "index", ";", "boolean", "isIncome", "=", "false", ";", "try", "{", "index", "=", "ParserUtil", ".", "parseIndex", "(", "argMultimap", ".", "getPreamble", "(", ")", ")", ";", "}", "catch", "(", "ParseException", "pe", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_COMMAND_FORMAT", ",", "EditCommand", ".", "MESSAGE_USAGE", ")", ",", "pe", ")", ";", "}", "EditCommand", ".", "EditTransactionDescriptor", "editTransactionDescriptor", "=", "new", "EditTransactionDescriptor", "(", ")", ";", "try", "{", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_INCOME", ")", ".", "isPresent", "(", ")", ")", "{", "isIncome", "=", "true", ";", "}", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_NAME", ")", ".", "isPresent", "(", ")", ")", "{", "editTransactionDescriptor", ".", "setName", "(", "ParserUtil", ".", "parseName", "(", "argMultimap", ".", "getValue", "(", "PREFIX_NAME", ")", ".", "get", "(", ")", ")", ")", ";", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_NAME", ")", ".", "get", "(", ")", ".", "length", "(", ")", ">", "44", ")", "{", "throw", "new", "ParseException", "(", "\"Name is too long!\"", ")", ";", "}", "}", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_AMOUNT", ")", ".", "isPresent", "(", ")", ")", "{", "editTransactionDescriptor", ".", "setAmount", "(", "ParserUtil", ".", "parseAmount", "(", "argMultimap", ".", "getValue", "(", "PREFIX_AMOUNT", ")", ".", "get", "(", ")", ",", "isIncome", ")", ")", ";", "if", "(", "Double", ".", "parseDouble", "(", "argMultimap", ".", "getValue", "(", "PREFIX_AMOUNT", ")", ".", "get", "(", ")", ")", ">", "999999", ")", "{", "throw", "new", "ParseException", "(", "\"Income cannot be 1 million dollars or more!\"", ")", ";", "}", "}", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_DATE", ")", ".", "isPresent", "(", ")", ")", "{", "editTransactionDescriptor", ".", "setDate", "(", "ParserUtil", ".", "parseDate", "(", "argMultimap", ".", "getValue", "(", "PREFIX_DATE", ")", ".", "get", "(", ")", ")", ")", ";", "if", "(", "LocalDate", ".", "parse", "(", "argMultimap", ".", "getValue", "(", "PREFIX_DATE", ")", ".", "get", "(", ")", ")", ".", "isAfter", "(", "LocalDate", ".", "now", "(", ")", ")", ")", "{", "throw", "new", "ParseException", "(", "\"Date input cannot be a date in the future (after today)\"", ")", ";", "}", "}", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_REMARK", ")", ".", "isPresent", "(", ")", ")", "{", "editTransactionDescriptor", ".", "setRemark", "(", "ParserUtil", ".", "parseRemark", "(", "argMultimap", ".", "getValue", "(", "PREFIX_REMARK", ")", ".", "get", "(", ")", ")", ")", ";", "}", "if", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "isPresent", "(", ")", ")", "{", "editTransactionDescriptor", ".", "setCategory", "(", "ParserUtil", ".", "parseCategory", "(", "argMultimap", ".", "getValue", "(", "PREFIX_CATEGORY", ")", ".", "get", "(", ")", ")", ")", ";", "}", "if", "(", "!", "editTransactionDescriptor", ".", "isAnyFieldEdited", "(", ")", ")", "{", "throw", "new", "ParseException", "(", "EditCommand", ".", "MESSAGE_NOT_EDITED", ")", ";", "}", "return", "new", "EditCommand", "(", "index", ",", "editTransactionDescriptor", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "throw", "new", "ParseException", "(", "e", ".", "getMessage", "(", ")", ")", ";", "}", "}" ]
Parses the given {@code String} of arguments in the context of the EditCommand and returns an EditCommand object for execution.
[ "Parses", "the", "given", "{", "@code", "String", "}", "of", "arguments", "in", "the", "context", "of", "the", "EditCommand", "and", "returns", "an", "EditCommand", "object", "for", "execution", "." ]
[]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 15328, 2189, 1109, 12, 780, 833, 13, 1216, 10616, 288, 203, 3639, 10134, 12, 1968, 1769, 203, 3639, 5067, 22020, 1501, 22020, 273, 203, 7734, 5067, 10524, 18, 2316, 554, 12, 1968, 16, 17154, 67, 1985, 16, 17154, 67, 2192, 51, 5321, 16, 17154, 67, 4594, 16, 17154, 67, 862, 12693, 16, 203, 13491, 17154, 67, 24847, 16, 17154, 67, 706, 3865, 958, 1769, 203, 203, 3639, 3340, 770, 31, 203, 3639, 1250, 8048, 5624, 273, 629, 31, 203, 203, 3639, 775, 288, 203, 5411, 770, 273, 6783, 1304, 18, 2670, 1016, 12, 3175, 22020, 18, 588, 52, 793, 7119, 10663, 203, 3639, 289, 1044, 261, 13047, 2804, 13, 288, 203, 5411, 604, 394, 10616, 12, 780, 18, 2139, 12, 8723, 67, 9347, 67, 19104, 67, 7254, 16, 15328, 2189, 18, 8723, 67, 29550, 3631, 2804, 1769, 203, 3639, 289, 203, 203, 3639, 15328, 2189, 18, 4666, 3342, 3187, 3874, 3342, 3187, 273, 394, 15328, 3342, 3187, 5621, 203, 203, 3639, 775, 288, 203, 5411, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 706, 3865, 958, 2934, 291, 6351, 10756, 288, 203, 7734, 8048, 5624, 273, 638, 31, 203, 5411, 289, 203, 5411, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 1985, 2934, 291, 6351, 10756, 288, 203, 7734, 3874, 3342, 3187, 18, 542, 461, 12, 2678, 1304, 18, 2670, 461, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 1985, 2934, 588, 1435, 10019, 203, 203, 7734, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 1985, 2934, 588, 7675, 2469, 1435, 405, 13291, 13, 288, 203, 10792, 604, 394, 10616, 2932, 461, 353, 4885, 1525, 4442, 1769, 203, 7734, 289, 203, 5411, 289, 203, 5411, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 2192, 51, 5321, 2934, 291, 6351, 10756, 288, 203, 7734, 3874, 3342, 3187, 18, 542, 6275, 12, 2678, 1304, 18, 2670, 6275, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 2192, 51, 5321, 2934, 588, 9334, 203, 13491, 8048, 5624, 10019, 203, 203, 7734, 309, 261, 5265, 18, 2670, 5265, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 2192, 51, 5321, 2934, 588, 10756, 405, 23841, 29, 13, 288, 203, 10792, 604, 394, 10616, 2932, 382, 5624, 2780, 506, 404, 312, 737, 285, 302, 22382, 5913, 578, 1898, 4442, 1769, 203, 7734, 289, 203, 5411, 289, 203, 5411, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 4594, 2934, 291, 6351, 10756, 288, 203, 203, 7734, 3874, 3342, 3187, 18, 542, 1626, 12, 2678, 1304, 18, 2670, 1626, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 4594, 2934, 588, 1435, 10019, 203, 203, 7734, 309, 261, 2042, 1626, 18, 2670, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 4594, 2934, 588, 1435, 2934, 291, 4436, 12, 2042, 1626, 18, 3338, 1435, 3719, 288, 203, 10792, 604, 394, 10616, 2932, 1626, 810, 2780, 506, 279, 1509, 316, 326, 3563, 261, 5205, 10074, 2225, 1769, 203, 7734, 289, 203, 5411, 289, 203, 203, 5411, 309, 261, 3175, 22020, 18, 24805, 12, 6307, 67, 862, 12693, 2934, 291, 6351, 10756, 288, 2 ]
[ 1, 1, 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, 26873, 203, 377, 380, 2280, 2420, 326, 864, 8901, 710, 514, 97, 434, 1775, 316, 326, 819, 434, 326, 15328, 2189, 203, 377, 380, 471, 1135, 392, 15328, 2189, 733, 364, 4588, 18, 203, 377, 380, 632, 15069, 10616, 309, 326, 729, 810, 1552, 486, 20156, 326, 2665, 740, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]
4dc5e74662742d9d3dc83eb32072b38fa623235e
BenFheng/main
src/main/java/seedu/expensela/logic/parser/BudgetCommandParser.java
[ "MIT" ]
Java
parse
BudgetCommand
public BudgetCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_BUDGET, PREFIX_RECURRING); if (!arePrefixesPresent(argMultimap, PREFIX_BUDGET) || !argMultimap.getPreamble().isEmpty()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BudgetCommand.MESSAGE_USAGE)); } try { Budget budget = ParserUtil.parseBudget(argMultimap.getValue(PREFIX_BUDGET).get()); boolean recurring = false; if (arePrefixesPresent(argMultimap, PREFIX_RECURRING)) { recurring = true; } return new BudgetCommand(budget.budgetAmount, recurring); } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } }
/** * Parses the given {@code String} of arguments in the context of the BudgetCommand * and returns a BudgetCommand object for execution. * @throws ParseException if the user input does not conform the expected format */
Parses the given String of arguments in the context of the BudgetCommand and returns a BudgetCommand object for execution. @throws ParseException if the user input does not conform the expected format
[ "Parses", "the", "given", "String", "of", "arguments", "in", "the", "context", "of", "the", "BudgetCommand", "and", "returns", "a", "BudgetCommand", "object", "for", "execution", ".", "@throws", "ParseException", "if", "the", "user", "input", "does", "not", "conform", "the", "expected", "format" ]
public BudgetCommand parse(String args) throws ParseException { ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_BUDGET, PREFIX_RECURRING); if (!arePrefixesPresent(argMultimap, PREFIX_BUDGET) || !argMultimap.getPreamble().isEmpty()) { throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT, BudgetCommand.MESSAGE_USAGE)); } try { Budget budget = ParserUtil.parseBudget(argMultimap.getValue(PREFIX_BUDGET).get()); boolean recurring = false; if (arePrefixesPresent(argMultimap, PREFIX_RECURRING)) { recurring = true; } return new BudgetCommand(budget.budgetAmount, recurring); } catch (IllegalArgumentException e) { throw new ParseException(e.getMessage()); } }
[ "public", "BudgetCommand", "parse", "(", "String", "args", ")", "throws", "ParseException", "{", "ArgumentMultimap", "argMultimap", "=", "ArgumentTokenizer", ".", "tokenize", "(", "args", ",", "PREFIX_BUDGET", ",", "PREFIX_RECURRING", ")", ";", "if", "(", "!", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_BUDGET", ")", "||", "!", "argMultimap", ".", "getPreamble", "(", ")", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "ParseException", "(", "String", ".", "format", "(", "MESSAGE_INVALID_COMMAND_FORMAT", ",", "BudgetCommand", ".", "MESSAGE_USAGE", ")", ")", ";", "}", "try", "{", "Budget", "budget", "=", "ParserUtil", ".", "parseBudget", "(", "argMultimap", ".", "getValue", "(", "PREFIX_BUDGET", ")", ".", "get", "(", ")", ")", ";", "boolean", "recurring", "=", "false", ";", "if", "(", "arePrefixesPresent", "(", "argMultimap", ",", "PREFIX_RECURRING", ")", ")", "{", "recurring", "=", "true", ";", "}", "return", "new", "BudgetCommand", "(", "budget", ".", "budgetAmount", ",", "recurring", ")", ";", "}", "catch", "(", "IllegalArgumentException", "e", ")", "{", "throw", "new", "ParseException", "(", "e", ".", "getMessage", "(", ")", ")", ";", "}", "}" ]
Parses the given {@code String} of arguments in the context of the BudgetCommand and returns a BudgetCommand object for execution.
[ "Parses", "the", "given", "{", "@code", "String", "}", "of", "arguments", "in", "the", "context", "of", "the", "BudgetCommand", "and", "returns", "a", "BudgetCommand", "object", "for", "execution", "." ]
[]
[ { "param": "args", "type": "String" } ]
{ "returns": [], "raises": [], "params": [ { "identifier": "args", "type": "String", "docstring": null, "docstring_tokens": [], "default": null, "is_optional": null } ], "outlier_params": [], "others": [] }
[ 1, 3495, 21872, 5110, 30, 1071, 25099, 2189, 1109, 12, 780, 833, 13, 1216, 10616, 288, 203, 3639, 5067, 22020, 1501, 22020, 273, 203, 7734, 5067, 10524, 18, 2316, 554, 12, 1968, 16, 17154, 67, 3000, 40, 3264, 16, 17154, 67, 862, 7509, 54, 1360, 1769, 203, 3639, 309, 16051, 834, 11700, 6351, 12, 3175, 22020, 16, 17154, 67, 3000, 40, 3264, 13, 203, 7734, 747, 401, 3175, 22020, 18, 588, 52, 793, 7119, 7675, 291, 1921, 10756, 288, 203, 5411, 604, 394, 10616, 12, 780, 18, 2139, 12, 8723, 67, 9347, 67, 19104, 67, 7254, 16, 25099, 2189, 18, 8723, 67, 29550, 10019, 203, 3639, 289, 203, 3639, 775, 288, 203, 5411, 25099, 15051, 273, 6783, 1304, 18, 2670, 16124, 12, 3175, 22020, 18, 24805, 12, 6307, 67, 3000, 40, 3264, 2934, 588, 10663, 203, 5411, 1250, 26043, 273, 629, 31, 203, 5411, 309, 261, 834, 11700, 6351, 12, 3175, 22020, 16, 17154, 67, 862, 7509, 54, 1360, 3719, 288, 203, 7734, 26043, 273, 638, 31, 203, 5411, 289, 203, 5411, 327, 394, 25099, 2189, 12, 70, 8562, 18, 70, 8562, 6275, 16, 26043, 1769, 203, 3639, 289, 1044, 261, 31237, 425, 13, 288, 203, 5411, 604, 394, 10616, 12, 73, 18, 24906, 10663, 203, 3639, 289, 203, 565, 289, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]
[ 1, 26873, 203, 377, 380, 2280, 2420, 326, 864, 8901, 710, 514, 97, 434, 1775, 316, 326, 819, 434, 326, 25099, 2189, 203, 377, 380, 471, 1135, 279, 25099, 2189, 733, 364, 4588, 18, 203, 377, 380, 632, 15069, 10616, 309, 326, 729, 810, 1552, 486, 20156, 326, 2665, 740, 203, 377, 1195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100 ]