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
partition
stringclasses
1 value
nightcode/yaranga
core/src/org/nightcode/common/net/http/MacAuthUtils.java
MacAuthUtils.getNonce
public static String getNonce(long issueTime) { long currentTime = new Date().getTime(); return TimeUnit.MILLISECONDS.toSeconds(currentTime - issueTime) + ":" + Long.toString(System.nanoTime()); }
java
public static String getNonce(long issueTime) { long currentTime = new Date().getTime(); return TimeUnit.MILLISECONDS.toSeconds(currentTime - issueTime) + ":" + Long.toString(System.nanoTime()); }
[ "public", "static", "String", "getNonce", "(", "long", "issueTime", ")", "{", "long", "currentTime", "=", "new", "Date", "(", ")", ".", "getTime", "(", ")", ";", "return", "TimeUnit", ".", "MILLISECONDS", ".", "toSeconds", "(", "currentTime", "-", "issueTi...
Returns a nonce value. The nonce value MUST be unique across all requests with the same MAC key identifier. @see <a href="https://tools.ietf.org/html/draft-hammer-oauth-v2-mac-token-05#section-3.1">3.1. The "Authorization" Request Header</a> @param issueTime the number of seconds since the credentials were issued to ...
[ "Returns", "a", "nonce", "value", ".", "The", "nonce", "value", "MUST", "be", "unique", "across", "all", "requests", "with", "the", "same", "MAC", "key", "identifier", "." ]
f02cf8d8bcd365b6b1d55638938631a00e9ee808
https://github.com/nightcode/yaranga/blob/f02cf8d8bcd365b6b1d55638938631a00e9ee808/core/src/org/nightcode/common/net/http/MacAuthUtils.java#L40-L43
train
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java
SimpleMethodInvoker.invoke
public static Object invoke( final Object obj, final String methodName, final Object param ) throws UtilException { // // This time we have a parameter passed in. // // We can therefo...
java
public static Object invoke( final Object obj, final String methodName, final Object param ) throws UtilException { // // This time we have a parameter passed in. // // We can therefo...
[ "public", "static", "Object", "invoke", "(", "final", "Object", "obj", ",", "final", "String", "methodName", ",", "final", "Object", "param", ")", "throws", "UtilException", "{", "//", "// This time we have a parameter passed in.", "//", "// We can therefore work ...
Invoke an arbitrary one argument method on an arbitrary object and let the method work out the parameter's type. The user of this method had better be sure that the param isn't null. If there's a chance it is null, then the invoke method with a paramType argument must be used. @param obj to invoke method on @param me...
[ "Invoke", "an", "arbitrary", "one", "argument", "method", "on", "an", "arbitrary", "object", "and", "let", "the", "method", "work", "out", "the", "parameter", "s", "type", ".", "The", "user", "of", "this", "method", "had", "better", "be", "sure", "that", ...
0f9969bc0809e8a617501fa57c135e9b3984fae0
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java#L200-L216
train
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java
SimpleMethodInvoker.invoke
public static Object invoke( final Object obj, final String methodName, final Object param, final Class<?> parameterType ) throws UtilException { // // For this...
java
public static Object invoke( final Object obj, final String methodName, final Object param, final Class<?> parameterType ) throws UtilException { // // For this...
[ "public", "static", "Object", "invoke", "(", "final", "Object", "obj", ",", "final", "String", "methodName", ",", "final", "Object", "param", ",", "final", "Class", "<", "?", ">", "parameterType", ")", "throws", "UtilException", "{", "//", "// For this call...
Invoke an arbitrary one argument method on an arbitrary object, but also include the parameter's type. @param obj to invoke method on @param methodName to invoke @param param to use @param parameterType type of parameter @return method result @throws net.crowmagnumb.util.UtilException if problem
[ "Invoke", "an", "arbitrary", "one", "argument", "method", "on", "an", "arbitrary", "object", "but", "also", "include", "the", "parameter", "s", "type", "." ]
0f9969bc0809e8a617501fa57c135e9b3984fae0
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java#L230-L249
train
crowmagnumb/s6-util
src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java
SimpleMethodInvoker.invokeStaticMethod
public static Object invokeStaticMethod( final Class<?> objClass, final String methodName, final Object param ) throws UtilException { // // This time we have a parameter pas...
java
public static Object invokeStaticMethod( final Class<?> objClass, final String methodName, final Object param ) throws UtilException { // // This time we have a parameter pas...
[ "public", "static", "Object", "invokeStaticMethod", "(", "final", "Class", "<", "?", ">", "objClass", ",", "final", "String", "methodName", ",", "final", "Object", "param", ")", "throws", "UtilException", "{", "//", "// This time we have a parameter passed in.", ...
Invoke an arbitrary one argument method on an arbitrary class and let the method work out the parameter's type. The user of this method had better be sure that the param isn't null. If there's a chance it is null, then the invoke method with a paramType argument must be used. @param objClass to invoke method on @para...
[ "Invoke", "an", "arbitrary", "one", "argument", "method", "on", "an", "arbitrary", "class", "and", "let", "the", "method", "work", "out", "the", "parameter", "s", "type", ".", "The", "user", "of", "this", "method", "had", "better", "be", "sure", "that", ...
0f9969bc0809e8a617501fa57c135e9b3984fae0
https://github.com/crowmagnumb/s6-util/blob/0f9969bc0809e8a617501fa57c135e9b3984fae0/src/main/java/net/crowmagnumb/util/reflect/SimpleMethodInvoker.java#L325-L341
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/CommandLineRunner.java
CommandLineRunner.runCommandLine
public int runCommandLine() throws IOException, InterruptedException { logRunnerConfiguration(); ProcessBuilder processBuilder = new ProcessBuilder( getCommandLineArguments() ); processBuilder.directory( workingDirectory ); processBuilder.environment().putAll( environmentVar...
java
public int runCommandLine() throws IOException, InterruptedException { logRunnerConfiguration(); ProcessBuilder processBuilder = new ProcessBuilder( getCommandLineArguments() ); processBuilder.directory( workingDirectory ); processBuilder.environment().putAll( environmentVar...
[ "public", "int", "runCommandLine", "(", ")", "throws", "IOException", ",", "InterruptedException", "{", "logRunnerConfiguration", "(", ")", ";", "ProcessBuilder", "processBuilder", "=", "new", "ProcessBuilder", "(", "getCommandLineArguments", "(", ")", ")", ";", "pr...
Execute the configured program @return the exit code from the program @throws IOException if there is a problem with program execution @throws InterruptedException if we are interrupted waiting for the process to exit or streams to complete
[ "Execute", "the", "configured", "program" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/CommandLineRunner.java#L64-L99
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/parser/VCProjectParser.java
VCProjectParser.getDefaultOutputDirectory
private File getDefaultOutputDirectory() { //The default output directory is the configuration name String childOutputDirectory = getConfiguration(); //However, for platforms others than Win32, the default output directory becomes platform/configuration if ( ! getPlatform()....
java
private File getDefaultOutputDirectory() { //The default output directory is the configuration name String childOutputDirectory = getConfiguration(); //However, for platforms others than Win32, the default output directory becomes platform/configuration if ( ! getPlatform()....
[ "private", "File", "getDefaultOutputDirectory", "(", ")", "{", "//The default output directory is the configuration name", "String", "childOutputDirectory", "=", "getConfiguration", "(", ")", ";", "//However, for platforms others than Win32, the default output directory becomes platform/...
Retrieve the default output directory for the Visual C++ project. @return the default output directory for the Visual C++ project
[ "Retrieve", "the", "default", "output", "directory", "for", "the", "Visual", "C", "++", "project", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/parser/VCProjectParser.java#L391-L404
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/parser/VCProjectParser.java
VCProjectParser.getBaseDirectory
private File getBaseDirectory() { File referenceFile = ( solutionFile != null ? solutionFile : getInputFile() ); return referenceFile.getParentFile().getAbsoluteFile(); }
java
private File getBaseDirectory() { File referenceFile = ( solutionFile != null ? solutionFile : getInputFile() ); return referenceFile.getParentFile().getAbsoluteFile(); }
[ "private", "File", "getBaseDirectory", "(", ")", "{", "File", "referenceFile", "=", "(", "solutionFile", "!=", "null", "?", "solutionFile", ":", "getInputFile", "(", ")", ")", ";", "return", "referenceFile", ".", "getParentFile", "(", ")", ".", "getAbsoluteFil...
Retrieve the base directory for the Visual C++ project. If this project is part of a Visual Studio solution, the base directory is the solution directory; for standalone projects, the base directory is the project directory. @return the base directory for the Visual C++ project
[ "Retrieve", "the", "base", "directory", "for", "the", "Visual", "C", "++", "project", ".", "If", "this", "project", "is", "part", "of", "a", "Visual", "Studio", "solution", "the", "base", "directory", "is", "the", "solution", "directory", ";", "for", "stan...
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/parser/VCProjectParser.java#L411-L415
train
GeoLatte/geolatte-common-hibernate
src/main/java/org/geolatte/common/cql/hibernate/PropertyDoesNotExistCriterion.java
PropertyDoesNotExistCriterion.toSqlString
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { String[] columns; try { columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); } catch (QueryException e) { columns = new Str...
java
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { String[] columns; try { columns = criteriaQuery.getColumnsUsingProjection(criteria, propertyName); } catch (QueryException e) { columns = new Str...
[ "public", "String", "toSqlString", "(", "Criteria", "criteria", ",", "CriteriaQuery", "criteriaQuery", ")", "throws", "HibernateException", "{", "String", "[", "]", "columns", ";", "try", "{", "columns", "=", "criteriaQuery", ".", "getColumnsUsingProjection", "(", ...
Render the SQL fragment that corresponds to this criterion. @param criteria The local criteria @param criteriaQuery The overal criteria query @return The generated SQL fragment @throws org.hibernate.HibernateException Problem during rendering.
[ "Render", "the", "SQL", "fragment", "that", "corresponds", "to", "this", "criterion", "." ]
2e871c70e506df2485d91152fbd0955c94de1d39
https://github.com/GeoLatte/geolatte-common-hibernate/blob/2e871c70e506df2485d91152fbd0955c94de1d39/src/main/java/org/geolatte/common/cql/hibernate/PropertyDoesNotExistCriterion.java#L61-L75
train
GeoLatte/geolatte-common-hibernate
src/main/java/org/geolatte/common/automapper/DatabaseMapping.java
DatabaseMapping.getIdProperty
public String getIdProperty(TableRef tableRef) { TableMapping tableMapping = mappedClasses.get(tableRef); if (tableMapping == null) { return null; } ColumnMetaData identifierColumn = tableMapping.getIdentifierColumn(); return tableMapping.getColumnMapping(identifierCo...
java
public String getIdProperty(TableRef tableRef) { TableMapping tableMapping = mappedClasses.get(tableRef); if (tableMapping == null) { return null; } ColumnMetaData identifierColumn = tableMapping.getIdentifierColumn(); return tableMapping.getColumnMapping(identifierCo...
[ "public", "String", "getIdProperty", "(", "TableRef", "tableRef", ")", "{", "TableMapping", "tableMapping", "=", "mappedClasses", ".", "get", "(", "tableRef", ")", ";", "if", "(", "tableMapping", "==", "null", ")", "{", "return", "null", ";", "}", "ColumnMet...
Returns the name of the Identifier property @param tableRef the <code>TableRef</code> for the table @return the name of the identifier property, or null if the table specified by the <code>tableRef</code> parameter is not mapped @throws IllegalStateException if the map() method has not been invoked first.
[ "Returns", "the", "name", "of", "the", "Identifier", "property" ]
2e871c70e506df2485d91152fbd0955c94de1d39
https://github.com/GeoLatte/geolatte-common-hibernate/blob/2e871c70e506df2485d91152fbd0955c94de1d39/src/main/java/org/geolatte/common/automapper/DatabaseMapping.java#L134-L141
train
GeoLatte/geolatte-common-hibernate
src/main/java/org/geolatte/common/automapper/DatabaseMapping.java
DatabaseMapping.getGeometryProperty
public String getGeometryProperty(TableRef tableRef) { TableMapping tableMapping = mappedClasses.get(tableRef); if (tableMapping == null) { return null; } for (ColumnMetaData columnMetaData : tableMapping.getMappedColumns()) { if (columnMetaData.isGeometry()) { ...
java
public String getGeometryProperty(TableRef tableRef) { TableMapping tableMapping = mappedClasses.get(tableRef); if (tableMapping == null) { return null; } for (ColumnMetaData columnMetaData : tableMapping.getMappedColumns()) { if (columnMetaData.isGeometry()) { ...
[ "public", "String", "getGeometryProperty", "(", "TableRef", "tableRef", ")", "{", "TableMapping", "tableMapping", "=", "mappedClasses", ".", "get", "(", "tableRef", ")", ";", "if", "(", "tableMapping", "==", "null", ")", "{", "return", "null", ";", "}", "for...
Returns the name of the primary geometry property. <p>A geometry property is primary when it represents the location and shape of the object.</p> @param tableRef the <code>TableRef</code> for the table @return the name of the primary geometry property, or null if the table specified by the <code>tableRef</code> param...
[ "Returns", "the", "name", "of", "the", "primary", "geometry", "property", "." ]
2e871c70e506df2485d91152fbd0955c94de1d39
https://github.com/GeoLatte/geolatte-common-hibernate/blob/2e871c70e506df2485d91152fbd0955c94de1d39/src/main/java/org/geolatte/common/automapper/DatabaseMapping.java#L153-L165
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/parser/Filter.java
Filter.run
public void run(String cmd, CommandFilter f) { CommandWords commandWord = null; if ( cmd.contains(" ") ) { try { commandWord = CommandWords.valueOf(cmd.substring(1, cmd.indexOf(" "))); } catch (IllegalArgumentException e) { commandWord = CommandW...
java
public void run(String cmd, CommandFilter f) { CommandWords commandWord = null; if ( cmd.contains(" ") ) { try { commandWord = CommandWords.valueOf(cmd.substring(1, cmd.indexOf(" "))); } catch (IllegalArgumentException e) { commandWord = CommandW...
[ "public", "void", "run", "(", "String", "cmd", ",", "CommandFilter", "f", ")", "{", "CommandWords", "commandWord", "=", "null", ";", "if", "(", "cmd", ".", "contains", "(", "\" \"", ")", ")", "{", "try", "{", "commandWord", "=", "CommandWords", ".", "v...
Works out what type of command has been put into the method. @param cmd The string of text from SServer. @param f An instance of CommandFilter.
[ "Works", "out", "what", "type", "of", "command", "has", "been", "put", "into", "the", "method", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/parser/Filter.java#L61-L116
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/VersionInfoMojo.java
VersionInfoMojo.addProjectProperties
private void addProjectProperties() throws MojoExecutionException { Properties projectProps = mavenProject.getProperties(); projectProps.setProperty( PROPERTY_NAME_COMPANY, versionInfo.getCompanyName() ); projectProps.setProperty( PROPERTY_NAME_COPYRIGHT, versionInfo.getCopyright() ...
java
private void addProjectProperties() throws MojoExecutionException { Properties projectProps = mavenProject.getProperties(); projectProps.setProperty( PROPERTY_NAME_COMPANY, versionInfo.getCompanyName() ); projectProps.setProperty( PROPERTY_NAME_COPYRIGHT, versionInfo.getCopyright() ...
[ "private", "void", "addProjectProperties", "(", ")", "throws", "MojoExecutionException", "{", "Properties", "projectProps", "=", "mavenProject", ".", "getProperties", "(", ")", ";", "projectProps", ".", "setProperty", "(", "PROPERTY_NAME_COMPANY", ",", "versionInfo", ...
Add properties to the project that are replaced.
[ "Add", "properties", "to", "the", "project", "that", "are", "replaced", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/VersionInfoMojo.java#L126-L160
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/VersionInfoMojo.java
VersionInfoMojo.writeVersionInfoTemplateToTempFile
private File writeVersionInfoTemplateToTempFile() throws MojoExecutionException { try { final File versionInfoSrc = File.createTempFile( "msbuild-maven-plugin_" + MOJO_NAME, null ); InputStream is = getClass().getResourceAsStream( DEFAULT_VERSION_INFO_TEMPLATE ); ...
java
private File writeVersionInfoTemplateToTempFile() throws MojoExecutionException { try { final File versionInfoSrc = File.createTempFile( "msbuild-maven-plugin_" + MOJO_NAME, null ); InputStream is = getClass().getResourceAsStream( DEFAULT_VERSION_INFO_TEMPLATE ); ...
[ "private", "File", "writeVersionInfoTemplateToTempFile", "(", ")", "throws", "MojoExecutionException", "{", "try", "{", "final", "File", "versionInfoSrc", "=", "File", ".", "createTempFile", "(", "\"msbuild-maven-plugin_\"", "+", "MOJO_NAME", ",", "null", ")", ";", ...
Write the default .rc template file to a temporary file and return it @return a File pointing to the temporary file @throws MojoExecutionException if there is an IOException
[ "Write", "the", "default", ".", "rc", "template", "file", "to", "a", "temporary", "file", "and", "return", "it" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/VersionInfoMojo.java#L167-L191
train
99soft/rocoto
src/main/java/org/nnsoft/guice/rocoto/variables/VariablesMap.java
VariablesMap.applyParser
private void applyParser() { this.snapshot.clear(); Map<String, String> originals = new HashMap<String, String>(this.resolvers.size()); for ( Entry<String, VariableValue> resolver : this.resolvers.entrySet() ) { originals.put(resolver.getKey(), resolver.getValue().getOriginal()); } putAll(originals); }
java
private void applyParser() { this.snapshot.clear(); Map<String, String> originals = new HashMap<String, String>(this.resolvers.size()); for ( Entry<String, VariableValue> resolver : this.resolvers.entrySet() ) { originals.put(resolver.getKey(), resolver.getValue().getOriginal()); } putAll(originals); }
[ "private", "void", "applyParser", "(", ")", "{", "this", ".", "snapshot", ".", "clear", "(", ")", ";", "Map", "<", "String", ",", "String", ">", "originals", "=", "new", "HashMap", "<", "String", ",", "String", ">", "(", "this", ".", "resolvers", "."...
Re apply parser on all entries in map
[ "Re", "apply", "parser", "on", "all", "entries", "in", "map" ]
9f54ed913cae54d613b3bc7a352f579d0c6b816f
https://github.com/99soft/rocoto/blob/9f54ed913cae54d613b3bc7a352f579d0c6b816f/src/main/java/org/nnsoft/guice/rocoto/variables/VariablesMap.java#L211-L220
train
99soft/rocoto
src/main/java/org/nnsoft/guice/rocoto/configuration/ConfigurationModule.java
ConfigurationModule.bindProperty
protected PropertyValueBindingBuilder bindProperty( final String name ) { checkNotNull( name, "Property name cannot be null." ); return new PropertyValueBindingBuilder() { public void toValue( final String value ) { checkNotNull( value, "Null value n...
java
protected PropertyValueBindingBuilder bindProperty( final String name ) { checkNotNull( name, "Property name cannot be null." ); return new PropertyValueBindingBuilder() { public void toValue( final String value ) { checkNotNull( value, "Null value n...
[ "protected", "PropertyValueBindingBuilder", "bindProperty", "(", "final", "String", "name", ")", "{", "checkNotNull", "(", "name", ",", "\"Property name cannot be null.\"", ")", ";", "return", "new", "PropertyValueBindingBuilder", "(", ")", "{", "public", "void", "toV...
Binds to a property with the given name. @param name The property name @return The property value binder
[ "Binds", "to", "a", "property", "with", "the", "given", "name", "." ]
9f54ed913cae54d613b3bc7a352f579d0c6b816f
https://github.com/99soft/rocoto/blob/9f54ed913cae54d613b3bc7a352f579d0c6b816f/src/main/java/org/nnsoft/guice/rocoto/configuration/ConfigurationModule.java#L102-L117
train
99soft/rocoto
src/main/java/org/nnsoft/guice/rocoto/variables/Tree.java
Tree.addLeaf
public Tree<T> addLeaf( T child ) { Tree<T> leaf = new Tree<T>( child ); leaf.parent = this; children.add( leaf ); return leaf; }
java
public Tree<T> addLeaf( T child ) { Tree<T> leaf = new Tree<T>( child ); leaf.parent = this; children.add( leaf ); return leaf; }
[ "public", "Tree", "<", "T", ">", "addLeaf", "(", "T", "child", ")", "{", "Tree", "<", "T", ">", "leaf", "=", "new", "Tree", "<", "T", ">", "(", "child", ")", ";", "leaf", ".", "parent", "=", "this", ";", "children", ".", "add", "(", "leaf", "...
Add a new leaf to this tree @param child @return Tree node of the newly added leaf
[ "Add", "a", "new", "leaf", "to", "this", "tree" ]
9f54ed913cae54d613b3bc7a352f579d0c6b816f
https://github.com/99soft/rocoto/blob/9f54ed913cae54d613b3bc7a352f579d0c6b816f/src/main/java/org/nnsoft/guice/rocoto/variables/Tree.java#L71-L77
train
99soft/rocoto
src/main/java/org/nnsoft/guice/rocoto/variables/Tree.java
Tree.removeSubtree
public void removeSubtree( Tree<T> subtree ) { if ( children.remove( subtree ) ) { subtree.parent = null; } }
java
public void removeSubtree( Tree<T> subtree ) { if ( children.remove( subtree ) ) { subtree.parent = null; } }
[ "public", "void", "removeSubtree", "(", "Tree", "<", "T", ">", "subtree", ")", "{", "if", "(", "children", ".", "remove", "(", "subtree", ")", ")", "{", "subtree", ".", "parent", "=", "null", ";", "}", "}" ]
Remove given subtree @param subtree
[ "Remove", "given", "subtree" ]
9f54ed913cae54d613b3bc7a352f579d0c6b816f
https://github.com/99soft/rocoto/blob/9f54ed913cae54d613b3bc7a352f579d0c6b816f/src/main/java/org/nnsoft/guice/rocoto/variables/Tree.java#L103-L109
train
99soft/rocoto
src/main/java/org/nnsoft/guice/rocoto/variables/Tree.java
Tree.addSubtree
public Tree<T> addSubtree( Tree<T> subtree ) { Tree<T> copy = addLeaf( subtree.data ); copy.children = new ArrayList<Tree<T>>( subtree.children ); return copy; }
java
public Tree<T> addSubtree( Tree<T> subtree ) { Tree<T> copy = addLeaf( subtree.data ); copy.children = new ArrayList<Tree<T>>( subtree.children ); return copy; }
[ "public", "Tree", "<", "T", ">", "addSubtree", "(", "Tree", "<", "T", ">", "subtree", ")", "{", "Tree", "<", "T", ">", "copy", "=", "addLeaf", "(", "subtree", ".", "data", ")", ";", "copy", ".", "children", "=", "new", "ArrayList", "<", "Tree", "...
Add a subtree, provided tree is not modified. @param subtree @return subtree copy added
[ "Add", "a", "subtree", "provided", "tree", "is", "not", "modified", "." ]
9f54ed913cae54d613b3bc7a352f579d0c6b816f
https://github.com/99soft/rocoto/blob/9f54ed913cae54d613b3bc7a352f579d0c6b816f/src/main/java/org/nnsoft/guice/rocoto/variables/Tree.java#L149-L154
train
camunda/camunda-bpm-jbehave
camunda-bpm-jbehave/src/main/java/org/camunda/bpm/data/Guards.java
Guards.checkIsSetLocal
public static void checkIsSetLocal(final DelegateExecution execution, final String variableName) { Preconditions.checkArgument(variableName != null, VARIABLE_NAME_MUST_BE_NOT_NULL); final Object variableLocal = execution.getVariableLocal(variableName); Preconditions.checkState(variableLocal != null, ...
java
public static void checkIsSetLocal(final DelegateExecution execution, final String variableName) { Preconditions.checkArgument(variableName != null, VARIABLE_NAME_MUST_BE_NOT_NULL); final Object variableLocal = execution.getVariableLocal(variableName); Preconditions.checkState(variableLocal != null, ...
[ "public", "static", "void", "checkIsSetLocal", "(", "final", "DelegateExecution", "execution", ",", "final", "String", "variableName", ")", "{", "Preconditions", ".", "checkArgument", "(", "variableName", "!=", "null", ",", "VARIABLE_NAME_MUST_BE_NOT_NULL", ")", ";", ...
Checks, if a local variable with specified name is set. @param execution process execution. @param variableName name of the variable to check.
[ "Checks", "if", "a", "local", "variable", "with", "specified", "name", "is", "set", "." ]
ffad22471418e2c7f161f8976ca8a042114138ab
https://github.com/camunda/camunda-bpm-jbehave/blob/ffad22471418e2c7f161f8976ca8a042114138ab/camunda-bpm-jbehave/src/main/java/org/camunda/bpm/data/Guards.java#L62-L68
train
camunda/camunda-bpm-jbehave
camunda-bpm-jbehave/src/main/java/org/camunda/bpm/data/Guards.java
Guards.checkIsSetGlobal
public static void checkIsSetGlobal(final DelegateExecution execution, final String variableName) { Preconditions.checkArgument(variableName != null, VARIABLE_SKIP_GUARDS); final Object variable = execution.getVariable(variableName); Preconditions.checkState(variable != null, String.format("Conditi...
java
public static void checkIsSetGlobal(final DelegateExecution execution, final String variableName) { Preconditions.checkArgument(variableName != null, VARIABLE_SKIP_GUARDS); final Object variable = execution.getVariable(variableName); Preconditions.checkState(variable != null, String.format("Conditi...
[ "public", "static", "void", "checkIsSetGlobal", "(", "final", "DelegateExecution", "execution", ",", "final", "String", "variableName", ")", "{", "Preconditions", ".", "checkArgument", "(", "variableName", "!=", "null", ",", "VARIABLE_SKIP_GUARDS", ")", ";", "final"...
Checks, if a global variable with specified name is set. @param execution process execution. @param variableName name of the variable to check.
[ "Checks", "if", "a", "global", "variable", "with", "specified", "name", "is", "set", "." ]
ffad22471418e2c7f161f8976ca8a042114138ab
https://github.com/camunda/camunda-bpm-jbehave/blob/ffad22471418e2c7f161f8976ca8a042114138ab/camunda-bpm-jbehave/src/main/java/org/camunda/bpm/data/Guards.java#L96-L102
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/CppCheckMojo.java
CppCheckMojo.getRelativeIncludeDirectories
private List<File> getRelativeIncludeDirectories( VCProject vcProject ) throws MojoExecutionException { final List<File> relativeIncludeDirectories = new ArrayList<File>(); for ( File includeDir : vcProject.getIncludeDirectories() ) { if ( includeDir.isAbsolute() ) ...
java
private List<File> getRelativeIncludeDirectories( VCProject vcProject ) throws MojoExecutionException { final List<File> relativeIncludeDirectories = new ArrayList<File>(); for ( File includeDir : vcProject.getIncludeDirectories() ) { if ( includeDir.isAbsolute() ) ...
[ "private", "List", "<", "File", ">", "getRelativeIncludeDirectories", "(", "VCProject", "vcProject", ")", "throws", "MojoExecutionException", "{", "final", "List", "<", "File", ">", "relativeIncludeDirectories", "=", "new", "ArrayList", "<", "File", ">", "(", ")",...
Adjust the list of include paths to be relative to the projectFile directory
[ "Adjust", "the", "list", "of", "include", "paths", "to", "be", "relative", "to", "the", "projectFile", "directory" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/CppCheckMojo.java#L180-L207
train
camunda/camunda-bpm-jbehave
camunda-bpm-jbehave/src/main/java/org/camunda/bpm/bdd/steps/CamundaSteps.java
CamundaSteps.cleanUp
@AfterStory(uponGivenStory = false) public void cleanUp() { LOG.debug("Cleaning up after story run."); Mocks.reset(); support.undeploy(); support.resetClock(); ProcessEngineAssertions.reset(); }
java
@AfterStory(uponGivenStory = false) public void cleanUp() { LOG.debug("Cleaning up after story run."); Mocks.reset(); support.undeploy(); support.resetClock(); ProcessEngineAssertions.reset(); }
[ "@", "AfterStory", "(", "uponGivenStory", "=", "false", ")", "public", "void", "cleanUp", "(", ")", "{", "LOG", ".", "debug", "(", "\"Cleaning up after story run.\"", ")", ";", "Mocks", ".", "reset", "(", ")", ";", "support", ".", "undeploy", "(", ")", "...
Clean up all resources.
[ "Clean", "up", "all", "resources", "." ]
ffad22471418e2c7f161f8976ca8a042114138ab
https://github.com/camunda/camunda-bpm-jbehave/blob/ffad22471418e2c7f161f8976ca8a042114138ab/camunda-bpm-jbehave/src/main/java/org/camunda/bpm/bdd/steps/CamundaSteps.java#L39-L46
train
camunda/camunda-bpm-jbehave
camunda-bpm-jbehave/src/main/java/org/camunda/bpm/bdd/steps/CamundaSteps.java
CamundaSteps.stepIsReached
@Then("the step $activityId is reached") @When("the step $activityId is reached") public void stepIsReached(final String activityId) { assertThat(support.getProcessInstance()).isWaitingAt(activityId); LOG.debug("Step {} reached.", activityId); }
java
@Then("the step $activityId is reached") @When("the step $activityId is reached") public void stepIsReached(final String activityId) { assertThat(support.getProcessInstance()).isWaitingAt(activityId); LOG.debug("Step {} reached.", activityId); }
[ "@", "Then", "(", "\"the step $activityId is reached\"", ")", "@", "When", "(", "\"the step $activityId is reached\"", ")", "public", "void", "stepIsReached", "(", "final", "String", "activityId", ")", "{", "assertThat", "(", "support", ".", "getProcessInstance", "(",...
Process step reached. @param activityId name of the step to reach.
[ "Process", "step", "reached", "." ]
ffad22471418e2c7f161f8976ca8a042114138ab
https://github.com/camunda/camunda-bpm-jbehave/blob/ffad22471418e2c7f161f8976ca8a042114138ab/camunda-bpm-jbehave/src/main/java/org/camunda/bpm/bdd/steps/CamundaSteps.java#L79-L84
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MSBuildPackaging.java
MSBuildPackaging.isValid
public static boolean isValid( String packaging ) { return MSBUILD_SOLUTION.equals( packaging ) || EXE.equals( packaging ) || DLL.equals( packaging ) || LIB.equals( packaging ); }
java
public static boolean isValid( String packaging ) { return MSBUILD_SOLUTION.equals( packaging ) || EXE.equals( packaging ) || DLL.equals( packaging ) || LIB.equals( packaging ); }
[ "public", "static", "boolean", "isValid", "(", "String", "packaging", ")", "{", "return", "MSBUILD_SOLUTION", ".", "equals", "(", "packaging", ")", "||", "EXE", ".", "equals", "(", "packaging", ")", "||", "DLL", ".", "equals", "(", "packaging", ")", "||", ...
Test whether a packaging is a valid MSBuild packaging @param packaging string to test @return true if the packaging is valid for MSBuild
[ "Test", "whether", "a", "packaging", "is", "a", "valid", "MSBuild", "packaging" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MSBuildPackaging.java#L52-L58
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MSBuildPackaging.java
MSBuildPackaging.validPackaging
public static final String validPackaging() { return new StringBuilder() .append( MSBUILD_SOLUTION ).append( ", " ) .append( EXE ).append( ", " ) .append( DLL ).append( ", " ) .append( LIB ).toString(); }
java
public static final String validPackaging() { return new StringBuilder() .append( MSBUILD_SOLUTION ).append( ", " ) .append( EXE ).append( ", " ) .append( DLL ).append( ", " ) .append( LIB ).toString(); }
[ "public", "static", "final", "String", "validPackaging", "(", ")", "{", "return", "new", "StringBuilder", "(", ")", ".", "append", "(", "MSBUILD_SOLUTION", ")", ".", "append", "(", "\", \"", ")", ".", "append", "(", "EXE", ")", ".", "append", "(", "\", \...
Return a string listing the valid packaging types @return a common separated list of packaging types
[ "Return", "a", "string", "listing", "the", "valid", "packaging", "types" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MSBuildPackaging.java#L74-L81
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/ByteBuffer.java
ByteBuffer.setString
public void setString(String str) throws IOException { Reader r = new StringReader(str); int c; reset(); while (((c = r.read()) != 0) && (c != -1)) { write(c); } }
java
public void setString(String str) throws IOException { Reader r = new StringReader(str); int c; reset(); while (((c = r.read()) != 0) && (c != -1)) { write(c); } }
[ "public", "void", "setString", "(", "String", "str", ")", "throws", "IOException", "{", "Reader", "r", "=", "new", "StringReader", "(", "str", ")", ";", "int", "c", ";", "reset", "(", ")", ";", "while", "(", "(", "(", "c", "=", "r", ".", "read", ...
Sets the buffer contents. @param str The string to set. @throws java.io.IOException if any.
[ "Sets", "the", "buffer", "contents", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/ByteBuffer.java#L70-L77
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/ByteBuffer.java
ByteBuffer.getString
public String getString() throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(buf); int c; StringWriter w = new StringWriter(); while (((c = in.read()) != 0) && (c != -1)) { w.write((char) c); } return w.getBuffer()...
java
public String getString() throws IOException { ByteArrayInputStream in = new ByteArrayInputStream(buf); int c; StringWriter w = new StringWriter(); while (((c = in.read()) != 0) && (c != -1)) { w.write((char) c); } return w.getBuffer()...
[ "public", "String", "getString", "(", ")", "throws", "IOException", "{", "ByteArrayInputStream", "in", "=", "new", "ByteArrayInputStream", "(", "buf", ")", ";", "int", "c", ";", "StringWriter", "w", "=", "new", "StringWriter", "(", ")", ";", "while", "(", ...
Gets the buffer contents. @return The string in the buffer. @throws java.io.IOException if any.
[ "Gets", "the", "buffer", "contents", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/ByteBuffer.java#L85-L93
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/configuration/BuildPlatform.java
BuildPlatform.identifyPrimaryConfiguration
public void identifyPrimaryConfiguration() throws MojoExecutionException { Set<String> configurationNames = new HashSet<String>(); for ( BuildConfiguration configuration : configurations ) { if ( configurationNames.contains( configuration.getName() ) ) { ...
java
public void identifyPrimaryConfiguration() throws MojoExecutionException { Set<String> configurationNames = new HashSet<String>(); for ( BuildConfiguration configuration : configurations ) { if ( configurationNames.contains( configuration.getName() ) ) { ...
[ "public", "void", "identifyPrimaryConfiguration", "(", ")", "throws", "MojoExecutionException", "{", "Set", "<", "String", ">", "configurationNames", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "for", "(", "BuildConfiguration", "configuration", ":", ...
Check the configurations and mark one as primary. @throws MojoExecutionException if duplicate configuration names are found
[ "Check", "the", "configurations", "and", "mark", "one", "as", "primary", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/configuration/BuildPlatform.java#L117-L142
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/configuration/VersionInfoConfiguration.java
VersionInfoConfiguration.getCopyright
public final String getCopyright() { if ( copyright == null ) { StringBuilder sb = new StringBuilder(); sb.append( COPYRIGHT_PREAMBLE ) .append( " " ) .append( Calendar.getInstance().get( Calendar.YEAR ) ) .append( " " ) ...
java
public final String getCopyright() { if ( copyright == null ) { StringBuilder sb = new StringBuilder(); sb.append( COPYRIGHT_PREAMBLE ) .append( " " ) .append( Calendar.getInstance().get( Calendar.YEAR ) ) .append( " " ) ...
[ "public", "final", "String", "getCopyright", "(", ")", "{", "if", "(", "copyright", "==", "null", ")", "{", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "sb", ".", "append", "(", "COPYRIGHT_PREAMBLE", ")", ".", "append", "(", "\" \"...
Get the configured copyright string @return copyright string or default if not configured
[ "Get", "the", "configured", "copyright", "string" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/configuration/VersionInfoConfiguration.java#L50-L63
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/AbstractTeam.java
AbstractTeam.createNewPlayers
public void createNewPlayers() { for (int i = 0; i < size(); i++) { players[i] = new SServerPlayer(teamName, getNewControllerPlayer(i), playerPort, hostname); } }
java
public void createNewPlayers() { for (int i = 0; i < size(); i++) { players[i] = new SServerPlayer(teamName, getNewControllerPlayer(i), playerPort, hostname); } }
[ "public", "void", "createNewPlayers", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", "(", ")", ";", "i", "++", ")", "{", "players", "[", "i", "]", "=", "new", "SServerPlayer", "(", "teamName", ",", "getNewControllerPlayer", ...
Create 11 SServerPlayer's.
[ "Create", "11", "SServerPlayer", "s", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/AbstractTeam.java#L140-L144
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/AbstractTeam.java
AbstractTeam.connectAll
public void connectAll() { for (int i = 0; i < size(); i++) { if (i == 0) { players[i].connect(true); } else if (i >= 1) { try { players[i].connect(false); } catch (Exception ex) { players[i].handleEr...
java
public void connectAll() { for (int i = 0; i < size(); i++) { if (i == 0) { players[i].connect(true); } else if (i >= 1) { try { players[i].connect(false); } catch (Exception ex) { players[i].handleEr...
[ "public", "void", "connectAll", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", "(", ")", ";", "i", "++", ")", "{", "if", "(", "i", "==", "0", ")", "{", "players", "[", "i", "]", ".", "connect", "(", "true", ")", "...
Connect all the players to the server. ActionsPlayer with index 0 is always the goalie. Connects a coach if there is one.
[ "Connect", "all", "the", "players", "to", "the", "server", ".", "ActionsPlayer", "with", "index", "0", "is", "always", "the", "goalie", ".", "Connects", "a", "coach", "if", "there", "is", "one", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/AbstractTeam.java#L187-L208
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/AbstractTeam.java
AbstractTeam.connect
public void connect(int index) { try { if (index == 0) { players[index].connect(true); } else { players[index].connect(false); } } catch (Exception ex) { players[index].handleError(ex.getMessage()); } pause(5...
java
public void connect(int index) { try { if (index == 0) { players[index].connect(true); } else { players[index].connect(false); } } catch (Exception ex) { players[index].handleError(ex.getMessage()); } pause(5...
[ "public", "void", "connect", "(", "int", "index", ")", "{", "try", "{", "if", "(", "index", "==", "0", ")", "{", "players", "[", "index", "]", ".", "connect", "(", "true", ")", ";", "}", "else", "{", "players", "[", "index", "]", ".", "connect", ...
Connect the selected player to the server. The player with index 0 is always the goalie. @param index The number of the player to connect.
[ "Connect", "the", "selected", "player", "to", "the", "server", ".", "The", "player", "with", "index", "0", "is", "always", "the", "goalie", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/AbstractTeam.java#L216-L227
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.findProperty
private String findProperty( String prop ) { String result = System.getProperty( prop ); if ( result == null ) { result = mavenProject.getProperties().getProperty( prop ); } return result; }
java
private String findProperty( String prop ) { String result = System.getProperty( prop ); if ( result == null ) { result = mavenProject.getProperties().getProperty( prop ); } return result; }
[ "private", "String", "findProperty", "(", "String", "prop", ")", "{", "String", "result", "=", "System", ".", "getProperty", "(", "prop", ")", ";", "if", "(", "result", "==", "null", ")", "{", "result", "=", "mavenProject", ".", "getProperties", "(", ")"...
Look for a value for the specified property in System properties then project properties. @param prop the property name @return the value or null if not found
[ "Look", "for", "a", "value", "for", "the", "specified", "property", "in", "System", "properties", "then", "project", "properties", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L153-L161
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.validateProjectFile
protected void validateProjectFile() throws MojoExecutionException { if ( projectFile != null && projectFile.exists() && projectFile.isFile() ) { getLog().debug( "Project file validated at " + projectFile ); boolean solutionFile =...
java
protected void validateProjectFile() throws MojoExecutionException { if ( projectFile != null && projectFile.exists() && projectFile.isFile() ) { getLog().debug( "Project file validated at " + projectFile ); boolean solutionFile =...
[ "protected", "void", "validateProjectFile", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "projectFile", "!=", "null", "&&", "projectFile", ".", "exists", "(", ")", "&&", "projectFile", ".", "isFile", "(", ")", ")", "{", "getLog", "(", ")", ...
Check that we have a valid project or solution file. @throws MojoExecutionException if the specified projectFile is invalid.
[ "Check", "that", "we", "have", "a", "valid", "project", "or", "solution", "file", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L175-L204
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.getProjectSources
protected List<File> getProjectSources( VCProject vcProject, boolean includeHeaders, List<String> excludes ) throws MojoExecutionException { final DirectoryScanner directoryScanner = new DirectoryScanner(); List<String> sourceFilePatterns = new ArrayList<String>(); String relProj...
java
protected List<File> getProjectSources( VCProject vcProject, boolean includeHeaders, List<String> excludes ) throws MojoExecutionException { final DirectoryScanner directoryScanner = new DirectoryScanner(); List<String> sourceFilePatterns = new ArrayList<String>(); String relProj...
[ "protected", "List", "<", "File", ">", "getProjectSources", "(", "VCProject", "vcProject", ",", "boolean", "includeHeaders", ",", "List", "<", "String", ">", "excludes", ")", "throws", "MojoExecutionException", "{", "final", "DirectoryScanner", "directoryScanner", "...
Generate a list of source files in the project directory and sub-directories @param vcProject the parsed project @param includeHeaders set to true to include header files (*.h and *.hpp) @param excludes a List of pathname patterns to exclude from results @return a list of abstract paths representing each source file
[ "Generate", "a", "list", "of", "source", "files", "in", "the", "project", "directory", "and", "sub", "-", "directories" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L239-L269
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.getParsedProjects
protected List<VCProject> getParsedProjects( BuildPlatform platform, BuildConfiguration configuration ) throws MojoExecutionException { Map<String, String> envVariables = new HashMap<String, String>(); if ( isCxxTestEnabled( null, true ) ) { envVariables.put...
java
protected List<VCProject> getParsedProjects( BuildPlatform platform, BuildConfiguration configuration ) throws MojoExecutionException { Map<String, String> envVariables = new HashMap<String, String>(); if ( isCxxTestEnabled( null, true ) ) { envVariables.put...
[ "protected", "List", "<", "VCProject", ">", "getParsedProjects", "(", "BuildPlatform", "platform", ",", "BuildConfiguration", "configuration", ")", "throws", "MojoExecutionException", "{", "Map", "<", "String", ",", "String", ">", "envVariables", "=", "new", "HashMa...
Return project configurations for the specified platform and configuration. @param platform the platform to parse for @param configuration the configuration to parse for @return a list of VCProject objects containing configuration for the specified platform and configuration @throws MojoExecutionException if parsing fa...
[ "Return", "project", "configurations", "for", "the", "specified", "platform", "and", "configuration", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L309-L346
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.getParsedProjects
protected List<VCProject> getParsedProjects( BuildPlatform platform, BuildConfiguration configuration, String filterRegex ) throws MojoExecutionException { Pattern filterPattern = null; List<VCProject> filteredList = new ArrayList<VCProject>(); if ( filterRegex != null ...
java
protected List<VCProject> getParsedProjects( BuildPlatform platform, BuildConfiguration configuration, String filterRegex ) throws MojoExecutionException { Pattern filterPattern = null; List<VCProject> filteredList = new ArrayList<VCProject>(); if ( filterRegex != null ...
[ "protected", "List", "<", "VCProject", ">", "getParsedProjects", "(", "BuildPlatform", "platform", ",", "BuildConfiguration", "configuration", ",", "String", "filterRegex", ")", "throws", "MojoExecutionException", "{", "Pattern", "filterPattern", "=", "null", ";", "Li...
Return project configurations for the specified platform and configuration filtered by name using the specified Pattern. @param platform the platform to parse for @param configuration the configuration to parse for @param filterRegex a Pattern to use to filter the projects @return a list of VCProject objects containing...
[ "Return", "project", "configurations", "for", "the", "specified", "platform", "and", "configuration", "filtered", "by", "name", "using", "the", "specified", "Pattern", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L357-L386
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.getOutputDirectories
protected List<File> getOutputDirectories( BuildPlatform p, BuildConfiguration c ) throws MojoExecutionException { List<File> result = new ArrayList<File>(); // If there is a configured value use it File configured = c.getOutputDirectory(); if ( configured != nul...
java
protected List<File> getOutputDirectories( BuildPlatform p, BuildConfiguration c ) throws MojoExecutionException { List<File> result = new ArrayList<File>(); // If there is a configured value use it File configured = c.getOutputDirectory(); if ( configured != nul...
[ "protected", "List", "<", "File", ">", "getOutputDirectories", "(", "BuildPlatform", "p", ",", "BuildConfiguration", "c", ")", "throws", "MojoExecutionException", "{", "List", "<", "File", ">", "result", "=", "new", "ArrayList", "<", "File", ">", "(", ")", "...
Determine the directories that msbuild will write output files to for a given platform and configuration. If an outputDirectory is configured in the POM this will take precedence and be the only result. @param p the BuildPlatform @param c the BuildConfiguration @return a List of File objects @throws MojoExecutionExcept...
[ "Determine", "the", "directories", "that", "msbuild", "will", "write", "output", "files", "to", "for", "a", "given", "platform", "and", "configuration", ".", "If", "an", "outputDirectory", "is", "configured", "in", "the", "POM", "this", "will", "take", "preced...
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L419-L484
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.isCppCheckEnabled
protected boolean isCppCheckEnabled( boolean quiet ) { if ( cppCheck.getSkip() ) { if ( ! quiet ) { getLog().info( CppCheckConfiguration.SKIP_MESSAGE + ", 'skip' set to true in the " + CppCheckConfiguration.TOOL_NAME + " configuration...
java
protected boolean isCppCheckEnabled( boolean quiet ) { if ( cppCheck.getSkip() ) { if ( ! quiet ) { getLog().info( CppCheckConfiguration.SKIP_MESSAGE + ", 'skip' set to true in the " + CppCheckConfiguration.TOOL_NAME + " configuration...
[ "protected", "boolean", "isCppCheckEnabled", "(", "boolean", "quiet", ")", "{", "if", "(", "cppCheck", ".", "getSkip", "(", ")", ")", "{", "if", "(", "!", "quiet", ")", "{", "getLog", "(", ")", ".", "info", "(", "CppCheckConfiguration", ".", "SKIP_MESSAG...
Determine whether CppCheck is enabled by the configuration @param quiet set to true to suppress logging @return true if CppCheck is enabled, false otherwise
[ "Determine", "whether", "CppCheck", "is", "enabled", "by", "the", "configuration" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L491-L516
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java
AbstractMSBuildPluginMojo.isVeraEnabled
protected boolean isVeraEnabled( boolean quiet ) { if ( vera.getSkip() ) { if ( ! quiet ) { getLog().info( VeraConfiguration.SKIP_MESSAGE + ", 'skip' set to true in the " + VeraConfiguration.TOOL_NAME + " configuration" ); ...
java
protected boolean isVeraEnabled( boolean quiet ) { if ( vera.getSkip() ) { if ( ! quiet ) { getLog().info( VeraConfiguration.SKIP_MESSAGE + ", 'skip' set to true in the " + VeraConfiguration.TOOL_NAME + " configuration" ); ...
[ "protected", "boolean", "isVeraEnabled", "(", "boolean", "quiet", ")", "{", "if", "(", "vera", ".", "getSkip", "(", ")", ")", "{", "if", "(", "!", "quiet", ")", "{", "getLog", "(", ")", ".", "info", "(", "VeraConfiguration", ".", "SKIP_MESSAGE", "+", ...
Determine whether Vera++ is enabled by the configuration @param quiet set to true to suppress logging @return true if Vera++ is enabled, false otherwise
[ "Determine", "whether", "Vera", "++", "is", "enabled", "by", "the", "configuration" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildPluginMojo.java#L523-L548
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/AbstractUDPClient.java
AbstractUDPClient.send
public void send(String message) throws IOException { buf.setString(message); DatagramPacket packet = new DatagramPacket(buf.getByteArray(), buf.length(), host, port); socket.send(packet); }
java
public void send(String message) throws IOException { buf.setString(message); DatagramPacket packet = new DatagramPacket(buf.getByteArray(), buf.length(), host, port); socket.send(packet); }
[ "public", "void", "send", "(", "String", "message", ")", "throws", "IOException", "{", "buf", ".", "setString", "(", "message", ")", ";", "DatagramPacket", "packet", "=", "new", "DatagramPacket", "(", "buf", ".", "getByteArray", "(", ")", ",", "buf", ".", ...
Sends a message to SServer. @param message A valid SServer message. @throws java.io.IOException if any.
[ "Sends", "a", "message", "to", "SServer", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/AbstractUDPClient.java#L163-L167
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/AbstractUDPClient.java
AbstractUDPClient.toStateString
public String toStateString() { StringBuffer buff = new StringBuffer(); buff.append("Host: "); buff.append(this.hostname); buff.append(':'); buff.append(this.port); buff.append("\n"); return buff.toString(); }
java
public String toStateString() { StringBuffer buff = new StringBuffer(); buff.append("Host: "); buff.append(this.hostname); buff.append(':'); buff.append(this.port); buff.append("\n"); return buff.toString(); }
[ "public", "String", "toStateString", "(", ")", "{", "StringBuffer", "buff", "=", "new", "StringBuffer", "(", ")", ";", "buff", ".", "append", "(", "\"Host: \"", ")", ";", "buff", ".", "append", "(", "this", ".", "hostname", ")", ";", "buff", ".", "appe...
Returns a string containing the connection details. @return Connection details (eg. "Host: 192.168.1.67:6000").
[ "Returns", "a", "string", "containing", "the", "connection", "details", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/AbstractUDPClient.java#L203-L211
train
brianm/url-scheme-registry
src/main/java/org/skife/url/UrlSchemeRegistry.java
UrlSchemeRegistry.register
public static void register(final String scheme, Class<? extends URLStreamHandler> handlerType) { if (!registeredSchemes.add(scheme)) { throw new IllegalStateException("a scheme has already been registered for " + scheme); } registerPackage("org.skife.url.generated"); En...
java
public static void register(final String scheme, Class<? extends URLStreamHandler> handlerType) { if (!registeredSchemes.add(scheme)) { throw new IllegalStateException("a scheme has already been registered for " + scheme); } registerPackage("org.skife.url.generated"); En...
[ "public", "static", "void", "register", "(", "final", "String", "scheme", ",", "Class", "<", "?", "extends", "URLStreamHandler", ">", "handlerType", ")", "{", "if", "(", "!", "registeredSchemes", ".", "add", "(", "scheme", ")", ")", "{", "throw", "new", ...
Used to register a handler for a scheme. The actual handler used will in fact be a runtime generated subclass of handlerType in order to abide by the naming rules for URL scheme handlers. @param scheme scheme name to associate handlerType with @param handlerType non-final class with a no-arg public constructor which w...
[ "Used", "to", "register", "a", "handler", "for", "a", "scheme", ".", "The", "actual", "handler", "used", "will", "in", "fact", "be", "a", "runtime", "generated", "subclass", "of", "handlerType", "in", "order", "to", "abide", "by", "the", "naming", "rules",...
db577eea4d246bcf96d7fcb06dda02f9c23db059
https://github.com/brianm/url-scheme-registry/blob/db577eea4d246bcf96d7fcb06dda02f9c23db059/src/main/java/org/skife/url/UrlSchemeRegistry.java#L50-L69
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addPlayerInitCommand
public void addPlayerInitCommand(String teamName, boolean isGoalie) { StringBuilder buf = new StringBuilder(); buf.append("(init "); buf.append(teamName); buf.append(" (version "); if (isGoalie) { buf.append(serverVersion); buf.append(") (goalie))"); ...
java
public void addPlayerInitCommand(String teamName, boolean isGoalie) { StringBuilder buf = new StringBuilder(); buf.append("(init "); buf.append(teamName); buf.append(" (version "); if (isGoalie) { buf.append(serverVersion); buf.append(") (goalie))"); ...
[ "public", "void", "addPlayerInitCommand", "(", "String", "teamName", ",", "boolean", "isGoalie", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(init \"", ")", ";", "buf", ".", "append", "(", "te...
This is used to initialise a player. @param teamName The team the player belongs to. @param isGoalie If the player is a goalie. Note: Only one goalie per team.
[ "This", "is", "used", "to", "initialise", "a", "player", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L61-L74
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addTrainerInitCommand
public void addTrainerInitCommand() { StringBuilder buf = new StringBuilder(); buf.append("(init (version "); buf.append(serverVersion); buf.append("))"); fifo.add(fifo.size(), buf.toString()); }
java
public void addTrainerInitCommand() { StringBuilder buf = new StringBuilder(); buf.append("(init (version "); buf.append(serverVersion); buf.append("))"); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addTrainerInitCommand", "(", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(init (version \"", ")", ";", "buf", ".", "append", "(", "serverVersion", ")", ";", "buf", ".", "app...
This is used to initialise a trainer.
[ "This", "is", "used", "to", "initialise", "a", "trainer", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L79-L85
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addCoachInitCommand
public void addCoachInitCommand(String teamName) { StringBuilder buf = new StringBuilder(); buf.append("(init "); buf.append(teamName); buf.append(" (version "); buf.append(serverVersion); buf.append("))"); fifo.add(fifo.size(), buf.toString()); }
java
public void addCoachInitCommand(String teamName) { StringBuilder buf = new StringBuilder(); buf.append("(init "); buf.append(teamName); buf.append(" (version "); buf.append(serverVersion); buf.append("))"); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addCoachInitCommand", "(", "String", "teamName", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(init \"", ")", ";", "buf", ".", "append", "(", "teamName", ")", ";", "buf", "...
This is used to initialise the online coach. @param teamName The team the coach belongs to.
[ "This", "is", "used", "to", "initialise", "the", "online", "coach", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L92-L100
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addReconnectCommand
public void addReconnectCommand(String teamName, int num) { StringBuilder buf = new StringBuilder(); buf.append("(reconnect "); buf.append(teamName); buf.append(' '); buf.append(num); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
java
public void addReconnectCommand(String teamName, int num) { StringBuilder buf = new StringBuilder(); buf.append("(reconnect "); buf.append(teamName); buf.append(' '); buf.append(num); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addReconnectCommand", "(", "String", "teamName", ",", "int", "num", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(reconnect \"", ")", ";", "buf", ".", "append", "(", "teamNam...
This is used to reconnect the player to the server. @param teamName a {@link java.lang.String} object. @param num a int.
[ "This", "is", "used", "to", "reconnect", "the", "player", "to", "the", "server", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L108-L116
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addCatchCommand
public void addCatchCommand(int direction) { StringBuilder buf = new StringBuilder(); buf.append("(catch "); buf.append(direction); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
java
public void addCatchCommand(int direction) { StringBuilder buf = new StringBuilder(); buf.append("(catch "); buf.append(direction); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addCatchCommand", "(", "int", "direction", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(catch \"", ")", ";", "buf", ".", "append", "(", "direction", ")", ";", "buf", ".", ...
Goalie special command. Tries to catch the ball in a given direction relative to its body direction. If the catch is successful the ball will be in the goalies hand untill kicked away. @param direction The direction in which to catch, relative to its body.
[ "Goalie", "special", "command", ".", "Tries", "to", "catch", "the", "ball", "in", "a", "given", "direction", "relative", "to", "its", "body", "direction", ".", "If", "the", "catch", "is", "successful", "the", "ball", "will", "be", "in", "the", "goalies", ...
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L125-L131
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addDashCommand
public void addDashCommand(int power) { StringBuilder buf = new StringBuilder(); buf.append("(dash "); buf.append(power); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
java
public void addDashCommand(int power) { StringBuilder buf = new StringBuilder(); buf.append("(dash "); buf.append(power); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addDashCommand", "(", "int", "power", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(dash \"", ")", ";", "buf", ".", "append", "(", "power", ")", ";", "buf", ".", "append"...
This command accelerates the player in the direction of its body. @param power Power is between minpower (-100) and maxpower (+100).
[ "This", "command", "accelerates", "the", "player", "in", "the", "direction", "of", "its", "body", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L187-L193
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addKickCommand
public void addKickCommand(int power, int direction) { StringBuilder buf = new StringBuilder(); buf.append("(kick "); buf.append(power); buf.append(' '); buf.append(direction); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
java
public void addKickCommand(int power, int direction) { StringBuilder buf = new StringBuilder(); buf.append("(kick "); buf.append(power); buf.append(' '); buf.append(direction); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addKickCommand", "(", "int", "power", ",", "int", "direction", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(kick \"", ")", ";", "buf", ".", "append", "(", "power", ")", ...
This command accelerates the ball with the given power in the given direction. @param power Power is between minpower (-100) and maxpower (+100). @param direction Direction is relative to the body of the player.
[ "This", "command", "accelerates", "the", "ball", "with", "the", "given", "power", "in", "the", "given", "direction", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L201-L209
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addTurnCommand
public void addTurnCommand(int angle) { StringBuilder buf = new StringBuilder(); buf.append("(turn "); buf.append(angle); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
java
public void addTurnCommand(int angle) { StringBuilder buf = new StringBuilder(); buf.append("(turn "); buf.append(angle); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addTurnCommand", "(", "int", "angle", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(turn \"", ")", ";", "buf", ".", "append", "(", "angle", ")", ";", "buf", ".", "append"...
This command will turn the players body in degrees relative to their current direction. @param angle Angle to turn (between -180 and +180).
[ "This", "command", "will", "turn", "the", "players", "body", "in", "degrees", "relative", "to", "their", "current", "direction", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L233-L239
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addChangePlayModeCommand
public void addChangePlayModeCommand(PlayMode playMode) { StringBuilder buf = new StringBuilder(); buf.append("(change_mode "); buf.append(playMode); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
java
public void addChangePlayModeCommand(PlayMode playMode) { StringBuilder buf = new StringBuilder(); buf.append("(change_mode "); buf.append(playMode); buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addChangePlayModeCommand", "(", "PlayMode", "playMode", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(change_mode \"", ")", ";", "buf", ".", "append", "(", "playMode", ")", ";"...
Trainer only command. Changes the play mode of the server. @param playMode a {@link com.github.robocup_atan.atan.model.enums.PlayMode} object.
[ "Trainer", "only", "command", ".", "Changes", "the", "play", "mode", "of", "the", "server", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L277-L283
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addMoveBallCommand
public void addMoveBallCommand(double x, double y) { StringBuilder buf = new StringBuilder(); buf.append("(move "); buf.append("ball"); // TODO Manual says the format...will implement this later. buf.append(' '); buf.append(x); buf.append(' '); buf.append(y); ...
java
public void addMoveBallCommand(double x, double y) { StringBuilder buf = new StringBuilder(); buf.append("(move "); buf.append("ball"); // TODO Manual says the format...will implement this later. buf.append(' '); buf.append(x); buf.append(' '); buf.append(y); ...
[ "public", "void", "addMoveBallCommand", "(", "double", "x", ",", "double", "y", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(move \"", ")", ";", "buf", ".", "append", "(", "\"ball\"", ")", ...
Trainer only command. Moves the ball to the given coordinates. @param x The x coordinate to move to. @param y The y coordinate to move to.
[ "Trainer", "only", "command", ".", "Moves", "the", "ball", "to", "the", "given", "coordinates", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L316-L326
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addCheckBallCommand
public void addCheckBallCommand() { StringBuilder buf = new StringBuilder(); buf.append("(check_ball)"); fifo.add(fifo.size(), buf.toString()); }
java
public void addCheckBallCommand() { StringBuilder buf = new StringBuilder(); buf.append("(check_ball)"); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addCheckBallCommand", "(", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(check_ball)\"", ")", ";", "fifo", ".", "add", "(", "fifo", ".", "size", "(", ")", ",", "buf", "."...
Trainer only command. Checks the current status of the ball.
[ "Trainer", "only", "command", ".", "Checks", "the", "current", "status", "of", "the", "ball", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L332-L336
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addStartCommand
public void addStartCommand() { StringBuilder buf = new StringBuilder(); buf.append("(start)"); fifo.add(fifo.size(), buf.toString()); }
java
public void addStartCommand() { StringBuilder buf = new StringBuilder(); buf.append("(start)"); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addStartCommand", "(", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(start)\"", ")", ";", "fifo", ".", "add", "(", "fifo", ".", "size", "(", ")", ",", "buf", ".", "toSt...
Trainer only command. Starts the server.
[ "Trainer", "only", "command", ".", "Starts", "the", "server", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L342-L346
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addRecoverCommand
public void addRecoverCommand() { StringBuilder buf = new StringBuilder(); buf.append("(recover)"); fifo.add(fifo.size(), buf.toString()); }
java
public void addRecoverCommand() { StringBuilder buf = new StringBuilder(); buf.append("(recover)"); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addRecoverCommand", "(", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(recover)\"", ")", ";", "fifo", ".", "add", "(", "fifo", ".", "size", "(", ")", ",", "buf", ".", "...
Trainer only command. Recovers the players stamina, recovery, effort and hear capacity to the values at the beginning of the game.
[ "Trainer", "only", "command", ".", "Recovers", "the", "players", "stamina", "recovery", "effort", "and", "hear", "capacity", "to", "the", "values", "at", "the", "beginning", "of", "the", "game", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L352-L356
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addEarCommand
public void addEarCommand(boolean earOn) { StringBuilder buf = new StringBuilder(); buf.append("(ear "); if (earOn) { buf.append("on"); } else { buf.append("off"); } buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
java
public void addEarCommand(boolean earOn) { StringBuilder buf = new StringBuilder(); buf.append("(ear "); if (earOn) { buf.append("on"); } else { buf.append("off"); } buf.append(')'); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addEarCommand", "(", "boolean", "earOn", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(ear \"", ")", ";", "if", "(", "earOn", ")", "{", "buf", ".", "append", "(", "\"on\"...
Trainer only command. It turns on or off the sending of auditory information to the trainer. @param earOn True to turn auditory information on, false to turn it off.
[ "Trainer", "only", "command", ".", "It", "turns", "on", "or", "off", "the", "sending", "of", "auditory", "information", "to", "the", "trainer", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L364-L374
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addChangePlayerTypeCommand
public void addChangePlayerTypeCommand(String teamName, int unum, int playerType) { StringBuilder buf = new StringBuilder(); buf.append("(change_player_type "); buf.append(teamName); buf.append(' '); buf.append(unum); buf.append(' '); buf.append(playerType); ...
java
public void addChangePlayerTypeCommand(String teamName, int unum, int playerType) { StringBuilder buf = new StringBuilder(); buf.append("(change_player_type "); buf.append(teamName); buf.append(' '); buf.append(unum); buf.append(' '); buf.append(playerType); ...
[ "public", "void", "addChangePlayerTypeCommand", "(", "String", "teamName", ",", "int", "unum", ",", "int", "playerType", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(change_player_type \"", ")", "...
Trainer only command. This command changes the specified players heterogeneous type. @param teamName The name of the team the player belongs to. @param unum The players uniform number (1~11 on pitch usually, subs <= 14). @param playerType A player type between 0 (the standard player) and 18. However, player.conf can c...
[ "Trainer", "only", "command", ".", "This", "command", "changes", "the", "specified", "players", "heterogeneous", "type", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L384-L394
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addTeamNamesCommand
public void addTeamNamesCommand() { StringBuilder buf = new StringBuilder(); buf.append("(team_names)"); fifo.add(fifo.size(), buf.toString()); }
java
public void addTeamNamesCommand() { StringBuilder buf = new StringBuilder(); buf.append("(team_names)"); fifo.add(fifo.size(), buf.toString()); }
[ "public", "void", "addTeamNamesCommand", "(", ")", "{", "StringBuilder", "buf", "=", "new", "StringBuilder", "(", ")", ";", "buf", ".", "append", "(", "\"(team_names)\"", ")", ";", "fifo", ".", "add", "(", "fifo", ".", "size", "(", ")", ",", "buf", "."...
Trainer command that can be used by online coach. This command provides information about the names of both teams and which side they are playing on.
[ "Trainer", "command", "that", "can", "be", "used", "by", "online", "coach", ".", "This", "command", "provides", "information", "about", "the", "names", "of", "both", "teams", "and", "which", "side", "they", "are", "playing", "on", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L431-L435
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.addTeamGraphicCommand
public void addTeamGraphicCommand(XPMImage xpm) { for (int x = 0; x < xpm.getArrayWidth(); x++) { for (int y = 0; y < xpm.getArrayHeight(); y++) { StringBuilder buf = new StringBuilder(); String tile = xpm.getTile(x, y); buf.append("(team_graphi...
java
public void addTeamGraphicCommand(XPMImage xpm) { for (int x = 0; x < xpm.getArrayWidth(); x++) { for (int y = 0; y < xpm.getArrayHeight(); y++) { StringBuilder buf = new StringBuilder(); String tile = xpm.getTile(x, y); buf.append("(team_graphi...
[ "public", "void", "addTeamGraphicCommand", "(", "XPMImage", "xpm", ")", "{", "for", "(", "int", "x", "=", "0", ";", "x", "<", "xpm", ".", "getArrayWidth", "(", ")", ";", "x", "++", ")", "{", "for", "(", "int", "y", "=", "0", ";", "y", "<", "xpm...
Coach only command. The online coach can send teams-graphics as 256 x 64 XPM to the server. Each team graphic-command sends a 8x8 tile. X and Y are the coordinates of this tile, so they range from 0 to 31 and 0 to 7 respectively. Each XPM line is a line from the 8x8 XPM tile. @param xpm An XPMImage object.
[ "Coach", "only", "command", ".", "The", "online", "coach", "can", "send", "teams", "-", "graphics", "as", "256", "x", "64", "XPM", "to", "the", "server", ".", "Each", "team", "graphic", "-", "command", "sends", "a", "8x8", "tile", ".", "X", "and", "Y...
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L468-L484
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java
CommandFactory.next
public String next() { if (fifo.isEmpty()) { throw new RuntimeException("Fifo is empty"); } String cmd = (String) fifo.get(0); fifo.remove(0); return cmd; }
java
public String next() { if (fifo.isEmpty()) { throw new RuntimeException("Fifo is empty"); } String cmd = (String) fifo.get(0); fifo.remove(0); return cmd; }
[ "public", "String", "next", "(", ")", "{", "if", "(", "fifo", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "RuntimeException", "(", "\"Fifo is empty\"", ")", ";", "}", "String", "cmd", "=", "(", "String", ")", "fifo", ".", "get", "(", "0", "...
Gets the next command from the stack. @return The next command.
[ "Gets", "the", "next", "command", "from", "the", "stack", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/CommandFactory.java#L501-L508
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/SonarConfigGeneratorMojo.java
SonarConfigGeneratorMojo.isSonarEnabled
protected boolean isSonarEnabled( boolean quiet ) throws MojoExecutionException { if ( sonar.skip() ) { if ( ! quiet ) { getLog().info( SonarConfiguration.SONAR_SKIP_MESSAGE + ", 'skip' set to true in the " + SonarConfiguration.SONAR_N...
java
protected boolean isSonarEnabled( boolean quiet ) throws MojoExecutionException { if ( sonar.skip() ) { if ( ! quiet ) { getLog().info( SonarConfiguration.SONAR_SKIP_MESSAGE + ", 'skip' set to true in the " + SonarConfiguration.SONAR_N...
[ "protected", "boolean", "isSonarEnabled", "(", "boolean", "quiet", ")", "throws", "MojoExecutionException", "{", "if", "(", "sonar", ".", "skip", "(", ")", ")", "{", "if", "(", "!", "quiet", ")", "{", "getLog", "(", ")", ".", "info", "(", "SonarConfigura...
Determine whether Sonar configuration generation is enabled by the configuration @param quiet set to true to suppress logging @return true if sonar configuration generation is enabled, false otherwise @throws MojoExecutionException if the configured project or solution file is invalid or cannot be parsed
[ "Determine", "whether", "Sonar", "configuration", "generation", "is", "enabled", "by", "the", "configuration" ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/SonarConfigGeneratorMojo.java#L74-L91
train
tecsinapse/tecsinapse-data-io
src/main/java/br/com/tecsinapse/dataio/importer/parser/CsvParser.java
CsvParser.parse
@Override public List<T> parse() throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException { List<T> list = new ArrayList<>(); Map<Method, TableCellMapping> cellMappingByMethod = ImporterUtils.getMappedMethods(clazz, group); final C...
java
@Override public List<T> parse() throws IllegalAccessException, InstantiationException, InvocationTargetException, NoSuchMethodException { List<T> list = new ArrayList<>(); Map<Method, TableCellMapping> cellMappingByMethod = ImporterUtils.getMappedMethods(clazz, group); final C...
[ "@", "Override", "public", "List", "<", "T", ">", "parse", "(", ")", "throws", "IllegalAccessException", ",", "InstantiationException", ",", "InvocationTargetException", ",", "NoSuchMethodException", "{", "List", "<", "T", ">", "list", "=", "new", "ArrayList", "...
Parser file to list of T objects Obs.: No read de first line. @return List of T object @throws IllegalAccessException IllegalAccessException @throws InstantiationException InstantiationException @throws InvocationTargetException InvocationTargetException @throws NoSuchMethodException NoSuchMethodException
[ "Parser", "file", "to", "list", "of", "T", "objects" ]
73029c887bc970598bb6127e2d7ed8055bd7f701
https://github.com/tecsinapse/tecsinapse-data-io/blob/73029c887bc970598bb6127e2d7ed8055bd7f701/src/main/java/br/com/tecsinapse/dataio/importer/parser/CsvParser.java#L164-L195
train
GeoLatte/geolatte-common-hibernate
src/main/java/org/geolatte/common/automapper/SimpleNamingStrategy.java
SimpleNamingStrategy.toJavaName
private String toJavaName(String name) { StringBuilder stb = new StringBuilder(); char[] namechars = name.toCharArray(); if (!Character.isJavaIdentifierStart(namechars[0])) { stb.append("__"); } else { stb.append(namechars[0]); } for (int i = 1; i ...
java
private String toJavaName(String name) { StringBuilder stb = new StringBuilder(); char[] namechars = name.toCharArray(); if (!Character.isJavaIdentifierStart(namechars[0])) { stb.append("__"); } else { stb.append(namechars[0]); } for (int i = 1; i ...
[ "private", "String", "toJavaName", "(", "String", "name", ")", "{", "StringBuilder", "stb", "=", "new", "StringBuilder", "(", ")", ";", "char", "[", "]", "namechars", "=", "name", ".", "toCharArray", "(", ")", ";", "if", "(", "!", "Character", ".", "is...
Turns the name into a valid, simplified Java Identifier. @param name input String @return java identifier, based on input String.
[ "Turns", "the", "name", "into", "a", "valid", "simplified", "Java", "Identifier", "." ]
2e871c70e506df2485d91152fbd0955c94de1d39
https://github.com/GeoLatte/geolatte-common-hibernate/blob/2e871c70e506df2485d91152fbd0955c94de1d39/src/main/java/org/geolatte/common/automapper/SimpleNamingStrategy.java#L61-L78
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildMojo.java
AbstractMSBuildMojo.validateForMSBuild
protected final void validateForMSBuild() throws MojoExecutionException { if ( !MSBuildPackaging.isValid( mavenProject.getPackaging() ) ) { throw new MojoExecutionException( "Please set packaging to one of " + MSBuildPackaging.validPackaging() ); } findMSBuild(); ...
java
protected final void validateForMSBuild() throws MojoExecutionException { if ( !MSBuildPackaging.isValid( mavenProject.getPackaging() ) ) { throw new MojoExecutionException( "Please set packaging to one of " + MSBuildPackaging.validPackaging() ); } findMSBuild(); ...
[ "protected", "final", "void", "validateForMSBuild", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "!", "MSBuildPackaging", ".", "isValid", "(", "mavenProject", ".", "getPackaging", "(", ")", ")", ")", "{", "throw", "new", "MojoExecutionException", ...
Check the Mojo configuration provides sufficient data to construct an MSBuild command line. @throws MojoExecutionException is a validation step encounters an error.
[ "Check", "the", "Mojo", "configuration", "provides", "sufficient", "data", "to", "construct", "an", "MSBuild", "command", "line", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildMojo.java#L44-L53
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildMojo.java
AbstractMSBuildMojo.findMSBuild
protected final void findMSBuild() throws MojoExecutionException { if ( msbuildPath == null ) { // not set in configuration try system environment String msbuildEnv = System.getenv( ENV_MSBUILD_PATH ); if ( msbuildEnv != null ) { msbuil...
java
protected final void findMSBuild() throws MojoExecutionException { if ( msbuildPath == null ) { // not set in configuration try system environment String msbuildEnv = System.getenv( ENV_MSBUILD_PATH ); if ( msbuildEnv != null ) { msbuil...
[ "protected", "final", "void", "findMSBuild", "(", ")", "throws", "MojoExecutionException", "{", "if", "(", "msbuildPath", "==", "null", ")", "{", "// not set in configuration try system environment", "String", "msbuildEnv", "=", "System", ".", "getenv", "(", "ENV_MSBU...
Attempts to locate MSBuild. First looks at the mojo configuration property, if not found there try the system environment. @throws MojoExecutionException if MSBuild cannot be located
[ "Attempts", "to", "locate", "MSBuild", ".", "First", "looks", "at", "the", "mojo", "configuration", "property", "if", "not", "found", "there", "try", "the", "system", "environment", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildMojo.java#L61-L87
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildMojo.java
AbstractMSBuildMojo.runMSBuild
protected void runMSBuild( List<String> targets, Map<String, String> environment ) throws MojoExecutionException, MojoFailureException { try { MSBuildExecutor msbuild = new MSBuildExecutor( getLog(), msbuildPath, msbuildMaxCpuCount, projectFile ); msbuild.setPlat...
java
protected void runMSBuild( List<String> targets, Map<String, String> environment ) throws MojoExecutionException, MojoFailureException { try { MSBuildExecutor msbuild = new MSBuildExecutor( getLog(), msbuildPath, msbuildMaxCpuCount, projectFile ); msbuild.setPlat...
[ "protected", "void", "runMSBuild", "(", "List", "<", "String", ">", "targets", ",", "Map", "<", "String", ",", "String", ">", "environment", ")", "throws", "MojoExecutionException", ",", "MojoFailureException", "{", "try", "{", "MSBuildExecutor", "msbuild", "=",...
Run MSBuild for each platform and configuration pair. @param targets the build targets to pass to MSBuild @param environment optional environment variable Map (my be null) @throws MojoExecutionException if there is a problem running MSBuild @throws MojoFailureException if MSBuild returns a non-zero exit code
[ "Run", "MSBuild", "for", "each", "platform", "and", "configuration", "pair", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/AbstractMSBuildMojo.java#L96-L121
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/XPMImage.java
XPMImage.getTile
public String getTile(int x, int y) { if ((x > getArrayWidth()) || (y > getArrayHeight()) || (x < 0) || (y < 0)) { throw new IllegalArgumentException(); } return image[x][y]; }
java
public String getTile(int x, int y) { if ((x > getArrayWidth()) || (y > getArrayHeight()) || (x < 0) || (y < 0)) { throw new IllegalArgumentException(); } return image[x][y]; }
[ "public", "String", "getTile", "(", "int", "x", ",", "int", "y", ")", "{", "if", "(", "(", "x", ">", "getArrayWidth", "(", ")", ")", "||", "(", "y", ">", "getArrayHeight", "(", ")", ")", "||", "(", "x", "<", "0", ")", "||", "(", "y", "<", "...
Gets a tile of the XPM Image. @param x Between 0 and 31. @param y Between 0 and 7. @return An XPM image string defining an 8*8 image.
[ "Gets", "a", "tile", "of", "the", "XPM", "Image", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/XPMImage.java#L86-L91
train
robocup-atan/atan
src/main/java/com/github/robocup_atan/atan/model/SServerPlayer.java
SServerPlayer.toListString
public String toListString() { StringBuffer buf = new StringBuffer(); buf.append(controller.getClass().getName()); return buf.toString(); }
java
public String toListString() { StringBuffer buf = new StringBuffer(); buf.append(controller.getClass().getName()); return buf.toString(); }
[ "public", "String", "toListString", "(", ")", "{", "StringBuffer", "buf", "=", "new", "StringBuffer", "(", ")", ";", "buf", ".", "append", "(", "controller", ".", "getClass", "(", ")", ".", "getName", "(", ")", ")", ";", "return", "buf", ".", "toString...
Create a list string. @return A list string.
[ "Create", "a", "list", "string", "." ]
52237b468b09ba5b7c52d290984dbe0326c96df7
https://github.com/robocup-atan/atan/blob/52237b468b09ba5b7c52d290984dbe0326c96df7/src/main/java/com/github/robocup_atan/atan/model/SServerPlayer.java#L222-L226
train
darcy-framework/synq
src/main/java/com/redhat/synq/MultiEvent.java
MultiEvent.throwMultiEventException
private void throwMultiEventException(Event<?> eventThatThrewException) { while(throwable instanceof MultiEventException && throwable.getCause() != null) { eventThatThrewException = ((MultiEventException) throwable).getEvent(); throwable = throwable.getCause(); } throw n...
java
private void throwMultiEventException(Event<?> eventThatThrewException) { while(throwable instanceof MultiEventException && throwable.getCause() != null) { eventThatThrewException = ((MultiEventException) throwable).getEvent(); throwable = throwable.getCause(); } throw n...
[ "private", "void", "throwMultiEventException", "(", "Event", "<", "?", ">", "eventThatThrewException", ")", "{", "while", "(", "throwable", "instanceof", "MultiEventException", "&&", "throwable", ".", "getCause", "(", ")", "!=", "null", ")", "{", "eventThatThrewEx...
Unwraps cause of throwable if the throwable is, itself, a MultiEventException. This eliminates much excessive noise that is purely implementation detail of MultiEvents from the stack trace.
[ "Unwraps", "cause", "of", "throwable", "if", "the", "throwable", "is", "itself", "a", "MultiEventException", ".", "This", "eliminates", "much", "excessive", "noise", "that", "is", "purely", "implementation", "detail", "of", "MultiEvents", "from", "the", "stack", ...
37f2e6966496520efd1ec506770a717823671e9b
https://github.com/darcy-framework/synq/blob/37f2e6966496520efd1ec506770a717823671e9b/src/main/java/com/redhat/synq/MultiEvent.java#L97-L104
train
forge/xml-parser
src/main/java/org/jboss/forge/parser/xml/Node.java
Node.get
List<Node> get(final Pattern... patterns) { return AbsoluteGetQuery.INSTANCE.execute(this, includeRootPatternFirst(patterns)); }
java
List<Node> get(final Pattern... patterns) { return AbsoluteGetQuery.INSTANCE.execute(this, includeRootPatternFirst(patterns)); }
[ "List", "<", "Node", ">", "get", "(", "final", "Pattern", "...", "patterns", ")", "{", "return", "AbsoluteGetQuery", ".", "INSTANCE", ".", "execute", "(", "this", ",", "includeRootPatternFirst", "(", "patterns", ")", ")", ";", "}" ]
Get all children matching the specified query. @param query The query to use for finding relevant child nodes @return All found children, or empty list if none found.
[ "Get", "all", "children", "matching", "the", "specified", "query", "." ]
2804337a6028878a3f97fb12f8bbe45501fa0024
https://github.com/forge/xml-parser/blob/2804337a6028878a3f97fb12f8bbe45501fa0024/src/main/java/org/jboss/forge/parser/xml/Node.java#L334-L337
train
99soft/rocoto
src/main/java/org/nnsoft/guice/rocoto/variables/AbstractAppender.java
AbstractAppender.resolve
public String resolve( Map<String, String> configuration ) { StringBuilder buffer = new StringBuilder(); append( buffer, configuration, null ); return buffer.toString(); }
java
public String resolve( Map<String, String> configuration ) { StringBuilder buffer = new StringBuilder(); append( buffer, configuration, null ); return buffer.toString(); }
[ "public", "String", "resolve", "(", "Map", "<", "String", ",", "String", ">", "configuration", ")", "{", "StringBuilder", "buffer", "=", "new", "StringBuilder", "(", ")", ";", "append", "(", "buffer", ",", "configuration", ",", "null", ")", ";", "return", ...
Begin resolving process with this appender against the provided configuration.
[ "Begin", "resolving", "process", "with", "this", "appender", "against", "the", "provided", "configuration", "." ]
9f54ed913cae54d613b3bc7a352f579d0c6b816f
https://github.com/99soft/rocoto/blob/9f54ed913cae54d613b3bc7a352f579d0c6b816f/src/main/java/org/nnsoft/guice/rocoto/variables/AbstractAppender.java#L86-L91
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MojoHelper.java
MojoHelper.validateToolPath
public static void validateToolPath( File toolPath, String toolName, Log logger ) throws FileNotFoundException { logger.debug( "Validating path for " + toolName ); if ( toolPath == null ) { logger.error( "Missing " + toolName + " path" ); throw n...
java
public static void validateToolPath( File toolPath, String toolName, Log logger ) throws FileNotFoundException { logger.debug( "Validating path for " + toolName ); if ( toolPath == null ) { logger.error( "Missing " + toolName + " path" ); throw n...
[ "public", "static", "void", "validateToolPath", "(", "File", "toolPath", ",", "String", "toolName", ",", "Log", "logger", ")", "throws", "FileNotFoundException", "{", "logger", ".", "debug", "(", "\"Validating path for \"", "+", "toolName", ")", ";", "if", "(", ...
Validates the path to a command-line tool. @param toolPath the configured tool path from the POM @param toolName the name of the tool, used for logging messages @param logger a Log to write messages to @throws FileNotFoundException if the tool cannot be found
[ "Validates", "the", "path", "to", "a", "command", "-", "line", "tool", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MojoHelper.java#L48-L66
train
andi12/msbuild-maven-plugin
msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MojoHelper.java
MojoHelper.validatePlatforms
public static List<BuildPlatform> validatePlatforms( List<BuildPlatform> platforms ) throws MojoExecutionException { if ( platforms == null ) { platforms = new ArrayList<BuildPlatform>(); platforms.add( new BuildPlatform() ); } else { Set<S...
java
public static List<BuildPlatform> validatePlatforms( List<BuildPlatform> platforms ) throws MojoExecutionException { if ( platforms == null ) { platforms = new ArrayList<BuildPlatform>(); platforms.add( new BuildPlatform() ); } else { Set<S...
[ "public", "static", "List", "<", "BuildPlatform", ">", "validatePlatforms", "(", "List", "<", "BuildPlatform", ">", "platforms", ")", "throws", "MojoExecutionException", "{", "if", "(", "platforms", "==", "null", ")", "{", "platforms", "=", "new", "ArrayList", ...
Check that we have a valid set of platforms. If no platforms are configured we create 1 default platform. @param platforms the list of BuildPlatform's to validate @return the passed in list or a new list with a default platform added @throws MojoExecutionException if the configuration is invalid.
[ "Check", "that", "we", "have", "a", "valid", "set", "of", "platforms", ".", "If", "no", "platforms", "are", "configured", "we", "create", "1", "default", "platform", "." ]
224159c15efba20d482f8c630f7947339b1a1b86
https://github.com/andi12/msbuild-maven-plugin/blob/224159c15efba20d482f8c630f7947339b1a1b86/msbuild-maven-plugin/src/main/java/uk/org/raje/maven/plugin/msbuild/MojoHelper.java#L75-L97
train
padrig64/ValidationFramework
validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/ResultCollectorValidatorBuilder.java
ResultCollectorValidatorBuilder.collect
@Deprecated public static <D> RuleContext<D> collect(ResultCollector<?, D> resultCollector) { return new ResultCollectorContext().collect(resultCollector); }
java
@Deprecated public static <D> RuleContext<D> collect(ResultCollector<?, D> resultCollector) { return new ResultCollectorContext().collect(resultCollector); }
[ "@", "Deprecated", "public", "static", "<", "D", ">", "RuleContext", "<", "D", ">", "collect", "(", "ResultCollector", "<", "?", ",", "D", ">", "resultCollector", ")", "{", "return", "new", "ResultCollectorContext", "(", ")", ".", "collect", "(", "resultCo...
Adds the first result collector to the validator. @param resultCollector First result collector to be added. @param <D> Type of data provided. @return Next component to continue building the validator. @deprecated Use {@link com.google.code.validationframework.base.validator.generalvalidator.dsl.GeneralVal...
[ "Adds", "the", "first", "result", "collector", "to", "the", "validator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/ResultCollectorValidatorBuilder.java#L59-L62
train
padrig64/ValidationFramework
validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/ResultCollectorValidatorBuilder.java
ResultCollectorValidatorBuilder.collect
@Deprecated public static <D> RuleContext<D> collect(ResultCollector<?, D>... resultCollectors) { return new ResultCollectorContext().collect(resultCollectors); }
java
@Deprecated public static <D> RuleContext<D> collect(ResultCollector<?, D>... resultCollectors) { return new ResultCollectorContext().collect(resultCollectors); }
[ "@", "Deprecated", "public", "static", "<", "D", ">", "RuleContext", "<", "D", ">", "collect", "(", "ResultCollector", "<", "?", ",", "D", ">", "...", "resultCollectors", ")", "{", "return", "new", "ResultCollectorContext", "(", ")", ".", "collect", "(", ...
Adds the first result collectors to the validator. @param resultCollectors First result collectors to be added. @param <D> Type of data provided. @return Next component to continue building the validator. @deprecated Use {@link com.google.code.validationframework.base.validator.generalvalidator.dsl.Genera...
[ "Adds", "the", "first", "result", "collectors", "to", "the", "validator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/ResultCollectorValidatorBuilder.java#L74-L77
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/support/TransparentToolTipDialog.java
TransparentToolTipDialog.initComponents
private void initComponents() { // Avoid warning on Mac OS X when changing the alpha getRootPane().putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE); toolTip = new JToolTip(); toolTip.addMouseListener(new TransparencyAdapter()); owner.addComponentListener(...
java
private void initComponents() { // Avoid warning on Mac OS X when changing the alpha getRootPane().putClientProperty("apple.awt.draggableWindowBackground", Boolean.FALSE); toolTip = new JToolTip(); toolTip.addMouseListener(new TransparencyAdapter()); owner.addComponentListener(...
[ "private", "void", "initComponents", "(", ")", "{", "// Avoid warning on Mac OS X when changing the alpha", "getRootPane", "(", ")", ".", "putClientProperty", "(", "\"apple.awt.draggableWindowBackground\"", ",", "Boolean", ".", "FALSE", ")", ";", "toolTip", "=", "new", ...
Initializes the components of the tooltip window.
[ "Initializes", "the", "components", "of", "the", "tooltip", "window", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/support/TransparentToolTipDialog.java#L287-L302
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/support/TransparentToolTipDialog.java
TransparentToolTipDialog.setText
public void setText(String text) { // Only change if different if (!ValueUtils.areEqual(text, toolTip.getTipText())) { boolean wasVisible = isVisible(); if (wasVisible) { setVisible(false); } toolTip.setTipText(text); if (was...
java
public void setText(String text) { // Only change if different if (!ValueUtils.areEqual(text, toolTip.getTipText())) { boolean wasVisible = isVisible(); if (wasVisible) { setVisible(false); } toolTip.setTipText(text); if (was...
[ "public", "void", "setText", "(", "String", "text", ")", "{", "// Only change if different", "if", "(", "!", "ValueUtils", ".", "areEqual", "(", "text", ",", "toolTip", ".", "getTipText", "(", ")", ")", ")", "{", "boolean", "wasVisible", "=", "isVisible", ...
Sets the text to be displayed as a tooltip. @param text Text to be displayed
[ "Sets", "the", "text", "to", "be", "displayed", "as", "a", "tooltip", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/support/TransparentToolTipDialog.java#L359-L374
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/support/TransparentToolTipDialog.java
TransparentToolTipDialog.followOwner
private void followOwner() { if (owner.isVisible() && owner.isShowing()) { try { Point screenLocation = owner.getLocationOnScreen(); Point relativeSlaveLocation = anchorLink.getRelativeSlaveLocation(owner.getSize(), TransparentToolTipDialog.thi...
java
private void followOwner() { if (owner.isVisible() && owner.isShowing()) { try { Point screenLocation = owner.getLocationOnScreen(); Point relativeSlaveLocation = anchorLink.getRelativeSlaveLocation(owner.getSize(), TransparentToolTipDialog.thi...
[ "private", "void", "followOwner", "(", ")", "{", "if", "(", "owner", ".", "isVisible", "(", ")", "&&", "owner", ".", "isShowing", "(", ")", ")", "{", "try", "{", "Point", "screenLocation", "=", "owner", ".", "getLocationOnScreen", "(", ")", ";", "Point...
Updates the location of the window based on the location of the owner component.
[ "Updates", "the", "location", "of", "the", "window", "based", "on", "the", "location", "of", "the", "owner", "component", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/support/TransparentToolTipDialog.java#L379-L390
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/dataprovider/MapCompositeDataProvider.java
MapCompositeDataProvider.addDataProvider
public void addDataProvider(K key, DataProvider<DPO> dataProvider) { dataProviders.put(key, dataProvider); }
java
public void addDataProvider(K key, DataProvider<DPO> dataProvider) { dataProviders.put(key, dataProvider); }
[ "public", "void", "addDataProvider", "(", "K", "key", ",", "DataProvider", "<", "DPO", ">", "dataProvider", ")", "{", "dataProviders", ".", "put", "(", "key", ",", "dataProvider", ")", ";", "}" ]
Adds the specified data provider with the specified key. @param key Key associated to the data provider. @param dataProvider Data provider associated to the key.
[ "Adds", "the", "specified", "data", "provider", "with", "the", "specified", "key", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/dataprovider/MapCompositeDataProvider.java#L56-L58
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/bool/IconBooleanFeedback.java
IconBooleanFeedback.updateDecoration
private void updateDecoration() { if (lastResult != null) { if (lastResult) { setIcon(validIcon); setToolTipText(validText); } else { setIcon(invalidIcon); setToolTipText(invalidText); } } }
java
private void updateDecoration() { if (lastResult != null) { if (lastResult) { setIcon(validIcon); setToolTipText(validText); } else { setIcon(invalidIcon); setToolTipText(invalidText); } } }
[ "private", "void", "updateDecoration", "(", ")", "{", "if", "(", "lastResult", "!=", "null", ")", "{", "if", "(", "lastResult", ")", "{", "setIcon", "(", "validIcon", ")", ";", "setToolTipText", "(", "validText", ")", ";", "}", "else", "{", "setIcon", ...
Updates the icon and tooltip text according to the last result processed by this result handler.
[ "Updates", "the", "icon", "and", "tooltip", "text", "according", "to", "the", "last", "result", "processed", "by", "this", "result", "handler", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/bool/IconBooleanFeedback.java#L248-L258
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/trigger/BaseComponentKeyStrokeTrigger.java
BaseComponentKeyStrokeTrigger.toKeyStrokes
private static KeyStroke[] toKeyStrokes(int... keyCodes) { KeyStroke[] keyStrokes = null; if (keyCodes != null) { keyStrokes = new KeyStroke[keyCodes.length]; for (int i = 0; i < keyCodes.length; i++) { keyStrokes[i] = KeyStroke.getKeyStroke(keyCodes[i], 0); ...
java
private static KeyStroke[] toKeyStrokes(int... keyCodes) { KeyStroke[] keyStrokes = null; if (keyCodes != null) { keyStrokes = new KeyStroke[keyCodes.length]; for (int i = 0; i < keyCodes.length; i++) { keyStrokes[i] = KeyStroke.getKeyStroke(keyCodes[i], 0); ...
[ "private", "static", "KeyStroke", "[", "]", "toKeyStrokes", "(", "int", "...", "keyCodes", ")", "{", "KeyStroke", "[", "]", "keyStrokes", "=", "null", ";", "if", "(", "keyCodes", "!=", "null", ")", "{", "keyStrokes", "=", "new", "KeyStroke", "[", "keyCod...
Converts the specified array of key codes in an array of key strokes. @param keyCodes Array of key codes to be converted. @return Array of keystrokes resulting form the conversion.
[ "Converts", "the", "specified", "array", "of", "key", "codes", "in", "an", "array", "of", "key", "strokes", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/trigger/BaseComponentKeyStrokeTrigger.java#L137-L148
train
padrig64/ValidationFramework
validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/FeedbackDemo.java
FeedbackDemo.initValidation
private void initValidation() { // Create validators and collect the results SimpleProperty<Result> resultCollector1 = new SimpleProperty<Result>(); createValidator(textField1, new StickerFeedback(textField1), resultCollector1); SimpleProperty<Result> resultCollector2 = new SimplePropert...
java
private void initValidation() { // Create validators and collect the results SimpleProperty<Result> resultCollector1 = new SimpleProperty<Result>(); createValidator(textField1, new StickerFeedback(textField1), resultCollector1); SimpleProperty<Result> resultCollector2 = new SimplePropert...
[ "private", "void", "initValidation", "(", ")", "{", "// Create validators and collect the results", "SimpleProperty", "<", "Result", ">", "resultCollector1", "=", "new", "SimpleProperty", "<", "Result", ">", "(", ")", ";", "createValidator", "(", "textField1", ",", ...
Initializes the input validation and conditional logic.
[ "Initializes", "the", "input", "validation", "and", "conditional", "logic", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/FeedbackDemo.java#L294-L312
train
opencb/java-common-libs
commons-datastore/commons-datastore-core/src/main/java/org/opencb/commons/datastore/core/QueryOptions.java
QueryOptions.add
public Object add(String key, Object value) { if (!this.containsKey(key)) { this.put(key, value); return null; } return this.get(key); }
java
public Object add(String key, Object value) { if (!this.containsKey(key)) { this.put(key, value); return null; } return this.get(key); }
[ "public", "Object", "add", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "!", "this", ".", "containsKey", "(", "key", ")", ")", "{", "this", ".", "put", "(", "key", ",", "value", ")", ";", "return", "null", ";", "}", "return"...
This method safely add new options. If the key already exists it does not overwrite the current value. You can use put for overwritten the value. @param key The new option name @param value The new value @return null if the key was not present, or the existing object if the key exists.
[ "This", "method", "safely", "add", "new", "options", ".", "If", "the", "key", "already", "exists", "it", "does", "not", "overwrite", "the", "current", "value", ".", "You", "can", "use", "put", "for", "overwritten", "the", "value", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-core/src/main/java/org/opencb/commons/datastore/core/QueryOptions.java#L85-L91
train
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/SubtitleLineContentToHtmlBase.java
SubtitleLineContentToHtmlBase.appendElements
protected void appendElements(RendersnakeHtmlCanvas html, List<SubtitleItem.Inner> elements) throws IOException { for (SubtitleItem.Inner element : elements) { String kanji = element.getKanji(); if (kanji != null) { html.spanKanji(kanji); } else { html.write(element.getText()); } } ...
java
protected void appendElements(RendersnakeHtmlCanvas html, List<SubtitleItem.Inner> elements) throws IOException { for (SubtitleItem.Inner element : elements) { String kanji = element.getKanji(); if (kanji != null) { html.spanKanji(kanji); } else { html.write(element.getText()); } } ...
[ "protected", "void", "appendElements", "(", "RendersnakeHtmlCanvas", "html", ",", "List", "<", "SubtitleItem", ".", "Inner", ">", "elements", ")", "throws", "IOException", "{", "for", "(", "SubtitleItem", ".", "Inner", "element", ":", "elements", ")", "{", "St...
Appends furigana over the whole word
[ "Appends", "furigana", "over", "the", "whole", "word" ]
58d6af66b1b1c738326c74d9ad5e4ad514120e27
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/SubtitleLineContentToHtmlBase.java#L38-L48
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JListSelectedItemCountProperty.java
JListSelectedItemCountProperty.updateValue
private void updateValue() { if (list != null) { int oldCount = this.count; this.count = list.getSelectedIndices().length; maybeNotifyListeners(oldCount, count); } }
java
private void updateValue() { if (list != null) { int oldCount = this.count; this.count = list.getSelectedIndices().length; maybeNotifyListeners(oldCount, count); } }
[ "private", "void", "updateValue", "(", ")", "{", "if", "(", "list", "!=", "null", ")", "{", "int", "oldCount", "=", "this", ".", "count", ";", "this", ".", "count", "=", "list", ".", "getSelectedIndices", "(", ")", ".", "length", ";", "maybeNotifyListe...
Updates the value of this property based on the list's selection model and notify the listeners.
[ "Updates", "the", "value", "of", "this", "property", "based", "on", "the", "list", "s", "selection", "model", "and", "notify", "the", "listeners", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JListSelectedItemCountProperty.java#L93-L99
train
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/FacetQueryParser.java
FacetQueryParser.parse
public String parse(String query) throws Exception { if (StringUtils.isEmpty(query)) { return ""; } Map<String, Object> jsonFacetMap = new LinkedHashMap<>(); String[] split = query.split(FACET_SEPARATOR); for (String facet : split) { if (facet.contains(NE...
java
public String parse(String query) throws Exception { if (StringUtils.isEmpty(query)) { return ""; } Map<String, Object> jsonFacetMap = new LinkedHashMap<>(); String[] split = query.split(FACET_SEPARATOR); for (String facet : split) { if (facet.contains(NE...
[ "public", "String", "parse", "(", "String", "query", ")", "throws", "Exception", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "query", ")", ")", "{", "return", "\"\"", ";", "}", "Map", "<", "String", ",", "Object", ">", "jsonFacetMap", "=", "new...
This method accepts a simple facet declaration format and converts it into a rich JSON query. @param query A string with the format: chrom>>type,biotype,avg>>gerp,avg;type;biotype>>sadasd @return A JSON string facet query @throws Exception Any exception related with JSON conversion
[ "This", "method", "accepts", "a", "simple", "facet", "declaration", "format", "and", "converts", "it", "into", "a", "rich", "JSON", "query", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/FacetQueryParser.java#L55-L74
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableSetProperty.java
AbstractReadableSetProperty.doNotifyListenersOfAddedValues
protected void doNotifyListenersOfAddedValues(Set<R> newItems) { List<SetValueChangeListener<R>> listenersCopy = new ArrayList<SetValueChangeListener<R>>(listeners); Set<R> unmodifiable = Collections.unmodifiableSet(newItems); for (SetValueChangeListener<R> listener : listenersCopy) { ...
java
protected void doNotifyListenersOfAddedValues(Set<R> newItems) { List<SetValueChangeListener<R>> listenersCopy = new ArrayList<SetValueChangeListener<R>>(listeners); Set<R> unmodifiable = Collections.unmodifiableSet(newItems); for (SetValueChangeListener<R> listener : listenersCopy) { ...
[ "protected", "void", "doNotifyListenersOfAddedValues", "(", "Set", "<", "R", ">", "newItems", ")", "{", "List", "<", "SetValueChangeListener", "<", "R", ">>", "listenersCopy", "=", "new", "ArrayList", "<", "SetValueChangeListener", "<", "R", ">", ">", "(", "li...
Notifies the change listeners that items have been added. @param newItems Newly added items.
[ "Notifies", "the", "change", "listeners", "that", "items", "have", "been", "added", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableSetProperty.java#L88-L94
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableSetProperty.java
AbstractReadableSetProperty.doNotifyListenersOfRemovedValues
protected void doNotifyListenersOfRemovedValues(Set<R> oldItems) { List<SetValueChangeListener<R>> listenersCopy = new ArrayList<SetValueChangeListener<R>>(listeners); Set<R> unmodifiable = Collections.unmodifiableSet(oldItems); for (SetValueChangeListener<R> listener : listenersCopy) { ...
java
protected void doNotifyListenersOfRemovedValues(Set<R> oldItems) { List<SetValueChangeListener<R>> listenersCopy = new ArrayList<SetValueChangeListener<R>>(listeners); Set<R> unmodifiable = Collections.unmodifiableSet(oldItems); for (SetValueChangeListener<R> listener : listenersCopy) { ...
[ "protected", "void", "doNotifyListenersOfRemovedValues", "(", "Set", "<", "R", ">", "oldItems", ")", "{", "List", "<", "SetValueChangeListener", "<", "R", ">>", "listenersCopy", "=", "new", "ArrayList", "<", "SetValueChangeListener", "<", "R", ">", ">", "(", "...
Notifies the change listeners that items have been removed. @param oldItems Removed items.
[ "Notifies", "the", "change", "listeners", "that", "items", "have", "been", "removed", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableSetProperty.java#L101-L107
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/binding/Binder.java
Binder.read
public static <MO> SingleMasterBinding<MO, MO> read(ReadableProperty<MO> master) { return new SingleMasterBinding<MO, MO>(master, null); }
java
public static <MO> SingleMasterBinding<MO, MO> read(ReadableProperty<MO> master) { return new SingleMasterBinding<MO, MO>(master, null); }
[ "public", "static", "<", "MO", ">", "SingleMasterBinding", "<", "MO", ",", "MO", ">", "read", "(", "ReadableProperty", "<", "MO", ">", "master", ")", "{", "return", "new", "SingleMasterBinding", "<", "MO", ",", "MO", ">", "(", "master", ",", "null", ")...
Specifies the master property that is part of the binding. @param master Master property. @param <MO> Type of value to be read from the master property. @return DSL object.
[ "Specifies", "the", "master", "property", "that", "is", "part", "of", "the", "binding", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/binding/Binder.java#L224-L226
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/utils/ValueUtils.java
ValueUtils.areEqual
public static <T> boolean areEqual(T value1, T value2, Comparator<T> comparator) { return ((value1 == null) && (value2 == null)) || // ((value1 != null) && (value2 != null) && (comparator.compare(value1, value2) == 0)); }
java
public static <T> boolean areEqual(T value1, T value2, Comparator<T> comparator) { return ((value1 == null) && (value2 == null)) || // ((value1 != null) && (value2 != null) && (comparator.compare(value1, value2) == 0)); }
[ "public", "static", "<", "T", ">", "boolean", "areEqual", "(", "T", "value1", ",", "T", "value2", ",", "Comparator", "<", "T", ">", "comparator", ")", "{", "return", "(", "(", "value1", "==", "null", ")", "&&", "(", "value2", "==", "null", ")", ")"...
Compares the two given values by taking null values into account and the specified comparator. @param value1 First value. @param value2 Second value. @param comparator Comparator to be used to compare the two values in case they are both non null. @param <T> Type of values to be compared. @return True ...
[ "Compares", "the", "two", "given", "values", "by", "taking", "null", "values", "into", "account", "and", "the", "specified", "comparator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/utils/ValueUtils.java#L68-L71
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/rule/string/IllegalCharacterBooleanRule.java
IllegalCharacterBooleanRule.setIllegalCharacters
public void setIllegalCharacters(final String illegalCharacters) { // Create a simple sub-rule taking care of the check this.illegalCharacters = illegalCharacters; delegatePattern = new NegateBooleanRule<String>(new StringRegexRule("[" + Pattern.quote(illegalCharacters) + "]")); ...
java
public void setIllegalCharacters(final String illegalCharacters) { // Create a simple sub-rule taking care of the check this.illegalCharacters = illegalCharacters; delegatePattern = new NegateBooleanRule<String>(new StringRegexRule("[" + Pattern.quote(illegalCharacters) + "]")); ...
[ "public", "void", "setIllegalCharacters", "(", "final", "String", "illegalCharacters", ")", "{", "// Create a simple sub-rule taking care of the check", "this", ".", "illegalCharacters", "=", "illegalCharacters", ";", "delegatePattern", "=", "new", "NegateBooleanRule", "<", ...
Sets the list of illegal characters in a string. @param illegalCharacters String containing all illegal characters.
[ "Sets", "the", "list", "of", "illegal", "characters", "in", "a", "string", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/rule/string/IllegalCharacterBooleanRule.java#L79-L96
train
padrig64/ValidationFramework
validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/TabbedPaneDemo.java
TabbedPaneDemo.createTabContent
private Component createTabContent(CompositeReadableProperty<Boolean> tabResultsProperty) { JPanel panel = new JPanel(); panel.setLayout(new MigLayout("fill, wrap 2", "[][grow, fill]")); for (int i = 0; i < 2; i++) { panel.add(new JLabel("Field " + (i + 1) + ":")); // C...
java
private Component createTabContent(CompositeReadableProperty<Boolean> tabResultsProperty) { JPanel panel = new JPanel(); panel.setLayout(new MigLayout("fill, wrap 2", "[][grow, fill]")); for (int i = 0; i < 2; i++) { panel.add(new JLabel("Field " + (i + 1) + ":")); // C...
[ "private", "Component", "createTabContent", "(", "CompositeReadableProperty", "<", "Boolean", ">", "tabResultsProperty", ")", "{", "JPanel", "panel", "=", "new", "JPanel", "(", ")", ";", "panel", ".", "setLayout", "(", "new", "MigLayout", "(", "\"fill, wrap 2\"", ...
Creates some content to put in a tab in the tabbed pane. @param tabResultsProperty Composite property to put the tab-wise result into. @return Component representing the tab content and to be added to the tabbed pane.
[ "Creates", "some", "content", "to", "put", "in", "a", "tab", "in", "the", "tabbed", "pane", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/TabbedPaneDemo.java#L157-L175
train
padrig64/ValidationFramework
validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/TabbedPaneDemo.java
TabbedPaneDemo.installFieldValidation
private ReadableProperty<Boolean> installFieldValidation(JTextField field) { // FieLd is valid if not empty SimpleBooleanProperty fieldResult = new SimpleBooleanProperty(); on(new JTextFieldDocumentChangedTrigger(field)) // .read(new JTextFieldTextProvider(field)) // ...
java
private ReadableProperty<Boolean> installFieldValidation(JTextField field) { // FieLd is valid if not empty SimpleBooleanProperty fieldResult = new SimpleBooleanProperty(); on(new JTextFieldDocumentChangedTrigger(field)) // .read(new JTextFieldTextProvider(field)) // ...
[ "private", "ReadableProperty", "<", "Boolean", ">", "installFieldValidation", "(", "JTextField", "field", ")", "{", "// FieLd is valid if not empty", "SimpleBooleanProperty", "fieldResult", "=", "new", "SimpleBooleanProperty", "(", ")", ";", "on", "(", "new", "JTextFiel...
Sets up a validator for the specified field. @param field Field on which a validator should be installed. @return Property representing the result of the field validation and that can be used for tab-wise validation.
[ "Sets", "up", "a", "validator", "for", "the", "specified", "field", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-demo/src/main/java/com/google/code/validationframework/demo/swing/TabbedPaneDemo.java#L184-L196
train
checkstyle-addons/checkstyle-addons
src/main/java/com/thomasjensen/checkstyle/addons/util/CheckstyleApiFixer.java
CheckstyleApiFixer.getTokenName
@Nonnull public String getTokenName(final int pTokenId) { final List<String> searchClasses = Arrays.asList("com.puppycrawl.tools.checkstyle.utils.TokenUtil", "com.puppycrawl.tools.checkstyle.utils.TokenUtils", TokenTypes.class.getName(), "com.puppycrawl.tools.checkstyle.Utils"); ...
java
@Nonnull public String getTokenName(final int pTokenId) { final List<String> searchClasses = Arrays.asList("com.puppycrawl.tools.checkstyle.utils.TokenUtil", "com.puppycrawl.tools.checkstyle.utils.TokenUtils", TokenTypes.class.getName(), "com.puppycrawl.tools.checkstyle.Utils"); ...
[ "@", "Nonnull", "public", "String", "getTokenName", "(", "final", "int", "pTokenId", ")", "{", "final", "List", "<", "String", ">", "searchClasses", "=", "Arrays", ".", "asList", "(", "\"com.puppycrawl.tools.checkstyle.utils.TokenUtil\"", ",", "\"com.puppycrawl.tools....
Returns the name of a token for a given ID. @param pTokenId the ID of the token name to get @return a token name as returned by Checkstyle @throws UnsupportedOperationException no known variant of <code>getTokenName()</code> could be found
[ "Returns", "the", "name", "of", "a", "token", "for", "a", "given", "ID", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/src/main/java/com/thomasjensen/checkstyle/addons/util/CheckstyleApiFixer.java#L126-L156
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.checkResult
private static int checkResult(int result) { if (exceptionsEnabled && result != nvgraphStatus.NVGRAPH_STATUS_SUCCESS) { throw new CudaException(nvgraphStatus.stringFor(result)); } return result; }
java
private static int checkResult(int result) { if (exceptionsEnabled && result != nvgraphStatus.NVGRAPH_STATUS_SUCCESS) { throw new CudaException(nvgraphStatus.stringFor(result)); } return result; }
[ "private", "static", "int", "checkResult", "(", "int", "result", ")", "{", "if", "(", "exceptionsEnabled", "&&", "result", "!=", "nvgraphStatus", ".", "NVGRAPH_STATUS_SUCCESS", ")", "{", "throw", "new", "CudaException", "(", "nvgraphStatus", ".", "stringFor", "(...
If the given result is not nvgraphStatus.NVGRAPH_STATUS_SUCCESS and exceptions have been enabled, this method will throw a CudaException with an error message that corresponds to the given result code. Otherwise, the given result is simply returned. @param result The result to check @return The result that was given a...
[ "If", "the", "given", "result", "is", "not", "nvgraphStatus", ".", "NVGRAPH_STATUS_SUCCESS", "and", "exceptions", "have", "been", "enabled", "this", "method", "will", "throw", "a", "CudaException", "with", "an", "error", "message", "that", "corresponds", "to", "...
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L109-L117
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphSetGraphStructure
public static int nvgraphSetGraphStructure( nvgraphHandle handle, nvgraphGraphDescr descrG, Object topologyData, int TType) { return checkResult(nvgraphSetGraphStructureNative(handle, descrG, topologyData, TType)); }
java
public static int nvgraphSetGraphStructure( nvgraphHandle handle, nvgraphGraphDescr descrG, Object topologyData, int TType) { return checkResult(nvgraphSetGraphStructureNative(handle, descrG, topologyData, TType)); }
[ "public", "static", "int", "nvgraphSetGraphStructure", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "Object", "topologyData", ",", "int", "TType", ")", "{", "return", "checkResult", "(", "nvgraphSetGraphStructureNative", "(", "handle", ",",...
Set size, topology data in the graph descriptor
[ "Set", "size", "topology", "data", "in", "the", "graph", "descriptor" ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L206-L213
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphGetGraphStructure
public static int nvgraphGetGraphStructure( nvgraphHandle handle, nvgraphGraphDescr descrG, Object topologyData, int[] TType) { return checkResult(nvgraphGetGraphStructureNative(handle, descrG, topologyData, TType)); }
java
public static int nvgraphGetGraphStructure( nvgraphHandle handle, nvgraphGraphDescr descrG, Object topologyData, int[] TType) { return checkResult(nvgraphGetGraphStructureNative(handle, descrG, topologyData, TType)); }
[ "public", "static", "int", "nvgraphGetGraphStructure", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "Object", "topologyData", ",", "int", "[", "]", "TType", ")", "{", "return", "checkResult", "(", "nvgraphGetGraphStructureNative", "(", "h...
Query size and topology information from the graph descriptor
[ "Query", "size", "and", "topology", "information", "from", "the", "graph", "descriptor" ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L222-L229
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphConvertTopology
public static int nvgraphConvertTopology( nvgraphHandle handle, int srcTType, Object srcTopology, Pointer srcEdgeData, Pointer dataType, int dstTType, Object dstTopology, Pointer dstEdgeData) { return checkResult(nvgraphConvertTopologyNa...
java
public static int nvgraphConvertTopology( nvgraphHandle handle, int srcTType, Object srcTopology, Pointer srcEdgeData, Pointer dataType, int dstTType, Object dstTopology, Pointer dstEdgeData) { return checkResult(nvgraphConvertTopologyNa...
[ "public", "static", "int", "nvgraphConvertTopology", "(", "nvgraphHandle", "handle", ",", "int", "srcTType", ",", "Object", "srcTopology", ",", "Pointer", "srcEdgeData", ",", "Pointer", "dataType", ",", "int", "dstTType", ",", "Object", "dstTopology", ",", "Pointe...
Convert the edge data to another topology
[ "Convert", "the", "edge", "data", "to", "another", "topology" ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L307-L318
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphConvertGraph
public static int nvgraphConvertGraph( nvgraphHandle handle, nvgraphGraphDescr srcDescrG, nvgraphGraphDescr dstDescrG, int dstTType) { return checkResult(nvgraphConvertGraphNative(handle, srcDescrG, dstDescrG, dstTType)); }
java
public static int nvgraphConvertGraph( nvgraphHandle handle, nvgraphGraphDescr srcDescrG, nvgraphGraphDescr dstDescrG, int dstTType) { return checkResult(nvgraphConvertGraphNative(handle, srcDescrG, dstDescrG, dstTType)); }
[ "public", "static", "int", "nvgraphConvertGraph", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "srcDescrG", ",", "nvgraphGraphDescr", "dstDescrG", ",", "int", "dstTType", ")", "{", "return", "checkResult", "(", "nvgraphConvertGraphNative", "(", "handle", ...
Convert graph to another structure
[ "Convert", "graph", "to", "another", "structure" ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L332-L339
train