id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3,900 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/config/ExtractorConfig.java | ExtractorConfig.getStringArray | public String[] getStringArray(String key) {
try {
return getValue(String[].class, key);
} catch (ClassCastException e) {
return new String[] { getString(key) };
}
} | java | public String[] getStringArray(String key) {
try {
return getValue(String[].class, key);
} catch (ClassCastException e) {
return new String[] { getString(key) };
}
} | [
"public",
"String",
"[",
"]",
"getStringArray",
"(",
"String",
"key",
")",
"{",
"try",
"{",
"return",
"getValue",
"(",
"String",
"[",
"]",
".",
"class",
",",
"key",
")",
";",
"}",
"catch",
"(",
"ClassCastException",
"e",
")",
"{",
"return",
"new",
"S... | Get string array.
@param key the key
@return the string [ ] | [
"Get",
"string",
"array",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/config/ExtractorConfig.java#L144-L151 |
3,901 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/config/ExtractorConfig.java | ExtractorConfig.getPair | public <K, V> Pair<K, V> getPair(String key, Class<K> keyClass, Class<V> valueClass) {
return getValue(Pair.class, key);
} | java | public <K, V> Pair<K, V> getPair(String key, Class<K> keyClass, Class<V> valueClass) {
return getValue(Pair.class, key);
} | [
"public",
"<",
"K",
",",
"V",
">",
"Pair",
"<",
"K",
",",
"V",
">",
"getPair",
"(",
"String",
"key",
",",
"Class",
"<",
"K",
">",
"keyClass",
",",
"Class",
"<",
"V",
">",
"valueClass",
")",
"{",
"return",
"getValue",
"(",
"Pair",
".",
"class",
... | Gets pair.
@param key the key
@param keyClass the key class
@param valueClass the value class
@return the pair | [
"Gets",
"pair",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/config/ExtractorConfig.java#L221-L223 |
3,902 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/config/JdbcDeepJobConfig.java | JdbcDeepJobConfig.validate | private void validate() {
if(driverClass == null) {
throw new IllegalArgumentException("Driver class must be specified");
}
if(catalog == null || catalog.isEmpty()) {
throw new IllegalArgumentException("Schema name must be specified");
}
if(table == null |... | java | private void validate() {
if(driverClass == null) {
throw new IllegalArgumentException("Driver class must be specified");
}
if(catalog == null || catalog.isEmpty()) {
throw new IllegalArgumentException("Schema name must be specified");
}
if(table == null |... | [
"private",
"void",
"validate",
"(",
")",
"{",
"if",
"(",
"driverClass",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Driver class must be specified\"",
")",
";",
"}",
"if",
"(",
"catalog",
"==",
"null",
"||",
"catalog",
".",
"i... | Validates configuration object. | [
"Validates",
"configuration",
"object",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/config/JdbcDeepJobConfig.java#L194-L214 |
3,903 | Stratio/deep-spark | deep-mongodb/src/main/java/com/stratio/deep/mongodb/config/MongoConfigFactory.java | MongoConfigFactory.createMongoDB | public static <T extends IDeepType> MongoDeepJobConfig<T> createMongoDB(Class<T> entityClass) {
return new MongoDeepJobConfig<>(entityClass);
} | java | public static <T extends IDeepType> MongoDeepJobConfig<T> createMongoDB(Class<T> entityClass) {
return new MongoDeepJobConfig<>(entityClass);
} | [
"public",
"static",
"<",
"T",
"extends",
"IDeepType",
">",
"MongoDeepJobConfig",
"<",
"T",
">",
"createMongoDB",
"(",
"Class",
"<",
"T",
">",
"entityClass",
")",
"{",
"return",
"new",
"MongoDeepJobConfig",
"<>",
"(",
"entityClass",
")",
";",
"}"
] | Creates a new entity-based MongoDB job configuration object.
@param entityClass the class instance of the entity class that will be used to map db objects to Java objects.
@param <T> the generic type of the entity object implementing IDeepType.
@return a new entity-based MongoDB job configuration object. | [
"Creates",
"a",
"new",
"entity",
"-",
"based",
"MongoDB",
"job",
"configuration",
"object",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-mongodb/src/main/java/com/stratio/deep/mongodb/config/MongoConfigFactory.java#L50-L52 |
3,904 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/extractor/CassandraExtractor.java | CassandraExtractor.getPreferredLocations | @Override
public List<String> getPreferredLocations(Partition tokenRange) {
return ((DeepPartition) tokenRange).splitWrapper().getReplicas();
} | java | @Override
public List<String> getPreferredLocations(Partition tokenRange) {
return ((DeepPartition) tokenRange).splitWrapper().getReplicas();
} | [
"@",
"Override",
"public",
"List",
"<",
"String",
">",
"getPreferredLocations",
"(",
"Partition",
"tokenRange",
")",
"{",
"return",
"(",
"(",
"DeepPartition",
")",
"tokenRange",
")",
".",
"splitWrapper",
"(",
")",
".",
"getReplicas",
"(",
")",
";",
"}"
] | Returns a list of hosts on which the given split resides. | [
"Returns",
"a",
"list",
"of",
"hosts",
"on",
"which",
"the",
"given",
"split",
"resides",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/extractor/CassandraExtractor.java#L147-L151 |
3,905 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/extractor/CassandraExtractor.java | CassandraExtractor.initRecordReader | private DeepRecordReader initRecordReader(final DeepPartition dp,
CassandraDeepJobConfig<T> config) {
DeepRecordReader recordReader = new DeepRecordReader(config, dp.splitWrapper());
return recordReader;
} | java | private DeepRecordReader initRecordReader(final DeepPartition dp,
CassandraDeepJobConfig<T> config) {
DeepRecordReader recordReader = new DeepRecordReader(config, dp.splitWrapper());
return recordReader;
} | [
"private",
"DeepRecordReader",
"initRecordReader",
"(",
"final",
"DeepPartition",
"dp",
",",
"CassandraDeepJobConfig",
"<",
"T",
">",
"config",
")",
"{",
"DeepRecordReader",
"recordReader",
"=",
"new",
"DeepRecordReader",
"(",
"config",
",",
"dp",
".",
"splitWrapper... | Instantiates a new deep record reader object associated to the provided partition.
@param dp a spark deep partition
@return the deep record reader associated to the provided partition. | [
"Instantiates",
"a",
"new",
"deep",
"record",
"reader",
"object",
"associated",
"to",
"the",
"provided",
"partition",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/extractor/CassandraExtractor.java#L159-L166 |
3,906 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/utils/Pair.java | Pair.create | public static <L, R> Pair<L, R> create(L left, R right) {
return new Pair<>(left, right);
} | java | public static <L, R> Pair<L, R> create(L left, R right) {
return new Pair<>(left, right);
} | [
"public",
"static",
"<",
"L",
",",
"R",
">",
"Pair",
"<",
"L",
",",
"R",
">",
"create",
"(",
"L",
"left",
",",
"R",
"right",
")",
"{",
"return",
"new",
"Pair",
"<>",
"(",
"left",
",",
"right",
")",
";",
"}"
] | Creates a new immutable pair of objects.
@param left the left element.
@param right the right element.
@param <L> the type of the left element.
@param <R> the type of the right element.
@return a new pair. | [
"Creates",
"a",
"new",
"immutable",
"pair",
"of",
"objects",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/utils/Pair.java#L58-L60 |
3,907 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java | ThriftRangeUtils.getSplits | public List<DeepTokenRange> getSplits() {
// Get the cluster token ranges
List<DeepTokenRange> tokenRanges = getRanges();
// Get the cluster token ranges splits
List<DeepTokenRange> splits = new ArrayList<>();
for (DeepTokenRange tokenRange : tokenRanges) {
List<Dee... | java | public List<DeepTokenRange> getSplits() {
// Get the cluster token ranges
List<DeepTokenRange> tokenRanges = getRanges();
// Get the cluster token ranges splits
List<DeepTokenRange> splits = new ArrayList<>();
for (DeepTokenRange tokenRange : tokenRanges) {
List<Dee... | [
"public",
"List",
"<",
"DeepTokenRange",
">",
"getSplits",
"(",
")",
"{",
"// Get the cluster token ranges",
"List",
"<",
"DeepTokenRange",
">",
"tokenRanges",
"=",
"getRanges",
"(",
")",
";",
"// Get the cluster token ranges splits",
"List",
"<",
"DeepTokenRange",
">... | Returns the token range splits of the Cassandra ring that will be mapped to Spark partitions.
@return the list of computed token ranges. | [
"Returns",
"the",
"token",
"range",
"splits",
"of",
"the",
"Cassandra",
"ring",
"that",
"will",
"be",
"mapped",
"to",
"Spark",
"partitions",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java#L104-L117 |
3,908 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java | ThriftRangeUtils.getRanges | public List<DeepTokenRange> getRanges() {
try {
List<TokenRange> tokenRanges;
ThriftClient client = ThriftClient.build(host, rpcPort);
try {
tokenRanges = client.describe_local_ring(keyspace);
} catch (TApplicationException e) {
if... | java | public List<DeepTokenRange> getRanges() {
try {
List<TokenRange> tokenRanges;
ThriftClient client = ThriftClient.build(host, rpcPort);
try {
tokenRanges = client.describe_local_ring(keyspace);
} catch (TApplicationException e) {
if... | [
"public",
"List",
"<",
"DeepTokenRange",
">",
"getRanges",
"(",
")",
"{",
"try",
"{",
"List",
"<",
"TokenRange",
">",
"tokenRanges",
";",
"ThriftClient",
"client",
"=",
"ThriftClient",
".",
"build",
"(",
"host",
",",
"rpcPort",
")",
";",
"try",
"{",
"tok... | Returns the token ranges of the Cassandra ring that will be mapped to Spark partitions.
The returned ranges are the Cassandra's physical ones, without any splitting.
@return the list of Cassandra ring token ranges. | [
"Returns",
"the",
"token",
"ranges",
"of",
"the",
"Cassandra",
"ring",
"that",
"will",
"be",
"mapped",
"to",
"Spark",
"partitions",
".",
"The",
"returned",
"ranges",
"are",
"the",
"Cassandra",
"s",
"physical",
"ones",
"without",
"any",
"splitting",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java#L125-L152 |
3,909 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java | ThriftRangeUtils.getSplits | public List<DeepTokenRange> getSplits(DeepTokenRange deepTokenRange) {
String start = tokenAsString((Comparable) deepTokenRange.getStartToken());
String end = tokenAsString((Comparable) deepTokenRange.getEndToken());
List<String> endpoints = deepTokenRange.getReplicas();
for (String en... | java | public List<DeepTokenRange> getSplits(DeepTokenRange deepTokenRange) {
String start = tokenAsString((Comparable) deepTokenRange.getStartToken());
String end = tokenAsString((Comparable) deepTokenRange.getEndToken());
List<String> endpoints = deepTokenRange.getReplicas();
for (String en... | [
"public",
"List",
"<",
"DeepTokenRange",
">",
"getSplits",
"(",
"DeepTokenRange",
"deepTokenRange",
")",
"{",
"String",
"start",
"=",
"tokenAsString",
"(",
"(",
"Comparable",
")",
"deepTokenRange",
".",
"getStartToken",
"(",
")",
")",
";",
"String",
"end",
"="... | Returns the computed token range splits of the specified token range.
@param deepTokenRange the token range to be splitted.
@return the list of token range splits, which are also token ranges. | [
"Returns",
"the",
"computed",
"token",
"range",
"splits",
"of",
"the",
"specified",
"token",
"range",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java#L160-L177 |
3,910 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java | ThriftRangeUtils.deepTokenRanges | public List<DeepTokenRange> deepTokenRanges(List<CfSplit> splits, List<String> endpoints) {
List<DeepTokenRange> result = new ArrayList<>();
for (CfSplit split : splits) {
Comparable splitStart = tokenAsComparable(split.getStart_token());
Comparable splitEnd = tokenAsComparable(s... | java | public List<DeepTokenRange> deepTokenRanges(List<CfSplit> splits, List<String> endpoints) {
List<DeepTokenRange> result = new ArrayList<>();
for (CfSplit split : splits) {
Comparable splitStart = tokenAsComparable(split.getStart_token());
Comparable splitEnd = tokenAsComparable(s... | [
"public",
"List",
"<",
"DeepTokenRange",
">",
"deepTokenRanges",
"(",
"List",
"<",
"CfSplit",
">",
"splits",
",",
"List",
"<",
"String",
">",
"endpoints",
")",
"{",
"List",
"<",
"DeepTokenRange",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";... | Returns the Deep splits represented by the specified Thrift splits using the specified endpoints for all of them.
Note that the returned list can contain one more ranges than the specified because the range containing the
partitioner's minimum token are divided into two ranges.
@param splits the Thrift splits to be... | [
"Returns",
"the",
"Deep",
"splits",
"represented",
"by",
"the",
"specified",
"Thrift",
"splits",
"using",
"the",
"specified",
"endpoints",
"for",
"all",
"of",
"them",
".",
"Note",
"that",
"the",
"returned",
"list",
"can",
"contain",
"one",
"more",
"ranges",
... | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftRangeUtils.java#L189-L204 |
3,911 | Stratio/deep-spark | deep-aerospike/src/main/java/com/stratio/deep/aerospike/config/AerospikeDeepJobConfig.java | AerospikeDeepJobConfig.port | public AerospikeDeepJobConfig<T> port(Integer[] ports) {
this.portList.addAll(Arrays.asList(ports));
return this;
} | java | public AerospikeDeepJobConfig<T> port(Integer[] ports) {
this.portList.addAll(Arrays.asList(ports));
return this;
} | [
"public",
"AerospikeDeepJobConfig",
"<",
"T",
">",
"port",
"(",
"Integer",
"[",
"]",
"ports",
")",
"{",
"this",
".",
"portList",
".",
"addAll",
"(",
"Arrays",
".",
"asList",
"(",
"ports",
")",
")",
";",
"return",
"this",
";",
"}"
] | Set Aerospike nodes' ports.
@param ports
@return | [
"Set",
"Aerospike",
"nodes",
"ports",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/config/AerospikeDeepJobConfig.java#L133-L136 |
3,912 | Stratio/deep-spark | deep-aerospike/src/main/java/com/stratio/deep/aerospike/config/AerospikeDeepJobConfig.java | AerospikeDeepJobConfig.validate | private void validate() {
if (host.isEmpty()) {
throw new IllegalArgumentException("host cannot be null");
}
if (catalog == null) {
throw new IllegalArgumentException("namespace cannot be null");
}
if (table == null) {
throw new IllegalArgument... | java | private void validate() {
if (host.isEmpty()) {
throw new IllegalArgumentException("host cannot be null");
}
if (catalog == null) {
throw new IllegalArgumentException("namespace cannot be null");
}
if (table == null) {
throw new IllegalArgument... | [
"private",
"void",
"validate",
"(",
")",
"{",
"if",
"(",
"host",
".",
"isEmpty",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"host cannot be null\"",
")",
";",
"}",
"if",
"(",
"catalog",
"==",
"null",
")",
"{",
"throw",
"new",
... | Validates connection parameters. | [
"Validates",
"connection",
"parameters",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/config/AerospikeDeepJobConfig.java#L259-L281 |
3,913 | Stratio/deep-spark | deep-aerospike/src/main/java/com/stratio/deep/aerospike/config/AerospikeDeepJobConfig.java | AerospikeDeepJobConfig.filterQuery | public AerospikeDeepJobConfig<T> filterQuery(Filter[] filters) {
if (filters.length > 1) {
throw new UnsupportedOperationException("Aerospike currently accepts only one filter operations");
} else if (filters.length > 0) {
Filter deepFilter = filters[0];
if (!isValidA... | java | public AerospikeDeepJobConfig<T> filterQuery(Filter[] filters) {
if (filters.length > 1) {
throw new UnsupportedOperationException("Aerospike currently accepts only one filter operations");
} else if (filters.length > 0) {
Filter deepFilter = filters[0];
if (!isValidA... | [
"public",
"AerospikeDeepJobConfig",
"<",
"T",
">",
"filterQuery",
"(",
"Filter",
"[",
"]",
"filters",
")",
"{",
"if",
"(",
"filters",
".",
"length",
">",
"1",
")",
"{",
"throw",
"new",
"UnsupportedOperationException",
"(",
"\"Aerospike currently accepts only one f... | Configure Aerospike filters with the received Deep Filter objects.
@param filters
@return | [
"Configure",
"Aerospike",
"filters",
"with",
"the",
"received",
"Deep",
"Filter",
"objects",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/config/AerospikeDeepJobConfig.java#L323-L340 |
3,914 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java | UtilJdbc.getObjectFromRow | public static <T, S extends DeepJobConfig> T getObjectFromRow(Class<T> classEntity, Map<String, Object> row, DeepJobConfig<T, S> config) throws IllegalAccessException, InstantiationException, InvocationTargetException {
T t = classEntity.newInstance();
Field[] fields = AnnotationUtils.filterDeepFields(c... | java | public static <T, S extends DeepJobConfig> T getObjectFromRow(Class<T> classEntity, Map<String, Object> row, DeepJobConfig<T, S> config) throws IllegalAccessException, InstantiationException, InvocationTargetException {
T t = classEntity.newInstance();
Field[] fields = AnnotationUtils.filterDeepFields(c... | [
"public",
"static",
"<",
"T",
",",
"S",
"extends",
"DeepJobConfig",
">",
"T",
"getObjectFromRow",
"(",
"Class",
"<",
"T",
">",
"classEntity",
",",
"Map",
"<",
"String",
",",
"Object",
">",
"row",
",",
"DeepJobConfig",
"<",
"T",
",",
"S",
">",
"config",... | Returns a Stratio Entity from a Jdbc row represented as a map.
@param classEntity Stratio Entity.
@param row Jdbc row represented as a Map.
@param config JDBC Deep Job configuration.
@param <T> Stratio Entity class.
@return Stratio Entity from a Jdbc row represented as a map.
@throws IllegalAccessException
@throws Inst... | [
"Returns",
"a",
"Stratio",
"Entity",
"from",
"a",
"Jdbc",
"row",
"represented",
"as",
"a",
"map",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java#L53-L76 |
3,915 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java | UtilJdbc.getRowFromObject | public static <T> Map<String, Object> getRowFromObject(T entity) throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Field[] fields = AnnotationUtils.filterDeepFields(entity.getClass());
Map<String, Object> row = new HashMap<>();
for (Field field : fi... | java | public static <T> Map<String, Object> getRowFromObject(T entity) throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Field[] fields = AnnotationUtils.filterDeepFields(entity.getClass());
Map<String, Object> row = new HashMap<>();
for (Field field : fi... | [
"public",
"static",
"<",
"T",
">",
"Map",
"<",
"String",
",",
"Object",
">",
"getRowFromObject",
"(",
"T",
"entity",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetException",
"{",
"Field",
"[",
"]",
"fields",
"=",
... | Returns a JDBC row data structure from a Stratio Deep Entity.
@param entity Stratio Deep entity.
@param <T> Stratio Deep entity type.
@return JDBC row data structure from a Stratio Deep Entity.
@throws IllegalAccessException
@throws InstantiationException
@throws InvocationTargetException | [
"Returns",
"a",
"JDBC",
"row",
"data",
"structure",
"from",
"a",
"Stratio",
"Deep",
"Entity",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java#L87-L101 |
3,916 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java | UtilJdbc.getCellsFromObject | public static<T extends DeepJobConfig> Cells getCellsFromObject(Map<String, Object> row, DeepJobConfig<Cells, T> config) {
Cells result = new Cells(config.getCatalog() + "." + config.getTable());
for(Map.Entry<String, Object> entry:row.entrySet()) {
Cell cell = Cell.create(entry.getKey(), en... | java | public static<T extends DeepJobConfig> Cells getCellsFromObject(Map<String, Object> row, DeepJobConfig<Cells, T> config) {
Cells result = new Cells(config.getCatalog() + "." + config.getTable());
for(Map.Entry<String, Object> entry:row.entrySet()) {
Cell cell = Cell.create(entry.getKey(), en... | [
"public",
"static",
"<",
"T",
"extends",
"DeepJobConfig",
">",
"Cells",
"getCellsFromObject",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"row",
",",
"DeepJobConfig",
"<",
"Cells",
",",
"T",
">",
"config",
")",
"{",
"Cells",
"result",
"=",
"new",
"Cel... | Returns a Cells object from a JDBC row data structure.
@param row JDBC row data structure as a Map.
@param config JDBC Deep Job config.
@return Cells object from a JDBC row data structure. | [
"Returns",
"a",
"Cells",
"object",
"from",
"a",
"JDBC",
"row",
"data",
"structure",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java#L109-L116 |
3,917 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java | UtilJdbc.getObjectFromCells | public static Map<String, Object> getObjectFromCells(Cells cells) {
Map<String, Object> result = new HashMap<>();
for(Cell cell:cells.getCells()) {
result.put(cell.getName(), cell.getValue());
}
return result;
} | java | public static Map<String, Object> getObjectFromCells(Cells cells) {
Map<String, Object> result = new HashMap<>();
for(Cell cell:cells.getCells()) {
result.put(cell.getName(), cell.getValue());
}
return result;
} | [
"public",
"static",
"Map",
"<",
"String",
",",
"Object",
">",
"getObjectFromCells",
"(",
"Cells",
"cells",
")",
"{",
"Map",
"<",
"String",
",",
"Object",
">",
"result",
"=",
"new",
"HashMap",
"<>",
"(",
")",
";",
"for",
"(",
"Cell",
"cell",
":",
"cel... | Returns a JDBC row data structure from a Cells object.
@param cells Cells object carrying information.
@return JDBC row data structure from a Cells object. | [
"Returns",
"a",
"JDBC",
"row",
"data",
"structure",
"from",
"a",
"Cells",
"object",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/utils/UtilJdbc.java#L123-L129 |
3,918 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftClient.java | ThriftClient.build | public static ThriftClient build(String host, int port, String keyspace) throws TException {
TTransport transport = new TFramedTransport(new TSocket(host, port));
TProtocol protocol = new TBinaryProtocol(transport);
ThriftClient client = new ThriftClient(protocol);
transport.open();
... | java | public static ThriftClient build(String host, int port, String keyspace) throws TException {
TTransport transport = new TFramedTransport(new TSocket(host, port));
TProtocol protocol = new TBinaryProtocol(transport);
ThriftClient client = new ThriftClient(protocol);
transport.open();
... | [
"public",
"static",
"ThriftClient",
"build",
"(",
"String",
"host",
",",
"int",
"port",
",",
"String",
"keyspace",
")",
"throws",
"TException",
"{",
"TTransport",
"transport",
"=",
"new",
"TFramedTransport",
"(",
"new",
"TSocket",
"(",
"host",
",",
"port",
"... | Returns a new client for the specified host, setting the specified keyspace.
@param host the Cassandra host address.
@param port the Cassandra host RPC port.
@param keyspace the name of the Cassandra keyspace to set.
@return a new client for the specified host, setting the specified keyspace.
@throws TExceptio... | [
"Returns",
"a",
"new",
"client",
"for",
"the",
"specified",
"host",
"setting",
"the",
"specified",
"keyspace",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftClient.java#L53-L62 |
3,919 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftClient.java | ThriftClient.build | public static ThriftClient build(String host, int port) throws TException {
return build(host, port, null);
} | java | public static ThriftClient build(String host, int port) throws TException {
return build(host, port, null);
} | [
"public",
"static",
"ThriftClient",
"build",
"(",
"String",
"host",
",",
"int",
"port",
")",
"throws",
"TException",
"{",
"return",
"build",
"(",
"host",
",",
"port",
",",
"null",
")",
";",
"}"
] | Returns a new client for the specified host.
@param host the Cassandra host address.
@param port the Cassandra host RPC port.
@return a new client for the specified host.
@throws TException if there is any problem with the {@code set_keyspace} call. | [
"Returns",
"a",
"new",
"client",
"for",
"the",
"specified",
"host",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/thrift/ThriftClient.java#L72-L74 |
3,920 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/utils/CellsUtils.java | CellsUtils.getRowFromCells | public static Row getRowFromCells(Cells cells) {
Object[] values = cells.getCellValues().toArray();
return RowFactory.create(values);
} | java | public static Row getRowFromCells(Cells cells) {
Object[] values = cells.getCellValues().toArray();
return RowFactory.create(values);
} | [
"public",
"static",
"Row",
"getRowFromCells",
"(",
"Cells",
"cells",
")",
"{",
"Object",
"[",
"]",
"values",
"=",
"cells",
".",
"getCellValues",
"(",
")",
".",
"toArray",
"(",
")",
";",
"return",
"RowFactory",
".",
"create",
"(",
"values",
")",
";",
"}... | Creates a SparkSQL Row object from a Stratio Cells object
@param cells Stratio Cells object for transforming.
@return SparkSQL Row created from Cells. | [
"Creates",
"a",
"SparkSQL",
"Row",
"object",
"from",
"a",
"Stratio",
"Cells",
"object"
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/utils/CellsUtils.java#L289-L292 |
3,921 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/utils/CellsUtils.java | CellsUtils.getRowsFromsCells | public static Collection<Row> getRowsFromsCells(Collection<Cells> cellsCol) {
Collection<Row> result = new ArrayList<>();
for (Cells cells : cellsCol) {
result.add(getRowFromCells(cells));
}
return result;
} | java | public static Collection<Row> getRowsFromsCells(Collection<Cells> cellsCol) {
Collection<Row> result = new ArrayList<>();
for (Cells cells : cellsCol) {
result.add(getRowFromCells(cells));
}
return result;
} | [
"public",
"static",
"Collection",
"<",
"Row",
">",
"getRowsFromsCells",
"(",
"Collection",
"<",
"Cells",
">",
"cellsCol",
")",
"{",
"Collection",
"<",
"Row",
">",
"result",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Cells",
"cells",
":",
... | Returns a Collection of SparkSQL Row objects from a collection of Stratio Cells
objects
@param cellsCol Collection of Cells for transforming
@return Collection of SparkSQL Row created from Cells. | [
"Returns",
"a",
"Collection",
"of",
"SparkSQL",
"Row",
"objects",
"from",
"a",
"collection",
"of",
"Stratio",
"Cells",
"objects"
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/utils/CellsUtils.java#L301-L307 |
3,922 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java | Cells.getCellsByTable | private List<Cell> getCellsByTable(String nameSpace) {
String tName = StringUtils.isEmpty(nameSpace) ? this.nameSpace : nameSpace;
List<Cell> res = cells.get(tName);
if (res == null) {
res = new ArrayList<>();
cells.put(tName, res);
}
return res;
} | java | private List<Cell> getCellsByTable(String nameSpace) {
String tName = StringUtils.isEmpty(nameSpace) ? this.nameSpace : nameSpace;
List<Cell> res = cells.get(tName);
if (res == null) {
res = new ArrayList<>();
cells.put(tName, res);
}
return res;
} | [
"private",
"List",
"<",
"Cell",
">",
"getCellsByTable",
"(",
"String",
"nameSpace",
")",
"{",
"String",
"tName",
"=",
"StringUtils",
".",
"isEmpty",
"(",
"nameSpace",
")",
"?",
"this",
".",
"nameSpace",
":",
"nameSpace",
";",
"List",
"<",
"Cell",
">",
"r... | Given the table name, returns the List of Cell object associated to that table.
@param nameSpace the table name.
@return the List of Cell object associated to that table. | [
"Given",
"the",
"table",
"name",
"returns",
"the",
"List",
"of",
"Cell",
"object",
"associated",
"to",
"that",
"table",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L72-L83 |
3,923 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java | Cells.add | public boolean add(Cell c) {
if (c == null) {
throw new DeepGenericException(new IllegalArgumentException("cell parameter cannot be null"));
}
return getCellsByTable(nameSpace).add(c);
} | java | public boolean add(Cell c) {
if (c == null) {
throw new DeepGenericException(new IllegalArgumentException("cell parameter cannot be null"));
}
return getCellsByTable(nameSpace).add(c);
} | [
"public",
"boolean",
"add",
"(",
"Cell",
"c",
")",
"{",
"if",
"(",
"c",
"==",
"null",
")",
"{",
"throw",
"new",
"DeepGenericException",
"(",
"new",
"IllegalArgumentException",
"(",
"\"cell parameter cannot be null\"",
")",
")",
";",
"}",
"return",
"getCellsByT... | Adds a new Cell object to this Cells instance. Associates the provided Cell to the default table.
@param c the Cell we want to add to this Cells object.
@return either true/false if the Cell has been added successfully or not. | [
"Adds",
"a",
"new",
"Cell",
"object",
"to",
"this",
"Cells",
"instance",
".",
"Associates",
"the",
"provided",
"Cell",
"to",
"the",
"default",
"table",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L128-L134 |
3,924 | Stratio/deep-spark | deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java | Cells.getCells | public Collection<Cell> getCells() {
List<Cell> res = new ArrayList<>();
for (Map.Entry<String, List<Cell>> entry : cells.entrySet()) {
res.addAll(entry.getValue());
}
return Collections.unmodifiableList(res);
} | java | public Collection<Cell> getCells() {
List<Cell> res = new ArrayList<>();
for (Map.Entry<String, List<Cell>> entry : cells.entrySet()) {
res.addAll(entry.getValue());
}
return Collections.unmodifiableList(res);
} | [
"public",
"Collection",
"<",
"Cell",
">",
"getCells",
"(",
")",
"{",
"List",
"<",
"Cell",
">",
"res",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Map",
".",
"Entry",
"<",
"String",
",",
"List",
"<",
"Cell",
">",
">",
"entry",
":",
... | Returns an immutable collection of all the Cell objects contained in this Cells. Beware that internally each list
of cells is associated to the table owning those cells, this method flattens the lists of cells known to this
object to just one list, thus losing the table information.
@return the request list of Cell ob... | [
"Returns",
"an",
"immutable",
"collection",
"of",
"all",
"the",
"Cell",
"objects",
"contained",
"in",
"this",
"Cells",
".",
"Beware",
"that",
"internally",
"each",
"list",
"of",
"cells",
"is",
"associated",
"to",
"the",
"table",
"owning",
"those",
"cells",
"... | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L346-L354 |
3,925 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepCqlRecordWriter.java | DeepCqlRecordWriter.write | public void write(Cells keys, Cells values) {
if (!hasCurrentTask) {
String localCql = queryBuilder.prepareQuery(keys, values);
currentTask = new WriteTask(localCql);
hasCurrentTask = true;
}
// add primary key columns to the bind variables
List<Obje... | java | public void write(Cells keys, Cells values) {
if (!hasCurrentTask) {
String localCql = queryBuilder.prepareQuery(keys, values);
currentTask = new WriteTask(localCql);
hasCurrentTask = true;
}
// add primary key columns to the bind variables
List<Obje... | [
"public",
"void",
"write",
"(",
"Cells",
"keys",
",",
"Cells",
"values",
")",
"{",
"if",
"(",
"!",
"hasCurrentTask",
")",
"{",
"String",
"localCql",
"=",
"queryBuilder",
".",
"prepareQuery",
"(",
"keys",
",",
"values",
")",
";",
"currentTask",
"=",
"new"... | Adds the provided row to a batch. If the batch size reaches the threshold configured in
IDeepJobConfig.getBatchSize the batch will be sent to the data store.
@param keys the Cells object containing the row keys.
@param values the Cells object containing all the other row columns. | [
"Adds",
"the",
"provided",
"row",
"to",
"a",
"batch",
".",
"If",
"the",
"batch",
"size",
"reaches",
"the",
"threshold",
"configured",
"in",
"IDeepJobConfig",
".",
"getBatchSize",
"the",
"batch",
"will",
"be",
"sent",
"to",
"the",
"data",
"store",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepCqlRecordWriter.java#L107-L123 |
3,926 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepCqlRecordWriter.java | DeepCqlRecordWriter.executeTaskAsync | private void executeTaskAsync() {
final String taskId = currentTask.getId();
ListenableFuture<?> future = taskExecutorService.submit(currentTask);
pendingTasks.put(taskId, future);
future.addListener(new Runnable() {
@Override
public void run() {
... | java | private void executeTaskAsync() {
final String taskId = currentTask.getId();
ListenableFuture<?> future = taskExecutorService.submit(currentTask);
pendingTasks.put(taskId, future);
future.addListener(new Runnable() {
@Override
public void run() {
... | [
"private",
"void",
"executeTaskAsync",
"(",
")",
"{",
"final",
"String",
"taskId",
"=",
"currentTask",
".",
"getId",
"(",
")",
";",
"ListenableFuture",
"<",
"?",
">",
"future",
"=",
"taskExecutorService",
".",
"submit",
"(",
"currentTask",
")",
";",
"pending... | Submits the task for future execution. Task is added to pending tasks
and removed when the execution is done. | [
"Submits",
"the",
"task",
"for",
"future",
"execution",
".",
"Task",
"is",
"added",
"to",
"pending",
"tasks",
"and",
"removed",
"when",
"the",
"execution",
"is",
"done",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepCqlRecordWriter.java#L136-L150 |
3,927 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepCqlRecordWriter.java | DeepCqlRecordWriter.waitForCompletion | private void waitForCompletion() {
for (ListenableFuture<?> future : pendingTasks.values()) {
try {
future.get();
} catch (InterruptedException | ExecutionException e) {
LOG.error("[" + this + "] Error waiting for writes to complete: " + e.getMessage());
... | java | private void waitForCompletion() {
for (ListenableFuture<?> future : pendingTasks.values()) {
try {
future.get();
} catch (InterruptedException | ExecutionException e) {
LOG.error("[" + this + "] Error waiting for writes to complete: " + e.getMessage());
... | [
"private",
"void",
"waitForCompletion",
"(",
")",
"{",
"for",
"(",
"ListenableFuture",
"<",
"?",
">",
"future",
":",
"pendingTasks",
".",
"values",
"(",
")",
")",
"{",
"try",
"{",
"future",
".",
"get",
"(",
")",
";",
"}",
"catch",
"(",
"InterruptedExce... | Waits until all pending tasks completed. | [
"Waits",
"until",
"all",
"pending",
"tasks",
"completed",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/cql/DeepCqlRecordWriter.java#L155-L163 |
3,928 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CellValidator.java | CellValidator.cellValidator | public static <T> CellValidator cellValidator(T obj) {
if (obj == null) {
return null;
}
Kind kind = Kind.objectToKind(obj);
AbstractType<?> tAbstractType = CassandraUtils.marshallerInstance(obj);
String validatorClassName = tAbstractType.getClass().getCanonicalName(... | java | public static <T> CellValidator cellValidator(T obj) {
if (obj == null) {
return null;
}
Kind kind = Kind.objectToKind(obj);
AbstractType<?> tAbstractType = CassandraUtils.marshallerInstance(obj);
String validatorClassName = tAbstractType.getClass().getCanonicalName(... | [
"public",
"static",
"<",
"T",
">",
"CellValidator",
"cellValidator",
"(",
"T",
"obj",
")",
"{",
"if",
"(",
"obj",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"Kind",
"kind",
"=",
"Kind",
".",
"objectToKind",
"(",
"obj",
")",
";",
"AbstractTyp... | Generates a CellValidator for a generic instance of an object.
We need the actual instance in order to differentiate between an UUID and a TimeUUID.
@param obj an instance to use to build the new CellValidator.
@param <T> the generic type of the provided object instance.
@return a new CellValidator associated to the p... | [
"Generates",
"a",
"CellValidator",
"for",
"a",
"generic",
"instance",
"of",
"an",
"object",
".",
"We",
"need",
"the",
"actual",
"instance",
"in",
"order",
"to",
"differentiate",
"between",
"an",
"UUID",
"and",
"a",
"TimeUUID",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CellValidator.java#L247-L259 |
3,929 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CellValidator.java | CellValidator.getCollectionInnerType | private static String getCollectionInnerType(Class<?> type) {
CQL3Type.Native nativeType = MAP_JAVA_TYPE_TO_CQL_TYPE.get(type);
return nativeType.name().toLowerCase();
} | java | private static String getCollectionInnerType(Class<?> type) {
CQL3Type.Native nativeType = MAP_JAVA_TYPE_TO_CQL_TYPE.get(type);
return nativeType.name().toLowerCase();
} | [
"private",
"static",
"String",
"getCollectionInnerType",
"(",
"Class",
"<",
"?",
">",
"type",
")",
"{",
"CQL3Type",
".",
"Native",
"nativeType",
"=",
"MAP_JAVA_TYPE_TO_CQL_TYPE",
".",
"get",
"(",
"type",
")",
";",
"return",
"nativeType",
".",
"name",
"(",
")... | private constructor. | [
"private",
"constructor",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CellValidator.java#L275-L278 |
3,930 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/config/CassandraConfigFactory.java | CassandraConfigFactory.create | public static <T extends IDeepType> CassandraDeepJobConfig<T> create(Class<T> entityClass) {
return new EntityDeepJobConfig<>(entityClass);
} | java | public static <T extends IDeepType> CassandraDeepJobConfig<T> create(Class<T> entityClass) {
return new EntityDeepJobConfig<>(entityClass);
} | [
"public",
"static",
"<",
"T",
"extends",
"IDeepType",
">",
"CassandraDeepJobConfig",
"<",
"T",
">",
"create",
"(",
"Class",
"<",
"T",
">",
"entityClass",
")",
"{",
"return",
"new",
"EntityDeepJobConfig",
"<>",
"(",
"entityClass",
")",
";",
"}"
] | Creates an entity-based configuration object.
@param entityClass the class instance of the entity class that will be used to map db objects to Java objects.
@param <T> the generic type of the entity object implementing IDeepType.
@return a new an entity-based configuration object. | [
"Creates",
"an",
"entity",
"-",
"based",
"configuration",
"object",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/config/CassandraConfigFactory.java#L68-L70 |
3,931 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/config/CassandraConfigFactory.java | CassandraConfigFactory.createWriteConfig | public static <T extends IDeepType> CassandraDeepJobConfig<T> createWriteConfig(Class<T> entityClass) {
return new EntityDeepJobConfig<>(entityClass, true);
} | java | public static <T extends IDeepType> CassandraDeepJobConfig<T> createWriteConfig(Class<T> entityClass) {
return new EntityDeepJobConfig<>(entityClass, true);
} | [
"public",
"static",
"<",
"T",
"extends",
"IDeepType",
">",
"CassandraDeepJobConfig",
"<",
"T",
">",
"createWriteConfig",
"(",
"Class",
"<",
"T",
">",
"entityClass",
")",
"{",
"return",
"new",
"EntityDeepJobConfig",
"<>",
"(",
"entityClass",
",",
"true",
")",
... | Creates an entity-based write configuration object.
@return an entity-based write configuration object. | [
"Creates",
"an",
"entity",
"-",
"based",
"write",
"configuration",
"object",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/config/CassandraConfigFactory.java#L77-L79 |
3,932 | Stratio/deep-spark | deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java | UtilMongoDB.getObjectFromBson | public static <T> T getObjectFromBson(Class<T> classEntity, BSONObject bsonObject)
throws IllegalAccessException, InstantiationException, InvocationTargetException {
T t = classEntity.newInstance();
Field[] fields = AnnotationUtils.filterDeepFields(classEntity);
Object insert = nul... | java | public static <T> T getObjectFromBson(Class<T> classEntity, BSONObject bsonObject)
throws IllegalAccessException, InstantiationException, InvocationTargetException {
T t = classEntity.newInstance();
Field[] fields = AnnotationUtils.filterDeepFields(classEntity);
Object insert = nul... | [
"public",
"static",
"<",
"T",
">",
"T",
"getObjectFromBson",
"(",
"Class",
"<",
"T",
">",
"classEntity",
",",
"BSONObject",
"bsonObject",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetException",
"{",
"T",
"t",
"=",
... | converts from BsonObject to an entity class with deep's anotations
@param classEntity the entity name.
@param bsonObject the instance of the BSONObjet to convert.
@return the provided bsonObject converted to an instance of T.
@throws IllegalAccessException the illegal access exception
@throws IllegalAccessException t... | [
"converts",
"from",
"BsonObject",
"to",
"an",
"entity",
"class",
"with",
"deep",
"s",
"anotations"
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java#L77-L120 |
3,933 | Stratio/deep-spark | deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java | UtilMongoDB.getBsonFromObject | public static <T> DBObject getBsonFromObject(T t)
throws IllegalAccessException, InstantiationException, InvocationTargetException {
Field[] fields = AnnotationUtils.filterDeepFields(t.getClass());
DBObject bson = new BasicDBObject();
for (Field field : fields) {
Method... | java | public static <T> DBObject getBsonFromObject(T t)
throws IllegalAccessException, InstantiationException, InvocationTargetException {
Field[] fields = AnnotationUtils.filterDeepFields(t.getClass());
DBObject bson = new BasicDBObject();
for (Field field : fields) {
Method... | [
"public",
"static",
"<",
"T",
">",
"DBObject",
"getBsonFromObject",
"(",
"T",
"t",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetException",
"{",
"Field",
"[",
"]",
"fields",
"=",
"AnnotationUtils",
".",
"filterDeepFie... | converts from an entity class with deep's anotations to BsonObject.
@param t an instance of an object of type T to convert to BSONObject.
@return the provided object converted to BSONObject.
@throws IllegalAccessException the illegal access exception
@throws IllegalAccessException the instantiation exception
@throws I... | [
"converts",
"from",
"an",
"entity",
"class",
"with",
"deep",
"s",
"anotations",
"to",
"BsonObject",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java#L156-L184 |
3,934 | Stratio/deep-spark | deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java | UtilMongoDB.getCellFromBson | public static Cells getCellFromBson(BSONObject bsonObject, String tableName) {
Cells cells = tableName != null ? new Cells(tableName) : new Cells();
Map<String, Object> map = bsonObject.toMap();
Set<Map.Entry<String, Object>> entryBson = map.entrySet();
for (Map.Entry<String, Object>... | java | public static Cells getCellFromBson(BSONObject bsonObject, String tableName) {
Cells cells = tableName != null ? new Cells(tableName) : new Cells();
Map<String, Object> map = bsonObject.toMap();
Set<Map.Entry<String, Object>> entryBson = map.entrySet();
for (Map.Entry<String, Object>... | [
"public",
"static",
"Cells",
"getCellFromBson",
"(",
"BSONObject",
"bsonObject",
",",
"String",
"tableName",
")",
"{",
"Cells",
"cells",
"=",
"tableName",
"!=",
"null",
"?",
"new",
"Cells",
"(",
"tableName",
")",
":",
"new",
"Cells",
"(",
")",
";",
"Map",
... | converts from BsonObject to cell class with deep's anotations
@param bsonObject the bson object
@param tableName the table name
@return cell from bson
@throws IllegalAccessException the illegal access exception
@throws IllegalAccessException the instantiation exception
@throws IllegalAccessException the invocation ta... | [
"converts",
"from",
"BsonObject",
"to",
"cell",
"class",
"with",
"deep",
"s",
"anotations"
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java#L219-L254 |
3,935 | Stratio/deep-spark | deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java | UtilMongoDB.getDBObjectFromCell | public static DBObject getDBObjectFromCell(Cells cells) {
DBObject bson = new BasicDBObject();
for (Cell cell : cells) {
if (cell.getValue() != null) {
if (Collection.class.isAssignableFrom(cell.getCellValue().getClass())) {
Collection c = (Collection) ce... | java | public static DBObject getDBObjectFromCell(Cells cells) {
DBObject bson = new BasicDBObject();
for (Cell cell : cells) {
if (cell.getValue() != null) {
if (Collection.class.isAssignableFrom(cell.getCellValue().getClass())) {
Collection c = (Collection) ce... | [
"public",
"static",
"DBObject",
"getDBObjectFromCell",
"(",
"Cells",
"cells",
")",
"{",
"DBObject",
"bson",
"=",
"new",
"BasicDBObject",
"(",
")",
";",
"for",
"(",
"Cell",
"cell",
":",
"cells",
")",
"{",
"if",
"(",
"cell",
".",
"getValue",
"(",
")",
"!... | converts from and entity class with deep's anotations to BsonObject
@param cells the cells
@return bson from cell | [
"converts",
"from",
"and",
"entity",
"class",
"with",
"deep",
"s",
"anotations",
"to",
"BsonObject"
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-mongodb/src/main/java/com/stratio/deep/mongodb/utils/UtilMongoDB.java#L263-L291 |
3,936 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeEntityExtractor.java | JdbcNativeEntityExtractor.transformElement | @Override
protected T transformElement(Map<String, Object> entity) {
try {
return (T)UtilJdbc.getObjectFromRow(jdbcDeepJobConfig.getEntityClass(), entity, jdbcDeepJobConfig);
} catch(IllegalAccessException | InvocationTargetException | InstantiationException e) {
throw new De... | java | @Override
protected T transformElement(Map<String, Object> entity) {
try {
return (T)UtilJdbc.getObjectFromRow(jdbcDeepJobConfig.getEntityClass(), entity, jdbcDeepJobConfig);
} catch(IllegalAccessException | InvocationTargetException | InstantiationException e) {
throw new De... | [
"@",
"Override",
"protected",
"T",
"transformElement",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"entity",
")",
"{",
"try",
"{",
"return",
"(",
"T",
")",
"UtilJdbc",
".",
"getObjectFromRow",
"(",
"jdbcDeepJobConfig",
".",
"getEntityClass",
"(",
")",
"... | Transforms a database row represented as a Map into a Stratio Deep Entity.
@param entity Database row represented as a Map of column_name:column_value.
@return Stratio Deep Entity carrying row data. | [
"Transforms",
"a",
"database",
"row",
"represented",
"as",
"a",
"Map",
"into",
"a",
"Stratio",
"Deep",
"Entity",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeEntityExtractor.java#L46-L53 |
3,937 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeEntityExtractor.java | JdbcNativeEntityExtractor.transformElement | @Override
protected Map<String, Object> transformElement(T entity) {
try {
return UtilJdbc.getRowFromObject(entity);
} catch(IllegalAccessException | InvocationTargetException | InstantiationException e) {
throw new DeepTransformException(e);
}
} | java | @Override
protected Map<String, Object> transformElement(T entity) {
try {
return UtilJdbc.getRowFromObject(entity);
} catch(IllegalAccessException | InvocationTargetException | InstantiationException e) {
throw new DeepTransformException(e);
}
} | [
"@",
"Override",
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"transformElement",
"(",
"T",
"entity",
")",
"{",
"try",
"{",
"return",
"UtilJdbc",
".",
"getRowFromObject",
"(",
"entity",
")",
";",
"}",
"catch",
"(",
"IllegalAccessException",
"|",
... | Trasforms a Stratio Deep Entity into a database row represented as a Map.
@param entity Stratio Deep entity.
@return Database row represented as a Map of column_name:column_value. | [
"Trasforms",
"a",
"Stratio",
"Deep",
"Entity",
"into",
"a",
"database",
"row",
"represented",
"as",
"a",
"Map",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeEntityExtractor.java#L60-L67 |
3,938 | Stratio/deep-spark | deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java | UtilAerospike.getObjectFromAerospikeRecord | public static <T> T getObjectFromAerospikeRecord(Class<T> classEntity, AerospikeRecord aerospikeRecord,
AerospikeDeepJobConfig aerospikeConfig)
throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Tuple2<S... | java | public static <T> T getObjectFromAerospikeRecord(Class<T> classEntity, AerospikeRecord aerospikeRecord,
AerospikeDeepJobConfig aerospikeConfig)
throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Tuple2<S... | [
"public",
"static",
"<",
"T",
">",
"T",
"getObjectFromAerospikeRecord",
"(",
"Class",
"<",
"T",
">",
"classEntity",
",",
"AerospikeRecord",
"aerospikeRecord",
",",
"AerospikeDeepJobConfig",
"aerospikeConfig",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationE... | Converts from AerospikeRecord to an entity class with deep's anotations.
@param classEntity the entity name.
@param aerospikeRecord the instance of the AerospikeRecord to convert.
@param aerospikeConfig Aerospike configuration object.
@param <T> return type.
@return the provided aerospikeRecord convert... | [
"Converts",
"from",
"AerospikeRecord",
"to",
"an",
"entity",
"class",
"with",
"deep",
"s",
"anotations",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java#L68-L121 |
3,939 | Stratio/deep-spark | deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java | UtilAerospike.getAerospikeRecordFromObject | public static <T> Pair<Object, AerospikeRecord> getAerospikeRecordFromObject(T t) throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Field[] fields = AnnotationUtils.filterDeepFields(t.getClass());
Pair<Field[], Field[]> keysAndFields = AnnotationUtils.filterK... | java | public static <T> Pair<Object, AerospikeRecord> getAerospikeRecordFromObject(T t) throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Field[] fields = AnnotationUtils.filterDeepFields(t.getClass());
Pair<Field[], Field[]> keysAndFields = AnnotationUtils.filterK... | [
"public",
"static",
"<",
"T",
">",
"Pair",
"<",
"Object",
",",
"AerospikeRecord",
">",
"getAerospikeRecordFromObject",
"(",
"T",
"t",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetException",
"{",
"Field",
"[",
"]",
... | Converts from an entity class with deep's anotations to AerospikeRecord.
@param t an instance of an object of type T to convert to AerospikeRecord.
@param <T> the type of the object to convert.
@return A pair with the Record key and the Record itself.
@throws IllegalAccessException
@throws InstantiationException
@th... | [
"Converts",
"from",
"an",
"entity",
"class",
"with",
"deep",
"s",
"anotations",
"to",
"AerospikeRecord",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java#L133-L163 |
3,940 | Stratio/deep-spark | deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java | UtilAerospike.getCellFromAerospikeRecord | public static Cells getCellFromAerospikeRecord(AerospikeKey key, AerospikeRecord aerospikeRecord,
AerospikeDeepJobConfig aerospikeConfig) throws IllegalAccessException,
InstantiationException, InvocationTargetException {
String namespace = aerospik... | java | public static Cells getCellFromAerospikeRecord(AerospikeKey key, AerospikeRecord aerospikeRecord,
AerospikeDeepJobConfig aerospikeConfig) throws IllegalAccessException,
InstantiationException, InvocationTargetException {
String namespace = aerospik... | [
"public",
"static",
"Cells",
"getCellFromAerospikeRecord",
"(",
"AerospikeKey",
"key",
",",
"AerospikeRecord",
"aerospikeRecord",
",",
"AerospikeDeepJobConfig",
"aerospikeConfig",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetExce... | Converts from AerospikeRecord to cell class with deep's anotations.
@param aerospikeRecord
@param key
@param aerospikeConfig
@return
@throws IllegalAccessException
@throws InstantiationException
@throws InvocationTargetException | [
"Converts",
"from",
"AerospikeRecord",
"to",
"cell",
"class",
"with",
"deep",
"s",
"anotations",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java#L176-L223 |
3,941 | Stratio/deep-spark | deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java | UtilAerospike.getAerospikeRecordFromCell | public static Pair<Object, AerospikeRecord> getAerospikeRecordFromCell(Cells cells) throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Map<String, Object> bins = new HashMap<>();
Object key = null;
for (Cell cell : cells.getCells()) {
if(ke... | java | public static Pair<Object, AerospikeRecord> getAerospikeRecordFromCell(Cells cells) throws IllegalAccessException, InstantiationException,
InvocationTargetException {
Map<String, Object> bins = new HashMap<>();
Object key = null;
for (Cell cell : cells.getCells()) {
if(ke... | [
"public",
"static",
"Pair",
"<",
"Object",
",",
"AerospikeRecord",
">",
"getAerospikeRecordFromCell",
"(",
"Cells",
"cells",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetException",
"{",
"Map",
"<",
"String",
",",
"Obje... | Converts from and entity class with deep's anotations to AerospikeRecord.
@param cells
@return
@throws IllegalAccessException
@throws InstantiationException
@throws InvocationTargetException | [
"Converts",
"from",
"and",
"entity",
"class",
"with",
"deep",
"s",
"anotations",
"to",
"AerospikeRecord",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-aerospike/src/main/java/com/stratio/deep/aerospike/utils/UtilAerospike.java#L242-L264 |
3,942 | Stratio/deep-spark | deep-elasticsearch/src/main/java/com/stratio/deep/es/utils/UtilES.java | UtilES.getObjectFromJson | public static <T> T getObjectFromJson(Class<T> classEntity, LinkedMapWritable jsonObject)
throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException {
T t = classEntity.newInstance();
Field[] fields = AnnotationUtils.filterDeepFields(classEntity)... | java | public static <T> T getObjectFromJson(Class<T> classEntity, LinkedMapWritable jsonObject)
throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException {
T t = classEntity.newInstance();
Field[] fields = AnnotationUtils.filterDeepFields(classEntity)... | [
"public",
"static",
"<",
"T",
">",
"T",
"getObjectFromJson",
"(",
"Class",
"<",
"T",
">",
"classEntity",
",",
"LinkedMapWritable",
"jsonObject",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetException",
",",
"NoSuchMetho... | converts from JSONObject to an entity class with deep's anotations
@param classEntity the entity name.
@param jsonObject the instance of the JSONObject to convert.
@param <T> return type.
@return the provided JSONObject converted to an instance of T.
@throws IllegalAccessException
@throws InstantiationExcepti... | [
"converts",
"from",
"JSONObject",
"to",
"an",
"entity",
"class",
"with",
"deep",
"s",
"anotations"
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-elasticsearch/src/main/java/com/stratio/deep/es/utils/UtilES.java#L88-L128 |
3,943 | Stratio/deep-spark | deep-elasticsearch/src/main/java/com/stratio/deep/es/utils/UtilES.java | UtilES.getCellFromJson | public static Cells getCellFromJson(LinkedMapWritable jsonObject, String tableName) throws IllegalAccessException,
InstantiationException, InvocationTargetException, NoSuchMethodException {
Cells cells = tableName != null ? new Cells(tableName) : new Cells();
Set<Map.Entry<Writable, Writab... | java | public static Cells getCellFromJson(LinkedMapWritable jsonObject, String tableName) throws IllegalAccessException,
InstantiationException, InvocationTargetException, NoSuchMethodException {
Cells cells = tableName != null ? new Cells(tableName) : new Cells();
Set<Map.Entry<Writable, Writab... | [
"public",
"static",
"Cells",
"getCellFromJson",
"(",
"LinkedMapWritable",
"jsonObject",
",",
"String",
"tableName",
")",
"throws",
"IllegalAccessException",
",",
"InstantiationException",
",",
"InvocationTargetException",
",",
"NoSuchMethodException",
"{",
"Cells",
"cells",... | converts from JSONObject to cell class
@param jsonObject
@return
@throws IllegalAccessException
@throws InstantiationException
@throws InvocationTargetException | [
"converts",
"from",
"JSONObject",
"to",
"cell",
"class"
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-elasticsearch/src/main/java/com/stratio/deep/es/utils/UtilES.java#L255-L286 |
3,944 | Stratio/deep-spark | deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CassandraCell.java | CassandraCell.create | public static Cell create(String cellName, DataType cellType, Boolean isPartitionKey,
Boolean isClusterKey) {
return new CassandraCell(cellName, cellType, isPartitionKey, isClusterKey);
} | java | public static Cell create(String cellName, DataType cellType, Boolean isPartitionKey,
Boolean isClusterKey) {
return new CassandraCell(cellName, cellType, isPartitionKey, isClusterKey);
} | [
"public",
"static",
"Cell",
"create",
"(",
"String",
"cellName",
",",
"DataType",
"cellType",
",",
"Boolean",
"isPartitionKey",
",",
"Boolean",
"isClusterKey",
")",
"{",
"return",
"new",
"CassandraCell",
"(",
"cellName",
",",
"cellType",
",",
"isPartitionKey",
"... | Factory method, creates a new metadata Cell, i.e. a Cell without value.
@param cellName the cell name
@param cellType the cell value type.
@param isPartitionKey true if this cell is part of the cassandra's partition key.
@param isClusterKey true if this cell is part of the cassandra's clustering key.
@re... | [
"Factory",
"method",
"creates",
"a",
"new",
"metadata",
"Cell",
"i",
".",
"e",
".",
"a",
"Cell",
"without",
"value",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-cassandra/src/main/java/com/stratio/deep/cassandra/entity/CassandraCell.java#L110-L113 |
3,945 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeCellExtractor.java | JdbcNativeCellExtractor.transformElement | @Override
protected Cells transformElement(Map<String, Object> entity) {
return UtilJdbc.getCellsFromObject(entity, jdbcDeepJobConfig);
} | java | @Override
protected Cells transformElement(Map<String, Object> entity) {
return UtilJdbc.getCellsFromObject(entity, jdbcDeepJobConfig);
} | [
"@",
"Override",
"protected",
"Cells",
"transformElement",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"entity",
")",
"{",
"return",
"UtilJdbc",
".",
"getCellsFromObject",
"(",
"entity",
",",
"jdbcDeepJobConfig",
")",
";",
"}"
] | Transforms a database row represented as a Map into a Cells object.
@param entity Database row represented as a Map of column name:column value.
@return Cells object with database row data. | [
"Transforms",
"a",
"database",
"row",
"represented",
"as",
"a",
"Map",
"into",
"a",
"Cells",
"object",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeCellExtractor.java#L48-L51 |
3,946 | Stratio/deep-spark | deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeCellExtractor.java | JdbcNativeCellExtractor.transformElement | @Override
protected Map<String, Object> transformElement(Cells cells) {
return UtilJdbc.getObjectFromCells(cells);
} | java | @Override
protected Map<String, Object> transformElement(Cells cells) {
return UtilJdbc.getObjectFromCells(cells);
} | [
"@",
"Override",
"protected",
"Map",
"<",
"String",
",",
"Object",
">",
"transformElement",
"(",
"Cells",
"cells",
")",
"{",
"return",
"UtilJdbc",
".",
"getObjectFromCells",
"(",
"cells",
")",
";",
"}"
] | Transforms a Cells object into a database row represented as a Map.
@param cells Cells data object.
@return Database row represented as a Map of column name:column value. | [
"Transforms",
"a",
"Cells",
"object",
"into",
"a",
"database",
"row",
"represented",
"as",
"a",
"Map",
"."
] | b9621c9b7a6d996f80fce1d073d696a157bed095 | https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-jdbc/src/main/java/com/stratio/deep/jdbc/extractor/JdbcNativeCellExtractor.java#L58-L61 |
3,947 | whitesource/fs-agent | src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java | ArchiveExtractor.extractDockerImageLayers | public void extractDockerImageLayers(File imageTarFile, File imageExtractionDir, Boolean deleteTarFiles) {
FilesScanner filesScanner = new FilesScanner();
boolean success = false;
// docker layers are saved as TAR file (we save it as TAR)
if (imageTarFile.getName().endsWith(TAR_SUFFIX)) ... | java | public void extractDockerImageLayers(File imageTarFile, File imageExtractionDir, Boolean deleteTarFiles) {
FilesScanner filesScanner = new FilesScanner();
boolean success = false;
// docker layers are saved as TAR file (we save it as TAR)
if (imageTarFile.getName().endsWith(TAR_SUFFIX)) ... | [
"public",
"void",
"extractDockerImageLayers",
"(",
"File",
"imageTarFile",
",",
"File",
"imageExtractionDir",
",",
"Boolean",
"deleteTarFiles",
")",
"{",
"FilesScanner",
"filesScanner",
"=",
"new",
"FilesScanner",
"(",
")",
";",
"boolean",
"success",
"=",
"false",
... | extract image layers | [
"extract",
"image",
"layers"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java#L226-L249 |
3,948 | whitesource/fs-agent | src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java | ArchiveExtractor.unZip | private boolean unZip(String innerDir, String archiveFile) {
boolean success = true;
ZipFile zipFile;
try {
zipFile = new ZipFile(archiveFile);
// Get the list of file headers from the zip file before unpacking
List fileHeaderList = zipFile.getFileHeaders();
... | java | private boolean unZip(String innerDir, String archiveFile) {
boolean success = true;
ZipFile zipFile;
try {
zipFile = new ZipFile(archiveFile);
// Get the list of file headers from the zip file before unpacking
List fileHeaderList = zipFile.getFileHeaders();
... | [
"private",
"boolean",
"unZip",
"(",
"String",
"innerDir",
",",
"String",
"archiveFile",
")",
"{",
"boolean",
"success",
"=",
"true",
";",
"ZipFile",
"zipFile",
";",
"try",
"{",
"zipFile",
"=",
"new",
"ZipFile",
"(",
"archiveFile",
")",
";",
"// Get the list ... | Open and extract data from zip pattern files | [
"Open",
"and",
"extract",
"data",
"from",
"zip",
"pattern",
"files"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java#L407-L439 |
3,949 | whitesource/fs-agent | src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java | ArchiveExtractor.unTar | private boolean unTar(String fileName, String innerDir, String archiveFile) {
boolean success = true;
TarUnArchiver unArchiver = new TarUnArchiver();
try {
File destDir = new File(innerDir);
if (!destDir.exists()) {
destDir.mkdirs();
}
... | java | private boolean unTar(String fileName, String innerDir, String archiveFile) {
boolean success = true;
TarUnArchiver unArchiver = new TarUnArchiver();
try {
File destDir = new File(innerDir);
if (!destDir.exists()) {
destDir.mkdirs();
}
... | [
"private",
"boolean",
"unTar",
"(",
"String",
"fileName",
",",
"String",
"innerDir",
",",
"String",
"archiveFile",
")",
"{",
"boolean",
"success",
"=",
"true",
";",
"TarUnArchiver",
"unArchiver",
"=",
"new",
"TarUnArchiver",
"(",
")",
";",
"try",
"{",
"File"... | Open and extract data from Tar pattern files | [
"Open",
"and",
"extract",
"data",
"from",
"Tar",
"pattern",
"files"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java#L442-L470 |
3,950 | whitesource/fs-agent | src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java | ArchiveExtractor.unXz | public boolean unXz(File srcFileToArchive, String destFilePath) {
boolean success = true;
try {
XZUnArchiver XZUnArchiver = new XZUnArchiver();
XZUnArchiver.enableLogging(new ConsoleLogger(ConsoleLogger.LEVEL_DISABLED, UN_ARCHIVER_LOGGER));
XZUnArchiver.setSourceFile(... | java | public boolean unXz(File srcFileToArchive, String destFilePath) {
boolean success = true;
try {
XZUnArchiver XZUnArchiver = new XZUnArchiver();
XZUnArchiver.enableLogging(new ConsoleLogger(ConsoleLogger.LEVEL_DISABLED, UN_ARCHIVER_LOGGER));
XZUnArchiver.setSourceFile(... | [
"public",
"boolean",
"unXz",
"(",
"File",
"srcFileToArchive",
",",
"String",
"destFilePath",
")",
"{",
"boolean",
"success",
"=",
"true",
";",
"try",
"{",
"XZUnArchiver",
"XZUnArchiver",
"=",
"new",
"XZUnArchiver",
"(",
")",
";",
"XZUnArchiver",
".",
"enableLo... | extract xz files | [
"extract",
"xz",
"files"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java#L473-L486 |
3,951 | whitesource/fs-agent | src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java | ArchiveExtractor.getFileName | private String getFileName(String name) {
//check if the environment is linux or windows
if (name.contains(Constants.FORWARD_SLASH)) {
name = name.substring(name.lastIndexOf(Constants.FORWARD_SLASH) + 1, name.length());
} else if (name.contains(Constants.BACK_SLASH)) {
na... | java | private String getFileName(String name) {
//check if the environment is linux or windows
if (name.contains(Constants.FORWARD_SLASH)) {
name = name.substring(name.lastIndexOf(Constants.FORWARD_SLASH) + 1, name.length());
} else if (name.contains(Constants.BACK_SLASH)) {
na... | [
"private",
"String",
"getFileName",
"(",
"String",
"name",
")",
"{",
"//check if the environment is linux or windows",
"if",
"(",
"name",
".",
"contains",
"(",
"Constants",
".",
"FORWARD_SLASH",
")",
")",
"{",
"name",
"=",
"name",
".",
"substring",
"(",
"name",
... | parse name without directories | [
"parse",
"name",
"without",
"directories"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/archive/ArchiveExtractor.java#L589-L597 |
3,952 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/docker/remotedocker/AbstractRemoteDocker.java | AbstractRemoteDocker.executeCommand | protected Pair<Integer, InputStream> executeCommand(String command) {
int resultVal = 1;
InputStream inputStream = null;
try {
logger.debug("Executing command: {}", command);
Process process = Runtime.getRuntime().exec(command);
resultVal = process.waitFor()... | java | protected Pair<Integer, InputStream> executeCommand(String command) {
int resultVal = 1;
InputStream inputStream = null;
try {
logger.debug("Executing command: {}", command);
Process process = Runtime.getRuntime().exec(command);
resultVal = process.waitFor()... | [
"protected",
"Pair",
"<",
"Integer",
",",
"InputStream",
">",
"executeCommand",
"(",
"String",
"command",
")",
"{",
"int",
"resultVal",
"=",
"1",
";",
"InputStream",
"inputStream",
"=",
"null",
";",
"try",
"{",
"logger",
".",
"debug",
"(",
"\"Executing comma... | from old command's stream and the new command's stream | [
"from",
"old",
"command",
"s",
"stream",
"and",
"the",
"new",
"command",
"s",
"stream"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/docker/remotedocker/AbstractRemoteDocker.java#L313-L339 |
3,953 | lamydev/Android-Notification | core/src/zemin/notification/NotificationViewCallback.java | NotificationViewCallback.onContentViewChanged | public void onContentViewChanged(NotificationView view, View contentView, int layoutId) {
if (DBG) Log.v(TAG, "onContentViewChanged");
ChildViewManager mgr = view.getChildViewManager();
if (layoutId == R.layout.notification_simple ||
layoutId == R.layout.notification_large_icon ||
... | java | public void onContentViewChanged(NotificationView view, View contentView, int layoutId) {
if (DBG) Log.v(TAG, "onContentViewChanged");
ChildViewManager mgr = view.getChildViewManager();
if (layoutId == R.layout.notification_simple ||
layoutId == R.layout.notification_large_icon ||
... | [
"public",
"void",
"onContentViewChanged",
"(",
"NotificationView",
"view",
",",
"View",
"contentView",
",",
"int",
"layoutId",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onContentViewChanged\"",
")",
";",
"ChildViewManager",
"mgr",
... | Called when content view is changed. All child-views were cleared due the
change of content view. You need to re-setup the associated child-views.
@param view
@param contentView
@param layoutId | [
"Called",
"when",
"content",
"view",
"is",
"changed",
".",
"All",
"child",
"-",
"views",
"were",
"cleared",
"due",
"the",
"change",
"of",
"content",
"view",
".",
"You",
"need",
"to",
"re",
"-",
"setup",
"the",
"associated",
"child",
"-",
"views",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationViewCallback.java#L72-L97 |
3,954 | lamydev/Android-Notification | core/src/zemin/notification/NotificationViewCallback.java | NotificationViewCallback.onShowNotification | public void onShowNotification(NotificationView view, View contentView, NotificationEntry entry, int layoutId) {
if (DBG) Log.v(TAG, "onShowNotification - " + entry.ID);
final Drawable icon = entry.iconDrawable;
final CharSequence title = entry.title;
final CharSequence text = entry.tex... | java | public void onShowNotification(NotificationView view, View contentView, NotificationEntry entry, int layoutId) {
if (DBG) Log.v(TAG, "onShowNotification - " + entry.ID);
final Drawable icon = entry.iconDrawable;
final CharSequence title = entry.title;
final CharSequence text = entry.tex... | [
"public",
"void",
"onShowNotification",
"(",
"NotificationView",
"view",
",",
"View",
"contentView",
",",
"NotificationEntry",
"entry",
",",
"int",
"layoutId",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onShowNotification - \"",
"+",... | Called when a notification is being displayed. This is the place to update
the user interface of child-views for the new notification.
@param view
@param contentView
@param entry
@param layoutId | [
"Called",
"when",
"a",
"notification",
"is",
"being",
"displayed",
".",
"This",
"is",
"the",
"place",
"to",
"update",
"the",
"user",
"interface",
"of",
"child",
"-",
"views",
"for",
"the",
"new",
"notification",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationViewCallback.java#L108-L143 |
3,955 | lamydev/Android-Notification | core/src/zemin/notification/NotificationViewCallback.java | NotificationViewCallback.onUpdateNotification | public void onUpdateNotification(NotificationView view, View contentView, NotificationEntry entry, int layoutId) {
if (DBG) Log.v(TAG, "onUpdateNotification - " + entry.ID);
final Drawable icon = entry.iconDrawable;
final CharSequence title = entry.title;
final CharSequence text = entry... | java | public void onUpdateNotification(NotificationView view, View contentView, NotificationEntry entry, int layoutId) {
if (DBG) Log.v(TAG, "onUpdateNotification - " + entry.ID);
final Drawable icon = entry.iconDrawable;
final CharSequence title = entry.title;
final CharSequence text = entry... | [
"public",
"void",
"onUpdateNotification",
"(",
"NotificationView",
"view",
",",
"View",
"contentView",
",",
"NotificationEntry",
"entry",
",",
"int",
"layoutId",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onUpdateNotification - \"",
... | Called when a notification is being updated.
@param view
@param contentView
@param entry
@param layoutId | [
"Called",
"when",
"a",
"notification",
"is",
"being",
"updated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationViewCallback.java#L153-L167 |
3,956 | lamydev/Android-Notification | core/src/zemin/notification/NotificationViewCallback.java | NotificationViewCallback.onClickContentView | public void onClickContentView(NotificationView view, View contentView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onClickContentView - " + entry.ID);
} | java | public void onClickContentView(NotificationView view, View contentView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onClickContentView - " + entry.ID);
} | [
"public",
"void",
"onClickContentView",
"(",
"NotificationView",
"view",
",",
"View",
"contentView",
",",
"NotificationEntry",
"entry",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onClickContentView - \"",
"+",
"entry",
".",
"ID",
"... | Called when the view has been clicked.
@param view
@param contentView
@param entry
@return boolean true, if handled. | [
"Called",
"when",
"the",
"view",
"has",
"been",
"clicked",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationViewCallback.java#L177-L179 |
3,957 | lamydev/Android-Notification | core/src/zemin/notification/AnimationFactory.java | AnimationFactory.pushDownIn | public static Animation pushDownIn() {
AnimationSet animationSet = new AnimationSet(true);
animationSet.setFillAfter(true);
animationSet.addAnimation(new TranslateAnimation(0, 0, -100, 0));
animationSet.addAnimation(new AlphaAnimation(0.0f, 1.0f));
return animationSet;
} | java | public static Animation pushDownIn() {
AnimationSet animationSet = new AnimationSet(true);
animationSet.setFillAfter(true);
animationSet.addAnimation(new TranslateAnimation(0, 0, -100, 0));
animationSet.addAnimation(new AlphaAnimation(0.0f, 1.0f));
return animationSet;
} | [
"public",
"static",
"Animation",
"pushDownIn",
"(",
")",
"{",
"AnimationSet",
"animationSet",
"=",
"new",
"AnimationSet",
"(",
"true",
")",
";",
"animationSet",
".",
"setFillAfter",
"(",
"true",
")",
";",
"animationSet",
".",
"addAnimation",
"(",
"new",
"Trans... | Create push down animation for entering.
@return Animation | [
"Create",
"push",
"down",
"animation",
"for",
"entering",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/AnimationFactory.java#L34-L40 |
3,958 | whitesource/fs-agent | src/main/java/org/whitesource/fs/configuration/ConfigurationValidation.java | ConfigurationValidation.getConfigurationErrors | public List<String> getConfigurationErrors(boolean projectPerFolder, String configProjectToken, String configProjectName, String configApiToken, String configFilePath,
int archiveDepth, String[] includes, String[] projectPerFolderIncludes, String[] pythonIncludes, String s... | java | public List<String> getConfigurationErrors(boolean projectPerFolder, String configProjectToken, String configProjectName, String configApiToken, String configFilePath,
int archiveDepth, String[] includes, String[] projectPerFolderIncludes, String[] pythonIncludes, String s... | [
"public",
"List",
"<",
"String",
">",
"getConfigurationErrors",
"(",
"boolean",
"projectPerFolder",
",",
"String",
"configProjectToken",
",",
"String",
"configProjectName",
",",
"String",
"configApiToken",
",",
"String",
"configFilePath",
",",
"int",
"archiveDepth",
"... | Check configuration errors | [
"Check",
"configuration",
"errors"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/fs/configuration/ConfigurationValidation.java#L32-L75 |
3,959 | whitesource/fs-agent | src/main/java/org/whitesource/agent/FileSystemScanner.java | FileSystemScanner.createProjects | @Deprecated
public List<DependencyInfo> createProjects(List<String> scannerBaseDirs, Map<String, Set<String>> appPathsToDependencyDirs, boolean scmConnector,
String[] includes, String[] excludes, boolean globCaseSensitive, int archiveExtractionDepth,
... | java | @Deprecated
public List<DependencyInfo> createProjects(List<String> scannerBaseDirs, Map<String, Set<String>> appPathsToDependencyDirs, boolean scmConnector,
String[] includes, String[] excludes, boolean globCaseSensitive, int archiveExtractionDepth,
... | [
"@",
"Deprecated",
"public",
"List",
"<",
"DependencyInfo",
">",
"createProjects",
"(",
"List",
"<",
"String",
">",
"scannerBaseDirs",
",",
"Map",
"<",
"String",
",",
"Set",
"<",
"String",
">",
">",
"appPathsToDependencyDirs",
",",
"boolean",
"scmConnector",
"... | This method is usually called from outside by different other tools
@param scannerBaseDirs folders to scan
@param scmConnector use scmConnector
@param includes includes glob patterns
@param excludes excludes glob patterns
@param globCaseSensitive global case sensitive
... | [
"This",
"method",
"is",
"usually",
"called",
"from",
"outside",
"by",
"different",
"other",
"tools"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/FileSystemScanner.java#L103-L112 |
3,960 | whitesource/fs-agent | src/main/java/org/whitesource/scm/ScmConnector.java | ScmConnector.cloneRepository | public File cloneRepository() {
String scmTempFolder = new FilesUtils().createTmpFolder(false, TempFolders.UNIQUE_SCM_TEMP_FOLDER);
cloneDirectory = new File(scmTempFolder, getType().toString().toLowerCase() + Constants.UNDERSCORE +
getUrlName() + Constants.UNDERSCORE + getBranch());
... | java | public File cloneRepository() {
String scmTempFolder = new FilesUtils().createTmpFolder(false, TempFolders.UNIQUE_SCM_TEMP_FOLDER);
cloneDirectory = new File(scmTempFolder, getType().toString().toLowerCase() + Constants.UNDERSCORE +
getUrlName() + Constants.UNDERSCORE + getBranch());
... | [
"public",
"File",
"cloneRepository",
"(",
")",
"{",
"String",
"scmTempFolder",
"=",
"new",
"FilesUtils",
"(",
")",
".",
"createTmpFolder",
"(",
"false",
",",
"TempFolders",
".",
"UNIQUE_SCM_TEMP_FOLDER",
")",
";",
"cloneDirectory",
"=",
"new",
"File",
"(",
"sc... | Clones the given repository.
@return The folder in which the specific branch/tag resides. | [
"Clones",
"the",
"given",
"repository",
"."
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/scm/ScmConnector.java#L85-L94 |
3,961 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/nuget/packagesConfig/NugetPackagesConfigXmlParser.java | NugetPackagesConfigXmlParser.parsePackagesConfigFile | public Set<DependencyInfo> parsePackagesConfigFile(boolean getDependenciesFromReferenceTag, String nugetDependencyFile) {
Persister persister = new Persister();
Set<DependencyInfo> dependencies = new HashSet<>();
try {
// case of packages.config file
if (this.nugetConfigF... | java | public Set<DependencyInfo> parsePackagesConfigFile(boolean getDependenciesFromReferenceTag, String nugetDependencyFile) {
Persister persister = new Persister();
Set<DependencyInfo> dependencies = new HashSet<>();
try {
// case of packages.config file
if (this.nugetConfigF... | [
"public",
"Set",
"<",
"DependencyInfo",
">",
"parsePackagesConfigFile",
"(",
"boolean",
"getDependenciesFromReferenceTag",
",",
"String",
"nugetDependencyFile",
")",
"{",
"Persister",
"persister",
"=",
"new",
"Persister",
"(",
")",
";",
"Set",
"<",
"DependencyInfo",
... | Parse packages.config or csproj file
@param getDependenciesFromReferenceTag - flag to indicate weather to get dependencies form reference tag or not
@return Set of DependencyInfos | [
"Parse",
"packages",
".",
"config",
"or",
"csproj",
"file"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/nuget/packagesConfig/NugetPackagesConfigXmlParser.java#L65-L89 |
3,962 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/ruby/RubyDependencyResolver.java | RubyDependencyResolver.findPathToGems | private String findPathToGems() throws FileNotFoundException {
String[] commandParams = cli.getCommandParams(GEM, ENVIRONMENT);
List<String> lines = cli.runCmd(rootDirectory, commandParams);
String path = null;
if (!lines.isEmpty()) {
path = lines.get(0) + fileSeparator + CAC... | java | private String findPathToGems() throws FileNotFoundException {
String[] commandParams = cli.getCommandParams(GEM, ENVIRONMENT);
List<String> lines = cli.runCmd(rootDirectory, commandParams);
String path = null;
if (!lines.isEmpty()) {
path = lines.get(0) + fileSeparator + CAC... | [
"private",
"String",
"findPathToGems",
"(",
")",
"throws",
"FileNotFoundException",
"{",
"String",
"[",
"]",
"commandParams",
"=",
"cli",
".",
"getCommandParams",
"(",
"GEM",
",",
"ENVIRONMENT",
")",
";",
"List",
"<",
"String",
">",
"lines",
"=",
"cli",
".",... | Ruby's cache is inside the installation folder. path can be found by running command 'gem environment gemdir' | [
"Ruby",
"s",
"cache",
"is",
"inside",
"the",
"installation",
"folder",
".",
"path",
"can",
"be",
"found",
"by",
"running",
"command",
"gem",
"environment",
"gemdir"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/ruby/RubyDependencyResolver.java#L547-L558 |
3,963 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/ruby/RubyDependencyResolver.java | RubyDependencyResolver.findGemVersion | private String findGemVersion(String gemName, String pathToGems) {
String version = null;
File maxVersionFile = findMaxVersionFile(gemName, pathToGems);
if (maxVersionFile != null) {
String fileName = maxVersionFile.getName();
version = getVersionFromFileName(fileName, ge... | java | private String findGemVersion(String gemName, String pathToGems) {
String version = null;
File maxVersionFile = findMaxVersionFile(gemName, pathToGems);
if (maxVersionFile != null) {
String fileName = maxVersionFile.getName();
version = getVersionFromFileName(fileName, ge... | [
"private",
"String",
"findGemVersion",
"(",
"String",
"gemName",
",",
"String",
"pathToGems",
")",
"{",
"String",
"version",
"=",
"null",
";",
"File",
"maxVersionFile",
"=",
"findMaxVersionFile",
"(",
"gemName",
",",
"pathToGems",
")",
";",
"if",
"(",
"maxVers... | in such cases, look for the relevant gem file in the cache with the highest version | [
"in",
"such",
"cases",
"look",
"for",
"the",
"relevant",
"gem",
"file",
"in",
"the",
"cache",
"with",
"the",
"highest",
"version"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/ruby/RubyDependencyResolver.java#L617-L625 |
3,964 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoardCallback.java | NotificationBoardCallback.makeRowView | public View makeRowView(NotificationBoard board, NotificationEntry entry, LayoutInflater inflater) {
return inflater.inflate(R.layout.notification_board_row, null, false);
} | java | public View makeRowView(NotificationBoard board, NotificationEntry entry, LayoutInflater inflater) {
return inflater.inflate(R.layout.notification_board_row, null, false);
} | [
"public",
"View",
"makeRowView",
"(",
"NotificationBoard",
"board",
",",
"NotificationEntry",
"entry",
",",
"LayoutInflater",
"inflater",
")",
"{",
"return",
"inflater",
".",
"inflate",
"(",
"R",
".",
"layout",
".",
"notification_board_row",
",",
"null",
",",
"f... | Called to instantiate a view being placed in the row view,
which is the user interface for the incoming notification.
@param board
@param entry
@param inflater
@return View | [
"Called",
"to",
"instantiate",
"a",
"view",
"being",
"placed",
"in",
"the",
"row",
"view",
"which",
"is",
"the",
"user",
"interface",
"for",
"the",
"incoming",
"notification",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoardCallback.java#L101-L104 |
3,965 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoardCallback.java | NotificationBoardCallback.onRowViewAdded | public void onRowViewAdded(NotificationBoard board, RowView rowView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onRowViewAdded - " + entry.ID);
if (entry.hasActions()) {
ArrayList<Action> actions = entry.getActions();
ViewGroup vg = (ViewGroup) rowView.findViewById(R.id.act... | java | public void onRowViewAdded(NotificationBoard board, RowView rowView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onRowViewAdded - " + entry.ID);
if (entry.hasActions()) {
ArrayList<Action> actions = entry.getActions();
ViewGroup vg = (ViewGroup) rowView.findViewById(R.id.act... | [
"public",
"void",
"onRowViewAdded",
"(",
"NotificationBoard",
"board",
",",
"RowView",
"rowView",
",",
"NotificationEntry",
"entry",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onRowViewAdded - \"",
"+",
"entry",
".",
"ID",
")",
"... | Called when a row view is added to the board.
@param board
@param rowView
@param entry | [
"Called",
"when",
"a",
"row",
"view",
"is",
"added",
"to",
"the",
"board",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoardCallback.java#L113-L142 |
3,966 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoardCallback.java | NotificationBoardCallback.onRowViewUpdate | public void onRowViewUpdate(NotificationBoard board, RowView rowView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onRowViewUpdate - " + entry.ID);
ImageView iconView = (ImageView) rowView.findViewById(R.id.icon);
TextView titleView = (TextView) rowView.findViewById(R.id.title);
Text... | java | public void onRowViewUpdate(NotificationBoard board, RowView rowView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onRowViewUpdate - " + entry.ID);
ImageView iconView = (ImageView) rowView.findViewById(R.id.icon);
TextView titleView = (TextView) rowView.findViewById(R.id.title);
Text... | [
"public",
"void",
"onRowViewUpdate",
"(",
"NotificationBoard",
"board",
",",
"RowView",
"rowView",
",",
"NotificationEntry",
"entry",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onRowViewUpdate - \"",
"+",
"entry",
".",
"ID",
")",
... | Called when a row view is being updated.
@param board
@param rowView
@param entry | [
"Called",
"when",
"a",
"row",
"view",
"is",
"being",
"updated",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoardCallback.java#L162-L197 |
3,967 | lamydev/Android-Notification | core/src/zemin/notification/NotificationBoardCallback.java | NotificationBoardCallback.onClickRowView | public void onClickRowView(NotificationBoard board, RowView rowView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onClickRowView - " + entry.ID);
} | java | public void onClickRowView(NotificationBoard board, RowView rowView, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onClickRowView - " + entry.ID);
} | [
"public",
"void",
"onClickRowView",
"(",
"NotificationBoard",
"board",
",",
"RowView",
"rowView",
",",
"NotificationEntry",
"entry",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onClickRowView - \"",
"+",
"entry",
".",
"ID",
")",
"... | Called when a row view has been clicked.
@param board
@param rowView
@param entry | [
"Called",
"when",
"a",
"row",
"view",
"has",
"been",
"clicked",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationBoardCallback.java#L206-L208 |
3,968 | lamydev/Android-Notification | core/src/zemin/notification/Utils.java | Utils.getAlphaForOffset | public static float getAlphaForOffset(float alphaStart, float alphaEnd,
float posStart, float posEnd, float posOffset) {
return alphaStart + posOffset * (alphaEnd - alphaStart) / (posEnd - posStart);
} | java | public static float getAlphaForOffset(float alphaStart, float alphaEnd,
float posStart, float posEnd, float posOffset) {
return alphaStart + posOffset * (alphaEnd - alphaStart) / (posEnd - posStart);
} | [
"public",
"static",
"float",
"getAlphaForOffset",
"(",
"float",
"alphaStart",
",",
"float",
"alphaEnd",
",",
"float",
"posStart",
",",
"float",
"posEnd",
",",
"float",
"posOffset",
")",
"{",
"return",
"alphaStart",
"+",
"posOffset",
"*",
"(",
"alphaEnd",
"-",
... | Calculate the alpha value for a position offset.
@param alphaStart
@param alphaEnd
@param posStart
@param posEnd
@param posOffset | [
"Calculate",
"the",
"alpha",
"value",
"for",
"a",
"position",
"offset",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/Utils.java#L33-L36 |
3,969 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java | PhpDependencyResolver.createDependencyInfos | private Collection<DependencyInfo> createDependencyInfos(Collection<PhpPackage> phpPackages, Collection<DependencyInfo> dependencyInfos, Collection<String> directDependencies) {
HashMap<DependencyInfo, Collection<String>> parentToChildMap = new HashMap<>();
HashMap<String, DependencyInfo> packageDepende... | java | private Collection<DependencyInfo> createDependencyInfos(Collection<PhpPackage> phpPackages, Collection<DependencyInfo> dependencyInfos, Collection<String> directDependencies) {
HashMap<DependencyInfo, Collection<String>> parentToChildMap = new HashMap<>();
HashMap<String, DependencyInfo> packageDepende... | [
"private",
"Collection",
"<",
"DependencyInfo",
">",
"createDependencyInfos",
"(",
"Collection",
"<",
"PhpPackage",
">",
"phpPackages",
",",
"Collection",
"<",
"DependencyInfo",
">",
"dependencyInfos",
",",
"Collection",
"<",
"String",
">",
"directDependencies",
")",
... | create dependencyInfo objects from each direct dependency | [
"create",
"dependencyInfo",
"objects",
"from",
"each",
"direct",
"dependency"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java#L168-L196 |
3,970 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java | PhpDependencyResolver.createDependencyInfo | private DependencyInfo createDependencyInfo(PhpPackage phpPackage) {
String groupId = getGroupIdFromName(phpPackage);
String artifactId = phpPackage.getName();
String version = phpPackage.getVersion();
String commit = phpPackage.getPackageSource().getReference();
if (StringUtils.... | java | private DependencyInfo createDependencyInfo(PhpPackage phpPackage) {
String groupId = getGroupIdFromName(phpPackage);
String artifactId = phpPackage.getName();
String version = phpPackage.getVersion();
String commit = phpPackage.getPackageSource().getReference();
if (StringUtils.... | [
"private",
"DependencyInfo",
"createDependencyInfo",
"(",
"PhpPackage",
"phpPackage",
")",
"{",
"String",
"groupId",
"=",
"getGroupIdFromName",
"(",
"phpPackage",
")",
";",
"String",
"artifactId",
"=",
"phpPackage",
".",
"getName",
"(",
")",
";",
"String",
"versio... | convert phpPackage to dependencyInfo object | [
"convert",
"phpPackage",
"to",
"dependencyInfo",
"object"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java#L199-L225 |
3,971 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java | PhpDependencyResolver.collectChildren | private void collectChildren(DependencyInfo dependencyInfo, HashMap<String, DependencyInfo> packageDependencyMap,
HashMap<DependencyInfo, Collection<String>> requireDependenciesMap) {
Collection<String> requires = requireDependenciesMap.get(dependencyInfo);
// check if d... | java | private void collectChildren(DependencyInfo dependencyInfo, HashMap<String, DependencyInfo> packageDependencyMap,
HashMap<DependencyInfo, Collection<String>> requireDependenciesMap) {
Collection<String> requires = requireDependenciesMap.get(dependencyInfo);
// check if d... | [
"private",
"void",
"collectChildren",
"(",
"DependencyInfo",
"dependencyInfo",
",",
"HashMap",
"<",
"String",
",",
"DependencyInfo",
">",
"packageDependencyMap",
",",
"HashMap",
"<",
"DependencyInfo",
",",
"Collection",
"<",
"String",
">",
">",
"requireDependenciesMap... | collect children's recursively for each dependencyInfo object | [
"collect",
"children",
"s",
"recursively",
"for",
"each",
"dependencyInfo",
"object"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java#L228-L241 |
3,972 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java | PhpDependencyResolver.getGroupIdFromName | private String getGroupIdFromName(PhpPackage phpPackage) {
String groupId = null;
if (StringUtils.isNotBlank(phpPackage.getName())) {
String packageName = phpPackage.getName();
String[] gavCoordinates = packageName.split(FORWARD_SLASH);
groupId = gavCoordinates[0];
... | java | private String getGroupIdFromName(PhpPackage phpPackage) {
String groupId = null;
if (StringUtils.isNotBlank(phpPackage.getName())) {
String packageName = phpPackage.getName();
String[] gavCoordinates = packageName.split(FORWARD_SLASH);
groupId = gavCoordinates[0];
... | [
"private",
"String",
"getGroupIdFromName",
"(",
"PhpPackage",
"phpPackage",
")",
"{",
"String",
"groupId",
"=",
"null",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"phpPackage",
".",
"getName",
"(",
")",
")",
")",
"{",
"String",
"packageName",
"="... | get the groupId from the name of package | [
"get",
"the",
"groupId",
"from",
"the",
"name",
"of",
"package"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java#L244-L252 |
3,973 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java | PhpDependencyResolver.getArtifactIdFromName | private String getArtifactIdFromName(PhpPackage phpPackage) {
String artifactId = null;
if (StringUtils.isNotBlank(phpPackage.getName())) {
String packageName = phpPackage.getName();
String[] gavCoordinates = packageName.split(FORWARD_SLASH);
artifactId = gavCoordinat... | java | private String getArtifactIdFromName(PhpPackage phpPackage) {
String artifactId = null;
if (StringUtils.isNotBlank(phpPackage.getName())) {
String packageName = phpPackage.getName();
String[] gavCoordinates = packageName.split(FORWARD_SLASH);
artifactId = gavCoordinat... | [
"private",
"String",
"getArtifactIdFromName",
"(",
"PhpPackage",
"phpPackage",
")",
"{",
"String",
"artifactId",
"=",
"null",
";",
"if",
"(",
"StringUtils",
".",
"isNotBlank",
"(",
"phpPackage",
".",
"getName",
"(",
")",
")",
")",
"{",
"String",
"packageName",... | get the artifactId from the name of package | [
"get",
"the",
"artifactId",
"from",
"the",
"name",
"of",
"package"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/php/PhpDependencyResolver.java#L255-L263 |
3,974 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/docker/remotedocker/azure/AzureRemoteDocker.java | AzureRemoteDocker.loginToRemoteRegistry | @Override
protected boolean loginToRemoteRegistry() {
Pair<Integer, InputStream> result;
try {
// Check if user already logged in to azure
isUserLoggedIn();
// If user isn't logged in, then login to azure via az cli.
if(!loggedInToAzure) {
... | java | @Override
protected boolean loginToRemoteRegistry() {
Pair<Integer, InputStream> result;
try {
// Check if user already logged in to azure
isUserLoggedIn();
// If user isn't logged in, then login to azure via az cli.
if(!loggedInToAzure) {
... | [
"@",
"Override",
"protected",
"boolean",
"loginToRemoteRegistry",
"(",
")",
"{",
"Pair",
"<",
"Integer",
",",
"InputStream",
">",
"result",
";",
"try",
"{",
"// Check if user already logged in to azure",
"isUserLoggedIn",
"(",
")",
";",
"// If user isn't logged in, then... | Log in to container registry in Azure cloud.
If login succeeded, docker obtains authentication to pull images from this registry.
@return | [
"Log",
"in",
"to",
"container",
"registry",
"in",
"Azure",
"cloud",
".",
"If",
"login",
"succeeded",
"docker",
"obtains",
"authentication",
"to",
"pull",
"images",
"from",
"this",
"registry",
"."
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/docker/remotedocker/azure/AzureRemoteDocker.java#L54-L100 |
3,975 | lamydev/Android-Notification | core/src/zemin/notification/NotificationEntry.java | NotificationEntry.setWhen | public void setWhen(CharSequence format, long when) {
if (format == null) format = DEFAULT_DATE_FORMAT;
this.whenFormatted = DateFormat.format(format, when);
} | java | public void setWhen(CharSequence format, long when) {
if (format == null) format = DEFAULT_DATE_FORMAT;
this.whenFormatted = DateFormat.format(format, when);
} | [
"public",
"void",
"setWhen",
"(",
"CharSequence",
"format",
",",
"long",
"when",
")",
"{",
"if",
"(",
"format",
"==",
"null",
")",
"format",
"=",
"DEFAULT_DATE_FORMAT",
";",
"this",
".",
"whenFormatted",
"=",
"DateFormat",
".",
"format",
"(",
"format",
","... | Set a timestamp pertaining to this notification.
Only used for:
@see NotificationLocal
@see NotificationGlobal
@param format
@param when | [
"Set",
"a",
"timestamp",
"pertaining",
"to",
"this",
"notification",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L309-L312 |
3,976 | lamydev/Android-Notification | core/src/zemin/notification/NotificationEntry.java | NotificationEntry.setProgress | public void setProgress(int max, int progress, boolean indeterminate) {
this.progressMax = max;
this.progress = progress;
this.progressIndeterminate = indeterminate;
} | java | public void setProgress(int max, int progress, boolean indeterminate) {
this.progressMax = max;
this.progress = progress;
this.progressIndeterminate = indeterminate;
} | [
"public",
"void",
"setProgress",
"(",
"int",
"max",
",",
"int",
"progress",
",",
"boolean",
"indeterminate",
")",
"{",
"this",
".",
"progressMax",
"=",
"max",
";",
"this",
".",
"progress",
"=",
"progress",
";",
"this",
".",
"progressIndeterminate",
"=",
"i... | Set the progress this notification represents.
@see android.app.Notification#setProgress(int, int, boolean)
@param max
@param progress
@param indeterminate | [
"Set",
"the",
"progress",
"this",
"notification",
"represents",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L387-L391 |
3,977 | lamydev/Android-Notification | core/src/zemin/notification/NotificationEntry.java | NotificationEntry.setRingtone | public void setRingtone(Context context, int resId) {
if (resId > 0) {
this.ringtoneUri = Uri.parse("android.resource://" +
context.getPackageName() + "/" + resId);
}
} | java | public void setRingtone(Context context, int resId) {
if (resId > 0) {
this.ringtoneUri = Uri.parse("android.resource://" +
context.getPackageName() + "/" + resId);
}
} | [
"public",
"void",
"setRingtone",
"(",
"Context",
"context",
",",
"int",
"resId",
")",
"{",
"if",
"(",
"resId",
">",
"0",
")",
"{",
"this",
".",
"ringtoneUri",
"=",
"Uri",
".",
"parse",
"(",
"\"android.resource://\"",
"+",
"context",
".",
"getPackageName",
... | Set ringtone resource.
@param context
@param resId | [
"Set",
"ringtone",
"resource",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L618-L623 |
3,978 | lamydev/Android-Notification | core/src/zemin/notification/NotificationEntry.java | NotificationEntry.setRingtone | public void setRingtone(String filepath) {
if (filepath != null) {
File file = new File(filepath);
if (file.exists()) {
this.ringtoneUri = Uri.fromFile(file);
} else {
Log.e(TAG, "ringtone file not found.");
}
}
} | java | public void setRingtone(String filepath) {
if (filepath != null) {
File file = new File(filepath);
if (file.exists()) {
this.ringtoneUri = Uri.fromFile(file);
} else {
Log.e(TAG, "ringtone file not found.");
}
}
} | [
"public",
"void",
"setRingtone",
"(",
"String",
"filepath",
")",
"{",
"if",
"(",
"filepath",
"!=",
"null",
")",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"filepath",
")",
";",
"if",
"(",
"file",
".",
"exists",
"(",
")",
")",
"{",
"this",
".",
... | Set ringtone file path.
@param filepath | [
"Set",
"ringtone",
"file",
"path",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L641-L650 |
3,979 | lamydev/Android-Notification | core/src/zemin/notification/NotificationRemote.java | NotificationRemote.getDeleteIntent | public PendingIntent getDeleteIntent(NotificationEntry entry) {
Intent intent = new Intent(ACTION_CANCEL);
intent.putExtra(KEY_ENTRY_ID, entry.ID);
return PendingIntent.getBroadcast(mContext, genIdForPendingIntent(), intent, 0);
} | java | public PendingIntent getDeleteIntent(NotificationEntry entry) {
Intent intent = new Intent(ACTION_CANCEL);
intent.putExtra(KEY_ENTRY_ID, entry.ID);
return PendingIntent.getBroadcast(mContext, genIdForPendingIntent(), intent, 0);
} | [
"public",
"PendingIntent",
"getDeleteIntent",
"(",
"NotificationEntry",
"entry",
")",
"{",
"Intent",
"intent",
"=",
"new",
"Intent",
"(",
"ACTION_CANCEL",
")",
";",
"intent",
".",
"putExtra",
"(",
"KEY_ENTRY_ID",
",",
"entry",
".",
"ID",
")",
";",
"return",
... | Create an PendingIntent to execute when the notification is explicitly dismissed by the user.
@see android.app.Notification#setDeleteIntent(PendingIntent)
@param entry
@return PendingIntent | [
"Create",
"an",
"PendingIntent",
"to",
"execute",
"when",
"the",
"notification",
"is",
"explicitly",
"dismissed",
"by",
"the",
"user",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationRemote.java#L129-L133 |
3,980 | lamydev/Android-Notification | core/src/zemin/notification/NotificationRemote.java | NotificationRemote.getContentIntent | public PendingIntent getContentIntent(NotificationEntry entry) {
Intent intent = new Intent(ACTION_CONTENT);
intent.putExtra(KEY_ENTRY_ID, entry.ID);
return PendingIntent.getBroadcast(mContext, genIdForPendingIntent(), intent, 0);
} | java | public PendingIntent getContentIntent(NotificationEntry entry) {
Intent intent = new Intent(ACTION_CONTENT);
intent.putExtra(KEY_ENTRY_ID, entry.ID);
return PendingIntent.getBroadcast(mContext, genIdForPendingIntent(), intent, 0);
} | [
"public",
"PendingIntent",
"getContentIntent",
"(",
"NotificationEntry",
"entry",
")",
"{",
"Intent",
"intent",
"=",
"new",
"Intent",
"(",
"ACTION_CONTENT",
")",
";",
"intent",
".",
"putExtra",
"(",
"KEY_ENTRY_ID",
",",
"entry",
".",
"ID",
")",
";",
"return",
... | Create an PendingIntent to execute when the notification is clicked by the user.
@see android.app.Notification#setContentIntent(PendingIntent)
@param entry
@return PedningIntent | [
"Create",
"an",
"PendingIntent",
"to",
"execute",
"when",
"the",
"notification",
"is",
"clicked",
"by",
"the",
"user",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationRemote.java#L143-L147 |
3,981 | lamydev/Android-Notification | core/src/zemin/notification/NotificationRemote.java | NotificationRemote.getActionIntent | public PendingIntent getActionIntent(NotificationEntry entry, NotificationEntry.Action act) {
Intent intent = new Intent(ACTION_ACTION);
intent.putExtra(KEY_ENTRY_ID, entry.ID);
intent.putExtra(KEY_ACTION_ID, entry.mActions.indexOf(act));
return PendingIntent.getBroadcast(mContext, genId... | java | public PendingIntent getActionIntent(NotificationEntry entry, NotificationEntry.Action act) {
Intent intent = new Intent(ACTION_ACTION);
intent.putExtra(KEY_ENTRY_ID, entry.ID);
intent.putExtra(KEY_ACTION_ID, entry.mActions.indexOf(act));
return PendingIntent.getBroadcast(mContext, genId... | [
"public",
"PendingIntent",
"getActionIntent",
"(",
"NotificationEntry",
"entry",
",",
"NotificationEntry",
".",
"Action",
"act",
")",
"{",
"Intent",
"intent",
"=",
"new",
"Intent",
"(",
"ACTION_ACTION",
")",
";",
"intent",
".",
"putExtra",
"(",
"KEY_ENTRY_ID",
"... | Create an PendingIntent to be fired when the notification action is invoked.
@see android.app.Notification#addAction(int, CharSequence, PendingIntent)
@param entry
@param act
@return PendingIntent | [
"Create",
"an",
"PendingIntent",
"to",
"be",
"fired",
"when",
"the",
"notification",
"action",
"is",
"invoked",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationRemote.java#L158-L163 |
3,982 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/go/GoDependencyResolver.java | GoDependencyResolver.collectDependenciesWithoutDefinedManager | private String collectDependenciesWithoutDefinedManager(String rootDirectory, List<DependencyInfo> dependencyInfos){
String error = null;
try {
collectDepDependencies(rootDirectory, dependencyInfos);
goDependencyManager = GoDependencyManager.DEP;
} catch (Exception e){
... | java | private String collectDependenciesWithoutDefinedManager(String rootDirectory, List<DependencyInfo> dependencyInfos){
String error = null;
try {
collectDepDependencies(rootDirectory, dependencyInfos);
goDependencyManager = GoDependencyManager.DEP;
} catch (Exception e){
... | [
"private",
"String",
"collectDependenciesWithoutDefinedManager",
"(",
"String",
"rootDirectory",
",",
"List",
"<",
"DependencyInfo",
">",
"dependencyInfos",
")",
"{",
"String",
"error",
"=",
"null",
";",
"try",
"{",
"collectDepDependencies",
"(",
"rootDirectory",
",",... | when no dependency manager is defined - trying to run one manager after the other, till one succeeds. if not - returning an error | [
"when",
"no",
"dependency",
"manager",
"is",
"defined",
"-",
"trying",
"to",
"run",
"one",
"manager",
"after",
"the",
"other",
"till",
"one",
"succeeds",
".",
"if",
"not",
"-",
"returning",
"an",
"error"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/go/GoDependencyResolver.java#L241-L280 |
3,983 | whitesource/fs-agent | src/main/java/org/whitesource/agent/utils/CommandLineProcess.java | CommandLineProcess.printErrors | private void printErrors(){
if (errorLog.isFile()){
FileReader fileReader;
try {
fileReader = new FileReader(errorLog);
BufferedReader bufferedReader = new BufferedReader(fileReader);
String currLine;
while ((currLine = buff... | java | private void printErrors(){
if (errorLog.isFile()){
FileReader fileReader;
try {
fileReader = new FileReader(errorLog);
BufferedReader bufferedReader = new BufferedReader(fileReader);
String currLine;
while ((currLine = buff... | [
"private",
"void",
"printErrors",
"(",
")",
"{",
"if",
"(",
"errorLog",
".",
"isFile",
"(",
")",
")",
"{",
"FileReader",
"fileReader",
";",
"try",
"{",
"fileReader",
"=",
"new",
"FileReader",
"(",
"errorLog",
")",
";",
"BufferedReader",
"bufferedReader",
"... | if you find a better way - go ahead and replace it | [
"if",
"you",
"find",
"a",
"better",
"way",
"-",
"go",
"ahead",
"and",
"replace",
"it"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/utils/CommandLineProcess.java#L106-L129 |
3,984 | whitesource/fs-agent | src/main/java/org/whitesource/agent/utils/CommandLineProcess.java | CommandLineProcess.getShortPath | private String getShortPath(String rootPath) {
File file = new File(rootPath);
String lastPathAfterSeparator = null;
String shortPath = getWindowsShortPath(file.getAbsolutePath());
if (StringUtils.isNotEmpty(shortPath)) {
return getWindowsShortPath(file.getAbsolutePath());
... | java | private String getShortPath(String rootPath) {
File file = new File(rootPath);
String lastPathAfterSeparator = null;
String shortPath = getWindowsShortPath(file.getAbsolutePath());
if (StringUtils.isNotEmpty(shortPath)) {
return getWindowsShortPath(file.getAbsolutePath());
... | [
"private",
"String",
"getShortPath",
"(",
"String",
"rootPath",
")",
"{",
"File",
"file",
"=",
"new",
"File",
"(",
"rootPath",
")",
";",
"String",
"lastPathAfterSeparator",
"=",
"null",
";",
"String",
"shortPath",
"=",
"getWindowsShortPath",
"(",
"file",
".",
... | get windows short path | [
"get",
"windows",
"short",
"path"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/utils/CommandLineProcess.java#L132-L150 |
3,985 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/npm/NpmDependencyResolver.java | NpmDependencyResolver.collectPackageJsonDependencies | private Collection<DependencyInfo> collectPackageJsonDependencies(Collection<BomFile> packageJsons) {
Collection<DependencyInfo> dependencies = new LinkedList<>();
ConcurrentHashMap<DependencyInfo, BomFile> dependencyPackageJsonMap = new ConcurrentHashMap<>();
ExecutorService executorService = E... | java | private Collection<DependencyInfo> collectPackageJsonDependencies(Collection<BomFile> packageJsons) {
Collection<DependencyInfo> dependencies = new LinkedList<>();
ConcurrentHashMap<DependencyInfo, BomFile> dependencyPackageJsonMap = new ConcurrentHashMap<>();
ExecutorService executorService = E... | [
"private",
"Collection",
"<",
"DependencyInfo",
">",
"collectPackageJsonDependencies",
"(",
"Collection",
"<",
"BomFile",
">",
"packageJsons",
")",
"{",
"Collection",
"<",
"DependencyInfo",
">",
"dependencies",
"=",
"new",
"LinkedList",
"<>",
"(",
")",
";",
"Concu... | Collect dependencies from package.json files - without 'npm ls' | [
"Collect",
"dependencies",
"from",
"package",
".",
"json",
"files",
"-",
"without",
"npm",
"ls"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/npm/NpmDependencyResolver.java#L333-L362 |
3,986 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/npm/NpmDependencyResolver.java | NpmDependencyResolver.removeDependenciesWithoutSha1 | private void removeDependenciesWithoutSha1(Collection<DependencyInfo> dependencies){
Collection<DependencyInfo> childDependencies = new ArrayList<>();
for (Iterator<DependencyInfo> iterator = dependencies.iterator(); iterator.hasNext();){
DependencyInfo dependencyInfo = iterator.next();
... | java | private void removeDependenciesWithoutSha1(Collection<DependencyInfo> dependencies){
Collection<DependencyInfo> childDependencies = new ArrayList<>();
for (Iterator<DependencyInfo> iterator = dependencies.iterator(); iterator.hasNext();){
DependencyInfo dependencyInfo = iterator.next();
... | [
"private",
"void",
"removeDependenciesWithoutSha1",
"(",
"Collection",
"<",
"DependencyInfo",
">",
"dependencies",
")",
"{",
"Collection",
"<",
"DependencyInfo",
">",
"childDependencies",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
";",
"for",
"(",
"Iterator",
"<",
... | currently deprecated - not relevant | [
"currently",
"deprecated",
"-",
"not",
"relevant"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/npm/NpmDependencyResolver.java#L423-L433 |
3,987 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/docker/RpmParser.java | RpmParser.getPackageVersion | private String getPackageVersion(String packageInfoString) {
// packageInfoString for example - audit-libs-2.7.6-3.el7-x86_64
try {
String firstDotString = packageInfoString.substring(0, packageInfoString.indexOf(Constants.DOT));
int lastIndexOfHyphen = firstDotString.lastIndexOf... | java | private String getPackageVersion(String packageInfoString) {
// packageInfoString for example - audit-libs-2.7.6-3.el7-x86_64
try {
String firstDotString = packageInfoString.substring(0, packageInfoString.indexOf(Constants.DOT));
int lastIndexOfHyphen = firstDotString.lastIndexOf... | [
"private",
"String",
"getPackageVersion",
"(",
"String",
"packageInfoString",
")",
"{",
"// packageInfoString for example - audit-libs-2.7.6-3.el7-x86_64",
"try",
"{",
"String",
"firstDotString",
"=",
"packageInfoString",
".",
"substring",
"(",
"0",
",",
"packageInfoString",
... | get rpm package version | [
"get",
"rpm",
"package",
"version"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/docker/RpmParser.java#L65-L79 |
3,988 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/docker/RpmParser.java | RpmParser.checkFolders | public File checkFolders(Collection<String> yumDbFolders, String yumDbFolderPath) {
if (!yumDbFolders.isEmpty()) {
for (String folderPath : yumDbFolders) {
File file = new File(folderPath);
if (file.listFiles().length > 0 && folderPath.contains(yumDbFolderPath)) {
... | java | public File checkFolders(Collection<String> yumDbFolders, String yumDbFolderPath) {
if (!yumDbFolders.isEmpty()) {
for (String folderPath : yumDbFolders) {
File file = new File(folderPath);
if (file.listFiles().length > 0 && folderPath.contains(yumDbFolderPath)) {
... | [
"public",
"File",
"checkFolders",
"(",
"Collection",
"<",
"String",
">",
"yumDbFolders",
",",
"String",
"yumDbFolderPath",
")",
"{",
"if",
"(",
"!",
"yumDbFolders",
".",
"isEmpty",
"(",
")",
")",
"{",
"for",
"(",
"String",
"folderPath",
":",
"yumDbFolders",
... | find yumdb folder from collection | [
"find",
"yumdb",
"folder",
"from",
"collection"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/docker/RpmParser.java#L87-L97 |
3,989 | whitesource/fs-agent | src/main/java/org/whitesource/fs/FSAConfiguration.java | FSAConfiguration.checkAppPathsForVia | private boolean checkAppPathsForVia(Set<String> keySet, List<String> errors) {
for (String key : keySet) {
if (!key.equals("defaultKey")) {
File file = new File(key);
if (!file.exists()) {
errors.add("Effective Usage Analysis will not run if the -a... | java | private boolean checkAppPathsForVia(Set<String> keySet, List<String> errors) {
for (String key : keySet) {
if (!key.equals("defaultKey")) {
File file = new File(key);
if (!file.exists()) {
errors.add("Effective Usage Analysis will not run if the -a... | [
"private",
"boolean",
"checkAppPathsForVia",
"(",
"Set",
"<",
"String",
">",
"keySet",
",",
"List",
"<",
"String",
">",
"errors",
")",
"{",
"for",
"(",
"String",
"key",
":",
"keySet",
")",
"{",
"if",
"(",
"!",
"key",
".",
"equals",
"(",
"\"defaultKey\"... | check validation for appPath property, first check if the path is exist and then if this path is not a directory | [
"check",
"validation",
"for",
"appPath",
"property",
"first",
"check",
"if",
"the",
"path",
"is",
"exist",
"and",
"then",
"if",
"this",
"path",
"is",
"not",
"a",
"directory"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/fs/FSAConfiguration.java#L407-L423 |
3,990 | whitesource/fs-agent | src/main/java/org/whitesource/fs/FSAConfiguration.java | FSAConfiguration.parseProxy | public static String[] parseProxy(String proxy, List<String> errors) {
String[] parsedProxyInfo = new String[4];
if (proxy != null) {
try {
URL proxyAsUrl = new URL(proxy);
parsedProxyInfo[0] = proxyAsUrl.getHost();
parsedProxyInfo[1] = String... | java | public static String[] parseProxy(String proxy, List<String> errors) {
String[] parsedProxyInfo = new String[4];
if (proxy != null) {
try {
URL proxyAsUrl = new URL(proxy);
parsedProxyInfo[0] = proxyAsUrl.getHost();
parsedProxyInfo[1] = String... | [
"public",
"static",
"String",
"[",
"]",
"parseProxy",
"(",
"String",
"proxy",
",",
"List",
"<",
"String",
">",
"errors",
")",
"{",
"String",
"[",
"]",
"parsedProxyInfo",
"=",
"new",
"String",
"[",
"4",
"]",
";",
"if",
"(",
"proxy",
"!=",
"null",
")",... | returns data of proxy url from command line parameter proxy | [
"returns",
"data",
"of",
"proxy",
"url",
"from",
"command",
"line",
"parameter",
"proxy"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/fs/FSAConfiguration.java#L1220-L1240 |
3,991 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleLinesParser.java | GradleLinesParser.getSha1FromLocalRepo | private DependencyFile getSha1FromLocalRepo(DependencyInfo dependencyInfo) {
File localRepo = new File(gradleLocalRepositoryPath);
DependencyFile dependencyFile = null;
if (localRepo.exists() && localRepo.isDirectory()) {
String artifactId = dependencyInfo.getArtifactId();
... | java | private DependencyFile getSha1FromLocalRepo(DependencyInfo dependencyInfo) {
File localRepo = new File(gradleLocalRepositoryPath);
DependencyFile dependencyFile = null;
if (localRepo.exists() && localRepo.isDirectory()) {
String artifactId = dependencyInfo.getArtifactId();
... | [
"private",
"DependencyFile",
"getSha1FromLocalRepo",
"(",
"DependencyInfo",
"dependencyInfo",
")",
"{",
"File",
"localRepo",
"=",
"new",
"File",
"(",
"gradleLocalRepositoryPath",
")",
";",
"DependencyFile",
"dependencyFile",
"=",
"null",
";",
"if",
"(",
"localRepo",
... | get sha1 form local repository | [
"get",
"sha1",
"form",
"local",
"repository"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/gradle/GradleLinesParser.java#L280-L293 |
3,992 | lamydev/Android-Notification | core/src/zemin/notification/NotificationRemoteCallback.java | NotificationRemoteCallback.onClickRemote | public void onClickRemote(NotificationRemote remote, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onClickRemote - " + entry.ID);
} | java | public void onClickRemote(NotificationRemote remote, NotificationEntry entry) {
if (DBG) Log.v(TAG, "onClickRemote - " + entry.ID);
} | [
"public",
"void",
"onClickRemote",
"(",
"NotificationRemote",
"remote",
",",
"NotificationEntry",
"entry",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onClickRemote - \"",
"+",
"entry",
".",
"ID",
")",
";",
"}"
] | Called when notification is clicked.
@param remote
@param entry | [
"Called",
"when",
"notification",
"is",
"clicked",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationRemoteCallback.java#L135-L137 |
3,993 | lamydev/Android-Notification | core/src/zemin/notification/NotificationRemoteCallback.java | NotificationRemoteCallback.onClickRemoteAction | public void onClickRemoteAction(NotificationRemote remote, NotificationEntry entry,
NotificationEntry.Action act) {
if (DBG) Log.v(TAG, "onClickRemoteAction - " + entry.ID + ", " + act);
} | java | public void onClickRemoteAction(NotificationRemote remote, NotificationEntry entry,
NotificationEntry.Action act) {
if (DBG) Log.v(TAG, "onClickRemoteAction - " + entry.ID + ", " + act);
} | [
"public",
"void",
"onClickRemoteAction",
"(",
"NotificationRemote",
"remote",
",",
"NotificationEntry",
"entry",
",",
"NotificationEntry",
".",
"Action",
"act",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"onClickRemoteAction - \"",
"+",... | Called when notification action view is clicked.
@param remote
@param entry
@param act | [
"Called",
"when",
"notification",
"action",
"view",
"is",
"clicked",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationRemoteCallback.java#L156-L159 |
3,994 | lamydev/Android-Notification | core/src/zemin/notification/NotificationRemoteCallback.java | NotificationRemoteCallback.onReceive | public void onReceive(NotificationRemote remote, NotificationEntry entry,
Intent intent, String intentAction) {
if (DBG) Log.d(TAG, "onReceive - " + entry.ID + ", " + intentAction);
} | java | public void onReceive(NotificationRemote remote, NotificationEntry entry,
Intent intent, String intentAction) {
if (DBG) Log.d(TAG, "onReceive - " + entry.ID + ", " + intentAction);
} | [
"public",
"void",
"onReceive",
"(",
"NotificationRemote",
"remote",
",",
"NotificationEntry",
"entry",
",",
"Intent",
"intent",
",",
"String",
"intentAction",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"d",
"(",
"TAG",
",",
"\"onReceive - \"",
"+",
"entry"... | Called when receiving a broadcast.
@param remote
@param entry
@param intent
@param intentAction | [
"Called",
"when",
"receiving",
"a",
"broadcast",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationRemoteCallback.java#L169-L172 |
3,995 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/docker/DockerResolver.java | DockerResolver.filterDockerImagesToScan | private Collection<DockerImage> filterDockerImagesToScan(Collection<DockerImage> dockerImages, String[] dockerImageIncludes, String[] dockerImageExcludes) {
logger.info("Filtering docker images list by includes and excludes lists");
Collection<DockerImage> dockerImagesToScan = new LinkedList<>();
... | java | private Collection<DockerImage> filterDockerImagesToScan(Collection<DockerImage> dockerImages, String[] dockerImageIncludes, String[] dockerImageExcludes) {
logger.info("Filtering docker images list by includes and excludes lists");
Collection<DockerImage> dockerImagesToScan = new LinkedList<>();
... | [
"private",
"Collection",
"<",
"DockerImage",
">",
"filterDockerImagesToScan",
"(",
"Collection",
"<",
"DockerImage",
">",
"dockerImages",
",",
"String",
"[",
"]",
"dockerImageIncludes",
",",
"String",
"[",
"]",
"dockerImageExcludes",
")",
"{",
"logger",
".",
"info... | Filter the images using includes and excludes lists | [
"Filter",
"the",
"images",
"using",
"includes",
"and",
"excludes",
"lists"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/docker/DockerResolver.java#L166-L183 |
3,996 | whitesource/fs-agent | src/main/java/org/whitesource/agent/dependency/resolver/docker/DockerResolver.java | DockerResolver.saveDockerImages | private void saveDockerImages(Collection<DockerImage> dockerImages, Collection<AgentProjectInfo> projects) throws IOException {
logger.info("Saving {} docker images", dockerImages.size());
int counter = 1;
int imagesCount = dockerImages.size();
for (DockerImage dockerImage : dockerImages... | java | private void saveDockerImages(Collection<DockerImage> dockerImages, Collection<AgentProjectInfo> projects) throws IOException {
logger.info("Saving {} docker images", dockerImages.size());
int counter = 1;
int imagesCount = dockerImages.size();
for (DockerImage dockerImage : dockerImages... | [
"private",
"void",
"saveDockerImages",
"(",
"Collection",
"<",
"DockerImage",
">",
"dockerImages",
",",
"Collection",
"<",
"AgentProjectInfo",
">",
"projects",
")",
"throws",
"IOException",
"{",
"logger",
".",
"info",
"(",
"\"Saving {} docker images\"",
",",
"docker... | Save docker images and scan files | [
"Save",
"docker",
"images",
"and",
"scan",
"files"
] | d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1 | https://github.com/whitesource/fs-agent/blob/d6ee4842c4f08f4aeda7eb2307b24c49b6bed0e1/src/main/java/org/whitesource/agent/dependency/resolver/docker/DockerResolver.java#L220-L230 |
3,997 | lamydev/Android-Notification | core/src/zemin/notification/NotificationHandler.java | NotificationHandler.cancel | public void cancel(int entryId) {
NotificationEntry entry = mCenter.getEntry(ID, entryId);
if (entry != null) {
cancel(entry);
}
} | java | public void cancel(int entryId) {
NotificationEntry entry = mCenter.getEntry(ID, entryId);
if (entry != null) {
cancel(entry);
}
} | [
"public",
"void",
"cancel",
"(",
"int",
"entryId",
")",
"{",
"NotificationEntry",
"entry",
"=",
"mCenter",
".",
"getEntry",
"(",
"ID",
",",
"entryId",
")",
";",
"if",
"(",
"entry",
"!=",
"null",
")",
"{",
"cancel",
"(",
"entry",
")",
";",
"}",
"}"
] | Cancel notification by its id.
@param entryId | [
"Cancel",
"notification",
"by",
"its",
"id",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationHandler.java#L231-L236 |
3,998 | lamydev/Android-Notification | core/src/zemin/notification/NotificationHandler.java | NotificationHandler.cancel | public void cancel(String tag) {
List<NotificationEntry> entries = mCenter.getEntries(ID, tag);
if (entries != null && !entries.isEmpty()) {
for (NotificationEntry entry : entries) {
cancel(entry);
}
}
} | java | public void cancel(String tag) {
List<NotificationEntry> entries = mCenter.getEntries(ID, tag);
if (entries != null && !entries.isEmpty()) {
for (NotificationEntry entry : entries) {
cancel(entry);
}
}
} | [
"public",
"void",
"cancel",
"(",
"String",
"tag",
")",
"{",
"List",
"<",
"NotificationEntry",
">",
"entries",
"=",
"mCenter",
".",
"getEntries",
"(",
"ID",
",",
"tag",
")",
";",
"if",
"(",
"entries",
"!=",
"null",
"&&",
"!",
"entries",
".",
"isEmpty",
... | Cancel notifications by its tag.
@param tag | [
"Cancel",
"notifications",
"by",
"its",
"tag",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationHandler.java#L243-L250 |
3,999 | lamydev/Android-Notification | core/src/zemin/notification/NotificationHandler.java | NotificationHandler.cancelAll | public void cancelAll() {
if (DBG) Log.v(TAG, "prepare to cancel all");
cancelSchedule(ARRIVE);
schedule(CANCEL_ALL, 0, 0, null, 0);
} | java | public void cancelAll() {
if (DBG) Log.v(TAG, "prepare to cancel all");
cancelSchedule(ARRIVE);
schedule(CANCEL_ALL, 0, 0, null, 0);
} | [
"public",
"void",
"cancelAll",
"(",
")",
"{",
"if",
"(",
"DBG",
")",
"Log",
".",
"v",
"(",
"TAG",
",",
"\"prepare to cancel all\"",
")",
";",
"cancelSchedule",
"(",
"ARRIVE",
")",
";",
"schedule",
"(",
"CANCEL_ALL",
",",
"0",
",",
"0",
",",
"null",
"... | Cancel all notifications. | [
"Cancel",
"all",
"notifications",
"."
] | 6d6571d2862cb6edbacf9a78125418f7d621c3f8 | https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationHandler.java#L269-L273 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.