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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
144,200 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java | JMapper.destinationFactory | public JMapper<D, S> destinationFactory(DestinationFactory<D> factory){
this.mapper.setDestinationFactory(factory);
return this;
} | java | public JMapper<D, S> destinationFactory(DestinationFactory<D> factory){
this.mapper.setDestinationFactory(factory);
return this;
} | [
"public",
"JMapper",
"<",
"D",
",",
"S",
">",
"destinationFactory",
"(",
"DestinationFactory",
"<",
"D",
">",
"factory",
")",
"{",
"this",
".",
"mapper",
".",
"setDestinationFactory",
"(",
"factory",
")",
";",
"return",
"this",
";",
"}"
] | Permits to define a destination factory, this is usefull in case of immutable objects.
@param factory destination factory
@return this instance of JMapper | [
"Permits",
"to",
"define",
"a",
"destination",
"factory",
"this",
"is",
"usefull",
"in",
"case",
"of",
"immutable",
"objects",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/JMapper.java#L475-L478 |
144,201 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.isAssignableFrom | public static boolean isAssignableFrom(Class<?> destination,Class<?> source){
return destination.isAssignableFrom(source) || isBoxing(destination,source) || isUnBoxing(destination,source);
} | java | public static boolean isAssignableFrom(Class<?> destination,Class<?> source){
return destination.isAssignableFrom(source) || isBoxing(destination,source) || isUnBoxing(destination,source);
} | [
"public",
"static",
"boolean",
"isAssignableFrom",
"(",
"Class",
"<",
"?",
">",
"destination",
",",
"Class",
"<",
"?",
">",
"source",
")",
"{",
"return",
"destination",
".",
"isAssignableFrom",
"(",
"source",
")",
"||",
"isBoxing",
"(",
"destination",
",",
... | Returns true if destination is assignable from source analyzing autoboxing also.
@param destination destination class
@param source source class
@return true if destination is assignable from source analyzing autoboxing also. | [
"Returns",
"true",
"if",
"destination",
"is",
"assignable",
"from",
"source",
"analyzing",
"autoboxing",
"also",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L125-L127 |
144,202 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.functionsAreAllowed | private static boolean functionsAreAllowed(boolean isAddAllFunction, boolean isPutAllFunction,Class<?> classD,Class<?> classS) {
if(isAddAllFunction)
return collectionIsAssignableFrom(classD) && collectionIsAssignableFrom(classS);
if(isPutAllFunction)
return mapIsAssignableFrom(classD) && mapIsAss... | java | private static boolean functionsAreAllowed(boolean isAddAllFunction, boolean isPutAllFunction,Class<?> classD,Class<?> classS) {
if(isAddAllFunction)
return collectionIsAssignableFrom(classD) && collectionIsAssignableFrom(classS);
if(isPutAllFunction)
return mapIsAssignableFrom(classD) && mapIsAss... | [
"private",
"static",
"boolean",
"functionsAreAllowed",
"(",
"boolean",
"isAddAllFunction",
",",
"boolean",
"isPutAllFunction",
",",
"Class",
"<",
"?",
">",
"classD",
",",
"Class",
"<",
"?",
">",
"classS",
")",
"{",
"if",
"(",
"isAddAllFunction",
")",
"return",... | Returns true if the function to check is allowed.
@param isAddAllFunction true if addAll method is to check
@param isPutAllFunction true if putAll method is to check
@param classD destination class
@param classS source class
@return true if the function to check is allowed | [
"Returns",
"true",
"if",
"the",
"function",
"to",
"check",
"is",
"allowed",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L232-L242 |
144,203 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.getGenericString | public static String getGenericString(Field field){
String fieldDescription = field.toGenericString();
List<String> splitResult = new ArrayList<String>();
char[] charResult = fieldDescription.toCharArray();
boolean isFinished = false;
int separatorIndex = fieldDescription.indexOf(" ");
int pre... | java | public static String getGenericString(Field field){
String fieldDescription = field.toGenericString();
List<String> splitResult = new ArrayList<String>();
char[] charResult = fieldDescription.toCharArray();
boolean isFinished = false;
int separatorIndex = fieldDescription.indexOf(" ");
int pre... | [
"public",
"static",
"String",
"getGenericString",
"(",
"Field",
"field",
")",
"{",
"String",
"fieldDescription",
"=",
"field",
".",
"toGenericString",
"(",
")",
";",
"List",
"<",
"String",
">",
"splitResult",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",... | Splits the fieldDescription to obtain his class type,generics inclusive.
@param field field to check
@return returns a string that specified the structure of the field, including its generic | [
"Splits",
"the",
"fieldDescription",
"to",
"obtain",
"his",
"class",
"type",
"generics",
"inclusive",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L305-L351 |
144,204 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.areEqual | public static boolean areEqual(Field destination,Field source){
return getGenericString(destination).equals(getGenericString(source));
} | java | public static boolean areEqual(Field destination,Field source){
return getGenericString(destination).equals(getGenericString(source));
} | [
"public",
"static",
"boolean",
"areEqual",
"(",
"Field",
"destination",
",",
"Field",
"source",
")",
"{",
"return",
"getGenericString",
"(",
"destination",
")",
".",
"equals",
"(",
"getGenericString",
"(",
"source",
")",
")",
";",
"}"
] | Returns true if destination and source have the same structure.
@param destination destination field
@param source source field
@return returns true if destination and source have the same structure | [
"Returns",
"true",
"if",
"destination",
"and",
"source",
"have",
"the",
"same",
"structure",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L359-L361 |
144,205 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.mapperClassName | public static String mapperClassName(Class<?> destination, Class<?> source, String resource){
String className = destination.getName().replaceAll("\\.","") + source.getName().replaceAll("\\.","");
if(isEmpty(resource))
return className;
if(!isPath(resource))
return write(className, String.... | java | public static String mapperClassName(Class<?> destination, Class<?> source, String resource){
String className = destination.getName().replaceAll("\\.","") + source.getName().replaceAll("\\.","");
if(isEmpty(resource))
return className;
if(!isPath(resource))
return write(className, String.... | [
"public",
"static",
"String",
"mapperClassName",
"(",
"Class",
"<",
"?",
">",
"destination",
",",
"Class",
"<",
"?",
">",
"source",
",",
"String",
"resource",
")",
"{",
"String",
"className",
"=",
"destination",
".",
"getName",
"(",
")",
".",
"replaceAll",... | Returns the name of mapper that identifies the destination and source classes.
@param destination class of Destination
@param source class of Source
@param resource a resource that represents an xml path or a content
@return Returns a string containing the names of the classes passed as input | [
"Returns",
"the",
"name",
"of",
"mapper",
"that",
"identifies",
"the",
"destination",
"and",
"source",
"classes",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L371-L385 |
144,206 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.areMappedObjects | public static boolean areMappedObjects(Class<?> dClass,Class<?> sClass,XML xml){
return isMapped(dClass,xml) || isMapped(sClass,xml);
} | java | public static boolean areMappedObjects(Class<?> dClass,Class<?> sClass,XML xml){
return isMapped(dClass,xml) || isMapped(sClass,xml);
} | [
"public",
"static",
"boolean",
"areMappedObjects",
"(",
"Class",
"<",
"?",
">",
"dClass",
",",
"Class",
"<",
"?",
">",
"sClass",
",",
"XML",
"xml",
")",
"{",
"return",
"isMapped",
"(",
"dClass",
",",
"xml",
")",
"||",
"isMapped",
"(",
"sClass",
",",
... | returns true if almost one class is configured, false otherwise.
@param dClass class to verify
@param sClass class to verify
@param xml xml to check
@return true if almost one class is configured, false otherwise. | [
"returns",
"true",
"if",
"almost",
"one",
"class",
"is",
"configured",
"false",
"otherwise",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L428-L430 |
144,207 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.isMapped | private static boolean isMapped(Class<?> aClass,XML xml){
return xml.isInheritedMapped(aClass) || Annotation.isInheritedMapped(aClass);
} | java | private static boolean isMapped(Class<?> aClass,XML xml){
return xml.isInheritedMapped(aClass) || Annotation.isInheritedMapped(aClass);
} | [
"private",
"static",
"boolean",
"isMapped",
"(",
"Class",
"<",
"?",
">",
"aClass",
",",
"XML",
"xml",
")",
"{",
"return",
"xml",
".",
"isInheritedMapped",
"(",
"aClass",
")",
"||",
"Annotation",
".",
"isInheritedMapped",
"(",
"aClass",
")",
";",
"}"
] | Returns true if the class is configured in annotation or xml, false otherwise.
@param aClass a class
@param xml xml to check
@return true if the class is configured in annotation or xml, false otherwise | [
"Returns",
"true",
"if",
"the",
"class",
"is",
"configured",
"in",
"annotation",
"or",
"xml",
"false",
"otherwise",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L438-L440 |
144,208 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java | ClassesManager.getAllsuperClasses | public static List<Class<?>> getAllsuperClasses(Class<?> aClass){
List<Class<?>> result = new ArrayList<Class<?>>();
result.add(aClass);
Class<?> superclass = aClass.getSuperclass();
while(!isNull(superclass) && superclass != Object.class){
result.add(superclass);
superclass = superclass.getSupercla... | java | public static List<Class<?>> getAllsuperClasses(Class<?> aClass){
List<Class<?>> result = new ArrayList<Class<?>>();
result.add(aClass);
Class<?> superclass = aClass.getSuperclass();
while(!isNull(superclass) && superclass != Object.class){
result.add(superclass);
superclass = superclass.getSupercla... | [
"public",
"static",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"getAllsuperClasses",
"(",
"Class",
"<",
"?",
">",
"aClass",
")",
"{",
"List",
"<",
"Class",
"<",
"?",
">",
">",
"result",
"=",
"new",
"ArrayList",
"<",
"Class",
"<",
"?",
">",
">",
"(... | Returns a list with the class passed in input plus his superclasses.
@param aClass class to check
@return a classes list | [
"Returns",
"a",
"list",
"with",
"the",
"class",
"passed",
"in",
"input",
"plus",
"his",
"superclasses",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/util/ClassesManager.java#L447-L456 |
144,209 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayListAnalyzer.java | ArrayListAnalyzer.getInfoOperation | public InfoOperation getInfoOperation(final Field destination, final Field source) {
Class<?> dClass = destination.getType();
Class<?> sClass = source.getType();
Class<?> dItem = null;
Class<?> sItem = null;
InfoOperation operation = new InfoOperation().setConversionType(UNDEFINED);
// Arr... | java | public InfoOperation getInfoOperation(final Field destination, final Field source) {
Class<?> dClass = destination.getType();
Class<?> sClass = source.getType();
Class<?> dItem = null;
Class<?> sItem = null;
InfoOperation operation = new InfoOperation().setConversionType(UNDEFINED);
// Arr... | [
"public",
"InfoOperation",
"getInfoOperation",
"(",
"final",
"Field",
"destination",
",",
"final",
"Field",
"source",
")",
"{",
"Class",
"<",
"?",
">",
"dClass",
"=",
"destination",
".",
"getType",
"(",
")",
";",
"Class",
"<",
"?",
">",
"sClass",
"=",
"s... | This method calculates and returns information relating the operation to be performed.
@param destination destination field to be analyzed
@param source source field to be analyzed
@return all information relating the operation to be performed | [
"This",
"method",
"calculates",
"and",
"returns",
"information",
"relating",
"the",
"operation",
"to",
"be",
"performed",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/analyzer/ArrayListAnalyzer.java#L62-L101 |
144,210 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ObjectOperation.java | ObjectOperation.getMapper | private MapperConstructor getMapper(String dName){
return new MapperConstructor(destinationType(), sourceType(), dName, dName, getSName(), configChosen, xml,methodsToGenerate);
} | java | private MapperConstructor getMapper(String dName){
return new MapperConstructor(destinationType(), sourceType(), dName, dName, getSName(), configChosen, xml,methodsToGenerate);
} | [
"private",
"MapperConstructor",
"getMapper",
"(",
"String",
"dName",
")",
"{",
"return",
"new",
"MapperConstructor",
"(",
"destinationType",
"(",
")",
",",
"sourceType",
"(",
")",
",",
"dName",
",",
"dName",
",",
"getSName",
"(",
")",
",",
"configChosen",
",... | Returns a new instance of MapperConstructor
@param dName destination name
@return the mapper | [
"Returns",
"a",
"new",
"instance",
"of",
"MapperConstructor"
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/recursive/ObjectOperation.java#L54-L56 |
144,211 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java | MapperConstructor.getMappings | public Map<String,String> getMappings(){
HashMap<String, String> mappings = new HashMap<String, String> ();
HashMap<String, Boolean> destInstance = new HashMap<String, Boolean>();
String s = "V";
destInstance.put("null", true );
destInstance.put("v" , false );
HashMap<String, N... | java | public Map<String,String> getMappings(){
HashMap<String, String> mappings = new HashMap<String, String> ();
HashMap<String, Boolean> destInstance = new HashMap<String, Boolean>();
String s = "V";
destInstance.put("null", true );
destInstance.put("v" , false );
HashMap<String, N... | [
"public",
"Map",
"<",
"String",
",",
"String",
">",
"getMappings",
"(",
")",
"{",
"HashMap",
"<",
"String",
",",
"String",
">",
"mappings",
"=",
"new",
"HashMap",
"<",
"String",
",",
"String",
">",
"(",
")",
";",
"HashMap",
"<",
"String",
",",
"Boole... | Returns a Map where the keys are the mappings names and relative values are the mappings.
@return a Map with all mapping combinations | [
"Returns",
"a",
"Map",
"where",
"the",
"keys",
"are",
"the",
"mappings",
"names",
"and",
"relative",
"values",
"are",
"the",
"mappings",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java#L58-L94 |
144,212 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java | MapperConstructor.wrappedMapping | private String wrappedMapping(boolean makeDest,NullPointerControl npc,MappingType mtd,MappingType mts){
String sClass = source.getName();
String dClass = destination.getName();
String str = (makeDest?" "+sClass+" "+stringOfGetSource +" = ("+sClass+") $1;"
:" "+dClass+" "+stringO... | java | private String wrappedMapping(boolean makeDest,NullPointerControl npc,MappingType mtd,MappingType mts){
String sClass = source.getName();
String dClass = destination.getName();
String str = (makeDest?" "+sClass+" "+stringOfGetSource +" = ("+sClass+") $1;"
:" "+dClass+" "+stringO... | [
"private",
"String",
"wrappedMapping",
"(",
"boolean",
"makeDest",
",",
"NullPointerControl",
"npc",
",",
"MappingType",
"mtd",
",",
"MappingType",
"mts",
")",
"{",
"String",
"sClass",
"=",
"source",
".",
"getName",
"(",
")",
";",
"String",
"dClass",
"=",
"d... | This method adds the Null Pointer Control to mapping created by the mapping method.
wrapMapping is used to wrap the mapping returned by mapping method.
@param makeDest true if destination is a new instance, false otherwise
@param npc a NullPointerControl chosen
@param mtd Mapping Type of destination
@param mts Mapping... | [
"This",
"method",
"adds",
"the",
"Null",
"Pointer",
"Control",
"to",
"mapping",
"created",
"by",
"the",
"mapping",
"method",
".",
"wrapMapping",
"is",
"used",
"to",
"wrap",
"the",
"mapping",
"returned",
"by",
"mapping",
"method",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java#L109-L130 |
144,213 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java | MapperConstructor.mapping | public StringBuilder mapping(boolean makeDest,MappingType mtd,MappingType mts){
StringBuilder sb = new StringBuilder();
if(isNullSetting(makeDest, mtd, mts, sb)) return sb;
if(makeDest)
sb.append(newInstance(destination, stringOfSetDestination));
for (ASimpleOperation simpleOperation : s... | java | public StringBuilder mapping(boolean makeDest,MappingType mtd,MappingType mts){
StringBuilder sb = new StringBuilder();
if(isNullSetting(makeDest, mtd, mts, sb)) return sb;
if(makeDest)
sb.append(newInstance(destination, stringOfSetDestination));
for (ASimpleOperation simpleOperation : s... | [
"public",
"StringBuilder",
"mapping",
"(",
"boolean",
"makeDest",
",",
"MappingType",
"mtd",
",",
"MappingType",
"mts",
")",
"{",
"StringBuilder",
"sb",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"if",
"(",
"isNullSetting",
"(",
"makeDest",
",",
"mtd",
",",... | This method writes the mapping based on the value of the three MappingType taken in input.
@param makeDest true if destination is a new instance, false otherwise
@param mtd mapping type of destination
@param mts mapping type of source
@return a String that contains the mapping | [
"This",
"method",
"writes",
"the",
"mapping",
"based",
"on",
"the",
"value",
"of",
"the",
"three",
"MappingType",
"taken",
"in",
"input",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java#L163-L179 |
144,214 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java | MapperConstructor.setOperation | private <T extends AGeneralOperation>T setOperation(T operation,MappingType mtd,MappingType mts){
operation.setMtd(mtd).setMts(mts)
.initialDSetPath(stringOfSetDestination)
.initialDGetPath(stringOfGetDestination)
.initialSGetPath(stringOfGetSource);
return operation;
} | java | private <T extends AGeneralOperation>T setOperation(T operation,MappingType mtd,MappingType mts){
operation.setMtd(mtd).setMts(mts)
.initialDSetPath(stringOfSetDestination)
.initialDGetPath(stringOfGetDestination)
.initialSGetPath(stringOfGetSource);
return operation;
} | [
"private",
"<",
"T",
"extends",
"AGeneralOperation",
">",
"T",
"setOperation",
"(",
"T",
"operation",
",",
"MappingType",
"mtd",
",",
"MappingType",
"mts",
")",
"{",
"operation",
".",
"setMtd",
"(",
"mtd",
")",
".",
"setMts",
"(",
"mts",
")",
".",
"initi... | Setting common to all operations.
@param operation operation to configure
@param mtd mapping type of destination
@param mts mapping type of source
@return operation configured | [
"Setting",
"common",
"to",
"all",
"operations",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java#L189-L196 |
144,215 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java | MapperConstructor.isNullSetting | private boolean isNullSetting(boolean makeDest,MappingType mtd,MappingType mts,StringBuilder result){
if( makeDest
&& (mtd == ALL_FIELDS||mtd == ONLY_VALUED_FIELDS)
&& mts == ONLY_NULL_FIELDS){
result.append(" "+stringOfSetDestination+"(null);"+newLine);
return true;
}
return false;
} | java | private boolean isNullSetting(boolean makeDest,MappingType mtd,MappingType mts,StringBuilder result){
if( makeDest
&& (mtd == ALL_FIELDS||mtd == ONLY_VALUED_FIELDS)
&& mts == ONLY_NULL_FIELDS){
result.append(" "+stringOfSetDestination+"(null);"+newLine);
return true;
}
return false;
} | [
"private",
"boolean",
"isNullSetting",
"(",
"boolean",
"makeDest",
",",
"MappingType",
"mtd",
",",
"MappingType",
"mts",
",",
"StringBuilder",
"result",
")",
"{",
"if",
"(",
"makeDest",
"&&",
"(",
"mtd",
"==",
"ALL_FIELDS",
"||",
"mtd",
"==",
"ONLY_VALUED_FIEL... | if it is a null setting returns the null mapping
@param makeDest true if destination is a new instance
@param mtd mapping type of destination
@param mts mapping type of source
@param result StringBuilder used for mapping
@return true if operation is a null setting, false otherwise | [
"if",
"it",
"is",
"a",
"null",
"setting",
"returns",
"the",
"null",
"mapping"
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/generation/MapperConstructor.java#L206-L214 |
144,216 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java | AComplexOperation.genericFlow | private final StringBuilder genericFlow(boolean newInstance){
// if newInstance is true or mapping type of newField is ONLY_NULL_FIELDS
// write the mapping for the new field
if(newInstance || getMtd() == ONLY_NULL_FIELDS)
return sourceControl(fieldToCreate());
// if is enrichment case and ma... | java | private final StringBuilder genericFlow(boolean newInstance){
// if newInstance is true or mapping type of newField is ONLY_NULL_FIELDS
// write the mapping for the new field
if(newInstance || getMtd() == ONLY_NULL_FIELDS)
return sourceControl(fieldToCreate());
// if is enrichment case and ma... | [
"private",
"final",
"StringBuilder",
"genericFlow",
"(",
"boolean",
"newInstance",
")",
"{",
"// if newInstance is true or mapping type of newField is ONLY_NULL_FIELDS\r",
"// write the mapping for the new field\r",
"if",
"(",
"newInstance",
"||",
"getMtd",
"(",
")",
"==",
"ONL... | This method specifies the general flow of the complex mapping.
@param newInstance true if you need to create a new instance, false otherwise
@return a StringBuilder containing the mapping | [
"This",
"method",
"specifies",
"the",
"general",
"flow",
"of",
"the",
"complex",
"mapping",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java#L117-L134 |
144,217 | jmapper-framework/jmapper-core | JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java | AComplexOperation.sourceControl | private StringBuilder sourceControl(StringBuilder mapping){
if(getMts() == ALL_FIELDS && !sourceType().isPrimitive()){
StringBuilder write = write(" if(",getSource(),"!=null){",newLine,
sharedCode(mapping) ,newLine,
" }");
if(!destinationType().isPrimitive() && !av... | java | private StringBuilder sourceControl(StringBuilder mapping){
if(getMts() == ALL_FIELDS && !sourceType().isPrimitive()){
StringBuilder write = write(" if(",getSource(),"!=null){",newLine,
sharedCode(mapping) ,newLine,
" }");
if(!destinationType().isPrimitive() && !av... | [
"private",
"StringBuilder",
"sourceControl",
"(",
"StringBuilder",
"mapping",
")",
"{",
"if",
"(",
"getMts",
"(",
")",
"==",
"ALL_FIELDS",
"&&",
"!",
"sourceType",
"(",
")",
".",
"isPrimitive",
"(",
")",
")",
"{",
"StringBuilder",
"write",
"=",
"write",
"(... | This method is used when the MappingType of Source is setting to ALL.
@param mapping
@return a StringBuilder that contains the mapping enriched with source controls | [
"This",
"method",
"is",
"used",
"when",
"the",
"MappingType",
"of",
"Source",
"is",
"setting",
"to",
"ALL",
"."
] | b48fd3527f35055b8b4a30f53a51136f183acc90 | https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/operations/complex/AComplexOperation.java#L141-L157 |
144,218 | osglworks/java-mvc | src/main/java/org/osgl/mvc/result/Redirect.java | Redirect.moved | @Deprecated
public static Redirect moved(String url, Object... args) {
touchPayload().message(url, args);
return _INSTANCE;
} | java | @Deprecated
public static Redirect moved(String url, Object... args) {
touchPayload().message(url, args);
return _INSTANCE;
} | [
"@",
"Deprecated",
"public",
"static",
"Redirect",
"moved",
"(",
"String",
"url",
",",
"Object",
"...",
"args",
")",
"{",
"touchPayload",
"(",
")",
".",
"message",
"(",
"url",
",",
"args",
")",
";",
"return",
"_INSTANCE",
";",
"}"
] | This method is deprecated | [
"This",
"method",
"is",
"deprecated"
] | 4d2b2ec40498ac6ee7040c0424377cbeacab124b | https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/result/Redirect.java#L125-L129 |
144,219 | osglworks/java-mvc | src/main/java/org/osgl/mvc/util/Binder.java | Binder.attribute | public Binder<T> attribute(String key, Object value) {
if (null == value) {
attributes.remove(value);
} else {
attributes.put(key, value);
}
return this;
} | java | public Binder<T> attribute(String key, Object value) {
if (null == value) {
attributes.remove(value);
} else {
attributes.put(key, value);
}
return this;
} | [
"public",
"Binder",
"<",
"T",
">",
"attribute",
"(",
"String",
"key",
",",
"Object",
"value",
")",
"{",
"if",
"(",
"null",
"==",
"value",
")",
"{",
"attributes",
".",
"remove",
"(",
"value",
")",
";",
"}",
"else",
"{",
"attributes",
".",
"put",
"("... | Set attribute of this binder.
Note use this method only on new resolver instance instead of shared instance
@param key the attribute key
@param value the attribute value
@return this binder instance | [
"Set",
"attribute",
"of",
"this",
"binder",
"."
] | 4d2b2ec40498ac6ee7040c0424377cbeacab124b | https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/util/Binder.java#L78-L85 |
144,220 | osglworks/java-mvc | src/main/java/org/osgl/mvc/util/Binder.java | Binder.attributes | public Binder<T> attributes(Map<String, Object> attributes) {
this.attributes.putAll(attributes);
return this;
} | java | public Binder<T> attributes(Map<String, Object> attributes) {
this.attributes.putAll(attributes);
return this;
} | [
"public",
"Binder",
"<",
"T",
">",
"attributes",
"(",
"Map",
"<",
"String",
",",
"Object",
">",
"attributes",
")",
"{",
"this",
".",
"attributes",
".",
"putAll",
"(",
"attributes",
")",
";",
"return",
"this",
";",
"}"
] | Set attributes to this binder
Note use this method only on new resolver instance instead of shared instance
@param attributes the attributes map
@return this binder instance | [
"Set",
"attributes",
"to",
"this",
"binder"
] | 4d2b2ec40498ac6ee7040c0424377cbeacab124b | https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/util/Binder.java#L95-L98 |
144,221 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/spark/PortUtils.java | PortUtils.isPortAvailable | static boolean isPortAvailable(int port) {
ServerSocket ss = null;
try {
ss = new ServerSocket(port);
ss.setReuseAddress(true);
return true;
} catch (IOException ioe) { // NOSONAR
return false;
} finally {
closeQuietly(ss);
... | java | static boolean isPortAvailable(int port) {
ServerSocket ss = null;
try {
ss = new ServerSocket(port);
ss.setReuseAddress(true);
return true;
} catch (IOException ioe) { // NOSONAR
return false;
} finally {
closeQuietly(ss);
... | [
"static",
"boolean",
"isPortAvailable",
"(",
"int",
"port",
")",
"{",
"ServerSocket",
"ss",
"=",
"null",
";",
"try",
"{",
"ss",
"=",
"new",
"ServerSocket",
"(",
"port",
")",
";",
"ss",
".",
"setReuseAddress",
"(",
"true",
")",
";",
"return",
"true",
";... | Find out if the provided port is available.
@param port The port to be inspected.
@return true if the port is avaiable. | [
"Find",
"out",
"if",
"the",
"provided",
"port",
"is",
"available",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/spark/PortUtils.java#L42-L53 |
144,222 | osglworks/java-mvc | src/main/java/org/osgl/mvc/result/RenderBinary.java | RenderBinary.name | public RenderBinary name(String attachmentName) {
this.name = attachmentName;
this.disposition = Disposition.of(S.notBlank(attachmentName));
return this;
} | java | public RenderBinary name(String attachmentName) {
this.name = attachmentName;
this.disposition = Disposition.of(S.notBlank(attachmentName));
return this;
} | [
"public",
"RenderBinary",
"name",
"(",
"String",
"attachmentName",
")",
"{",
"this",
".",
"name",
"=",
"attachmentName",
";",
"this",
".",
"disposition",
"=",
"Disposition",
".",
"of",
"(",
"S",
".",
"notBlank",
"(",
"attachmentName",
")",
")",
";",
"retur... | Set the attachment name.
If the attachment name is not `null` and not empty, then it will set the disposition to
attachment; otherwise it will set the disposition to inline
@param attachmentName the attachment name
@return this RenderBinary instance | [
"Set",
"the",
"attachment",
"name",
"."
] | 4d2b2ec40498ac6ee7040c0424377cbeacab124b | https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/result/RenderBinary.java#L211-L215 |
144,223 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java | SystemPublicMetrics.addNonHeapMetrics | private static void addNonHeapMetrics(Collection<Metric<?>> result) {
MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage();
result.add(newMemoryMetric("nonheap.committed", memoryUsage.getCommitted()));
result.add(newMemoryMetric("nonheap.init", memoryUsage.getIni... | java | private static void addNonHeapMetrics(Collection<Metric<?>> result) {
MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage();
result.add(newMemoryMetric("nonheap.committed", memoryUsage.getCommitted()));
result.add(newMemoryMetric("nonheap.init", memoryUsage.getIni... | [
"private",
"static",
"void",
"addNonHeapMetrics",
"(",
"Collection",
"<",
"Metric",
"<",
"?",
">",
">",
"result",
")",
"{",
"MemoryUsage",
"memoryUsage",
"=",
"ManagementFactory",
".",
"getMemoryMXBean",
"(",
")",
".",
"getNonHeapMemoryUsage",
"(",
")",
";",
"... | Add JVM non-heap metrics.
@param result the result | [
"Add",
"JVM",
"non",
"-",
"heap",
"metrics",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java#L46-L52 |
144,224 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java | SystemPublicMetrics.addBasicMetrics | protected void addBasicMetrics(Collection<Metric<?>> result) {
// NOTE: ManagementFactory must not be used here since it fails on GAE
Runtime runtime = Runtime.getRuntime();
result.add(newMemoryMetric("mem", runtime.totalMemory() + getTotalNonHeapMemoryIfPossible()));
result.add(newMemor... | java | protected void addBasicMetrics(Collection<Metric<?>> result) {
// NOTE: ManagementFactory must not be used here since it fails on GAE
Runtime runtime = Runtime.getRuntime();
result.add(newMemoryMetric("mem", runtime.totalMemory() + getTotalNonHeapMemoryIfPossible()));
result.add(newMemor... | [
"protected",
"void",
"addBasicMetrics",
"(",
"Collection",
"<",
"Metric",
"<",
"?",
">",
">",
"result",
")",
"{",
"// NOTE: ManagementFactory must not be used here since it fails on GAE",
"Runtime",
"runtime",
"=",
"Runtime",
".",
"getRuntime",
"(",
")",
";",
"result"... | Add basic system metrics.
@param result the result | [
"Add",
"basic",
"system",
"metrics",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java#L89-L96 |
144,225 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java | SystemPublicMetrics.addClassLoadingMetrics | protected void addClassLoadingMetrics(Collection<Metric<?>> result) {
ClassLoadingMXBean classLoadingMxBean = ManagementFactory.getClassLoadingMXBean();
result.add(new Metric<>("classes", (long) classLoadingMxBean.getLoadedClassCount()));
result.add(new Metric<>("classes.loaded", classLoadingMxB... | java | protected void addClassLoadingMetrics(Collection<Metric<?>> result) {
ClassLoadingMXBean classLoadingMxBean = ManagementFactory.getClassLoadingMXBean();
result.add(new Metric<>("classes", (long) classLoadingMxBean.getLoadedClassCount()));
result.add(new Metric<>("classes.loaded", classLoadingMxB... | [
"protected",
"void",
"addClassLoadingMetrics",
"(",
"Collection",
"<",
"Metric",
"<",
"?",
">",
">",
"result",
")",
"{",
"ClassLoadingMXBean",
"classLoadingMxBean",
"=",
"ManagementFactory",
".",
"getClassLoadingMXBean",
"(",
")",
";",
"result",
".",
"add",
"(",
... | Add class loading metrics.
@param result the result | [
"Add",
"class",
"loading",
"metrics",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java#L103-L108 |
144,226 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java | SystemPublicMetrics.addGarbageCollectionMetrics | protected void addGarbageCollectionMetrics(Collection<Metric<?>> result) {
List<GarbageCollectorMXBean> garbageCollectorMxBeans = ManagementFactory.getGarbageCollectorMXBeans();
for (GarbageCollectorMXBean garbageCollectorMXBean : garbageCollectorMxBeans) {
String name = beautifyGcName(garba... | java | protected void addGarbageCollectionMetrics(Collection<Metric<?>> result) {
List<GarbageCollectorMXBean> garbageCollectorMxBeans = ManagementFactory.getGarbageCollectorMXBeans();
for (GarbageCollectorMXBean garbageCollectorMXBean : garbageCollectorMxBeans) {
String name = beautifyGcName(garba... | [
"protected",
"void",
"addGarbageCollectionMetrics",
"(",
"Collection",
"<",
"Metric",
"<",
"?",
">",
">",
"result",
")",
"{",
"List",
"<",
"GarbageCollectorMXBean",
">",
"garbageCollectorMxBeans",
"=",
"ManagementFactory",
".",
"getGarbageCollectorMXBeans",
"(",
")",
... | Add garbage collection metrics.
@param result the result | [
"Add",
"garbage",
"collection",
"metrics",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java#L115-L122 |
144,227 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java | SystemPublicMetrics.addHeapMetrics | protected void addHeapMetrics(Collection<Metric<?>> result) {
MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
result.add(newMemoryMetric("heap.committed", memoryUsage.getCommitted()));
result.add(newMemoryMetric("heap.init", memoryUsage.getInit()));
re... | java | protected void addHeapMetrics(Collection<Metric<?>> result) {
MemoryUsage memoryUsage = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage();
result.add(newMemoryMetric("heap.committed", memoryUsage.getCommitted()));
result.add(newMemoryMetric("heap.init", memoryUsage.getInit()));
re... | [
"protected",
"void",
"addHeapMetrics",
"(",
"Collection",
"<",
"Metric",
"<",
"?",
">",
">",
"result",
")",
"{",
"MemoryUsage",
"memoryUsage",
"=",
"ManagementFactory",
".",
"getMemoryMXBean",
"(",
")",
".",
"getHeapMemoryUsage",
"(",
")",
";",
"result",
".",
... | Add JVM heap metrics.
@param result the result | [
"Add",
"JVM",
"heap",
"metrics",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java#L129-L135 |
144,228 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java | SystemPublicMetrics.addThreadMetrics | protected void addThreadMetrics(Collection<Metric<?>> result) {
ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
result.add(new Metric<>("threads.peak", (long) threadMxBean.getPeakThreadCount()));
result.add(new Metric<>("threads.daemon", (long) threadMxBean.getDaemonThreadCount(... | java | protected void addThreadMetrics(Collection<Metric<?>> result) {
ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
result.add(new Metric<>("threads.peak", (long) threadMxBean.getPeakThreadCount()));
result.add(new Metric<>("threads.daemon", (long) threadMxBean.getDaemonThreadCount(... | [
"protected",
"void",
"addThreadMetrics",
"(",
"Collection",
"<",
"Metric",
"<",
"?",
">",
">",
"result",
")",
"{",
"ThreadMXBean",
"threadMxBean",
"=",
"ManagementFactory",
".",
"getThreadMXBean",
"(",
")",
";",
"result",
".",
"add",
"(",
"new",
"Metric",
"<... | Add thread metrics.
@param result the result | [
"Add",
"thread",
"metrics",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java#L142-L148 |
144,229 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java | SystemPublicMetrics.addManagementMetrics | private void addManagementMetrics(Collection<Metric<?>> result) {
try {
// Add JVM up time in ms
result.add(new Metric<>("uptime", ManagementFactory.getRuntimeMXBean().getUptime()));
result.add(new Metric<>("systemload.average", ManagementFactory.getOperatingSystemMXBean().ge... | java | private void addManagementMetrics(Collection<Metric<?>> result) {
try {
// Add JVM up time in ms
result.add(new Metric<>("uptime", ManagementFactory.getRuntimeMXBean().getUptime()));
result.add(new Metric<>("systemload.average", ManagementFactory.getOperatingSystemMXBean().ge... | [
"private",
"void",
"addManagementMetrics",
"(",
"Collection",
"<",
"Metric",
"<",
"?",
">",
">",
"result",
")",
"{",
"try",
"{",
"// Add JVM up time in ms",
"result",
".",
"add",
"(",
"new",
"Metric",
"<>",
"(",
"\"uptime\"",
",",
"ManagementFactory",
".",
"... | Add metrics from ManagementFactory if possible. Note that ManagementFactory is not available on Google App Engine.
@param result the result | [
"Add",
"metrics",
"from",
"ManagementFactory",
"if",
"possible",
".",
"Note",
"that",
"ManagementFactory",
"is",
"not",
"available",
"on",
"Google",
"App",
"Engine",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/actuate/metrics/SystemPublicMetrics.java#L155-L168 |
144,230 | Indoqa/indoqa-boot | src/main/java/com/indoqa/boot/application/AbstractIndoqaBootApplication.java | AbstractIndoqaBootApplication.invoke | public void invoke(StartupLifecycle lifecycle) {
this.initializeAsciiLogo();
this.printLogo();
lifecycle.willInitialize();
this.logInitializationStart();
lifecycle.willCreateSpringContext();
this.initializeApplicationContext();
lifecycle.didCreateSpringContext(... | java | public void invoke(StartupLifecycle lifecycle) {
this.initializeAsciiLogo();
this.printLogo();
lifecycle.willInitialize();
this.logInitializationStart();
lifecycle.willCreateSpringContext();
this.initializeApplicationContext();
lifecycle.didCreateSpringContext(... | [
"public",
"void",
"invoke",
"(",
"StartupLifecycle",
"lifecycle",
")",
"{",
"this",
".",
"initializeAsciiLogo",
"(",
")",
";",
"this",
".",
"printLogo",
"(",
")",
";",
"lifecycle",
".",
"willInitialize",
"(",
")",
";",
"this",
".",
"logInitializationStart",
... | Start the Indoqa-Boot application and hook into the startup lifecycle.
@param lifecycle Provide an implementation of the callback interface. | [
"Start",
"the",
"Indoqa",
"-",
"Boot",
"application",
"and",
"hook",
"into",
"the",
"startup",
"lifecycle",
"."
] | a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6 | https://github.com/Indoqa/indoqa-boot/blob/a4c6a6517308f5fc6f1eb4e4f5b9994122c268e6/src/main/java/com/indoqa/boot/application/AbstractIndoqaBootApplication.java#L97-L132 |
144,231 | osglworks/java-mvc | src/main/java/org/osgl/mvc/HttpContextManager.java | HttpContextManager.save | public static void save() {
H.Response resp = H.Response.current();
H.Session session = H.Session.current();
serialize(session);
H.Flash flash = H.Flash.current();
serialize(flash);
} | java | public static void save() {
H.Response resp = H.Response.current();
H.Session session = H.Session.current();
serialize(session);
H.Flash flash = H.Flash.current();
serialize(flash);
} | [
"public",
"static",
"void",
"save",
"(",
")",
"{",
"H",
".",
"Response",
"resp",
"=",
"H",
".",
"Response",
".",
"current",
"(",
")",
";",
"H",
".",
"Session",
"session",
"=",
"H",
".",
"Session",
".",
"current",
"(",
")",
";",
"serialize",
"(",
... | Persist session and flash to cookie, write all cookies to http response | [
"Persist",
"session",
"and",
"flash",
"to",
"cookie",
"write",
"all",
"cookies",
"to",
"http",
"response"
] | 4d2b2ec40498ac6ee7040c0424377cbeacab124b | https://github.com/osglworks/java-mvc/blob/4d2b2ec40498ac6ee7040c0424377cbeacab124b/src/main/java/org/osgl/mvc/HttpContextManager.java#L70-L78 |
144,232 | Tirasa/ConnIdSOAPBundle | wssample/src/main/java/net/tirasa/connid/bundles/soap/wssample/ProvisioningImpl.java | ProvisioningImpl.connect | private Connection connect()
throws SQLException {
if (DefaultContentLoader.localDataSource == null) {
LOG.error("Data Source is null");
return null;
}
final Connection conn = DataSourceUtils.getConnection(DefaultContentLoader.localDataSource);
if (c... | java | private Connection connect()
throws SQLException {
if (DefaultContentLoader.localDataSource == null) {
LOG.error("Data Source is null");
return null;
}
final Connection conn = DataSourceUtils.getConnection(DefaultContentLoader.localDataSource);
if (c... | [
"private",
"Connection",
"connect",
"(",
")",
"throws",
"SQLException",
"{",
"if",
"(",
"DefaultContentLoader",
".",
"localDataSource",
"==",
"null",
")",
"{",
"LOG",
".",
"error",
"(",
"\"Data Source is null\"",
")",
";",
"return",
"null",
";",
"}",
"final",
... | Establish a connection to underlying db.
@return
@throws ClassNotFoundException
@throws SQLException | [
"Establish",
"a",
"connection",
"to",
"underlying",
"db",
"."
] | d6521885e109d66e76193e62fb66647b3f386cae | https://github.com/Tirasa/ConnIdSOAPBundle/blob/d6521885e109d66e76193e62fb66647b3f386cae/wssample/src/main/java/net/tirasa/connid/bundles/soap/wssample/ProvisioningImpl.java#L619-L633 |
144,233 | digipost/sdp-shared | api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java | Wss4jInterceptor.initializeRequestData | protected RequestData initializeRequestData(final MessageContext messageContext) {
RequestData requestData = new RequestData();
requestData.setMsgContext(messageContext);
// reads securementUsername first from the context then from the property
String contextUsername = (String) messageC... | java | protected RequestData initializeRequestData(final MessageContext messageContext) {
RequestData requestData = new RequestData();
requestData.setMsgContext(messageContext);
// reads securementUsername first from the context then from the property
String contextUsername = (String) messageC... | [
"protected",
"RequestData",
"initializeRequestData",
"(",
"final",
"MessageContext",
"messageContext",
")",
"{",
"RequestData",
"requestData",
"=",
"new",
"RequestData",
"(",
")",
";",
"requestData",
".",
"setMsgContext",
"(",
"messageContext",
")",
";",
"// reads sec... | Creates and initializes a request data for the given message context.
@param messageContext the message context
@return the request data | [
"Creates",
"and",
"initializes",
"a",
"request",
"data",
"for",
"the",
"given",
"message",
"context",
"."
] | c34920a993b65ff0908dab9d9c92140ded7312bc | https://github.com/digipost/sdp-shared/blob/c34920a993b65ff0908dab9d9c92140ded7312bc/api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java#L268-L284 |
144,234 | digipost/sdp-shared | api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java | Wss4jInterceptor.checkResults | protected void checkResults(final List<WSSecurityEngineResult> results, final List<Integer> validationActions) throws Wss4jSecurityValidationException {
if (!handler.checkReceiverResultsAnyOrder(results, validationActions)) {
throw new Wss4jSecurityValidationException("Security processing failed (ac... | java | protected void checkResults(final List<WSSecurityEngineResult> results, final List<Integer> validationActions) throws Wss4jSecurityValidationException {
if (!handler.checkReceiverResultsAnyOrder(results, validationActions)) {
throw new Wss4jSecurityValidationException("Security processing failed (ac... | [
"protected",
"void",
"checkResults",
"(",
"final",
"List",
"<",
"WSSecurityEngineResult",
">",
"results",
",",
"final",
"List",
"<",
"Integer",
">",
"validationActions",
")",
"throws",
"Wss4jSecurityValidationException",
"{",
"if",
"(",
"!",
"handler",
".",
"check... | Checks whether the received headers match the configured validation actions. Subclasses could override this method
for custom verification behavior.
@param results the results of the validation function
@param validationActions the decoded validation actions
@throws Wss4jSecurityValidationException if the re... | [
"Checks",
"whether",
"the",
"received",
"headers",
"match",
"the",
"configured",
"validation",
"actions",
".",
"Subclasses",
"could",
"override",
"this",
"method",
"for",
"custom",
"verification",
"behavior",
"."
] | c34920a993b65ff0908dab9d9c92140ded7312bc | https://github.com/digipost/sdp-shared/blob/c34920a993b65ff0908dab9d9c92140ded7312bc/api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java#L409-L413 |
144,235 | digipost/sdp-shared | api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java | Wss4jInterceptor.updateContextWithResults | @SuppressWarnings("unchecked")
private void updateContextWithResults(final MessageContext messageContext, final WSHandlerResult result) {
List<WSHandlerResult> handlerResults;
if ((handlerResults = (List<WSHandlerResult>) messageContext.getProperty(WSHandlerConstants.RECV_RESULTS)) == null) {
... | java | @SuppressWarnings("unchecked")
private void updateContextWithResults(final MessageContext messageContext, final WSHandlerResult result) {
List<WSHandlerResult> handlerResults;
if ((handlerResults = (List<WSHandlerResult>) messageContext.getProperty(WSHandlerConstants.RECV_RESULTS)) == null) {
... | [
"@",
"SuppressWarnings",
"(",
"\"unchecked\"",
")",
"private",
"void",
"updateContextWithResults",
"(",
"final",
"MessageContext",
"messageContext",
",",
"final",
"WSHandlerResult",
"result",
")",
"{",
"List",
"<",
"WSHandlerResult",
">",
"handlerResults",
";",
"if",
... | Puts the results of WS-Security headers processing in the message context. Some actions like Signature
Confirmation require this. | [
"Puts",
"the",
"results",
"of",
"WS",
"-",
"Security",
"headers",
"processing",
"in",
"the",
"message",
"context",
".",
"Some",
"actions",
"like",
"Signature",
"Confirmation",
"require",
"this",
"."
] | c34920a993b65ff0908dab9d9c92140ded7312bc | https://github.com/digipost/sdp-shared/blob/c34920a993b65ff0908dab9d9c92140ded7312bc/api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java#L419-L428 |
144,236 | digipost/sdp-shared | api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java | Wss4jInterceptor.verifyCertificateTrust | protected void verifyCertificateTrust(WSHandlerResult result) throws WSSecurityException {
List<WSSecurityEngineResult> signResults = result.getActionResults().getOrDefault(WSConstants.SIGN, emptyList());
if (signResults.isEmpty()) {
throw new Wss4jSecurityValidationException("No action resu... | java | protected void verifyCertificateTrust(WSHandlerResult result) throws WSSecurityException {
List<WSSecurityEngineResult> signResults = result.getActionResults().getOrDefault(WSConstants.SIGN, emptyList());
if (signResults.isEmpty()) {
throw new Wss4jSecurityValidationException("No action resu... | [
"protected",
"void",
"verifyCertificateTrust",
"(",
"WSHandlerResult",
"result",
")",
"throws",
"WSSecurityException",
"{",
"List",
"<",
"WSSecurityEngineResult",
">",
"signResults",
"=",
"result",
".",
"getActionResults",
"(",
")",
".",
"getOrDefault",
"(",
"WSConsta... | Verifies the trust of a certificate. | [
"Verifies",
"the",
"trust",
"of",
"a",
"certificate",
"."
] | c34920a993b65ff0908dab9d9c92140ded7312bc | https://github.com/digipost/sdp-shared/blob/c34920a993b65ff0908dab9d9c92140ded7312bc/api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java#L433-L456 |
144,237 | digipost/sdp-shared | api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java | Wss4jInterceptor.verifyTimestamp | protected void verifyTimestamp(WSHandlerResult result) throws WSSecurityException {
List<WSSecurityEngineResult> insertTimestampResults = result.getActionResults().getOrDefault(WSConstants.TS, emptyList());
if (insertTimestampResults.isEmpty()) {
throw new Wss4jSecurityValidationException("N... | java | protected void verifyTimestamp(WSHandlerResult result) throws WSSecurityException {
List<WSSecurityEngineResult> insertTimestampResults = result.getActionResults().getOrDefault(WSConstants.TS, emptyList());
if (insertTimestampResults.isEmpty()) {
throw new Wss4jSecurityValidationException("N... | [
"protected",
"void",
"verifyTimestamp",
"(",
"WSHandlerResult",
"result",
")",
"throws",
"WSSecurityException",
"{",
"List",
"<",
"WSSecurityEngineResult",
">",
"insertTimestampResults",
"=",
"result",
".",
"getActionResults",
"(",
")",
".",
"getOrDefault",
"(",
"WSCo... | Verifies the timestamp. | [
"Verifies",
"the",
"timestamp",
"."
] | c34920a993b65ff0908dab9d9c92140ded7312bc | https://github.com/digipost/sdp-shared/blob/c34920a993b65ff0908dab9d9c92140ded7312bc/api-commons/src/main/java/no/digipost/api/interceptors/Wss4jInterceptor.java#L461-L485 |
144,238 | TimotheeJeannin/ProviGen | ProviGenLib/src/com/tjeannin/provigen/helper/TableUpdater.java | TableUpdater.addMissingColumns | public static void addMissingColumns(SQLiteDatabase database, Class contractClass) {
Contract contract = new Contract(contractClass);
Cursor cursor = database.rawQuery("PRAGMA table_info(" + contract.getTable() + ")", null);
for (ContractField field : contract.getFields()) {
if (!f... | java | public static void addMissingColumns(SQLiteDatabase database, Class contractClass) {
Contract contract = new Contract(contractClass);
Cursor cursor = database.rawQuery("PRAGMA table_info(" + contract.getTable() + ")", null);
for (ContractField field : contract.getFields()) {
if (!f... | [
"public",
"static",
"void",
"addMissingColumns",
"(",
"SQLiteDatabase",
"database",
",",
"Class",
"contractClass",
")",
"{",
"Contract",
"contract",
"=",
"new",
"Contract",
"(",
"contractClass",
")",
";",
"Cursor",
"cursor",
"=",
"database",
".",
"rawQuery",
"("... | Adds missing table columns for the given contract class.
@param database The database in which the updated table is.
@param contractClass The contract class to work with. | [
"Adds",
"missing",
"table",
"columns",
"for",
"the",
"given",
"contract",
"class",
"."
] | 80c8a2021434a44e8d38c69407e3e6abf70cf21e | https://github.com/TimotheeJeannin/ProviGen/blob/80c8a2021434a44e8d38c69407e3e6abf70cf21e/ProviGenLib/src/com/tjeannin/provigen/helper/TableUpdater.java#L19-L29 |
144,239 | TimotheeJeannin/ProviGen | ProviGenLib/src/com/tjeannin/provigen/helper/TableBuilder.java | TableBuilder.addConstraint | public TableBuilder addConstraint(String columnName, String constraintType, String constraintConflictClause) {
constraints.add(new Constraint(columnName, constraintType, constraintConflictClause));
return this;
} | java | public TableBuilder addConstraint(String columnName, String constraintType, String constraintConflictClause) {
constraints.add(new Constraint(columnName, constraintType, constraintConflictClause));
return this;
} | [
"public",
"TableBuilder",
"addConstraint",
"(",
"String",
"columnName",
",",
"String",
"constraintType",
",",
"String",
"constraintConflictClause",
")",
"{",
"constraints",
".",
"add",
"(",
"new",
"Constraint",
"(",
"columnName",
",",
"constraintType",
",",
"constra... | Adds the specified constraint to the created table.
@param columnName The name of the column on which the constraint is applied.
@param constraintType The type of constraint to apply.
One of
<ul>
<li>{@link com.tjeannin.provigen.model.Constraint#UNIQUE}</li>
<li>{@link com.tjeannin.provigen.mod... | [
"Adds",
"the",
"specified",
"constraint",
"to",
"the",
"created",
"table",
"."
] | 80c8a2021434a44e8d38c69407e3e6abf70cf21e | https://github.com/TimotheeJeannin/ProviGen/blob/80c8a2021434a44e8d38c69407e3e6abf70cf21e/ProviGenLib/src/com/tjeannin/provigen/helper/TableBuilder.java#L48-L51 |
144,240 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/defaultvalues/pluggable/buildermatchers/Matchers.java | Matchers.allOf | @Deprecated
public static Predicate<ColumnModel> allOf(final Predicate<ColumnModel>... conditions) {
return (cM) -> Arrays.stream(conditions)
.allMatch(c -> c.test(cM));
} | java | @Deprecated
public static Predicate<ColumnModel> allOf(final Predicate<ColumnModel>... conditions) {
return (cM) -> Arrays.stream(conditions)
.allMatch(c -> c.test(cM));
} | [
"@",
"Deprecated",
"public",
"static",
"Predicate",
"<",
"ColumnModel",
">",
"allOf",
"(",
"final",
"Predicate",
"<",
"ColumnModel",
">",
"...",
"conditions",
")",
"{",
"return",
"(",
"cM",
")",
"-",
">",
"Arrays",
".",
"stream",
"(",
"conditions",
")",
... | A condition that returns true if all of the provided conditions return true. Equivalent to logical AND operator.
@param conditions The conditions to be checked
@return A condition that returns true if all passed conditions return true
@deprecated Use {@link Predicate#and(Predicate)} instead | [
"A",
"condition",
"that",
"returns",
"true",
"if",
"all",
"of",
"the",
"provided",
"conditions",
"return",
"true",
".",
"Equivalent",
"to",
"logical",
"AND",
"operator",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/defaultvalues/pluggable/buildermatchers/Matchers.java#L69-L73 |
144,241 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/defaultvalues/pluggable/buildermatchers/Matchers.java | Matchers.anyOf | @Deprecated
public static Predicate<ColumnModel> anyOf(final Predicate<ColumnModel>... conditions) {
return (cM) -> Arrays.stream(conditions)
.anyMatch(c -> c.test(cM));
} | java | @Deprecated
public static Predicate<ColumnModel> anyOf(final Predicate<ColumnModel>... conditions) {
return (cM) -> Arrays.stream(conditions)
.anyMatch(c -> c.test(cM));
} | [
"@",
"Deprecated",
"public",
"static",
"Predicate",
"<",
"ColumnModel",
">",
"anyOf",
"(",
"final",
"Predicate",
"<",
"ColumnModel",
">",
"...",
"conditions",
")",
"{",
"return",
"(",
"cM",
")",
"-",
">",
"Arrays",
".",
"stream",
"(",
"conditions",
")",
... | A condition that returns true if any of the provided conditions return true. Equivalent to logical OR operator.
@param conditions The conditions to be checked
@return A condition that returns true if any of the passed conditions return true
@deprecated Use {@link Predicate#or(Predicate)} instead | [
"A",
"condition",
"that",
"returns",
"true",
"if",
"any",
"of",
"the",
"provided",
"conditions",
"return",
"true",
".",
"Equivalent",
"to",
"logical",
"OR",
"operator",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/defaultvalues/pluggable/buildermatchers/Matchers.java#L82-L86 |
144,242 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/defaultvalues/pluggable/buildermatchers/Matchers.java | Matchers.oneOf | public static Predicate<ColumnModel> oneOf(final Predicate<ColumnModel>... conditions) {
return (cM) -> Arrays.stream(conditions)
.map(c -> c.test(cM)).filter(b -> b).count() == 1;
} | java | public static Predicate<ColumnModel> oneOf(final Predicate<ColumnModel>... conditions) {
return (cM) -> Arrays.stream(conditions)
.map(c -> c.test(cM)).filter(b -> b).count() == 1;
} | [
"public",
"static",
"Predicate",
"<",
"ColumnModel",
">",
"oneOf",
"(",
"final",
"Predicate",
"<",
"ColumnModel",
">",
"...",
"conditions",
")",
"{",
"return",
"(",
"cM",
")",
"-",
">",
"Arrays",
".",
"stream",
"(",
"conditions",
")",
".",
"map",
"(",
... | A condition that returns true if exactly one of the provided conditions return true. Equivalent to logical XOR operator.
@param conditions The conditions to be checked
@return A condition that returns true if exactly one of the passed conditions return true | [
"A",
"condition",
"that",
"returns",
"true",
"if",
"exactly",
"one",
"of",
"the",
"provided",
"conditions",
"return",
"true",
".",
"Equivalent",
"to",
"logical",
"XOR",
"operator",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/defaultvalues/pluggable/buildermatchers/Matchers.java#L94-L97 |
144,243 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/dummy/DefaultDummyFactory.java | DefaultDummyFactory.getDummy | @Override
public <T extends RedGEntity> T getDummy(final AbstractRedG redG, final Class<T> dummyClass) {
// check if a dummy for this type already exists in cache
if (this.dummyCache.containsKey(dummyClass)) {
return dummyClass.cast(this.dummyCache.get(dummyClass));
}
... | java | @Override
public <T extends RedGEntity> T getDummy(final AbstractRedG redG, final Class<T> dummyClass) {
// check if a dummy for this type already exists in cache
if (this.dummyCache.containsKey(dummyClass)) {
return dummyClass.cast(this.dummyCache.get(dummyClass));
}
... | [
"@",
"Override",
"public",
"<",
"T",
"extends",
"RedGEntity",
">",
"T",
"getDummy",
"(",
"final",
"AbstractRedG",
"redG",
",",
"final",
"Class",
"<",
"T",
">",
"dummyClass",
")",
"{",
"// check if a dummy for this type already exists in cache\r",
"if",
"(",
"this"... | Returns a dummy entity for the requested type.
All this method guarantees is that the returned entity is a valid entity with all non null foreign key relations filled in,
it does not guarantee useful or even semantically correct data.
The dummy objects get taken either from the list of objects to insert from the redG o... | [
"Returns",
"a",
"dummy",
"entity",
"for",
"the",
"requested",
"type",
".",
"All",
"this",
"method",
"guarantees",
"is",
"that",
"the",
"returned",
"entity",
"is",
"a",
"valid",
"entity",
"with",
"all",
"non",
"null",
"foreign",
"key",
"relations",
"filled",
... | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/dummy/DefaultDummyFactory.java#L47-L56 |
144,244 | HalBuilder/halbuilder-api | src/main/java/com/theoryinpractise/halbuilder/api/Link.java | Link.hasTemplate | private boolean hasTemplate(String href) {
if (href == null) {
return false;
}
return URI_TEMPLATE_PATTERN.matcher(href).find();
} | java | private boolean hasTemplate(String href) {
if (href == null) {
return false;
}
return URI_TEMPLATE_PATTERN.matcher(href).find();
} | [
"private",
"boolean",
"hasTemplate",
"(",
"String",
"href",
")",
"{",
"if",
"(",
"href",
"==",
"null",
")",
"{",
"return",
"false",
";",
"}",
"return",
"URI_TEMPLATE_PATTERN",
".",
"matcher",
"(",
"href",
")",
".",
"find",
"(",
")",
";",
"}"
] | Determine whether the argument href contains at least one URI template, as defined in RFC 6570.
@param href Href to check.
@return True if the href contains a template, false if not (or if the argument is null). | [
"Determine",
"whether",
"the",
"argument",
"href",
"contains",
"at",
"least",
"one",
"URI",
"template",
"as",
"defined",
"in",
"RFC",
"6570",
"."
] | b595b0af8b033ae4a51dba9c3deb411d25bb54d7 | https://github.com/HalBuilder/halbuilder-api/blob/b595b0af8b033ae4a51dba9c3deb411d25bb54d7/src/main/java/com/theoryinpractise/halbuilder/api/Link.java#L54-L59 |
144,245 | btc-ag/redg | redg-generator/src/main/java/com/btc/redg/generator/extractor/MetadataExtractor.java | MetadataExtractor.processJoinTables | private static void processJoinTables(final List<TableModel> result, final Map<String, Map<Table, List<String>>> joinTableMetadata) {
joinTableMetadata.entrySet().forEach(entry -> {
LOG.debug("Processing join tables for {}. Found {} join tables to process", entry.getKey(), entry.getValue().size())... | java | private static void processJoinTables(final List<TableModel> result, final Map<String, Map<Table, List<String>>> joinTableMetadata) {
joinTableMetadata.entrySet().forEach(entry -> {
LOG.debug("Processing join tables for {}. Found {} join tables to process", entry.getKey(), entry.getValue().size())... | [
"private",
"static",
"void",
"processJoinTables",
"(",
"final",
"List",
"<",
"TableModel",
">",
"result",
",",
"final",
"Map",
"<",
"String",
",",
"Map",
"<",
"Table",
",",
"List",
"<",
"String",
">",
">",
">",
"joinTableMetadata",
")",
"{",
"joinTableMeta... | Processes the information about the join tables that were collected during table model extraction.
@param result The already processed tables
@param joinTableMetadata The metadata about the join tables | [
"Processes",
"the",
"information",
"about",
"the",
"join",
"tables",
"that",
"were",
"collected",
"during",
"table",
"model",
"extraction",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/extractor/MetadataExtractor.java#L84-L113 |
144,246 | btc-ag/redg | redg-generator/src/main/java/com/btc/redg/generator/extractor/MetadataExtractor.java | MetadataExtractor.mergeJoinTableMetadata | private static Map<String, Map<Table, List<String>>> mergeJoinTableMetadata(Map<String, Map<Table, List<String>>> data,
Map<String, Map<Table, List<String>>> extension) {
for (String key : extension.keySet()) {
Map<Ta... | java | private static Map<String, Map<Table, List<String>>> mergeJoinTableMetadata(Map<String, Map<Table, List<String>>> data,
Map<String, Map<Table, List<String>>> extension) {
for (String key : extension.keySet()) {
Map<Ta... | [
"private",
"static",
"Map",
"<",
"String",
",",
"Map",
"<",
"Table",
",",
"List",
"<",
"String",
">",
">",
">",
"mergeJoinTableMetadata",
"(",
"Map",
"<",
"String",
",",
"Map",
"<",
"Table",
",",
"List",
"<",
"String",
">",
">",
">",
"data",
",",
"... | Performs a deep-merge on the two provided maps, integrating everything from the second map into the first and returning the first map.
@param data The first map. Will be modified
@param extension The second map, which will be integrated into the first one. Will not be modified
@return The resulting map, a reference to ... | [
"Performs",
"a",
"deep",
"-",
"merge",
"on",
"the",
"two",
"provided",
"maps",
"integrating",
"everything",
"from",
"the",
"second",
"map",
"into",
"the",
"first",
"and",
"returning",
"the",
"first",
"map",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/extractor/MetadataExtractor.java#L140-L154 |
144,247 | elibom/jogger | src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java | AbstractFileRoutesLoader.validatePath | private String validatePath(String path, int line) throws ParseException {
if (!path.startsWith("/")) {
throw new ParseException("Path must start with '/'", line);
}
boolean openedKey = false;
for (int i=0; i < path.length(); i++) {
boolean validChar = isValidCharForPath(path.charAt(i), openedKey);
i... | java | private String validatePath(String path, int line) throws ParseException {
if (!path.startsWith("/")) {
throw new ParseException("Path must start with '/'", line);
}
boolean openedKey = false;
for (int i=0; i < path.length(); i++) {
boolean validChar = isValidCharForPath(path.charAt(i), openedKey);
i... | [
"private",
"String",
"validatePath",
"(",
"String",
"path",
",",
"int",
"line",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"!",
"path",
".",
"startsWith",
"(",
"\"/\"",
")",
")",
"{",
"throw",
"new",
"ParseException",
"(",
"\"Path must start with '/'\"",... | Helper method. It validates if the path is valid.
@param path the path to be validated
@return the same path that was received as an argument.
@throws ParseException if the path is not valid. | [
"Helper",
"method",
".",
"It",
"validates",
"if",
"the",
"path",
"is",
"valid",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java#L167-L191 |
144,248 | elibom/jogger | src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java | AbstractFileRoutesLoader.isValidCharForPath | private boolean isValidCharForPath(char c, boolean openedKey) {
char[] invalidChars = { '?', '#', ' ' };
for (char invalidChar : invalidChars) {
if (c == invalidChar) {
return false;
}
}
if (openedKey) {
char[] moreInvalidChars = { '/', '{' };
for (char invalidChar : moreInvalidChars) {
if ... | java | private boolean isValidCharForPath(char c, boolean openedKey) {
char[] invalidChars = { '?', '#', ' ' };
for (char invalidChar : invalidChars) {
if (c == invalidChar) {
return false;
}
}
if (openedKey) {
char[] moreInvalidChars = { '/', '{' };
for (char invalidChar : moreInvalidChars) {
if ... | [
"private",
"boolean",
"isValidCharForPath",
"(",
"char",
"c",
",",
"boolean",
"openedKey",
")",
"{",
"char",
"[",
"]",
"invalidChars",
"=",
"{",
"'",
"'",
",",
"'",
"'",
",",
"'",
"'",
"}",
";",
"for",
"(",
"char",
"invalidChar",
":",
"invalidChars",
... | Helper method. Tells if a char is valid in a the path of a route line.
@param c the char that we are validating.
@param openedKey if there is already an opened key ({) char before.
@return true if the char is valid, false otherwise. | [
"Helper",
"method",
".",
"Tells",
"if",
"a",
"char",
"is",
"valid",
"in",
"a",
"the",
"path",
"of",
"a",
"route",
"line",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/router/loader/AbstractFileRoutesLoader.java#L201-L219 |
144,249 | elibom/jogger | src/main/java/com/elibom/jogger/util/Preconditions.java | Preconditions.notEmpty | public static void notEmpty(String value, String message) throws IllegalArgumentException {
if (value == null || "".equals(value.trim())) {
throw new IllegalArgumentException("A precondition failed: " + message);
}
} | java | public static void notEmpty(String value, String message) throws IllegalArgumentException {
if (value == null || "".equals(value.trim())) {
throw new IllegalArgumentException("A precondition failed: " + message);
}
} | [
"public",
"static",
"void",
"notEmpty",
"(",
"String",
"value",
",",
"String",
"message",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"value",
"==",
"null",
"||",
"\"\"",
".",
"equals",
"(",
"value",
".",
"trim",
"(",
")",
")",
")",
"{",
... | Checks that a string is not null or empty.
@param value the string to be tested.
@param message the message for the exception in case the string is empty.
@throws IllegalArgumentException if the string is empty. | [
"Checks",
"that",
"a",
"string",
"is",
"not",
"null",
"or",
"empty",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/util/Preconditions.java#L37-L41 |
144,250 | elibom/jogger | src/main/java/com/elibom/jogger/http/AbstractRequest.java | AbstractRequest.initPathVariables | protected void initPathVariables(String routePath) {
pathVariables.clear();
List<String> variables = getVariables(routePath);
String regexPath = routePath.replaceAll(Path.VAR_REGEXP, Path.VAR_REPLACE);
Matcher matcher = Pattern.compile("(?i)" + regexPath).matcher(getPath());
matcher.matches();
// start... | java | protected void initPathVariables(String routePath) {
pathVariables.clear();
List<String> variables = getVariables(routePath);
String regexPath = routePath.replaceAll(Path.VAR_REGEXP, Path.VAR_REPLACE);
Matcher matcher = Pattern.compile("(?i)" + regexPath).matcher(getPath());
matcher.matches();
// start... | [
"protected",
"void",
"initPathVariables",
"(",
"String",
"routePath",
")",
"{",
"pathVariables",
".",
"clear",
"(",
")",
";",
"List",
"<",
"String",
">",
"variables",
"=",
"getVariables",
"(",
"routePath",
")",
";",
"String",
"regexPath",
"=",
"routePath",
"... | Helper method. Initializes the pathVariables property of this class.
@param routePath the route path as defined in the routes.config file. | [
"Helper",
"method",
".",
"Initializes",
"the",
"pathVariables",
"property",
"of",
"this",
"class",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/AbstractRequest.java#L43-L57 |
144,251 | elibom/jogger | src/main/java/com/elibom/jogger/http/AbstractRequest.java | AbstractRequest.getVariables | private List<String> getVariables(String routePath) {
List<String> variables = new ArrayList<String>();
Matcher matcher = Pattern.compile(Path.VAR_REGEXP).matcher(routePath);
while (matcher.find()) {
// group(0) always stands for the entire expression and we only want what is inside the {}
variables.add(ma... | java | private List<String> getVariables(String routePath) {
List<String> variables = new ArrayList<String>();
Matcher matcher = Pattern.compile(Path.VAR_REGEXP).matcher(routePath);
while (matcher.find()) {
// group(0) always stands for the entire expression and we only want what is inside the {}
variables.add(ma... | [
"private",
"List",
"<",
"String",
">",
"getVariables",
"(",
"String",
"routePath",
")",
"{",
"List",
"<",
"String",
">",
"variables",
"=",
"new",
"ArrayList",
"<",
"String",
">",
"(",
")",
";",
"Matcher",
"matcher",
"=",
"Pattern",
".",
"compile",
"(",
... | Helper method. Retrieves all the variables defined in the path.
@param routePath the route path as defined in the routes.config file.
@return a List object with the names of the variables. | [
"Helper",
"method",
".",
"Retrieves",
"all",
"the",
"variables",
"defined",
"in",
"the",
"path",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/AbstractRequest.java#L66-L76 |
144,252 | kmbulebu/dsc-it100-java | src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java | ConfigurationBuilder.withRemoteSocket | public ConfigurationBuilder withRemoteSocket(String host, int port) {
configuration.connector = new NioSocketConnector();
configuration.address = new InetSocketAddress(host, port);
return this;
} | java | public ConfigurationBuilder withRemoteSocket(String host, int port) {
configuration.connector = new NioSocketConnector();
configuration.address = new InetSocketAddress(host, port);
return this;
} | [
"public",
"ConfigurationBuilder",
"withRemoteSocket",
"(",
"String",
"host",
",",
"int",
"port",
")",
"{",
"configuration",
".",
"connector",
"=",
"new",
"NioSocketConnector",
"(",
")",
";",
"configuration",
".",
"address",
"=",
"new",
"InetSocketAddress",
"(",
... | Use a TCP connection for remotely connecting to the IT-100.
Typically used with a utility such as ser2net for connecting to a remote serial port.
@param host Hostname or IP address of the remote device.
@param port TCP port of the remote device.
@return This builder instance. | [
"Use",
"a",
"TCP",
"connection",
"for",
"remotely",
"connecting",
"to",
"the",
"IT",
"-",
"100",
"."
] | 69c170ba50c870cce6dbbe04b488c6b1c6a0e10f | https://github.com/kmbulebu/dsc-it100-java/blob/69c170ba50c870cce6dbbe04b488c6b1c6a0e10f/src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java#L38-L42 |
144,253 | kmbulebu/dsc-it100-java | src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java | ConfigurationBuilder.withSerialPort | public ConfigurationBuilder withSerialPort(String serialPort, int baudRate) {
configuration.connector = new SerialConnector();
configuration.address = new SerialAddress(serialPort, baudRate, DataBits.DATABITS_8, StopBits.BITS_1, Parity.NONE, FlowControl.NONE );
return this;
} | java | public ConfigurationBuilder withSerialPort(String serialPort, int baudRate) {
configuration.connector = new SerialConnector();
configuration.address = new SerialAddress(serialPort, baudRate, DataBits.DATABITS_8, StopBits.BITS_1, Parity.NONE, FlowControl.NONE );
return this;
} | [
"public",
"ConfigurationBuilder",
"withSerialPort",
"(",
"String",
"serialPort",
",",
"int",
"baudRate",
")",
"{",
"configuration",
".",
"connector",
"=",
"new",
"SerialConnector",
"(",
")",
";",
"configuration",
".",
"address",
"=",
"new",
"SerialAddress",
"(",
... | Use a local serial port for communicating with the IT-100.
@param serialPort The serial port name. (/dev/ttyUSB0, COM1:, etc).
@param baudRate The baud rate to use while communicating with the IT-100. IT-100 default is 19200.
@return This builder instance. | [
"Use",
"a",
"local",
"serial",
"port",
"for",
"communicating",
"with",
"the",
"IT",
"-",
"100",
"."
] | 69c170ba50c870cce6dbbe04b488c6b1c6a0e10f | https://github.com/kmbulebu/dsc-it100-java/blob/69c170ba50c870cce6dbbe04b488c6b1c6a0e10f/src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java#L50-L54 |
144,254 | kmbulebu/dsc-it100-java | src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java | ConfigurationBuilder.build | public Configuration build() {
if (configuration.connector == null || configuration.address == null) {
throw new IllegalArgumentException("You must call either withRemoteSocket or withSerialPort.");
}
return configuration;
} | java | public Configuration build() {
if (configuration.connector == null || configuration.address == null) {
throw new IllegalArgumentException("You must call either withRemoteSocket or withSerialPort.");
}
return configuration;
} | [
"public",
"Configuration",
"build",
"(",
")",
"{",
"if",
"(",
"configuration",
".",
"connector",
"==",
"null",
"||",
"configuration",
".",
"address",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"You must call either withRemoteSocket or... | Create an immutable Configuration instance.
@return Configuration Immutable configuration instance. | [
"Create",
"an",
"immutable",
"Configuration",
"instance",
"."
] | 69c170ba50c870cce6dbbe04b488c6b1c6a0e10f | https://github.com/kmbulebu/dsc-it100-java/blob/69c170ba50c870cce6dbbe04b488c6b1c6a0e10f/src/main/java/com/github/kmbulebu/dsc/it100/ConfigurationBuilder.java#L91-L96 |
144,255 | btc-ag/redg | redg-generator/src/main/java/com/btc/redg/generator/extractor/DatabaseManager.java | DatabaseManager.crawlDatabase | public static Catalog crawlDatabase(final Connection connection, final InclusionRule schemaRule, final InclusionRule tableRule) throws SchemaCrawlerException {
final SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.builder()
.withSchemaInfoLevel(SchemaInfoLevelBuilder.standard().setR... | java | public static Catalog crawlDatabase(final Connection connection, final InclusionRule schemaRule, final InclusionRule tableRule) throws SchemaCrawlerException {
final SchemaCrawlerOptions options = SchemaCrawlerOptionsBuilder.builder()
.withSchemaInfoLevel(SchemaInfoLevelBuilder.standard().setR... | [
"public",
"static",
"Catalog",
"crawlDatabase",
"(",
"final",
"Connection",
"connection",
",",
"final",
"InclusionRule",
"schemaRule",
",",
"final",
"InclusionRule",
"tableRule",
")",
"throws",
"SchemaCrawlerException",
"{",
"final",
"SchemaCrawlerOptions",
"options",
"... | Starts the schema crawler and lets it crawl the given JDBC connection.
@param connection The JDBC connection
@param schemaRule The {@link InclusionRule} to be passed to SchemaCrawler that specifies which schemas should be analyzed
@param tableRule The {@link InclusionRule} to be passed to SchemaCrawler that specifies... | [
"Starts",
"the",
"schema",
"crawler",
"and",
"lets",
"it",
"crawl",
"the",
"given",
"JDBC",
"connection",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/extractor/DatabaseManager.java#L146-L160 |
144,256 | btc-ag/redg | redg-generator/src/main/java/com/btc/redg/generator/CodeGenerator.java | CodeGenerator.generateMainClass | public String generateMainClass(final Collection<TableModel> tables, final boolean enableVisualizationSupport) {
Objects.requireNonNull(tables);
//get package from the table models
final String targetPackage = ((TableModel) tables.toArray()[0]).getPackageName();
final ST template =... | java | public String generateMainClass(final Collection<TableModel> tables, final boolean enableVisualizationSupport) {
Objects.requireNonNull(tables);
//get package from the table models
final String targetPackage = ((TableModel) tables.toArray()[0]).getPackageName();
final ST template =... | [
"public",
"String",
"generateMainClass",
"(",
"final",
"Collection",
"<",
"TableModel",
">",
"tables",
",",
"final",
"boolean",
"enableVisualizationSupport",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"tables",
")",
";",
"//get package from the table models\r",
... | Generates the main class used for creating the extractor objects and later generating the insert statements.
For each passed table a appropriate creation method will be generated that will return the new object and internally add it to the list of objects that
will be used to generate the insert strings
@param tables ... | [
"Generates",
"the",
"main",
"class",
"used",
"for",
"creating",
"the",
"extractor",
"objects",
"and",
"later",
"generating",
"the",
"insert",
"statements",
".",
"For",
"each",
"passed",
"table",
"a",
"appropriate",
"creation",
"method",
"will",
"be",
"generated"... | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/CodeGenerator.java#L223-L239 |
144,257 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java | RedGBuilder.withDefaultValueStrategy | public RedGBuilder<T> withDefaultValueStrategy(final DefaultValueStrategy strategy) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setDefaultValueStrategy(strategy);
return this;
} | java | public RedGBuilder<T> withDefaultValueStrategy(final DefaultValueStrategy strategy) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setDefaultValueStrategy(strategy);
return this;
} | [
"public",
"RedGBuilder",
"<",
"T",
">",
"withDefaultValueStrategy",
"(",
"final",
"DefaultValueStrategy",
"strategy",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Using the builder after build() was called is ... | Sets the default value strategy
@param strategy The default value strategy
@return The builder itself
@see AbstractRedG#setDefaultValueStrategy(DefaultValueStrategy) | [
"Sets",
"the",
"default",
"value",
"strategy"
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java#L70-L76 |
144,258 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java | RedGBuilder.withPreparedStatementParameterSetter | public RedGBuilder<T> withPreparedStatementParameterSetter(final PreparedStatementParameterSetter setter) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setPreparedStatementParameterSetter(setter);
... | java | public RedGBuilder<T> withPreparedStatementParameterSetter(final PreparedStatementParameterSetter setter) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setPreparedStatementParameterSetter(setter);
... | [
"public",
"RedGBuilder",
"<",
"T",
">",
"withPreparedStatementParameterSetter",
"(",
"final",
"PreparedStatementParameterSetter",
"setter",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Using the builder after ... | Sets the PreparedStatement parameter setter
@param setter The PreparedStatement parameter setter
@return The builder itself
@see AbstractRedG#setPreparedStatementParameterSetter(PreparedStatementParameterSetter) | [
"Sets",
"the",
"PreparedStatement",
"parameter",
"setter"
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java#L84-L90 |
144,259 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java | RedGBuilder.withSqlValuesFormatter | public RedGBuilder<T> withSqlValuesFormatter(final SQLValuesFormatter formatter) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setSqlValuesFormatter(formatter);
return this;
} | java | public RedGBuilder<T> withSqlValuesFormatter(final SQLValuesFormatter formatter) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setSqlValuesFormatter(formatter);
return this;
} | [
"public",
"RedGBuilder",
"<",
"T",
">",
"withSqlValuesFormatter",
"(",
"final",
"SQLValuesFormatter",
"formatter",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Using the builder after build() was called is not... | Sets the SQL values formatter
@param formatter The SQL values formatter
@return The builder itself
@see AbstractRedG#setSqlValuesFormatter(SQLValuesFormatter) | [
"Sets",
"the",
"SQL",
"values",
"formatter"
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java#L98-L104 |
144,260 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java | RedGBuilder.withDummyFactory | public RedGBuilder<T> withDummyFactory(final DummyFactory dummyFactory) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setDummyFactory(dummyFactory);
return this;
} | java | public RedGBuilder<T> withDummyFactory(final DummyFactory dummyFactory) {
if (instance == null) {
throw new IllegalStateException("Using the builder after build() was called is not allowed!");
}
instance.setDummyFactory(dummyFactory);
return this;
} | [
"public",
"RedGBuilder",
"<",
"T",
">",
"withDummyFactory",
"(",
"final",
"DummyFactory",
"dummyFactory",
")",
"{",
"if",
"(",
"instance",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Using the builder after build() was called is not allowed!... | Sets the dummy factory
@param dummyFactory The dummy factory
@return The builder itself
@see AbstractRedG#setDummyFactory(DummyFactory) | [
"Sets",
"the",
"dummy",
"factory"
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/RedGBuilder.java#L112-L118 |
144,261 | elibom/jogger | src/main/java/com/elibom/jogger/http/servlet/multipart/ParameterParser.java | ParameterParser.isOneOf | private boolean isOneOf(char ch, final char[] charray) {
boolean result = false;
for (int i = 0; i < charray.length; i++) {
if (ch == charray[i]) {
result = true;
break;
}
}
return result;
} | java | private boolean isOneOf(char ch, final char[] charray) {
boolean result = false;
for (int i = 0; i < charray.length; i++) {
if (ch == charray[i]) {
result = true;
break;
}
}
return result;
} | [
"private",
"boolean",
"isOneOf",
"(",
"char",
"ch",
",",
"final",
"char",
"[",
"]",
"charray",
")",
"{",
"boolean",
"result",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"charray",
".",
"length",
";",
"i",
"++",
")",
"{",
... | Tests if the given character is present in the array of characters.
@param ch the character to test for presense in the array of characters
@param charray the array of characters to test against
@return <tt>true</tt> if the character is present in the array of characters, <tt>false</tt> otherwise. | [
"Tests",
"if",
"the",
"given",
"character",
"is",
"present",
"in",
"the",
"array",
"of",
"characters",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/ParameterParser.java#L115-L124 |
144,262 | elibom/jogger | src/main/java/com/elibom/jogger/Environment.java | Environment.get | public static String get() {
String env = System.getProperty("JOGGER_ENV");
if (env == null) {
env = System.getenv("JOGGER_ENV");
}
if (env == null) {
return "dev";
}
return env;
} | java | public static String get() {
String env = System.getProperty("JOGGER_ENV");
if (env == null) {
env = System.getenv("JOGGER_ENV");
}
if (env == null) {
return "dev";
}
return env;
} | [
"public",
"static",
"String",
"get",
"(",
")",
"{",
"String",
"env",
"=",
"System",
".",
"getProperty",
"(",
"\"JOGGER_ENV\"",
")",
";",
"if",
"(",
"env",
"==",
"null",
")",
"{",
"env",
"=",
"System",
".",
"getenv",
"(",
"\"JOGGER_ENV\"",
")",
";",
"... | Retrieves the environment in which Jogger is working.
@return a String object representing the environment. | [
"Retrieves",
"the",
"environment",
"in",
"which",
"Jogger",
"is",
"working",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/Environment.java#L19-L30 |
144,263 | btc-ag/redg | redg-runtime/src/main/java/com/btc/redg/runtime/AbstractRedG.java | AbstractRedG.generateSQLStatements | public List<String> generateSQLStatements() {
return getEntitiesSortedForInsert().stream()
.map(RedGEntity::getSQLString)
.collect(Collectors.toList());
} | java | public List<String> generateSQLStatements() {
return getEntitiesSortedForInsert().stream()
.map(RedGEntity::getSQLString)
.collect(Collectors.toList());
} | [
"public",
"List",
"<",
"String",
">",
"generateSQLStatements",
"(",
")",
"{",
"return",
"getEntitiesSortedForInsert",
"(",
")",
".",
"stream",
"(",
")",
".",
"map",
"(",
"RedGEntity",
"::",
"getSQLString",
")",
".",
"collect",
"(",
"Collectors",
".",
"toList... | Returns a list of insert statements, one for each added entity in the respective order they were added.
@return The SQL Insert strings | [
"Returns",
"a",
"list",
"of",
"insert",
"statements",
"one",
"for",
"each",
"added",
"entity",
"in",
"the",
"respective",
"order",
"they",
"were",
"added",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-runtime/src/main/java/com/btc/redg/runtime/AbstractRedG.java#L169-L173 |
144,264 | btc-ag/redg | redg-generator/src/main/java/com/btc/redg/generator/extractor/nameprovider/DefaultNameProvider.java | DefaultNameProvider.getMethodNameForReference | @Override
public String getMethodNameForReference(final ForeignKey foreignKey) {
final Column c = foreignKey.getColumnReferences().get(0).getForeignKeyColumn();
// check if only one-column fk
if (foreignKey.getColumnReferences().size() == 1) {
return getMethodNameForColumn(c... | java | @Override
public String getMethodNameForReference(final ForeignKey foreignKey) {
final Column c = foreignKey.getColumnReferences().get(0).getForeignKeyColumn();
// check if only one-column fk
if (foreignKey.getColumnReferences().size() == 1) {
return getMethodNameForColumn(c... | [
"@",
"Override",
"public",
"String",
"getMethodNameForReference",
"(",
"final",
"ForeignKey",
"foreignKey",
")",
"{",
"final",
"Column",
"c",
"=",
"foreignKey",
".",
"getColumnReferences",
"(",
")",
".",
"get",
"(",
"0",
")",
".",
"getForeignKeyColumn",
"(",
"... | Generates an appropriate method name for a foreign key
@param foreignKey The database foreign key
@return The generated name | [
"Generates",
"an",
"appropriate",
"method",
"name",
"for",
"a",
"foreign",
"key"
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/extractor/nameprovider/DefaultNameProvider.java#L97-L124 |
144,265 | elibom/jogger | src/main/java/com/elibom/jogger/Jogger.java | Jogger.handle | public void handle(Request request, Response response) throws Exception {
if (Environment.isDevelopment()) {
this.middlewares = this.middlewareFactory.create();
}
try {
handle(request, response, new ArrayList<Middleware>(Arrays.asList(middlewares)));
} catch (Exception e) {
if (exceptionHandler != n... | java | public void handle(Request request, Response response) throws Exception {
if (Environment.isDevelopment()) {
this.middlewares = this.middlewareFactory.create();
}
try {
handle(request, response, new ArrayList<Middleware>(Arrays.asList(middlewares)));
} catch (Exception e) {
if (exceptionHandler != n... | [
"public",
"void",
"handle",
"(",
"Request",
"request",
",",
"Response",
"response",
")",
"throws",
"Exception",
"{",
"if",
"(",
"Environment",
".",
"isDevelopment",
"(",
")",
")",
"{",
"this",
".",
"middlewares",
"=",
"this",
".",
"middlewareFactory",
".",
... | Handles an HTTP request by delgating the call to the middlewares.
@param request the Jogger HTTP request.
@param response the Jogger HTTP response.
@throws Exception | [
"Handles",
"an",
"HTTP",
"request",
"by",
"delgating",
"the",
"call",
"to",
"the",
"middlewares",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/Jogger.java#L107-L121 |
144,266 | mesosphere/mesos-http-adapter | src/main/java/com/mesosphere/mesos/http-adapter/MesosToSchedulerDriverAdapter.java | MesosToSchedulerDriverAdapter.performReliableSubscription | private synchronized void performReliableSubscription() {
// If timer is not running, initialize it.
if (subscriberTimer == null) {
LOGGER.info("Initializing reliable subscriber");
subscriberTimer = createTimerInternal();
ExponentialBackOff backOff = new ExponentialBa... | java | private synchronized void performReliableSubscription() {
// If timer is not running, initialize it.
if (subscriberTimer == null) {
LOGGER.info("Initializing reliable subscriber");
subscriberTimer = createTimerInternal();
ExponentialBackOff backOff = new ExponentialBa... | [
"private",
"synchronized",
"void",
"performReliableSubscription",
"(",
")",
"{",
"// If timer is not running, initialize it.",
"if",
"(",
"subscriberTimer",
"==",
"null",
")",
"{",
"LOGGER",
".",
"info",
"(",
"\"Initializing reliable subscriber\"",
")",
";",
"subscriberTi... | Task that performs Subscription. | [
"Task",
"that",
"performs",
"Subscription",
"."
] | 5965d467c86ce7a1092bda5624dd2da9b0776334 | https://github.com/mesosphere/mesos-http-adapter/blob/5965d467c86ce7a1092bda5624dd2da9b0776334/src/main/java/com/mesosphere/mesos/http-adapter/MesosToSchedulerDriverAdapter.java#L141-L155 |
144,267 | mesosphere/mesos-http-adapter | src/main/java/com/mesosphere/mesos/http-adapter/MesosToSchedulerDriverAdapter.java | MesosToSchedulerDriverAdapter.startInternal | @VisibleForTesting
protected Mesos startInternal() {
String version = System.getenv("MESOS_API_VERSION");
if (version == null) {
version = "V0";
}
LOGGER.info("Using Mesos API version: {}", version);
if (version.equals("V0")) {
if (credential == null... | java | @VisibleForTesting
protected Mesos startInternal() {
String version = System.getenv("MESOS_API_VERSION");
if (version == null) {
version = "V0";
}
LOGGER.info("Using Mesos API version: {}", version);
if (version.equals("V0")) {
if (credential == null... | [
"@",
"VisibleForTesting",
"protected",
"Mesos",
"startInternal",
"(",
")",
"{",
"String",
"version",
"=",
"System",
".",
"getenv",
"(",
"\"MESOS_API_VERSION\"",
")",
";",
"if",
"(",
"version",
"==",
"null",
")",
"{",
"version",
"=",
"\"V0\"",
";",
"}",
"LO... | Broken out into a separate function to allow testing with custom `Mesos` implementations. | [
"Broken",
"out",
"into",
"a",
"separate",
"function",
"to",
"allow",
"testing",
"with",
"custom",
"Mesos",
"implementations",
"."
] | 5965d467c86ce7a1092bda5624dd2da9b0776334 | https://github.com/mesosphere/mesos-http-adapter/blob/5965d467c86ce7a1092bda5624dd2da9b0776334/src/main/java/com/mesosphere/mesos/http-adapter/MesosToSchedulerDriverAdapter.java#L314-L338 |
144,268 | btc-ag/redg | redg-generator/src/main/java/com/btc/redg/generator/extractor/TableExtractor.java | TableExtractor.extractTableModel | public TableModel extractTableModel(final Table table) {
Objects.requireNonNull(table);
final TableModel model = new TableModel();
model.setClassName(this.classPrefix + this.nameProvider.getClassNameForTable(table));
model.setName(this.nameProvider.getClassNameForTable(table));
... | java | public TableModel extractTableModel(final Table table) {
Objects.requireNonNull(table);
final TableModel model = new TableModel();
model.setClassName(this.classPrefix + this.nameProvider.getClassNameForTable(table));
model.setName(this.nameProvider.getClassNameForTable(table));
... | [
"public",
"TableModel",
"extractTableModel",
"(",
"final",
"Table",
"table",
")",
"{",
"Objects",
".",
"requireNonNull",
"(",
"table",
")",
";",
"final",
"TableModel",
"model",
"=",
"new",
"TableModel",
"(",
")",
";",
"model",
".",
"setClassName",
"(",
"this... | Extracts the table model from a single table. Every table this table references via foreign keys must be fully loaded, otherwise an exception will be
thrown.
@param table The table to extract the model from
@return The extracted model with all information needed for code generation | [
"Extracts",
"the",
"table",
"model",
"from",
"a",
"single",
"table",
".",
"Every",
"table",
"this",
"table",
"references",
"via",
"foreign",
"keys",
"must",
"be",
"fully",
"loaded",
"otherwise",
"an",
"exception",
"will",
"be",
"thrown",
"."
] | 416a68639d002512cabfebff09afd2e1909e27df | https://github.com/btc-ag/redg/blob/416a68639d002512cabfebff09afd2e1909e27df/redg-generator/src/main/java/com/btc/redg/generator/extractor/TableExtractor.java#L126-L167 |
144,269 | elibom/jogger | src/main/java/com/elibom/jogger/http/servlet/ServletRequest.java | ServletRequest.init | private ServletRequest init() throws MultipartException, IOException {
// retrieve multipart/form-data parameters
if (Multipart.isMultipartContent(request)) {
Multipart multipart = new Multipart();
multipart.parse(request, new PartHandler() {
@Override
public void handleFormItem(String name, String v... | java | private ServletRequest init() throws MultipartException, IOException {
// retrieve multipart/form-data parameters
if (Multipart.isMultipartContent(request)) {
Multipart multipart = new Multipart();
multipart.parse(request, new PartHandler() {
@Override
public void handleFormItem(String name, String v... | [
"private",
"ServletRequest",
"init",
"(",
")",
"throws",
"MultipartException",
",",
"IOException",
"{",
"// retrieve multipart/form-data parameters",
"if",
"(",
"Multipart",
".",
"isMultipartContent",
"(",
"request",
")",
")",
"{",
"Multipart",
"multipart",
"=",
"new"... | Initializes the path variables and the multipart content.
@throws MultipartException if there is a problem parsing the multipart/form-data.
@throws IOException if there is a problem parsing the multipart/form-data. | [
"Initializes",
"the",
"path",
"variables",
"and",
"the",
"multipart",
"content",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/ServletRequest.java#L64-L84 |
144,270 | elibom/jogger | src/main/java/com/elibom/jogger/middleware/statik/StaticMiddleware.java | StaticMiddleware.fixRequestPath | private String fixRequestPath(String path) {
return path.endsWith("/") ? path.substring(0, path.length() - 1) : path;
} | java | private String fixRequestPath(String path) {
return path.endsWith("/") ? path.substring(0, path.length() - 1) : path;
} | [
"private",
"String",
"fixRequestPath",
"(",
"String",
"path",
")",
"{",
"return",
"path",
".",
"endsWith",
"(",
"\"/\"",
")",
"?",
"path",
".",
"substring",
"(",
"0",
",",
"path",
".",
"length",
"(",
")",
"-",
"1",
")",
":",
"path",
";",
"}"
] | Helper method. The request path shouldn't have a trailing slash.
@param path the path to fix.
@return the path with its trailing slash | [
"Helper",
"method",
".",
"The",
"request",
"path",
"shouldn",
"t",
"have",
"a",
"trailing",
"slash",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/statik/StaticMiddleware.java#L136-L138 |
144,271 | elibom/jogger | src/main/java/com/elibom/jogger/middleware/router/RouterMiddleware.java | RouterMiddleware.getInterceptors | private List<Interceptor> getInterceptors(String path) {
List<Interceptor> ret = new ArrayList<Interceptor>();
for (InterceptorEntry entry : getInterceptors()) {
if (matches(path, entry.getPaths())) {
ret.add(entry.getInterceptor());
}
}
return ret;
} | java | private List<Interceptor> getInterceptors(String path) {
List<Interceptor> ret = new ArrayList<Interceptor>();
for (InterceptorEntry entry : getInterceptors()) {
if (matches(path, entry.getPaths())) {
ret.add(entry.getInterceptor());
}
}
return ret;
} | [
"private",
"List",
"<",
"Interceptor",
">",
"getInterceptors",
"(",
"String",
"path",
")",
"{",
"List",
"<",
"Interceptor",
">",
"ret",
"=",
"new",
"ArrayList",
"<",
"Interceptor",
">",
"(",
")",
";",
"for",
"(",
"InterceptorEntry",
"entry",
":",
"getInter... | Returns a list of interceptors that match a path
@param path
@return a list of {@link Interceptor} objects. | [
"Returns",
"a",
"list",
"of",
"interceptors",
"that",
"match",
"a",
"path"
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/router/RouterMiddleware.java#L68-L78 |
144,272 | elibom/jogger | src/main/java/com/elibom/jogger/middleware/router/RouterMiddleware.java | RouterMiddleware.matchesPath | private boolean matchesPath(String routePath, String pathToMatch) {
routePath = routePath.replaceAll(Path.VAR_REGEXP, Path.VAR_REPLACE);
return pathToMatch.matches("(?i)" + routePath);
} | java | private boolean matchesPath(String routePath, String pathToMatch) {
routePath = routePath.replaceAll(Path.VAR_REGEXP, Path.VAR_REPLACE);
return pathToMatch.matches("(?i)" + routePath);
} | [
"private",
"boolean",
"matchesPath",
"(",
"String",
"routePath",
",",
"String",
"pathToMatch",
")",
"{",
"routePath",
"=",
"routePath",
".",
"replaceAll",
"(",
"Path",
".",
"VAR_REGEXP",
",",
"Path",
".",
"VAR_REPLACE",
")",
";",
"return",
"pathToMatch",
".",
... | Helper method. Tells if the the HTTP path matches the route path.
@param routePath the path defined for the route.
@param pathToMatch the path from the HTTP request.
@return true if the path matches, false otherwise. | [
"Helper",
"method",
".",
"Tells",
"if",
"the",
"the",
"HTTP",
"path",
"matches",
"the",
"route",
"path",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/middleware/router/RouterMiddleware.java#L145-L148 |
144,273 | elibom/jogger | src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java | Multipart.isMultipartContent | public static boolean isMultipartContent(HttpServletRequest request) {
if (!"post".equals(request.getMethod().toLowerCase())) {
return false;
}
String contentType = request.getContentType();
if (contentType == null) {
return false;
}
if (contentType.toLowerCase().startsWith(MULTIPART)) {
return tr... | java | public static boolean isMultipartContent(HttpServletRequest request) {
if (!"post".equals(request.getMethod().toLowerCase())) {
return false;
}
String contentType = request.getContentType();
if (contentType == null) {
return false;
}
if (contentType.toLowerCase().startsWith(MULTIPART)) {
return tr... | [
"public",
"static",
"boolean",
"isMultipartContent",
"(",
"HttpServletRequest",
"request",
")",
"{",
"if",
"(",
"!",
"\"post\"",
".",
"equals",
"(",
"request",
".",
"getMethod",
"(",
")",
".",
"toLowerCase",
"(",
")",
")",
")",
"{",
"return",
"false",
";",... | Tells if a request is multipart or not.
@param request the javax.servlet.http.HttpServletRequest that we are going to check.
@return true if the request is multipart, false otherwise. | [
"Tells",
"if",
"a",
"request",
"is",
"multipart",
"or",
"not",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java#L65-L79 |
144,274 | elibom/jogger | src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java | Multipart.getHeadersMap | protected Map<String,String> getHeadersMap(String headerPart) {
final int len = headerPart.length();
final Map<String,String> headers = new HashMap<String,String>();
int start = 0;
for (;;) {
int end = parseEndOfLine(headerPart, start);
if (start == end) {
break;
}
String header = headerPart.su... | java | protected Map<String,String> getHeadersMap(String headerPart) {
final int len = headerPart.length();
final Map<String,String> headers = new HashMap<String,String>();
int start = 0;
for (;;) {
int end = parseEndOfLine(headerPart, start);
if (start == end) {
break;
}
String header = headerPart.su... | [
"protected",
"Map",
"<",
"String",
",",
"String",
">",
"getHeadersMap",
"(",
"String",
"headerPart",
")",
"{",
"final",
"int",
"len",
"=",
"headerPart",
".",
"length",
"(",
")",
";",
"final",
"Map",
"<",
"String",
",",
"String",
">",
"headers",
"=",
"n... | Retreives a map with the headers of a part.
@param headerPart a String object with the contents of the part header.
@return a Map<String,String> object with the headers of the part. | [
"Retreives",
"a",
"map",
"with",
"the",
"headers",
"of",
"a",
"part",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java#L225-L272 |
144,275 | elibom/jogger | src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java | Multipart.getFieldName | private String getFieldName(String contentDisposition) {
String fieldName = null;
if (contentDisposition != null && contentDisposition.toLowerCase().startsWith(FORM_DATA)) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(true);
// parameter parser can handle null input
Map<St... | java | private String getFieldName(String contentDisposition) {
String fieldName = null;
if (contentDisposition != null && contentDisposition.toLowerCase().startsWith(FORM_DATA)) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(true);
// parameter parser can handle null input
Map<St... | [
"private",
"String",
"getFieldName",
"(",
"String",
"contentDisposition",
")",
"{",
"String",
"fieldName",
"=",
"null",
";",
"if",
"(",
"contentDisposition",
"!=",
"null",
"&&",
"contentDisposition",
".",
"toLowerCase",
"(",
")",
".",
"startsWith",
"(",
"FORM_DA... | Retrieves the name of the field from the Content-Disposition header of the part.
@param contentDisposition the value of the Content-Disposition header.
@return a String object that holds the name of the field to which this part is associated. | [
"Retrieves",
"the",
"name",
"of",
"the",
"field",
"from",
"the",
"Content",
"-",
"Disposition",
"header",
"of",
"the",
"part",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java#L303-L319 |
144,276 | elibom/jogger | src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java | Multipart.getBoundary | protected byte[] getBoundary(String contentType) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(true);
// Parameter parser can handle null input
Map<String,String> params = parser.parse(contentType, new char[] {';', ','});
String boundaryStr = (String) params.get("boundary");
if... | java | protected byte[] getBoundary(String contentType) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(true);
// Parameter parser can handle null input
Map<String,String> params = parser.parse(contentType, new char[] {';', ','});
String boundaryStr = (String) params.get("boundary");
if... | [
"protected",
"byte",
"[",
"]",
"getBoundary",
"(",
"String",
"contentType",
")",
"{",
"ParameterParser",
"parser",
"=",
"new",
"ParameterParser",
"(",
")",
";",
"parser",
".",
"setLowerCaseNames",
"(",
"true",
")",
";",
"// Parameter parser can handle null input",
... | Retrieves the boundary that is used to separate the request parts from the Content-Type header.
@param contentType the value of the Content-Type header.
@return a byte array with the boundary. | [
"Retrieves",
"the",
"boundary",
"that",
"is",
"used",
"to",
"separate",
"the",
"request",
"parts",
"from",
"the",
"Content",
"-",
"Type",
"header",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java#L328-L346 |
144,277 | elibom/jogger | src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java | Multipart.getFileName | private String getFileName(String contentDisposition) {
String fileName = null;
if (contentDisposition != null) {
String cdl = contentDisposition.toLowerCase();
if (cdl.startsWith(FORM_DATA) || cdl.startsWith(ATTACHMENT)) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(tr... | java | private String getFileName(String contentDisposition) {
String fileName = null;
if (contentDisposition != null) {
String cdl = contentDisposition.toLowerCase();
if (cdl.startsWith(FORM_DATA) || cdl.startsWith(ATTACHMENT)) {
ParameterParser parser = new ParameterParser();
parser.setLowerCaseNames(tr... | [
"private",
"String",
"getFileName",
"(",
"String",
"contentDisposition",
")",
"{",
"String",
"fileName",
"=",
"null",
";",
"if",
"(",
"contentDisposition",
"!=",
"null",
")",
"{",
"String",
"cdl",
"=",
"contentDisposition",
".",
"toLowerCase",
"(",
")",
";",
... | Retrieves the file name of a file from the filename attribute of the Content-Disposition header of the part.
@param contentDisposition the value of the Content-Disposition header.
@return a String object that holds the name of the file. | [
"Retrieves",
"the",
"file",
"name",
"of",
"a",
"file",
"from",
"the",
"filename",
"attribute",
"of",
"the",
"Content",
"-",
"Disposition",
"header",
"of",
"the",
"part",
"."
] | d5892ff45e76328d444a68b5a38c26e7bdd0692b | https://github.com/elibom/jogger/blob/d5892ff45e76328d444a68b5a38c26e7bdd0692b/src/main/java/com/elibom/jogger/http/servlet/multipart/Multipart.java#L355-L383 |
144,278 | kmbulebu/dsc-it100-java | src/main/java/com/github/kmbulebu/dsc/it100/IT100.java | IT100.connect | public void connect() throws Exception {
// Start up our MINA stuff
// Setup MINA codecs
final IT100CodecFactory it100CodecFactory = new IT100CodecFactory();
final ProtocolCodecFilter protocolCodecFilter = new ProtocolCodecFilter(it100CodecFactory);
final CommandLogFilter loggingFilter = new CommandLogFilt... | java | public void connect() throws Exception {
// Start up our MINA stuff
// Setup MINA codecs
final IT100CodecFactory it100CodecFactory = new IT100CodecFactory();
final ProtocolCodecFilter protocolCodecFilter = new ProtocolCodecFilter(it100CodecFactory);
final CommandLogFilter loggingFilter = new CommandLogFilt... | [
"public",
"void",
"connect",
"(",
")",
"throws",
"Exception",
"{",
"// Start up our MINA stuff ",
"// Setup MINA codecs",
"final",
"IT100CodecFactory",
"it100CodecFactory",
"=",
"new",
"IT100CodecFactory",
"(",
")",
";",
"final",
"ProtocolCodecFilter",
"protocolCodecFilter"... | Begin communicating with the IT-100.
@throws Exception If an error occurs while connecting to the IT-100 | [
"Begin",
"communicating",
"with",
"the",
"IT",
"-",
"100",
"."
] | 69c170ba50c870cce6dbbe04b488c6b1c6a0e10f | https://github.com/kmbulebu/dsc-it100-java/blob/69c170ba50c870cce6dbbe04b488c6b1c6a0e10f/src/main/java/com/github/kmbulebu/dsc/it100/IT100.java#L65-L140 |
144,279 | kmbulebu/dsc-it100-java | src/main/java/com/github/kmbulebu/dsc/it100/IT100.java | IT100.disconnect | public void disconnect() throws Exception {
if (session != null) {
session.getCloseFuture().awaitUninterruptibly();
}
if (connector != null) {
connector.dispose();
}
} | java | public void disconnect() throws Exception {
if (session != null) {
session.getCloseFuture().awaitUninterruptibly();
}
if (connector != null) {
connector.dispose();
}
} | [
"public",
"void",
"disconnect",
"(",
")",
"throws",
"Exception",
"{",
"if",
"(",
"session",
"!=",
"null",
")",
"{",
"session",
".",
"getCloseFuture",
"(",
")",
".",
"awaitUninterruptibly",
"(",
")",
";",
"}",
"if",
"(",
"connector",
"!=",
"null",
")",
... | Stop communicating with the IT-100 and release the port.
@throws Exception If there is an error while trying to close the port. | [
"Stop",
"communicating",
"with",
"the",
"IT",
"-",
"100",
"and",
"release",
"the",
"port",
"."
] | 69c170ba50c870cce6dbbe04b488c6b1c6a0e10f | https://github.com/kmbulebu/dsc-it100-java/blob/69c170ba50c870cce6dbbe04b488c6b1c6a0e10f/src/main/java/com/github/kmbulebu/dsc/it100/IT100.java#L170-L177 |
144,280 | aggregateknowledge/java-hll | src/main/java/net/agkn/hll/util/HLLUtil.java | HLLUtil.registerBitSize | public static int registerBitSize(final long expectedUniqueElements) {
return Math.max(HLL.MINIMUM_REGWIDTH_PARAM,
(int)Math.ceil(NumberUtil.log2(NumberUtil.log2(expectedUniqueElements))));
} | java | public static int registerBitSize(final long expectedUniqueElements) {
return Math.max(HLL.MINIMUM_REGWIDTH_PARAM,
(int)Math.ceil(NumberUtil.log2(NumberUtil.log2(expectedUniqueElements))));
} | [
"public",
"static",
"int",
"registerBitSize",
"(",
"final",
"long",
"expectedUniqueElements",
")",
"{",
"return",
"Math",
".",
"max",
"(",
"HLL",
".",
"MINIMUM_REGWIDTH_PARAM",
",",
"(",
"int",
")",
"Math",
".",
"ceil",
"(",
"NumberUtil",
".",
"log2",
"(",
... | Computes the bit-width of HLL registers necessary to estimate a set of
the specified cardinality.
@param expectedUniqueElements an upper bound on the number of unique
elements that are expected. This must be greater than zero.
@return a register size in bits (i.e. <code>log2(log2(n))</code>) | [
"Computes",
"the",
"bit",
"-",
"width",
"of",
"HLL",
"registers",
"necessary",
"to",
"estimate",
"a",
"set",
"of",
"the",
"specified",
"cardinality",
"."
] | 1f4126e79a85b79581460c75bf1c1634b8a7402d | https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/util/HLLUtil.java#L96-L99 |
144,281 | aggregateknowledge/java-hll | src/main/java/net/agkn/hll/util/HLLUtil.java | HLLUtil.alphaMSquared | public static double alphaMSquared(final int m) {
switch(m) {
case 1/*2^0*/:
case 2/*2^1*/:
case 4/*2^2*/:
case 8/*2^3*/:
throw new IllegalArgumentException("'m' cannot be less than 16 (" + m + " < 16).");
case 16/*2^4*/:
... | java | public static double alphaMSquared(final int m) {
switch(m) {
case 1/*2^0*/:
case 2/*2^1*/:
case 4/*2^2*/:
case 8/*2^3*/:
throw new IllegalArgumentException("'m' cannot be less than 16 (" + m + " < 16).");
case 16/*2^4*/:
... | [
"public",
"static",
"double",
"alphaMSquared",
"(",
"final",
"int",
"m",
")",
"{",
"switch",
"(",
"m",
")",
"{",
"case",
"1",
"/*2^0*/",
":",
"case",
"2",
"/*2^1*/",
":",
"case",
"4",
"/*2^2*/",
":",
"case",
"8",
"/*2^3*/",
":",
"throw",
"new",
"Ille... | Computes the 'alpha-m-squared' constant used by the HyperLogLog algorithm.
@param m this must be a power of two, cannot be less than
16 (2<sup>4</sup>), and cannot be greater than 65536 (2<sup>16</sup>).
@return gamma times <code>registerCount</code> squared where gamma is
based on the value of <code>registerCount</c... | [
"Computes",
"the",
"alpha",
"-",
"m",
"-",
"squared",
"constant",
"used",
"by",
"the",
"HyperLogLog",
"algorithm",
"."
] | 1f4126e79a85b79581460c75bf1c1634b8a7402d | https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/util/HLLUtil.java#L112-L132 |
144,282 | aggregateknowledge/java-hll | src/main/java/net/agkn/hll/HLL.java | HLL.cardinality | public long cardinality() {
switch(type) {
case EMPTY:
return 0/*by definition*/;
case EXPLICIT:
return explicitStorage.size();
case SPARSE:
return (long)Math.ceil(sparseProbabilisticAlgorithmCardinality());
case FUL... | java | public long cardinality() {
switch(type) {
case EMPTY:
return 0/*by definition*/;
case EXPLICIT:
return explicitStorage.size();
case SPARSE:
return (long)Math.ceil(sparseProbabilisticAlgorithmCardinality());
case FUL... | [
"public",
"long",
"cardinality",
"(",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"EMPTY",
":",
"return",
"0",
"/*by definition*/",
";",
"case",
"EXPLICIT",
":",
"return",
"explicitStorage",
".",
"size",
"(",
")",
";",
"case",
"SPARSE",
":",
"retu... | Computes the cardinality of the HLL.
@return the cardinality of HLL. This will never be negative. | [
"Computes",
"the",
"cardinality",
"of",
"the",
"HLL",
"."
] | 1f4126e79a85b79581460c75bf1c1634b8a7402d | https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/HLL.java#L511-L524 |
144,283 | aggregateknowledge/java-hll | src/main/java/net/agkn/hll/HLL.java | HLL.union | public void union(final HLL other) {
// TODO: verify HLLs are compatible
final HLLType otherType = other.getType();
if(type.equals(otherType)) {
homogeneousUnion(other);
return;
} else {
heterogenousUnion(other);
return;
}
} | java | public void union(final HLL other) {
// TODO: verify HLLs are compatible
final HLLType otherType = other.getType();
if(type.equals(otherType)) {
homogeneousUnion(other);
return;
} else {
heterogenousUnion(other);
return;
}
} | [
"public",
"void",
"union",
"(",
"final",
"HLL",
"other",
")",
"{",
"// TODO: verify HLLs are compatible",
"final",
"HLLType",
"otherType",
"=",
"other",
".",
"getType",
"(",
")",
";",
"if",
"(",
"type",
".",
"equals",
"(",
"otherType",
")",
")",
"{",
"homo... | Computes the union of HLLs and stores the result in this instance.
@param other the other {@link HLL} instance to union into this one. This
cannot be <code>null</code>. | [
"Computes",
"the",
"union",
"of",
"HLLs",
"and",
"stores",
"the",
"result",
"in",
"this",
"instance",
"."
] | 1f4126e79a85b79581460c75bf1c1634b8a7402d | https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/HLL.java#L631-L642 |
144,284 | aggregateknowledge/java-hll | src/main/java/net/agkn/hll/HLL.java | HLL.homogeneousUnion | private void homogeneousUnion(final HLL other) {
switch(type) {
case EMPTY:
// union of empty and empty is empty
return;
case EXPLICIT:
for(final long value : other.explicitStorage) {
addRaw(value);
}
// NOTE... | java | private void homogeneousUnion(final HLL other) {
switch(type) {
case EMPTY:
// union of empty and empty is empty
return;
case EXPLICIT:
for(final long value : other.explicitStorage) {
addRaw(value);
}
// NOTE... | [
"private",
"void",
"homogeneousUnion",
"(",
"final",
"HLL",
"other",
")",
"{",
"switch",
"(",
"type",
")",
"{",
"case",
"EMPTY",
":",
"// union of empty and empty is empty",
"return",
";",
"case",
"EXPLICIT",
":",
"for",
"(",
"final",
"long",
"value",
":",
"... | Computes the union of two HLLs of the same type, and stores the
result in this instance.
@param other the other {@link HLL} instance to union into this one. This
cannot be <code>null</code>. | [
"Computes",
"the",
"union",
"of",
"two",
"HLLs",
"of",
"the",
"same",
"type",
"and",
"stores",
"the",
"result",
"in",
"this",
"instance",
"."
] | 1f4126e79a85b79581460c75bf1c1634b8a7402d | https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/HLL.java#L818-L857 |
144,285 | aggregateknowledge/java-hll | src/main/java/net/agkn/hll/HLL.java | HLL.toBytes | public byte[] toBytes(final ISchemaVersion schemaVersion) {
final byte[] bytes;
switch(type) {
case EMPTY:
bytes = new byte[schemaVersion.paddingBytes(type)];
break;
case EXPLICIT: {
final IWordSerializer serializer =
... | java | public byte[] toBytes(final ISchemaVersion schemaVersion) {
final byte[] bytes;
switch(type) {
case EMPTY:
bytes = new byte[schemaVersion.paddingBytes(type)];
break;
case EXPLICIT: {
final IWordSerializer serializer =
... | [
"public",
"byte",
"[",
"]",
"toBytes",
"(",
"final",
"ISchemaVersion",
"schemaVersion",
")",
"{",
"final",
"byte",
"[",
"]",
"bytes",
";",
"switch",
"(",
"type",
")",
"{",
"case",
"EMPTY",
":",
"bytes",
"=",
"new",
"byte",
"[",
"schemaVersion",
".",
"p... | Serializes the HLL to an array of bytes in correspondence with the format
of the specified schema version.
@param schemaVersion the schema version dictating the serialization format
@return the array of bytes representing the HLL. This will never be
<code>null</code> or empty. | [
"Serializes",
"the",
"HLL",
"to",
"an",
"array",
"of",
"bytes",
"in",
"correspondence",
"with",
"the",
"format",
"of",
"the",
"specified",
"schema",
"version",
"."
] | 1f4126e79a85b79581460c75bf1c1634b8a7402d | https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/HLL.java#L880-L937 |
144,286 | aggregateknowledge/java-hll | src/main/java/net/agkn/hll/util/BitVector.java | BitVector.getRegisterContents | public void getRegisterContents(final IWordSerializer serializer) {
for(final LongIterator iter = registerIterator(); iter.hasNext();) {
serializer.writeWord(iter.next());
}
} | java | public void getRegisterContents(final IWordSerializer serializer) {
for(final LongIterator iter = registerIterator(); iter.hasNext();) {
serializer.writeWord(iter.next());
}
} | [
"public",
"void",
"getRegisterContents",
"(",
"final",
"IWordSerializer",
"serializer",
")",
"{",
"for",
"(",
"final",
"LongIterator",
"iter",
"=",
"registerIterator",
"(",
")",
";",
"iter",
".",
"hasNext",
"(",
")",
";",
")",
"{",
"serializer",
".",
"writeW... | Serializes the registers of the vector using the specified serializer.
@param serializer the serializer to use. This cannot be <code>null</code>. | [
"Serializes",
"the",
"registers",
"of",
"the",
"vector",
"using",
"the",
"specified",
"serializer",
"."
] | 1f4126e79a85b79581460c75bf1c1634b8a7402d | https://github.com/aggregateknowledge/java-hll/blob/1f4126e79a85b79581460c75bf1c1634b8a7402d/src/main/java/net/agkn/hll/util/BitVector.java#L245-L249 |
144,287 | OnyxDevTools/onyx-database-parent | onyx-database-examples/model-updates/model-after-update/src/main/java/com/onyxdevtools/modelUpdate/after/UpdateIndexDemo.java | UpdateIndexDemo.parseDate | private static Date parseDate(@SuppressWarnings("SameParameterValue") String stringDate)
{
try {
return formatter.parse(stringDate);
} catch (ParseException e) {
e.printStackTrace();
return null;
}
} | java | private static Date parseDate(@SuppressWarnings("SameParameterValue") String stringDate)
{
try {
return formatter.parse(stringDate);
} catch (ParseException e) {
e.printStackTrace();
return null;
}
} | [
"private",
"static",
"Date",
"parseDate",
"(",
"@",
"SuppressWarnings",
"(",
"\"SameParameterValue\"",
")",
"String",
"stringDate",
")",
"{",
"try",
"{",
"return",
"formatter",
".",
"parse",
"(",
"stringDate",
")",
";",
"}",
"catch",
"(",
"ParseException",
"e"... | Helper method used to parse a date in string format. Meant to encapsulate the error handling.
@param stringDate String in format of MM-dd-yyyy
@return Date key | [
"Helper",
"method",
"used",
"to",
"parse",
"a",
"date",
"in",
"string",
"format",
".",
"Meant",
"to",
"encapsulate",
"the",
"error",
"handling",
"."
] | 474dfc273a094dbc2ca08fcc08a2858cd538c920 | https://github.com/OnyxDevTools/onyx-database-parent/blob/474dfc273a094dbc2ca08fcc08a2858cd538c920/onyx-database-examples/model-updates/model-after-update/src/main/java/com/onyxdevtools/modelUpdate/after/UpdateIndexDemo.java#L80-L88 |
144,288 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.createMavenPomDescriptor | protected MavenPomDescriptor createMavenPomDescriptor(Model model, Scanner scanner) {
ScannerContext context = scanner.getContext();
MavenPomDescriptor pomDescriptor = context.peek(MavenPomDescriptor.class);
if (model instanceof EffectiveModel) {
context.getStore().addDescriptorType(... | java | protected MavenPomDescriptor createMavenPomDescriptor(Model model, Scanner scanner) {
ScannerContext context = scanner.getContext();
MavenPomDescriptor pomDescriptor = context.peek(MavenPomDescriptor.class);
if (model instanceof EffectiveModel) {
context.getStore().addDescriptorType(... | [
"protected",
"MavenPomDescriptor",
"createMavenPomDescriptor",
"(",
"Model",
"model",
",",
"Scanner",
"scanner",
")",
"{",
"ScannerContext",
"context",
"=",
"scanner",
".",
"getContext",
"(",
")",
";",
"MavenPomDescriptor",
"pomDescriptor",
"=",
"context",
".",
"pee... | Create the descriptor and set base information.
@param model
The model.
@param scanner
The scanner.
@return The descriptor. | [
"Create",
"the",
"descriptor",
"and",
"set",
"base",
"information",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L146-L162 |
144,289 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addActivation | private void addActivation(MavenProfileDescriptor mavenProfileDescriptor, Activation activation, Store store) {
if (null == activation) {
return;
}
MavenProfileActivationDescriptor profileActivationDescriptor = store.create(MavenProfileActivationDescriptor.class);
mavenProfil... | java | private void addActivation(MavenProfileDescriptor mavenProfileDescriptor, Activation activation, Store store) {
if (null == activation) {
return;
}
MavenProfileActivationDescriptor profileActivationDescriptor = store.create(MavenProfileActivationDescriptor.class);
mavenProfil... | [
"private",
"void",
"addActivation",
"(",
"MavenProfileDescriptor",
"mavenProfileDescriptor",
",",
"Activation",
"activation",
",",
"Store",
"store",
")",
"{",
"if",
"(",
"null",
"==",
"activation",
")",
"{",
"return",
";",
"}",
"MavenProfileActivationDescriptor",
"p... | Adds activation information for the given profile.
@param mavenProfileDescriptor
The profile descriptor.
@param activation
The activation information.
@param store
The database. | [
"Adds",
"activation",
"information",
"for",
"the",
"given",
"profile",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L191-L224 |
144,290 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addConfiguration | private void addConfiguration(ConfigurableDescriptor configurableDescriptor, Xpp3Dom config, Store store) {
if (null == config) {
return;
}
MavenConfigurationDescriptor configDescriptor = store.create(MavenConfigurationDescriptor.class);
configurableDescriptor.setConfiguratio... | java | private void addConfiguration(ConfigurableDescriptor configurableDescriptor, Xpp3Dom config, Store store) {
if (null == config) {
return;
}
MavenConfigurationDescriptor configDescriptor = store.create(MavenConfigurationDescriptor.class);
configurableDescriptor.setConfiguratio... | [
"private",
"void",
"addConfiguration",
"(",
"ConfigurableDescriptor",
"configurableDescriptor",
",",
"Xpp3Dom",
"config",
",",
"Store",
"store",
")",
"{",
"if",
"(",
"null",
"==",
"config",
")",
"{",
"return",
";",
"}",
"MavenConfigurationDescriptor",
"configDescrip... | Adds configuration information.
@param configurableDescriptor
The descriptor for the configured element (Plugin,
PluginExecution).
@param config
The configuration information.
@param store
The database. | [
"Adds",
"configuration",
"information",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L237-L247 |
144,291 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.getDependencies | private <P extends MavenDependentDescriptor, D extends AbstractDependencyDescriptor> List<MavenDependencyDescriptor> getDependencies(P dependent,
List<Dependency> dependencies, Class<D> dependsOnType, ScannerContext scannerContext) {
Store store = scannerContext.getStore();
List<MavenDepende... | java | private <P extends MavenDependentDescriptor, D extends AbstractDependencyDescriptor> List<MavenDependencyDescriptor> getDependencies(P dependent,
List<Dependency> dependencies, Class<D> dependsOnType, ScannerContext scannerContext) {
Store store = scannerContext.getStore();
List<MavenDepende... | [
"private",
"<",
"P",
"extends",
"MavenDependentDescriptor",
",",
"D",
"extends",
"AbstractDependencyDescriptor",
">",
"List",
"<",
"MavenDependencyDescriptor",
">",
"getDependencies",
"(",
"P",
"dependent",
",",
"List",
"<",
"Dependency",
">",
"dependencies",
",",
"... | Adds information about artifact dependencies.
@param dependent
The dependent to add artifacts as dependencies
@param dependencies
The dependencies information.
@param dependsOnType
The type for creating the
{@link com.buschmais.jqassistant.plugin.common.api.model.DependsOnDescriptor}.
@param scannerContext
The scanner... | [
"Adds",
"information",
"about",
"artifact",
"dependencies",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L282-L306 |
144,292 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addExecutionGoals | private void addExecutionGoals(MavenPluginExecutionDescriptor executionDescriptor, PluginExecution pluginExecution, Store store) {
List<String> goals = pluginExecution.getGoals();
for (String goal : goals) {
MavenExecutionGoalDescriptor goalDescriptor = store.create(MavenExecutionGoalDescrip... | java | private void addExecutionGoals(MavenPluginExecutionDescriptor executionDescriptor, PluginExecution pluginExecution, Store store) {
List<String> goals = pluginExecution.getGoals();
for (String goal : goals) {
MavenExecutionGoalDescriptor goalDescriptor = store.create(MavenExecutionGoalDescrip... | [
"private",
"void",
"addExecutionGoals",
"(",
"MavenPluginExecutionDescriptor",
"executionDescriptor",
",",
"PluginExecution",
"pluginExecution",
",",
"Store",
"store",
")",
"{",
"List",
"<",
"String",
">",
"goals",
"=",
"pluginExecution",
".",
"getGoals",
"(",
")",
... | Adds information about execution goals.
@param executionDescriptor
The descriptor for the execution.
@param pluginExecution
The PluginExecution.
@param store
The database. | [
"Adds",
"information",
"about",
"execution",
"goals",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L318-L326 |
144,293 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addLicenses | private void addLicenses(MavenPomDescriptor pomDescriptor, Model model, Store store) {
List<License> licenses = model.getLicenses();
for (License license : licenses) {
MavenLicenseDescriptor licenseDescriptor = store.create(MavenLicenseDescriptor.class);
licenseDescriptor.setUrl(... | java | private void addLicenses(MavenPomDescriptor pomDescriptor, Model model, Store store) {
List<License> licenses = model.getLicenses();
for (License license : licenses) {
MavenLicenseDescriptor licenseDescriptor = store.create(MavenLicenseDescriptor.class);
licenseDescriptor.setUrl(... | [
"private",
"void",
"addLicenses",
"(",
"MavenPomDescriptor",
"pomDescriptor",
",",
"Model",
"model",
",",
"Store",
"store",
")",
"{",
"List",
"<",
"License",
">",
"licenses",
"=",
"model",
".",
"getLicenses",
"(",
")",
";",
"for",
"(",
"License",
"license",
... | Adds information about references licenses.
@param pomDescriptor
The descriptor for the current POM.
@param model
The Maven Model.
@param store
The database. | [
"Adds",
"information",
"about",
"references",
"licenses",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L338-L349 |
144,294 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addDevelopers | private void addDevelopers(MavenPomDescriptor pomDescriptor, Model model, Store store) {
List<Developer> developers = model.getDevelopers();
for (Developer developer : developers) {
MavenDeveloperDescriptor developerDescriptor = store.create(MavenDeveloperDescriptor.class);
devel... | java | private void addDevelopers(MavenPomDescriptor pomDescriptor, Model model, Store store) {
List<Developer> developers = model.getDevelopers();
for (Developer developer : developers) {
MavenDeveloperDescriptor developerDescriptor = store.create(MavenDeveloperDescriptor.class);
devel... | [
"private",
"void",
"addDevelopers",
"(",
"MavenPomDescriptor",
"pomDescriptor",
",",
"Model",
"model",
",",
"Store",
"store",
")",
"{",
"List",
"<",
"Developer",
">",
"developers",
"=",
"model",
".",
"getDevelopers",
"(",
")",
";",
"for",
"(",
"Developer",
"... | Adds information about developers.
@param pomDescriptor
The descriptor for the current POM.
@param model
The Maven Model.
@param store
The database. | [
"Adds",
"information",
"about",
"developers",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L361-L371 |
144,295 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addManagedDependencies | private List<MavenDependencyDescriptor> addManagedDependencies(MavenDependentDescriptor pomDescriptor, DependencyManagement dependencyManagement,
ScannerContext scannerContext, Class<? extends AbstractDependencyDescriptor> relationClass) {
if (dependencyManagement == null) {
return Colle... | java | private List<MavenDependencyDescriptor> addManagedDependencies(MavenDependentDescriptor pomDescriptor, DependencyManagement dependencyManagement,
ScannerContext scannerContext, Class<? extends AbstractDependencyDescriptor> relationClass) {
if (dependencyManagement == null) {
return Colle... | [
"private",
"List",
"<",
"MavenDependencyDescriptor",
">",
"addManagedDependencies",
"(",
"MavenDependentDescriptor",
"pomDescriptor",
",",
"DependencyManagement",
"dependencyManagement",
",",
"ScannerContext",
"scannerContext",
",",
"Class",
"<",
"?",
"extends",
"AbstractDepe... | Adds dependency management information.
@param pomDescriptor
The descriptor for the current POM.
@param dependencyManagement
The dependency management information.
@param scannerContext | [
"Adds",
"dependency",
"management",
"information",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L382-L389 |
144,296 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addManagedPlugins | private void addManagedPlugins(BaseProfileDescriptor pomDescriptor, BuildBase build, ScannerContext scannerContext) {
if (null == build) {
return;
}
PluginManagement pluginManagement = build.getPluginManagement();
if (null == pluginManagement) {
return;
}
... | java | private void addManagedPlugins(BaseProfileDescriptor pomDescriptor, BuildBase build, ScannerContext scannerContext) {
if (null == build) {
return;
}
PluginManagement pluginManagement = build.getPluginManagement();
if (null == pluginManagement) {
return;
}
... | [
"private",
"void",
"addManagedPlugins",
"(",
"BaseProfileDescriptor",
"pomDescriptor",
",",
"BuildBase",
"build",
",",
"ScannerContext",
"scannerContext",
")",
"{",
"if",
"(",
"null",
"==",
"build",
")",
"{",
"return",
";",
"}",
"PluginManagement",
"pluginManagement... | Adds information about managed plugins.
@param pomDescriptor
The descriptor for the current POM.
@param build
Information required to build the project.
@param scannerContext
The scanner context. | [
"Adds",
"information",
"about",
"managed",
"plugins",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L401-L411 |
144,297 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.createMavenPluginDescriptors | private List<MavenPluginDescriptor> createMavenPluginDescriptors(List<Plugin> plugins, ScannerContext context) {
Store store = context.getStore();
List<MavenPluginDescriptor> pluginDescriptors = new ArrayList<>();
for (Plugin plugin : plugins) {
MavenPluginDescriptor mavenPluginDescr... | java | private List<MavenPluginDescriptor> createMavenPluginDescriptors(List<Plugin> plugins, ScannerContext context) {
Store store = context.getStore();
List<MavenPluginDescriptor> pluginDescriptors = new ArrayList<>();
for (Plugin plugin : plugins) {
MavenPluginDescriptor mavenPluginDescr... | [
"private",
"List",
"<",
"MavenPluginDescriptor",
">",
"createMavenPluginDescriptors",
"(",
"List",
"<",
"Plugin",
">",
"plugins",
",",
"ScannerContext",
"context",
")",
"{",
"Store",
"store",
"=",
"context",
".",
"getStore",
"(",
")",
";",
"List",
"<",
"MavenP... | Create plugin descriptors for the given plugins.
@param plugins
The plugins.
@param context
The scanner context.
@return The plugin descriptors. | [
"Create",
"plugin",
"descriptors",
"for",
"the",
"given",
"plugins",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L422-L437 |
144,298 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addModules | private void addModules(BaseProfileDescriptor pomDescriptor, List<String> modules, Store store) {
for (String module : modules) {
MavenModuleDescriptor moduleDescriptor = store.create(MavenModuleDescriptor.class);
moduleDescriptor.setName(module);
pomDescriptor.getModules().a... | java | private void addModules(BaseProfileDescriptor pomDescriptor, List<String> modules, Store store) {
for (String module : modules) {
MavenModuleDescriptor moduleDescriptor = store.create(MavenModuleDescriptor.class);
moduleDescriptor.setName(module);
pomDescriptor.getModules().a... | [
"private",
"void",
"addModules",
"(",
"BaseProfileDescriptor",
"pomDescriptor",
",",
"List",
"<",
"String",
">",
"modules",
",",
"Store",
"store",
")",
"{",
"for",
"(",
"String",
"module",
":",
"modules",
")",
"{",
"MavenModuleDescriptor",
"moduleDescriptor",
"=... | Adds information about referenced modules.
@param pomDescriptor
The descriptor for the current POM.
@param modules
The modules.
@param store
The database. | [
"Adds",
"information",
"about",
"referenced",
"modules",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L462-L469 |
144,299 | buschmais/jqa-maven3-plugin | src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java | MavenModelScannerPlugin.addParent | private void addParent(MavenPomDescriptor pomDescriptor, Model model, ScannerContext context) {
Parent parent = model.getParent();
if (null != parent) {
ArtifactResolver resolver = getArtifactResolver(context);
MavenArtifactDescriptor parentDescriptor = resolver.resolve(new Paren... | java | private void addParent(MavenPomDescriptor pomDescriptor, Model model, ScannerContext context) {
Parent parent = model.getParent();
if (null != parent) {
ArtifactResolver resolver = getArtifactResolver(context);
MavenArtifactDescriptor parentDescriptor = resolver.resolve(new Paren... | [
"private",
"void",
"addParent",
"(",
"MavenPomDescriptor",
"pomDescriptor",
",",
"Model",
"model",
",",
"ScannerContext",
"context",
")",
"{",
"Parent",
"parent",
"=",
"model",
".",
"getParent",
"(",
")",
";",
"if",
"(",
"null",
"!=",
"parent",
")",
"{",
"... | Adds information about parent POM.
@param pomDescriptor
The descriptor for the current POM.
@param model
The Maven Model.
@param context
The scanner context. | [
"Adds",
"information",
"about",
"parent",
"POM",
"."
] | 6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f | https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L481-L488 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.