repo
stringlengths
7
59
path
stringlengths
3
222
func_name
stringlengths
3
127
original_string
stringlengths
0
466k
language
stringclasses
1 value
code
stringlengths
0
466k
code_tokens
listlengths
0
68.3k
docstring
stringlengths
0
21.3k
docstring_tokens
listlengths
0
1.93k
sha
stringlengths
0
40
url
stringlengths
0
339
partition
stringclasses
3 values
summary
stringlengths
0
250
instruction
stringlengths
38
3.13k
input
stringclasses
1 value
output
stringlengths
146
466k
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/search/FieldSearchResultSQLImpl.java
FieldSearchResultSQLImpl.logAndGetQueryText
private String logAndGetQueryText(FieldSearchQuery query, String[] resultFields) //2004.05.02 wdn5e throws SQLException, QueryParseException { StringBuffer queryText = new StringBuffer("SELECT"); if (query.getType() == FieldSearchQuery.TERMS_TYPE) { ...
java
private String logAndGetQueryText(FieldSearchQuery query, String[] resultFields) //2004.05.02 wdn5e throws SQLException, QueryParseException { StringBuffer queryText = new StringBuffer("SELECT"); if (query.getType() == FieldSearchQuery.TERMS_TYPE) { ...
[ "private", "String", "logAndGetQueryText", "(", "FieldSearchQuery", "query", ",", "String", "[", "]", "resultFields", ")", "//2004.05.02 wdn5e", "throws", "SQLException", ",", "QueryParseException", "{", "StringBuffer", "queryText", "=", "new", "StringBuffer", "(", "\...
2004.05.02 wdn5e -- sort on selected fields
[ "2004", ".", "05", ".", "02", "wdn5e", "--", "sort", "on", "selected", "fields" ]
37df51b9b857fd12c6ab8269820d406c3c4ad774
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/search/FieldSearchResultSQLImpl.java#L158-L186
train
Log the query text.
Create a Java method that does the following: "Log the query text.".
Of course, here is the Java code you requested: ```java private String logAndGetQueryText(FieldSearchQuery query, String[] resultFields) //2004.05.02 wdn5e throws SQLException, QueryParseException { StringBuffer queryText = new StringBuffer("SELECT"); i...
paypal/SeLion
client/src/main/java/com/paypal/selion/platform/asserts/SeLionSoftAssert.java
SeLionSoftAssert.showAssertInfo
private void showAssertInfo(IAssert<?> assertCommand, AssertionError ex, boolean failedTest) { ITestResult testResult = Reporter.getCurrentTestResult(); // Checks whether the soft assert was called in a TestNG test run or else within a Java application. String methodName = "main"; if (t...
java
private void showAssertInfo(IAssert<?> assertCommand, AssertionError ex, boolean failedTest) { ITestResult testResult = Reporter.getCurrentTestResult(); // Checks whether the soft assert was called in a TestNG test run or else within a Java application. String methodName = "main"; if (t...
[ "private", "void", "showAssertInfo", "(", "IAssert", "<", "?", ">", "assertCommand", ",", "AssertionError", "ex", ",", "boolean", "failedTest", ")", "{", "ITestResult", "testResult", "=", "Reporter", ".", "getCurrentTestResult", "(", ")", ";", "// Checks whether t...
Shows a message in Reporter based on the assert result and also includes the stacktrace for failed assert. @param assertCommand The assert conditions for current test. @param ex An {@link AssertionError} in case of failed assert, else null. @param failedTest A boolean {@code true} when the assert has failed.
[ "Shows", "a", "message", "in", "Reporter", "based", "on", "the", "assert", "result", "and", "also", "includes", "the", "stacktrace", "for", "failed", "assert", "." ]
694d12d0df76db48d0360b16192770c6a4fbdfd2
https://github.com/paypal/SeLion/blob/694d12d0df76db48d0360b16192770c6a4fbdfd2/client/src/main/java/com/paypal/selion/platform/asserts/SeLionSoftAssert.java#L71-L95
train
Show assert info.
Create a Java method that does the following: "Show assert info.".
Of course, here is the Java code you requested: ```java private void showAssertInfo(IAssert<?> assertCommand, AssertionError ex, boolean failedTest) { ITestResult testResult = Reporter.getCurrentTestResult(); // Checks whether the soft assert was called in a TestNG test run or else within a Java appli...
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/util/ExtractorUtils.java
ExtractorUtils.setPublisherInfo
private static void setPublisherInfo(Map<String, String> env, Run build, BuildInfo pipelineBuildInfo, PublisherContext context, ArtifactoryClientConfiguration configuration) { configuration.setActivateRecorder(Boolean.TRUE); String buildName; String build...
java
private static void setPublisherInfo(Map<String, String> env, Run build, BuildInfo pipelineBuildInfo, PublisherContext context, ArtifactoryClientConfiguration configuration) { configuration.setActivateRecorder(Boolean.TRUE); String buildName; String build...
[ "private", "static", "void", "setPublisherInfo", "(", "Map", "<", "String", ",", "String", ">", "env", ",", "Run", "build", ",", "BuildInfo", "pipelineBuildInfo", ",", "PublisherContext", "context", ",", "ArtifactoryClientConfiguration", "configuration", ")", "{", ...
Set all the parameters relevant for publishing artifacts and build info
[ "Set", "all", "the", "parameters", "relevant", "for", "publishing", "artifacts", "and", "build", "info" ]
f5fcfff6a5a50be5374813e49d1fe3aaf6422333
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/util/ExtractorUtils.java#L250-L387
train
Sets the publisher info.
Create a Java method that does the following: "Sets the publisher info.".
Of course, here is the Java code you requested: ```java private static void setPublisherInfo(Map<String, String> env, Run build, BuildInfo pipelineBuildInfo, PublisherContext context, ArtifactoryClientConfiguration configuration) { configuration.setActivateRecorder(Bool...
Comcast/jrugged
jrugged-spring/src/main/java/org/fishwife/jrugged/spring/jmx/WebMBeanServerAdapter.java
WebMBeanServerAdapter.createWebMBeanAdapter
public WebMBeanAdapter createWebMBeanAdapter(String mBeanName, String encoding) throws JMException, UnsupportedEncodingException { return new WebMBeanAdapter(mBeanServer, mBeanName, encoding); }
java
public WebMBeanAdapter createWebMBeanAdapter(String mBeanName, String encoding) throws JMException, UnsupportedEncodingException { return new WebMBeanAdapter(mBeanServer, mBeanName, encoding); }
[ "public", "WebMBeanAdapter", "createWebMBeanAdapter", "(", "String", "mBeanName", ",", "String", "encoding", ")", "throws", "JMException", ",", "UnsupportedEncodingException", "{", "return", "new", "WebMBeanAdapter", "(", "mBeanServer", ",", "mBeanName", ",", "encoding"...
Create a WebMBeanAdaptor for a specified MBean name. @param mBeanName the MBean name (can be URL-encoded). @param encoding the string encoding to be used (i.e. UTF-8) @return the created WebMBeanAdaptor. @throws JMException Java Management Exception @throws UnsupportedEncodingException if the encoding is not supported.
[ "Create", "a", "WebMBeanAdaptor", "for", "a", "specified", "MBean", "name", "." ]
b6a5147c68ee733faf5616d49800abcbba67afe9
https://github.com/Comcast/jrugged/blob/b6a5147c68ee733faf5616d49800abcbba67afe9/jrugged-spring/src/main/java/org/fishwife/jrugged/spring/jmx/WebMBeanServerAdapter.java#L71-L74
train
Create a new instance of the WebMBeanAdapter class.
Create a Java method that does the following: "Create a new instance of the WebMBeanAdapter class.".
Of course, here is the Java code you requested: ```java public WebMBeanAdapter createWebMBeanAdapter(String mBeanName, String encoding) throws JMException, UnsupportedEncodingException { return new WebMBeanAdapter(mBeanServer, mBeanName, encoding); } ``` Hope this helps!
baratine/baratine
core/src/main/java/com/caucho/v5/bytecode/JavaClass.java
JavaClass.getDeclaredFields
public JField []getDeclaredFields() { ArrayList<JavaField> fieldList = getFieldList(); JField[] fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
java
public JField []getDeclaredFields() { ArrayList<JavaField> fieldList = getFieldList(); JField[] fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; }
[ "public", "JField", "[", "]", "getDeclaredFields", "(", ")", "{", "ArrayList", "<", "JavaField", ">", "fieldList", "=", "getFieldList", "(", ")", ";", "JField", "[", "]", "fields", "=", "new", "JField", "[", "fieldList", ".", "size", "(", ")", "]", ";"...
Returns the array of declared fields.
[ "Returns", "the", "array", "of", "declared", "fields", "." ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/bytecode/JavaClass.java#L683-L692
train
Returns an array of all declared fields.
Create a Java method that does the following: "Returns an array of all declared fields.".
Of course, here is the Java code you requested: ```java public JField []getDeclaredFields() { ArrayList<JavaField> fieldList = getFieldList(); JField[] fields = new JField[fieldList.size()]; fieldList.toArray(fields); return fields; } ``` Hope this helps!
influxdata/influxdb-java
src/main/java/org/influxdb/impl/InfluxDBImpl.java
InfluxDBImpl.createRetentionPolicy
@Override public void createRetentionPolicy(final String rpName, final String database, final String duration, final int replicationFactor, final boolean isDefault) { createRetentionPolicy(rpName, database, duration, null, replicationFactor, isDefault); }
java
@Override public void createRetentionPolicy(final String rpName, final String database, final String duration, final int replicationFactor, final boolean isDefault) { createRetentionPolicy(rpName, database, duration, null, replicationFactor, isDefault); }
[ "@", "Override", "public", "void", "createRetentionPolicy", "(", "final", "String", "rpName", ",", "final", "String", "database", ",", "final", "String", "duration", ",", "final", "int", "replicationFactor", ",", "final", "boolean", "isDefault", ")", "{", "creat...
{@inheritDoc}
[ "{" ]
8ae777f34aa2e598f609208cf4fa12d4642f83f5
https://github.com/influxdata/influxdb-java/blob/8ae777f34aa2e598f609208cf4fa12d4642f83f5/src/main/java/org/influxdb/impl/InfluxDBImpl.java#L897-L901
train
Create retention policy.
Create a Java method that does the following: "Create retention policy.".
Of course, here is the Java code you requested: ```java @Override public void createRetentionPolicy(final String rpName, final String database, final String duration, final int replicationFactor, final boolean isDefault) { createRetentionPolicy(rpName, database, duration, null...
SonarSource/sonarqube
sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/DuplicationsCollector.java
DuplicationsCollector.endOfGroup
@Override public void endOfGroup() { ClonePart origin = null; CloneGroup.Builder builder = CloneGroup.builder().setLength(length); List<ClonePart> parts = new ArrayList<>(count); for (int[] b : blockNumbers) { Block firstBlock = text.getBlock(b[0]); Block lastBlock = text.getBlock(b[1]);...
java
@Override public void endOfGroup() { ClonePart origin = null; CloneGroup.Builder builder = CloneGroup.builder().setLength(length); List<ClonePart> parts = new ArrayList<>(count); for (int[] b : blockNumbers) { Block firstBlock = text.getBlock(b[0]); Block lastBlock = text.getBlock(b[1]);...
[ "@", "Override", "public", "void", "endOfGroup", "(", ")", "{", "ClonePart", "origin", "=", "null", ";", "CloneGroup", ".", "Builder", "builder", "=", "CloneGroup", ".", "builder", "(", ")", ".", "setLength", "(", "length", ")", ";", "List", "<", "CloneP...
Constructs CloneGroup and saves it.
[ "Constructs", "CloneGroup", "and", "saves", "it", "." ]
2fffa4c2f79ae3714844d7742796e82822b6a98a
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/sonar-duplications/src/main/java/org/sonar/duplications/detector/suffixtree/DuplicationsCollector.java#L79-L116
train
This method is called when the end of a group is encountered.
Create a Java method that does the following: "This method is called when the end of a group is encountered.".
Of course, here is the Java code you requested: ```java @Override public void endOfGroup() { ClonePart origin = null; CloneGroup.Builder builder = CloneGroup.builder().setLength(length); List<ClonePart> parts = new ArrayList<>(count); for (int[] b : blockNumbers) { Block firstBlock = text.get...
geomajas/geomajas-project-server
command/src/main/java/org/geomajas/command/dto/GetVectorTileRequest.java
GetVectorTileRequest.isPartOf
public boolean isPartOf(GetVectorTileRequest request) { if (Math.abs(request.scale - scale) > EQUALS_DELTA) { return false; } if (code != null ? !code.equals(request.code) : request.code != null) { return false; } if (crs != null ? !crs.equals(request.crs) : request.crs != null) { return false; } if (filter != ...
java
public boolean isPartOf(GetVectorTileRequest request) { if (Math.abs(request.scale - scale) > EQUALS_DELTA) { return false; } if (code != null ? !code.equals(request.code) : request.code != null) { return false; } if (crs != null ? !crs.equals(request.crs) : request.crs != null) { return false; } if (filter != ...
[ "public", "boolean", "isPartOf", "(", "GetVectorTileRequest", "request", ")", "{", "if", "(", "Math", ".", "abs", "(", "request", ".", "scale", "-", "scale", ")", ">", "EQUALS_DELTA", ")", "{", "return", "false", ";", "}", "if", "(", "code", "!=", "nul...
Check if this request is part of the specified request. This is the case if both requests have equal properties and the specified request is asking for the same or more paint operations than this one. @param request another request @return true if the current request is contained in the specified request @since 1.10.0
[ "Check", "if", "this", "request", "is", "part", "of", "the", "specified", "request", ".", "This", "is", "the", "case", "if", "both", "requests", "have", "equal", "properties", "and", "the", "specified", "request", "is", "asking", "for", "the", "same", "or"...
904b7d7deed1350d28955589098dd1e0a786d76e
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/command/src/main/java/org/geomajas/command/dto/GetVectorTileRequest.java#L343-L354
train
Checks if this request is part of the request.
Create a Java method that does the following: "Checks if this request is part of the request.".
Of course, here is the Java code you requested: ```java public boolean isPartOf(GetVectorTileRequest request) { if (Math.abs(request.scale - scale) > EQUALS_DELTA) { return false; } if (code != null ? !code.equals(request.code) : request.code != null) { return false; } if (crs != null ? !crs.equals(request.crs) ...
tcurdt/jdeb
src/main/java/org/vafer/jdeb/utils/Utils.java
Utils.replaceVariables
public static String replaceVariables( final VariableResolver pResolver, final String pExpression, final String pOpen, final String pClose ) { final char[] open = pOpen.toCharArray(); final char[] close = pClose.toCharArray(); final StringBuilder out = new StringBuilder(); StringBuilder...
java
public static String replaceVariables( final VariableResolver pResolver, final String pExpression, final String pOpen, final String pClose ) { final char[] open = pOpen.toCharArray(); final char[] close = pClose.toCharArray(); final StringBuilder out = new StringBuilder(); StringBuilder...
[ "public", "static", "String", "replaceVariables", "(", "final", "VariableResolver", "pResolver", ",", "final", "String", "pExpression", ",", "final", "String", "pOpen", ",", "final", "String", "pClose", ")", "{", "final", "char", "[", "]", "open", "=", "pOpen"...
Substitute the variables in the given expression with the values from the resolver @param pResolver @param pExpression
[ "Substitute", "the", "variables", "in", "the", "given", "expression", "with", "the", "values", "from", "the", "resolver" ]
b899a7b1b3391356aafc491ab601f258961f67f0
https://github.com/tcurdt/jdeb/blob/b899a7b1b3391356aafc491ab601f258961f67f0/src/main/java/org/vafer/jdeb/utils/Utils.java#L129-L213
train
Replaces the variables in the given expression with the corresponding value.
Create a Java method that does the following: "Replaces the variables in the given expression with the corresponding value.".
Of course, here is the Java code you requested: ```java public static String replaceVariables( final VariableResolver pResolver, final String pExpression, final String pOpen, final String pClose ) { final char[] open = pOpen.toCharArray(); final char[] close = pClose.toCharArray(); final Strin...
autermann/yaml
src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java
YamlMappingNode.put
public T put(YamlNode key, byte value) { return put(key, getNodeFactory().byteNode(value)); }
java
public T put(YamlNode key, byte value) { return put(key, getNodeFactory().byteNode(value)); }
[ "public", "T", "put", "(", "YamlNode", "key", ",", "byte", "value", ")", "{", "return", "put", "(", "key", ",", "getNodeFactory", "(", ")", ".", "byteNode", "(", "value", ")", ")", ";", "}" ]
Adds the specified {@code key}/{@code value} pair to this mapping. @param key the key @param value the value @return {@code this}
[ "Adds", "the", "specified", "{", "@code", "key", "}", "/", "{", "@code", "value", "}", "pair", "to", "this", "mapping", "." ]
5f8ab03e4fec3a2abe72c03561cdaa3a3936634d
https://github.com/autermann/yaml/blob/5f8ab03e4fec3a2abe72c03561cdaa3a3936634d/src/main/java/com/github/autermann/yaml/nodes/YamlMappingNode.java#L420-L422
train
Put a byte value into the context.
Create a Java method that does the following: "Put a byte value into the context.".
Of course, here is the Java code you requested: ```java public T put(YamlNode key, byte value) { return put(key, getNodeFactory().byteNode(value)); } ``` Hope this helps!
alkacon/opencms-core
src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java
CmsSerialDateView.initDeactivationPanel
private void initDeactivationPanel() { m_deactivationPanel.setVisible(false); m_deactivationText.setText(Messages.get().key(Messages.GUI_SERIALDATE_DEACTIVE_TEXT_0)); }
java
private void initDeactivationPanel() { m_deactivationPanel.setVisible(false); m_deactivationText.setText(Messages.get().key(Messages.GUI_SERIALDATE_DEACTIVE_TEXT_0)); }
[ "private", "void", "initDeactivationPanel", "(", ")", "{", "m_deactivationPanel", ".", "setVisible", "(", "false", ")", ";", "m_deactivationText", ".", "setText", "(", "Messages", ".", "get", "(", ")", ".", "key", "(", "Messages", ".", "GUI_SERIALDATE_DEACTIVE_T...
Initialize elements of the panel displayed for the deactivated widget.
[ "Initialize", "elements", "of", "the", "panel", "displayed", "for", "the", "deactivated", "widget", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/acacia/client/widgets/serialdate/CmsSerialDateView.java#L598-L603
train
Initialize the panel and the text fields.
Create a Java method that does the following: "Initialize the panel and the text fields.".
Of course, here is the Java code you requested: ```java private void initDeactivationPanel() { m_deactivationPanel.setVisible(false); m_deactivationText.setText(Messages.get().key(Messages.GUI_SERIALDATE_DEACTIVE_TEXT_0)); } ``` Hope this helps!
playframework/playframework
core/play/src/main/java/play/mvc/Results.java
Results.tooManyRequests
public static Result tooManyRequests(File content, String filename) { return tooManyRequests(content, filename, StaticFileMimeTypes.fileMimeTypes()); }
java
public static Result tooManyRequests(File content, String filename) { return tooManyRequests(content, filename, StaticFileMimeTypes.fileMimeTypes()); }
[ "public", "static", "Result", "tooManyRequests", "(", "File", "content", ",", "String", "filename", ")", "{", "return", "tooManyRequests", "(", "content", ",", "filename", ",", "StaticFileMimeTypes", ".", "fileMimeTypes", "(", ")", ")", ";", "}" ]
Generates a 429 Too Many Requests result. @param content The file to send. @param filename The name to send the file as. @return the result
[ "Generates", "a", "429", "Too", "Many", "Requests", "result", "." ]
3c46dca803d24e715d85de678c59dcfac9525a00
https://github.com/playframework/playframework/blob/3c46dca803d24e715d85de678c59dcfac9525a00/core/play/src/main/java/play/mvc/Results.java#L3453-L3455
test
Returns a Result indicating that the content is tooManyRequests.
Create a Java method that does the following: "Returns a Result indicating that the content is tooManyRequests.".
Of course, here is the Java code you requested: ```java public static Result tooManyRequests(File content, String filename) { return tooManyRequests(content, filename, StaticFileMimeTypes.fileMimeTypes()); } ``` Hope this helps!
Azure/azure-storage-android
microsoft-azure-storage/src/com/microsoft/azure/storage/table/MimeHelper.java
MimeHelper.generateMimeParseException
private static StorageException generateMimeParseException() { return new StorageException(StorageErrorCodeStrings.OUT_OF_RANGE_INPUT, SR.INVALID_MIME_RESPONSE, Constants.HeaderConstants.HTTP_UNUSED_306, null, null); }
java
private static StorageException generateMimeParseException() { return new StorageException(StorageErrorCodeStrings.OUT_OF_RANGE_INPUT, SR.INVALID_MIME_RESPONSE, Constants.HeaderConstants.HTTP_UNUSED_306, null, null); }
[ "private", "static", "StorageException", "generateMimeParseException", "(", ")", "{", "return", "new", "StorageException", "(", "StorageErrorCodeStrings", ".", "OUT_OF_RANGE_INPUT", ",", "SR", ".", "INVALID_MIME_RESPONSE", ",", "Constants", ".", "HeaderConstants", ".", ...
Reserved for internal use. A static factory method that generates a {@link StorageException} for invalid MIME responses. @return The {@link StorageException} for the invalid MIME response.
[ "Reserved", "for", "internal", "use", ".", "A", "static", "factory", "method", "that", "generates", "a", "{", "@link", "StorageException", "}", "for", "invalid", "MIME", "responses", "." ]
2c643c37c6b8c9081058add284c601a2393afc93
https://github.com/Azure/azure-storage-android/blob/2c643c37c6b8c9081058add284c601a2393afc93/microsoft-azure-storage/src/com/microsoft/azure/storage/table/MimeHelper.java#L482-L485
valid
Generate a StorageException for an invalid MIME type.
Create a Java method that does the following: "Generate a StorageException for an invalid MIME type.".
Of course, here is the Java code you requested: ```java private static StorageException generateMimeParseException() { return new StorageException(StorageErrorCodeStrings.OUT_OF_RANGE_INPUT, SR.INVALID_MIME_RESPONSE, Constants.HeaderConstants.HTTP_UNUSED_306, null, null); } ``` Hope this h...
rhuss/jolokia
agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java
TabularDataExtractor.hasComplexKeys
private boolean hasComplexKeys(TabularType pType) { List<String> indexes = pType.getIndexNames(); CompositeType rowType = pType.getRowType(); for (String index : indexes) { if ( ! (rowType.getType(index) instanceof SimpleType)) { return true; } } ...
java
private boolean hasComplexKeys(TabularType pType) { List<String> indexes = pType.getIndexNames(); CompositeType rowType = pType.getRowType(); for (String index : indexes) { if ( ! (rowType.getType(index) instanceof SimpleType)) { return true; } } ...
[ "private", "boolean", "hasComplexKeys", "(", "TabularType", "pType", ")", "{", "List", "<", "String", ">", "indexes", "=", "pType", ".", "getIndexNames", "(", ")", ";", "CompositeType", "rowType", "=", "pType", ".", "getRowType", "(", ")", ";", "for", "(",...
Check, whether all keys are simple types or not
[ "Check", "whether", "all", "keys", "are", "simple", "types", "or", "not" ]
dc95e7bef859b1829776c5a84c8f7738f5d7d9c3
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/core/src/main/java/org/jolokia/converter/json/TabularDataExtractor.java#L164-L173
train
Checks if the composite type has a simple key.
Create a Java method that does the following: "Checks if the composite type has a simple key.".
Of course, here is the Java code you requested: ```java private boolean hasComplexKeys(TabularType pType) { List<String> indexes = pType.getIndexNames(); CompositeType rowType = pType.getRowType(); for (String index : indexes) { if ( ! (rowType.getType(index) instanceof SimpleType))...
Waikato/moa
moa/src/main/java/weka/gui/MOAClassOptionEditor.java
MOAClassOptionEditor.createCustomEditor
protected Component createCustomEditor() { JPanel panel; panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); m_EditComponent = (ClassOptionEditComponent) getEditComponent((ClassOption) getValue()); m_EditComponent.addChangeListener(new ChangeListener() { ...
java
protected Component createCustomEditor() { JPanel panel; panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); m_EditComponent = (ClassOptionEditComponent) getEditComponent((ClassOption) getValue()); m_EditComponent.addChangeListener(new ChangeListener() { ...
[ "protected", "Component", "createCustomEditor", "(", ")", "{", "JPanel", "panel", ";", "panel", "=", "new", "JPanel", "(", "new", "BorderLayout", "(", ")", ")", ";", "panel", ".", "setBorder", "(", "BorderFactory", ".", "createEmptyBorder", "(", "5", ",", ...
Creates the custom editor. @return the editor
[ "Creates", "the", "custom", "editor", "." ]
395982e5100bfe75a3a4d26115462ce2cc74cbb0
https://github.com/Waikato/moa/blob/395982e5100bfe75a3a4d26115462ce2cc74cbb0/moa/src/main/java/weka/gui/MOAClassOptionEditor.java#L78-L93
train
Create the custom editor.
Create a Java method that does the following: "Create the custom editor.".
Of course, here is the Java code you requested: ```java protected Component createCustomEditor() { JPanel panel; panel = new JPanel(new BorderLayout()); panel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); m_EditComponent = (ClassOptionEditComponent) getEditComponent((ClassOption) getValue()); m_...
tweea/matrixjavalib-main-common
src/main/java/net/matrix/configuration/HierarchicalConfigurationUtils.java
HierarchicalConfigurationUtils.parseAttributes
public static Map<String, String> parseAttributes(final Configuration config) { Map<String, String> parameters = new HashMap<>(); for (String key : new IterableIterator<>(config.getKeys())) { String value = config.getString(key); parameters.put(key, value); } return parameters; }
java
public static Map<String, String> parseAttributes(final Configuration config) { Map<String, String> parameters = new HashMap<>(); for (String key : new IterableIterator<>(config.getKeys())) { String value = config.getString(key); parameters.put(key, value); } return parameters; }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "parseAttributes", "(", "final", "Configuration", "config", ")", "{", "Map", "<", "String", ",", "String", ">", "parameters", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "String", ...
从一个配置对象中抽取信息转换为 {@code java.util.Map} 对象。 @param config 配置对象 @return {@code java.util.Map} 对象
[ "从一个配置对象中抽取信息转换为", "{", "@code", "java", ".", "util", ".", "Map", "}", "对象。" ]
ac8f98322a422e3ef76c3e12d47b98268cec7006
https://github.com/tweea/matrixjavalib-main-common/blob/ac8f98322a422e3ef76c3e12d47b98268cec7006/src/main/java/net/matrix/configuration/HierarchicalConfigurationUtils.java#L92-L99
train
Parses the attributes of a configuration object.
Create a Java method that does the following: "Parses the attributes of a configuration object.".
Of course, here is the Java code you requested: ```java public static Map<String, String> parseAttributes(final Configuration config) { Map<String, String> parameters = new HashMap<>(); for (String key : new IterableIterator<>(config.getKeys())) { String value = config.getString(key); parameters.put(key,...
ehcache/ehcache3
core/src/main/java/org/ehcache/core/PersistentUserManagedEhcache.java
PersistentUserManagedEhcache.putAll
@Override public void putAll(Map<? extends K, ? extends V> entries) throws BulkCacheWritingException { cache.putAll(entries); }
java
@Override public void putAll(Map<? extends K, ? extends V> entries) throws BulkCacheWritingException { cache.putAll(entries); }
[ "@", "Override", "public", "void", "putAll", "(", "Map", "<", "?", "extends", "K", ",", "?", "extends", "V", ">", "entries", ")", "throws", "BulkCacheWritingException", "{", "cache", ".", "putAll", "(", "entries", ")", ";", "}" ]
{@inheritDoc}
[ "{" ]
3cceda57185e522f8d241ddb75146d67ee2af898
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/core/src/main/java/org/ehcache/core/PersistentUserManagedEhcache.java#L182-L185
train
Override putAll to allow the cache to be written to the cache.
Create a Java method that does the following: "Override putAll to allow the cache to be written to the cache.".
Of course, here is the Java code you requested: ```java @Override public void putAll(Map<? extends K, ? extends V> entries) throws BulkCacheWritingException { cache.putAll(entries); } ``` Hope this helps!
VoltDB/voltdb
examples/nbbo/procedures/nbbo/ProcessTick.java
ProcessTick.run
public long run( String symbol, TimestampType time, long seq_number, String exchange, int bidPrice, int bidSize, int askPrice, int askSize) throws VoltAbortException { // convert bid and ask 0 values to null ...
java
public long run( String symbol, TimestampType time, long seq_number, String exchange, int bidPrice, int bidSize, int askPrice, int askSize) throws VoltAbortException { // convert bid and ask 0 values to null ...
[ "public", "long", "run", "(", "String", "symbol", ",", "TimestampType", "time", ",", "long", "seq_number", ",", "String", "exchange", ",", "int", "bidPrice", ",", "int", "bidSize", ",", "int", "askPrice", ",", "int", "askSize", ")", "throws", "VoltAbortExcep...
"main method" the procedure starts here.
[ "main", "method", "the", "procedure", "starts", "here", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/nbbo/procedures/nbbo/ProcessTick.java#L64-L139
train
Run the code in the Volt database.
Create a Java method that does the following: "Run the code in the Volt database.".
Of course, here is the Java code you requested: ```java public long run( String symbol, TimestampType time, long seq_number, String exchange, int bidPrice, int bidSize, int askPrice, int askSize) throws VoltAbortException ...
VoltDB/voltdb
src/frontend/org/voltdb/LoadedProcedureSet.java
LoadedProcedureSet.loadProcedures
public void loadProcedures(CatalogContext catalogContext, boolean isInitOrReplay) { m_defaultProcManager = catalogContext.m_defaultProcs; // default proc caches clear on catalog update m_defaultProcCache.clear(); m_plannerTool = catalogContext.m_ptool; // reload all system p...
java
public void loadProcedures(CatalogContext catalogContext, boolean isInitOrReplay) { m_defaultProcManager = catalogContext.m_defaultProcs; // default proc caches clear on catalog update m_defaultProcCache.clear(); m_plannerTool = catalogContext.m_ptool; // reload all system p...
[ "public", "void", "loadProcedures", "(", "CatalogContext", "catalogContext", ",", "boolean", "isInitOrReplay", ")", "{", "m_defaultProcManager", "=", "catalogContext", ".", "m_defaultProcs", ";", "// default proc caches clear on catalog update", "m_defaultProcCache", ".", "cl...
Load procedures.
[ "Load", "procedures", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/LoadedProcedureSet.java#L94-L118
train
Load all procedures from the database.
Create a Java method that does the following: "Load all procedures from the database.".
Of course, here is the Java code you requested: ```java public void loadProcedures(CatalogContext catalogContext, boolean isInitOrReplay) { m_defaultProcManager = catalogContext.m_defaultProcs; // default proc caches clear on catalog update m_defaultProcCache.clear(); m_plannerTool ...
thiagokimo/Faker
faker-core/src/main/java/io/kimo/lib/faker/Faker.java
Faker.fillWithColor
public void fillWithColor(View view, FakerColorComponent component) { validateNotNullableView(view); validateNotNullableFakerComponent(component); view.setBackgroundColor(component.randomColor()); }
java
public void fillWithColor(View view, FakerColorComponent component) { validateNotNullableView(view); validateNotNullableFakerComponent(component); view.setBackgroundColor(component.randomColor()); }
[ "public", "void", "fillWithColor", "(", "View", "view", ",", "FakerColorComponent", "component", ")", "{", "validateNotNullableView", "(", "view", ")", ";", "validateNotNullableFakerComponent", "(", "component", ")", ";", "view", ".", "setBackgroundColor", "(", "com...
Fill view with a random color @param view @param component
[ "Fill", "view", "with", "a", "random", "color" ]
8b0eccd499817a2bc3377db0c6e1b50736d0f034
https://github.com/thiagokimo/Faker/blob/8b0eccd499817a2bc3377db0c6e1b50736d0f034/faker-core/src/main/java/io/kimo/lib/faker/Faker.java#L138-L143
train
Fill a view with a random color.
Create a Java method that does the following: "Fill a view with a random color.".
Of course, here is the Java code you requested: ```java public void fillWithColor(View view, FakerColorComponent component) { validateNotNullableView(view); validateNotNullableFakerComponent(component); view.setBackgroundColor(component.randomColor()); } ``` Hope this helps!
nextreports/nextreports-engine
src/ro/nextreports/engine/util/DateUtil.java
DateUtil.sameMonth
public static boolean sameMonth(Date dateOne, Date dateTwo) { if ((dateOne == null) || (dateTwo == null)) { return false; } Calendar cal = Calendar.getInstance(); cal.setTime(dateOne); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH); ...
java
public static boolean sameMonth(Date dateOne, Date dateTwo) { if ((dateOne == null) || (dateTwo == null)) { return false; } Calendar cal = Calendar.getInstance(); cal.setTime(dateOne); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH); ...
[ "public", "static", "boolean", "sameMonth", "(", "Date", "dateOne", ",", "Date", "dateTwo", ")", "{", "if", "(", "(", "dateOne", "==", "null", ")", "||", "(", "dateTwo", "==", "null", ")", ")", "{", "return", "false", ";", "}", "Calendar", "cal", "="...
Test to see if two dates are in the same month @param dateOne first date @param dateTwo second date @return true if the two dates are in the same month
[ "Test", "to", "see", "if", "two", "dates", "are", "in", "the", "same", "month" ]
a847575a9298b5fce63b88961190c5b83ddccc44
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/util/DateUtil.java#L278-L293
train
Checks if two dates are in the same month.
Create a Java method that does the following: "Checks if two dates are in the same month.".
Of course, here is the Java code you requested: ```java public static boolean sameMonth(Date dateOne, Date dateTwo) { if ((dateOne == null) || (dateTwo == null)) { return false; } Calendar cal = Calendar.getInstance(); cal.setTime(dateOne); int year = cal.get(Calend...
TypedRest/TypedRest-Java
core/src/main/java/net/typedrest/EntryEndpoint.java
EntryEndpoint.readMeta
public void readMeta() throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException { executeAndHandle(Request.Get(uri)); }
java
public void readMeta() throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException { executeAndHandle(Request.Get(uri)); }
[ "public", "void", "readMeta", "(", ")", "throws", "IOException", ",", "IllegalArgumentException", ",", "IllegalAccessException", ",", "FileNotFoundException", ",", "IllegalStateException", "{", "executeAndHandle", "(", "Request", ".", "Get", "(", "uri", ")", ")", ";...
Fetches meta data such as links from the server. @throws IOException Network communication failed. @throws IllegalArgumentException {@link HttpStatus#SC_BAD_REQUEST} @throws IllegalAccessException {@link HttpStatus#SC_UNAUTHORIZED} or {@link HttpStatus#SC_FORBIDDEN} @throws FileNotFoundException {@link HttpStatus#SC_N...
[ "Fetches", "meta", "data", "such", "as", "links", "from", "the", "server", "." ]
8ce8782d4b8bbe68a2fb4417928b18724f178705
https://github.com/TypedRest/TypedRest-Java/blob/8ce8782d4b8bbe68a2fb4417928b18724f178705/core/src/main/java/net/typedrest/EntryEndpoint.java#L109-L112
test
Reads the content of the CRA VISA file.
Create a Java method that does the following: "Reads the content of the CRA VISA file.".
Of course, here is the Java code you requested: ```java public void readMeta() throws IOException, IllegalArgumentException, IllegalAccessException, FileNotFoundException, IllegalStateException { executeAndHandle(Request.Get(uri)); } ``` Hope this helps!
Whiley/WhileyCompiler
src/main/java/wyil/transform/VerificationConditionGenerator.java
VerificationConditionGenerator.freeVariables
public void freeVariables(SyntacticItem e, Set<WyalFile.VariableDeclaration> freeVars) { if (e instanceof Expr.VariableAccess) { Expr.VariableAccess va = (Expr.VariableAccess) e; freeVars.add(va.getVariableDeclaration()); } else if (e instanceof Expr.Quantifier) { Expr.Quantifier q = (Expr.Quantifier) e; ...
java
public void freeVariables(SyntacticItem e, Set<WyalFile.VariableDeclaration> freeVars) { if (e instanceof Expr.VariableAccess) { Expr.VariableAccess va = (Expr.VariableAccess) e; freeVars.add(va.getVariableDeclaration()); } else if (e instanceof Expr.Quantifier) { Expr.Quantifier q = (Expr.Quantifier) e; ...
[ "public", "void", "freeVariables", "(", "SyntacticItem", "e", ",", "Set", "<", "WyalFile", ".", "VariableDeclaration", ">", "freeVars", ")", "{", "if", "(", "e", "instanceof", "Expr", ".", "VariableAccess", ")", "{", "Expr", ".", "VariableAccess", "va", "=",...
Determine all free variables which are used within the given expression. A free variable is one which is not bound within the expression itself. @param e @param freeVars
[ "Determine", "all", "free", "variables", "which", "are", "used", "within", "the", "given", "expression", ".", "A", "free", "variable", "is", "one", "which", "is", "not", "bound", "within", "the", "expression", "itself", "." ]
680f8a657d3fc286f8cc422755988b6d74ab3f4c
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/transform/VerificationConditionGenerator.java#L2500-L2519
train
Free variables in a syntactic item.
Create a Java method that does the following: "Free variables in a syntactic item.".
Of course, here is the Java code you requested: ```java public void freeVariables(SyntacticItem e, Set<WyalFile.VariableDeclaration> freeVars) { if (e instanceof Expr.VariableAccess) { Expr.VariableAccess va = (Expr.VariableAccess) e; freeVars.add(va.getVariableDeclaration()); } else if (e instanceof Expr.Qu...
jtablesaw/tablesaw
core/src/main/java/tech/tablesaw/io/ColumnTypeDetector.java
ColumnTypeDetector.detectType
private ColumnType detectType(List<String> valuesList, ReadOptions options) { CopyOnWriteArrayList<AbstractColumnParser<?>> parsers = new CopyOnWriteArrayList<>(getParserList(typeArray, options)); CopyOnWriteArrayList<ColumnType> typeCandidates = new CopyOnWriteArrayList<>(typeArray); for (St...
java
private ColumnType detectType(List<String> valuesList, ReadOptions options) { CopyOnWriteArrayList<AbstractColumnParser<?>> parsers = new CopyOnWriteArrayList<>(getParserList(typeArray, options)); CopyOnWriteArrayList<ColumnType> typeCandidates = new CopyOnWriteArrayList<>(typeArray); for (St...
[ "private", "ColumnType", "detectType", "(", "List", "<", "String", ">", "valuesList", ",", "ReadOptions", "options", ")", "{", "CopyOnWriteArrayList", "<", "AbstractColumnParser", "<", "?", ">", ">", "parsers", "=", "new", "CopyOnWriteArrayList", "<>", "(", "get...
Returns a predicted ColumnType derived by analyzing the given list of undifferentiated strings read from a column in the file and applying the given Locale and options
[ "Returns", "a", "predicted", "ColumnType", "derived", "by", "analyzing", "the", "given", "list", "of", "undifferentiated", "strings", "read", "from", "a", "column", "in", "the", "file", "and", "applying", "the", "given", "Locale", "and", "options" ]
68a75b4098ac677e9486df5572cf13ec39f9f701
https://github.com/jtablesaw/tablesaw/blob/68a75b4098ac677e9486df5572cf13ec39f9f701/core/src/main/java/tech/tablesaw/io/ColumnTypeDetector.java#L161-L176
train
Detect type.
Create a Java method that does the following: "Detect type.".
Of course, here is the Java code you requested: ```java private ColumnType detectType(List<String> valuesList, ReadOptions options) { CopyOnWriteArrayList<AbstractColumnParser<?>> parsers = new CopyOnWriteArrayList<>(getParserList(typeArray, options)); CopyOnWriteArrayList<ColumnType> typeCandidates ...
Esri/geometry-api-java
src/main/java/com/esri/core/geometry/ECoordinate.java
ECoordinate.tolEq
boolean tolEq(ECoordinate v, double tolerance) // ! == with tolerance { return Math.abs(m_value - v.m_value) <= tolerance || eq(v); }
java
boolean tolEq(ECoordinate v, double tolerance) // ! == with tolerance { return Math.abs(m_value - v.m_value) <= tolerance || eq(v); }
[ "boolean", "tolEq", "(", "ECoordinate", "v", ",", "double", "tolerance", ")", "// ! == with tolerance", "{", "return", "Math", ".", "abs", "(", "m_value", "-", "v", ".", "m_value", ")", "<=", "tolerance", "||", "eq", "(", "v", ")", ";", "}" ]
user defined tolerance.
[ "user", "defined", "tolerance", "." ]
494da8ec953d76e7c6072afbc081abfe48ff07cf
https://github.com/Esri/geometry-api-java/blob/494da8ec953d76e7c6072afbc081abfe48ff07cf/src/main/java/com/esri/core/geometry/ECoordinate.java#L336-L339
train
Returns true if the coordinates are equal.
Create a Java method that does the following: "Returns true if the coordinates are equal.".
Of course, here is the Java code you requested: ```java boolean tolEq(ECoordinate v, double tolerance) // ! == with tolerance { return Math.abs(m_value - v.m_value) <= tolerance || eq(v); } ``` Hope this helps!
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/convert/MultipleTableFieldConverter.java
MultipleTableFieldConverter.getIndexOfConverterToPass
public int getIndexOfConverterToPass(boolean bSetData) { Converter field = this.getTargetField(null); if (m_converterNext == field) return -1; // -1 is the code for the base field. int iIndex = 0; for ( ; ; iIndex++) { // Is this one already on my list? ...
java
public int getIndexOfConverterToPass(boolean bSetData) { Converter field = this.getTargetField(null); if (m_converterNext == field) return -1; // -1 is the code for the base field. int iIndex = 0; for ( ; ; iIndex++) { // Is this one already on my list? ...
[ "public", "int", "getIndexOfConverterToPass", "(", "boolean", "bSetData", ")", "{", "Converter", "field", "=", "this", ".", "getTargetField", "(", "null", ")", ";", "if", "(", "m_converterNext", "==", "field", ")", "return", "-", "1", ";", "// -1 is the code f...
Should I pass the alternate field (or the main field)? @return index (-1)= next converter, 0 - n = List of converters
[ "Should", "I", "pass", "the", "alternate", "field", "(", "or", "the", "main", "field", ")", "?" ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/convert/MultipleTableFieldConverter.java#L148-L166
train
Get the index of the converter to pass.
Create a Java method that does the following: "Get the index of the converter to pass.".
Of course, here is the Java code you requested: ```java public int getIndexOfConverterToPass(boolean bSetData) { Converter field = this.getTargetField(null); if (m_converterNext == field) return -1; // -1 is the code for the base field. int iIndex = 0; for ( ; ; iIndex+...
deib-polimi/SPF2
sPFWFDMid/src/main/java/it/polimi/spf/wfd/WifiDirectMiddleware.java
WifiDirectMiddleware.init
public void init() { WfdLog.d(TAG, "Called init()"); initAndStartHandler(); try { mPort = this.requestAvailablePortFromOs(); } catch (IOException e) { mListener.onError(); return; } mManager = (WifiP2pManager) mContext.getSystemServi...
java
public void init() { WfdLog.d(TAG, "Called init()"); initAndStartHandler(); try { mPort = this.requestAvailablePortFromOs(); } catch (IOException e) { mListener.onError(); return; } mManager = (WifiP2pManager) mContext.getSystemServi...
[ "public", "void", "init", "(", ")", "{", "WfdLog", ".", "d", "(", "TAG", ",", "\"Called init()\"", ")", ";", "initAndStartHandler", "(", ")", ";", "try", "{", "mPort", "=", "this", ".", "requestAvailablePortFromOs", "(", ")", ";", "}", "catch", "(", "I...
Method called by {@link WFDMiddlewareAdapter#connect()}
[ "Method", "called", "by", "{" ]
c5a856ab29116a671fe9bef7035f3efb605dc2a1
https://github.com/deib-polimi/SPF2/blob/c5a856ab29116a671fe9bef7035f3efb605dc2a1/sPFWFDMid/src/main/java/it/polimi/spf/wfd/WifiDirectMiddleware.java#L138-L160
valid
Initializes the application.
Create a Java method that does the following: "Initializes the application.".
Of course, here is the Java code you requested: ```java public void init() { WfdLog.d(TAG, "Called init()"); initAndStartHandler(); try { mPort = this.requestAvailablePortFromOs(); } catch (IOException e) { mListener.onError(); return; } ...
PuyallupFoursquare/ccb-api-client-java
src/main/java/com/p4square/ccbapi/model/GetIndividualProfilesRequest.java
GetIndividualProfilesRequest.withLoginPassword
public GetIndividualProfilesRequest withLoginPassword(final String login, final char[] password) { this.login = login; this.password = password; this.id = 0; this.accountNumber = this.routingNumber = null; return this; }
java
public GetIndividualProfilesRequest withLoginPassword(final String login, final char[] password) { this.login = login; this.password = password; this.id = 0; this.accountNumber = this.routingNumber = null; return this; }
[ "public", "GetIndividualProfilesRequest", "withLoginPassword", "(", "final", "String", "login", ",", "final", "char", "[", "]", "password", ")", "{", "this", ".", "login", "=", "login", ";", "this", ".", "password", "=", "password", ";", "this", ".", "id", ...
Request the IndividualProfile for the given login and password. This option is mutually exclusive with {@link #withIndividualId(int)} and {@link #withMICR(String, String)}. @param login The individual's login. @param password The individual's password. @return this.
[ "Request", "the", "IndividualProfile", "for", "the", "given", "login", "and", "password", "." ]
54a7a3184dc565fe513aa520e1344b2303ea6834
https://github.com/PuyallupFoursquare/ccb-api-client-java/blob/54a7a3184dc565fe513aa520e1344b2303ea6834/src/main/java/com/p4square/ccbapi/model/GetIndividualProfilesRequest.java#L66-L72
train
Sets the login and password.
Create a Java method that does the following: "Sets the login and password.".
Of course, here is the Java code you requested: ```java public GetIndividualProfilesRequest withLoginPassword(final String login, final char[] password) { this.login = login; this.password = password; this.id = 0; this.accountNumber = this.routingNumber = null; return this; ...
seedstack/seed
security/specs/src/main/java/org/seedstack/seed/security/Role.java
Role.getScopesByType
@SuppressWarnings("unchecked") public <S extends Scope> Set<S> getScopesByType(Class<S> scopeType) { Set<S> typedScopes = new HashSet<>(); for (Scope scope : getScopes()) { if (scopeType.isInstance(scope)) { typedScopes.add((S) scope); } } retu...
java
@SuppressWarnings("unchecked") public <S extends Scope> Set<S> getScopesByType(Class<S> scopeType) { Set<S> typedScopes = new HashSet<>(); for (Scope scope : getScopes()) { if (scopeType.isInstance(scope)) { typedScopes.add((S) scope); } } retu...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "S", "extends", "Scope", ">", "Set", "<", "S", ">", "getScopesByType", "(", "Class", "<", "S", ">", "scopeType", ")", "{", "Set", "<", "S", ">", "typedScopes", "=", "new", "HashSet", "<...
Filters the scopes corresponding to a type @param <S> the type of the scope to filter. @param scopeType the type of scope @return the scopes of the given type
[ "Filters", "the", "scopes", "corresponding", "to", "a", "type" ]
d9cf33bfb2fffcdbb0976f4726e943acda90e828
https://github.com/seedstack/seed/blob/d9cf33bfb2fffcdbb0976f4726e943acda90e828/security/specs/src/main/java/org/seedstack/seed/security/Role.java#L74-L83
train
Get a set of scopes that are of the specified type.
Create a Java method that does the following: "Get a set of scopes that are of the specified type.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public <S extends Scope> Set<S> getScopesByType(Class<S> scopeType) { Set<S> typedScopes = new HashSet<>(); for (Scope scope : getScopes()) { if (scopeType.isInstance(scope)) { typedSc...
teatrove/teatrove
build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/teadoc/PropertyDoc.java
PropertyDoc.isTagPresent
public boolean isTagPresent(String tagName) { boolean tagPresent = false; if (mReadMethod != null) { tagPresent = mReadMethod.isTagPresent(tagName); } if (!tagPresent && mWriteMethod != null) { tagPresent = mWriteMethod.isTagPresent(tagName); } ...
java
public boolean isTagPresent(String tagName) { boolean tagPresent = false; if (mReadMethod != null) { tagPresent = mReadMethod.isTagPresent(tagName); } if (!tagPresent && mWriteMethod != null) { tagPresent = mWriteMethod.isTagPresent(tagName); } ...
[ "public", "boolean", "isTagPresent", "(", "String", "tagName", ")", "{", "boolean", "tagPresent", "=", "false", ";", "if", "(", "mReadMethod", "!=", "null", ")", "{", "tagPresent", "=", "mReadMethod", ".", "isTagPresent", "(", "tagName", ")", ";", "}", "if...
Checks to see if the specified tag exists
[ "Checks", "to", "see", "if", "the", "specified", "tag", "exists" ]
7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea
https://github.com/teatrove/teatrove/blob/7039bdd4da6817ff8c737f7e4e07bac7e3ad8bea/build-tools/toolbox/src/main/java/org/teatrove/toolbox/beandoc/teadoc/PropertyDoc.java#L279-L291
train
Check if the tag is present in the class file.
Create a Java method that does the following: "Check if the tag is present in the class file.".
Of course, here is the Java code you requested: ```java public boolean isTagPresent(String tagName) { boolean tagPresent = false; if (mReadMethod != null) { tagPresent = mReadMethod.isTagPresent(tagName); } if (!tagPresent && mWriteMethod != null) { tagPresent ...
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/helpers/MBeanRoutedNotificationHelper.java
MBeanRoutedNotificationHelper.safePostEvent
private void safePostEvent(Event event) { EventAdmin ea = eventAdminRef.getService(); if (ea != null) { ea.postEvent(event); } else if (tc.isEventEnabled()) { Tr.event(tc, "The EventAdmin service is unavailable. Unable to post the Event: " + event); } }
java
private void safePostEvent(Event event) { EventAdmin ea = eventAdminRef.getService(); if (ea != null) { ea.postEvent(event); } else if (tc.isEventEnabled()) { Tr.event(tc, "The EventAdmin service is unavailable. Unable to post the Event: " + event); } }
[ "private", "void", "safePostEvent", "(", "Event", "event", ")", "{", "EventAdmin", "ea", "=", "eventAdminRef", ".", "getService", "(", ")", ";", "if", "(", "ea", "!=", "null", ")", "{", "ea", ".", "postEvent", "(", "event", ")", ";", "}", "else", "if...
Null-safe event posting to eventAdminRef. @param event
[ "Null", "-", "safe", "event", "posting", "to", "eventAdminRef", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.server.rest/src/com/ibm/ws/jmx/connector/server/rest/helpers/MBeanRoutedNotificationHelper.java#L301-L308
train
Post an event to the EventAdmin service.
Create a Java method that does the following: "Post an event to the EventAdmin service.".
Of course, here is the Java code you requested: ```java private void safePostEvent(Event event) { EventAdmin ea = eventAdminRef.getService(); if (ea != null) { ea.postEvent(event); } else if (tc.isEventEnabled()) { Tr.event(tc, "The EventAdmin service is unavailable. Una...
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java
TaskManagerService.updateTaskStatus
void updateTaskStatus(Tenant tenant, TaskRecord taskRecord, boolean bDeleteClaimRecord) { String taskID = taskRecord.getTaskID(); DBTransaction dbTran = DBService.instance(tenant).startTransaction(); Map<String, String> propMap = taskRecord.getProperties(); for (String name : propMap.key...
java
void updateTaskStatus(Tenant tenant, TaskRecord taskRecord, boolean bDeleteClaimRecord) { String taskID = taskRecord.getTaskID(); DBTransaction dbTran = DBService.instance(tenant).startTransaction(); Map<String, String> propMap = taskRecord.getProperties(); for (String name : propMap.key...
[ "void", "updateTaskStatus", "(", "Tenant", "tenant", ",", "TaskRecord", "taskRecord", ",", "boolean", "bDeleteClaimRecord", ")", "{", "String", "taskID", "=", "taskRecord", ".", "getTaskID", "(", ")", ";", "DBTransaction", "dbTran", "=", "DBService", ".", "insta...
Add or update a task status record and optionally delete the task's claim record at the same time. @param tenant {@link Tenant} that owns the task's application. @param taskRecord {@link TaskRecord} containing task properties to be written to the database. A null/empty property value causes t...
[ "Add", "or", "update", "a", "task", "status", "record", "and", "optionally", "delete", "the", "task", "s", "claim", "record", "at", "the", "same", "time", "." ]
ad64d3c37922eefda68ec8869ef089c1ca604b70
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/taskmanager/TaskManagerService.java#L263-L279
train
Update the status of a task record.
Create a Java method that does the following: "Update the status of a task record.".
Of course, here is the Java code you requested: ```java void updateTaskStatus(Tenant tenant, TaskRecord taskRecord, boolean bDeleteClaimRecord) { String taskID = taskRecord.getTaskID(); DBTransaction dbTran = DBService.instance(tenant).startTransaction(); Map<String, String> propMap = taskRecor...
lunisolar/magma
magma-func-builder/src/main/java/eu/lunisolar/magma/func/build/function/to/LToCharBiFunctionBuilder.java
LToCharBiFunctionBuilder.toCharBiFunction
@Nonnull public static <T1, T2> LToCharBiFunctionBuilder<T1, T2> toCharBiFunction(Consumer<LToCharBiFunction<T1, T2>> consumer) { return new LToCharBiFunctionBuilder(consumer); }
java
@Nonnull public static <T1, T2> LToCharBiFunctionBuilder<T1, T2> toCharBiFunction(Consumer<LToCharBiFunction<T1, T2>> consumer) { return new LToCharBiFunctionBuilder(consumer); }
[ "@", "Nonnull", "public", "static", "<", "T1", ",", "T2", ">", "LToCharBiFunctionBuilder", "<", "T1", ",", "T2", ">", "toCharBiFunction", "(", "Consumer", "<", "LToCharBiFunction", "<", "T1", ",", "T2", ">", ">", "consumer", ")", "{", "return", "new", "L...
One of ways of creating builder. This might be the only way (considering all _functional_ builders) that might be utilize to specify generic params only once.
[ "One", "of", "ways", "of", "creating", "builder", ".", "This", "might", "be", "the", "only", "way", "(", "considering", "all", "_functional_", "builders", ")", "that", "might", "be", "utilize", "to", "specify", "generic", "params", "only", "once", "." ]
83809c6d1a33d913aec6c49920251e4f0be8b213
https://github.com/lunisolar/magma/blob/83809c6d1a33d913aec6c49920251e4f0be8b213/magma-func-builder/src/main/java/eu/lunisolar/magma/func/build/function/to/LToCharBiFunctionBuilder.java#L90-L93
train
Create a LToCharBiFunctionBuilder from an consumer.
Create a Java method that does the following: "Create a LToCharBiFunctionBuilder from an consumer.".
Of course, here is the Java code you requested: ```java @Nonnull public static <T1, T2> LToCharBiFunctionBuilder<T1, T2> toCharBiFunction(Consumer<LToCharBiFunction<T1, T2>> consumer) { return new LToCharBiFunctionBuilder(consumer); } ``` Hope this helps!
SG-O/miIO
src/main/java/de/sg_o/app/miio/base/Device.java
Device.update
public boolean update(String url, String md5) throws CommandExecutionException { if (url == null || md5 == null) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PARAMETERS); if (md5.length() != 32) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PA...
java
public boolean update(String url, String md5) throws CommandExecutionException { if (url == null || md5 == null) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PARAMETERS); if (md5.length() != 32) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PA...
[ "public", "boolean", "update", "(", "String", "url", ",", "String", "md5", ")", "throws", "CommandExecutionException", "{", "if", "(", "url", "==", "null", "||", "md5", "==", "null", ")", "throw", "new", "CommandExecutionException", "(", "CommandExecutionExcepti...
Command the device to update @param url The URL to update from @param md5 The MD5 Checksum for the update @return True if the command has been received. This does not mean that the update was successful. @throws CommandExecutionException When there has been a error during the communication or the response was invalid.
[ "Command", "the", "device", "to", "update" ]
f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b
https://github.com/SG-O/miIO/blob/f352dbd2a699d2cdb1b412ca5e6cbb0c38ca779b/src/main/java/de/sg_o/app/miio/base/Device.java#L432-L442
train
Update an existing CID language file.
Create a Java method that does the following: "Update an existing CID language file.".
Of course, here is the Java code you requested: ```java public boolean update(String url, String md5) throws CommandExecutionException { if (url == null || md5 == null) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PARAMETERS); if (md5.length() != 32) throw new CommandExec...
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/filter/ExtractRangeFilter.java
ExtractRangeFilter.initRemoteSkel
public void initRemoteSkel(ObjectInputStream daIn) { try { String startFieldName = daIn.readUTF(); if (ProxyConstants.NULL.equals(startFieldName)) startFieldName = null; String endFieldName = daIn.readUTF(); if (ProxyConstants.NULL.equals(end...
java
public void initRemoteSkel(ObjectInputStream daIn) { try { String startFieldName = daIn.readUTF(); if (ProxyConstants.NULL.equals(startFieldName)) startFieldName = null; String endFieldName = daIn.readUTF(); if (ProxyConstants.NULL.equals(end...
[ "public", "void", "initRemoteSkel", "(", "ObjectInputStream", "daIn", ")", "{", "try", "{", "String", "startFieldName", "=", "daIn", ".", "readUTF", "(", ")", ";", "if", "(", "ProxyConstants", ".", "NULL", ".", "equals", "(", "startFieldName", ")", ")", "s...
Use these marshalled params to initialize this object. Unmarshall the objects and call init. @param daIn The input stream to unmarshal the data from.
[ "Use", "these", "marshalled", "params", "to", "initialize", "this", "object", ".", "Unmarshall", "the", "objects", "and", "call", "init", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/filter/ExtractRangeFilter.java#L232-L251
train
Initialize the remote Skel.
Create a Java method that does the following: "Initialize the remote Skel.".
Of course, here is the Java code you requested: ```java public void initRemoteSkel(ObjectInputStream daIn) { try { String startFieldName = daIn.readUTF(); if (ProxyConstants.NULL.equals(startFieldName)) startFieldName = null; String endFieldName = daIn....
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/core/proxy/CollectionProxyDefaultImpl.java
CollectionProxyDefaultImpl.clear
public void clear() { Class collClass = getCollectionClass(); // ECER: assure we notify all objects being removed, // necessary for RemovalAwareCollections... if (IRemovalAwareCollection.class.isAssignableFrom(collClass)) { getData().clear(); } ...
java
public void clear() { Class collClass = getCollectionClass(); // ECER: assure we notify all objects being removed, // necessary for RemovalAwareCollections... if (IRemovalAwareCollection.class.isAssignableFrom(collClass)) { getData().clear(); } ...
[ "public", "void", "clear", "(", ")", "{", "Class", "collClass", "=", "getCollectionClass", "(", ")", ";", "// ECER: assure we notify all objects being removed, \r", "// necessary for RemovalAwareCollections...\r", "if", "(", "IRemovalAwareCollection", ".", "class", ".", "is...
Clears the proxy. A cleared proxy is defined as loaded @see Collection#clear()
[ "Clears", "the", "proxy", ".", "A", "cleared", "proxy", "is", "defined", "as", "loaded" ]
9a544372f67ce965f662cdc71609dd03683c8f04
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/core/proxy/CollectionProxyDefaultImpl.java#L363-L390
train
Clears the contents of the SECTYPE field.
Create a Java method that does the following: "Clears the contents of the SECTYPE field.".
Of course, here is the Java code you requested: ```java public void clear() { Class collClass = getCollectionClass(); // ECER: assure we notify all objects being removed, // necessary for RemovalAwareCollections... if (IRemovalAwareCollection.class.isAssignableFrom(collClass...
Twitter4J/Twitter4J
twitter4j-core/src/main/java/twitter4j/TwitterObjectFactory.java
TwitterObjectFactory.createPlace
public static Place createPlace(String rawJSON) throws TwitterException { try { return new PlaceJSONImpl(new JSONObject(rawJSON)); } catch (JSONException e) { throw new TwitterException(e); } }
java
public static Place createPlace(String rawJSON) throws TwitterException { try { return new PlaceJSONImpl(new JSONObject(rawJSON)); } catch (JSONException e) { throw new TwitterException(e); } }
[ "public", "static", "Place", "createPlace", "(", "String", "rawJSON", ")", "throws", "TwitterException", "{", "try", "{", "return", "new", "PlaceJSONImpl", "(", "new", "JSONObject", "(", "rawJSON", ")", ")", ";", "}", "catch", "(", "JSONException", "e", ")",...
Constructs a Place object from rawJSON string. @param rawJSON raw JSON form as String @return Place @throws TwitterException when provided string is not a valid JSON string. @since Twitter4J 2.1.7
[ "Constructs", "a", "Place", "object", "from", "rawJSON", "string", "." ]
8376fade8d557896bb9319fb46e39a55b134b166
https://github.com/Twitter4J/Twitter4J/blob/8376fade8d557896bb9319fb46e39a55b134b166/twitter4j-core/src/main/java/twitter4j/TwitterObjectFactory.java#L117-L123
train
Constructs a Place object from rawJSON string.
Create a Java method that does the following: "Constructs a Place object from rawJSON string.".
Of course, here is the Java code you requested: ```java public static Place createPlace(String rawJSON) throws TwitterException { try { return new PlaceJSONImpl(new JSONObject(rawJSON)); } catch (JSONException e) { throw new TwitterException(e); } } ``` Hope this he...
unbescape/unbescape
src/main/java/org/unbescape/xml/XmlEscape.java
XmlEscape.escapeXml11Attribute
public static String escapeXml11Attribute(final String text, final XmlEscapeType type, final XmlEscapeLevel level) { return escapeXml(text, XmlEscapeSymbols.XML11_ATTRIBUTE_SYMBOLS, type, level); }
java
public static String escapeXml11Attribute(final String text, final XmlEscapeType type, final XmlEscapeLevel level) { return escapeXml(text, XmlEscapeSymbols.XML11_ATTRIBUTE_SYMBOLS, type, level); }
[ "public", "static", "String", "escapeXml11Attribute", "(", "final", "String", "text", ",", "final", "XmlEscapeType", "type", ",", "final", "XmlEscapeLevel", "level", ")", "{", "return", "escapeXml", "(", "text", ",", "XmlEscapeSymbols", ".", "XML11_ATTRIBUTE_SYMBOLS...
<p> Perform a (configurable) XML 1.1 <strong>escape</strong> operation on a <tt>String</tt> input meant to be an XML attribute value. </p> <p> This method will perform an escape operation according to the specified {@link org.unbescape.xml.XmlEscapeType} and {@link org.unbescape.xml.XmlEscapeLevel} argument values. </p...
[ "<p", ">", "Perform", "a", "(", "configurable", ")", "XML", "1", ".", "1", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">", "input", "meant", "to", "be", "an", "XML", "attribute", "value", ...
ec5435fb3508c2eed25d8165dc27ded2602cae13
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/xml/XmlEscape.java#L636-L638
train
Escape an attribute of an XML document.
Create a Java method that does the following: "Escape an attribute of an XML document.".
Of course, here is the Java code you requested: ```java public static String escapeXml11Attribute(final String text, final XmlEscapeType type, final XmlEscapeLevel level) { return escapeXml(text, XmlEscapeSymbols.XML11_ATTRIBUTE_SYMBOLS, type, level); } ``` Hope this helps!
cloudant/sync-android
cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryValidator.java
QueryValidator.validateCompoundOperatorClauses
@SuppressWarnings("unchecked") private static void validateCompoundOperatorClauses(List<Object> clauses, Boolean[] textClauseLimitReached) throws QueryException { for (Object obj : clauses) { if (!(obj instanceof Map)) { ...
java
@SuppressWarnings("unchecked") private static void validateCompoundOperatorClauses(List<Object> clauses, Boolean[] textClauseLimitReached) throws QueryException { for (Object obj : clauses) { if (!(obj instanceof Map)) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "static", "void", "validateCompoundOperatorClauses", "(", "List", "<", "Object", ">", "clauses", ",", "Boolean", "[", "]", "textClauseLimitReached", ")", "throws", "QueryException", "{", "for", "(", "O...
This method runs the list of clauses making up the selector through a series of validation steps and returns whether the clause list is valid or not. @param clauses A list of clauses making up a query selector @param textClauseLimitReached A flag used to track the text clause limit throughout the validation process. ...
[ "This", "method", "runs", "the", "list", "of", "clauses", "making", "up", "the", "selector", "through", "a", "series", "of", "validation", "steps", "and", "returns", "whether", "the", "clause", "list", "is", "valid", "or", "not", "." ]
5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383
https://github.com/cloudant/sync-android/blob/5f1416ed1bd9ab05d7a4b8736480c8ae68bd7383/cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/internal/query/QueryValidator.java#L439-L479
train
Validate compound operator clauses.
Create a Java method that does the following: "Validate compound operator clauses.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") private static void validateCompoundOperatorClauses(List<Object> clauses, Boolean[] textClauseLimitReached) throws QueryException { for (Object obj : clauses) {...
Ordinastie/MalisisCore
src/main/java/net/malisis/core/renderer/model/loader/ObjFileImporter.java
ObjFileImporter.addShape
private void addShape(String data) { if (faces.size() != 0) { Shape s = new Shape(faces); shapes.put(currentShape.toLowerCase(), s); faces.clear(); } if (data != "") currentShape = data.indexOf('_') != -1 ? data.substring(0, data.indexOf('_')) : data; }
java
private void addShape(String data) { if (faces.size() != 0) { Shape s = new Shape(faces); shapes.put(currentShape.toLowerCase(), s); faces.clear(); } if (data != "") currentShape = data.indexOf('_') != -1 ? data.substring(0, data.indexOf('_')) : data; }
[ "private", "void", "addShape", "(", "String", "data", ")", "{", "if", "(", "faces", ".", "size", "(", ")", "!=", "0", ")", "{", "Shape", "s", "=", "new", "Shape", "(", "faces", ")", ";", "shapes", ".", "put", "(", "currentShape", ".", "toLowerCase"...
Creates a {@link Shape} and adds it to {@link #shapes}. @param data the data
[ "Creates", "a", "{", "@link", "Shape", "}", "and", "adds", "it", "to", "{", "@link", "#shapes", "}", "." ]
4f8e1fa462d5c372fc23414482ba9f429881cc54
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/renderer/model/loader/ObjFileImporter.java#L355-L366
train
Add a shape to the shape list.
Create a Java method that does the following: "Add a shape to the shape list.".
Of course, here is the Java code you requested: ```java private void addShape(String data) { if (faces.size() != 0) { Shape s = new Shape(faces); shapes.put(currentShape.toLowerCase(), s); faces.clear(); } if (data != "") currentShape = data.indexOf('_') != -1 ? data.substring(0, data.indexOf('_'...
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java
ToUnknownStream.ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.ignorableWhitespace(ch, start, length); }
java
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.ignorableWhitespace(ch, start, length); }
[ "public", "void", "ignorableWhitespace", "(", "char", "[", "]", "ch", ",", "int", "start", ",", "int", "length", ")", "throws", "SAXException", "{", "if", "(", "m_firstTagNotEmitted", ")", "{", "flush", "(", ")", ";", "}", "m_handler", ".", "ignorableWhite...
Pass the call on to the underlying handler @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int)
[ "Pass", "the", "call", "on", "to", "the", "underlying", "handler" ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/ToUnknownStream.java#L839-L847
train
Ignorable whitespace is handled by the SAX2 handler.
Create a Java method that does the following: "Ignorable whitespace is handled by the SAX2 handler.".
Of course, here is the Java code you requested: ```java public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException { if (m_firstTagNotEmitted) { flush(); } m_handler.ignorableWhitespace(ch, start, length); } ``` Hope this helps!
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java
Context.removeConnectionListener
void removeConnectionListener(ConnectionManager cm, ConnectionListener cl) { if (cmToCl != null && cmToCl.get(cm) != null) { cmToCl.get(cm).remove(cl); clToC.remove(cl); } }
java
void removeConnectionListener(ConnectionManager cm, ConnectionListener cl) { if (cmToCl != null && cmToCl.get(cm) != null) { cmToCl.get(cm).remove(cl); clToC.remove(cl); } }
[ "void", "removeConnectionListener", "(", "ConnectionManager", "cm", ",", "ConnectionListener", "cl", ")", "{", "if", "(", "cmToCl", "!=", "null", "&&", "cmToCl", ".", "get", "(", "cm", ")", "!=", "null", ")", "{", "cmToCl", ".", "get", "(", "cm", ")", ...
Remove a connection listener @param cm The connection manager @param cl The connection listener
[ "Remove", "a", "connection", "listener" ]
f0389ee7e62aa8b40ba09b251edad76d220ea796
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/connectionmanager/ccm/Context.java#L178-L185
train
Remove a connection listener from the connection manager
Create a Java method that does the following: "Remove a connection listener from the connection manager".
Of course, here is the Java code you requested: ```java void removeConnectionListener(ConnectionManager cm, ConnectionListener cl) { if (cmToCl != null && cmToCl.get(cm) != null) { cmToCl.get(cm).remove(cl); clToC.remove(cl); } } ``` Hope this helps!
dickschoeller/gedbrowser
gedbrowser-analytics/src/main/java/org/schoellerfamily/gedbrowser/analytics/order/ChildrenOrderAnalyzer.java
ChildrenOrderAnalyzer.analyze
@Override public OrderAnalyzerResult analyze() { final PersonNavigator navigator = new PersonNavigator(person); final List<Family> families = navigator.getFamilies(); for (final Family family : families) { analyzeFamily(family); } return result; }
java
@Override public OrderAnalyzerResult analyze() { final PersonNavigator navigator = new PersonNavigator(person); final List<Family> families = navigator.getFamilies(); for (final Family family : families) { analyzeFamily(family); } return result; }
[ "@", "Override", "public", "OrderAnalyzerResult", "analyze", "(", ")", "{", "final", "PersonNavigator", "navigator", "=", "new", "PersonNavigator", "(", "person", ")", ";", "final", "List", "<", "Family", ">", "families", "=", "navigator", ".", "getFamilies", ...
{@inheritDoc}
[ "{" ]
e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1
https://github.com/dickschoeller/gedbrowser/blob/e3e10b1ff3a34ebde9b7edcbfafcd5fe6fb3b3e1/gedbrowser-analytics/src/main/java/org/schoellerfamily/gedbrowser/analytics/order/ChildrenOrderAnalyzer.java#L39-L47
train
Analyzes the CRAs of the CRAs.
Create a Java method that does the following: "Analyzes the CRAs of the CRAs.".
Of course, here is the Java code you requested: ```java @Override public OrderAnalyzerResult analyze() { final PersonNavigator navigator = new PersonNavigator(person); final List<Family> families = navigator.getFamilies(); for (final Family family : families) { analyzeFamily(fam...
chocoteam/choco-graph
src/main/java/org/chocosolver/graphsolver/variables/GraphVar.java
GraphVar.isInstantiated
@Override public boolean isInstantiated() { if (getPotentialNodes().size() != getMandatoryNodes().size()) { return false; } ISet suc; for (int i : getUB().getNodes()) { suc = UB.getSuccOrNeighOf(i); if (suc.size() != getLB().getSuccOrNeighOf(i).size()) { return false; } } return true; }
java
@Override public boolean isInstantiated() { if (getPotentialNodes().size() != getMandatoryNodes().size()) { return false; } ISet suc; for (int i : getUB().getNodes()) { suc = UB.getSuccOrNeighOf(i); if (suc.size() != getLB().getSuccOrNeighOf(i).size()) { return false; } } return true; }
[ "@", "Override", "public", "boolean", "isInstantiated", "(", ")", "{", "if", "(", "getPotentialNodes", "(", ")", ".", "size", "(", ")", "!=", "getMandatoryNodes", "(", ")", ".", "size", "(", ")", ")", "{", "return", "false", ";", "}", "ISet", "suc", ...
***********************************************************************************
[ "***********************************************************************************" ]
0a03b0aafc86601977728c7e3fcb5ed376f1fae9
https://github.com/chocoteam/choco-graph/blob/0a03b0aafc86601977728c7e3fcb5ed376f1fae9/src/main/java/org/chocosolver/graphsolver/variables/GraphVar.java#L88-L101
train
Returns true if the node is instantiated.
Create a Java method that does the following: "Returns true if the node is instantiated.".
Of course, here is the Java code you requested: ```java @Override public boolean isInstantiated() { if (getPotentialNodes().size() != getMandatoryNodes().size()) { return false; } ISet suc; for (int i : getUB().getNodes()) { suc = UB.getSuccOrNeighOf(i); if (suc.size() != getLB().getSuccOrNeighOf(i)....
aws/aws-sdk-java
aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/AmazonCloudFormationClient.java
AmazonCloudFormationClient.getTemplate
@Override public GetTemplateResult getTemplate(GetTemplateRequest request) { request = beforeClientExecution(request); return executeGetTemplate(request); }
java
@Override public GetTemplateResult getTemplate(GetTemplateRequest request) { request = beforeClientExecution(request); return executeGetTemplate(request); }
[ "@", "Override", "public", "GetTemplateResult", "getTemplate", "(", "GetTemplateRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeGetTemplate", "(", "request", ")", ";", "}" ]
<p> Returns the template body for a specified stack. You can get the template for running or deleted stacks. </p> <p> For deleted stacks, GetTemplate returns the template for up to 90 days after the stack has been deleted. </p> <note> <p> If the template does not exist, a <code>ValidationError</code> is returned. </p> ...
[ "<p", ">", "Returns", "the", "template", "body", "for", "a", "specified", "stack", ".", "You", "can", "get", "the", "template", "for", "running", "or", "deleted", "stacks", ".", "<", "/", "p", ">", "<p", ">", "For", "deleted", "stacks", "GetTemplate", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudformation/src/main/java/com/amazonaws/services/cloudformation/AmazonCloudFormationClient.java#L1987-L1991
train
Retrieves information about an existing CID .
Create a Java method that does the following: "Retrieves information about an existing CID .".
Of course, here is the Java code you requested: ```java @Override public GetTemplateResult getTemplate(GetTemplateRequest request) { request = beforeClientExecution(request); return executeGetTemplate(request); } ``` Hope this helps!
aalmiray/Json-lib
src/main/java/net/sf/json/JsonConfig.java
JsonConfig.getMergedExcludes
public Collection getMergedExcludes() { Collection exclusions = new HashSet(); for( int i = 0; i < excludes.length; i++ ) { String exclusion = excludes[i]; if( !StringUtils.isBlank( excludes[i] ) ) { exclusions.add( exclusion.trim() ); } } if( !ignoreDefau...
java
public Collection getMergedExcludes() { Collection exclusions = new HashSet(); for( int i = 0; i < excludes.length; i++ ) { String exclusion = excludes[i]; if( !StringUtils.isBlank( excludes[i] ) ) { exclusions.add( exclusion.trim() ); } } if( !ignoreDefau...
[ "public", "Collection", "getMergedExcludes", "(", ")", "{", "Collection", "exclusions", "=", "new", "HashSet", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "excludes", ".", "length", ";", "i", "++", ")", "{", "String", "exclusion", ...
Returns a set of default excludes with user-defined excludes.<br> [Java -&gt; JSON]
[ "Returns", "a", "set", "of", "default", "excludes", "with", "user", "-", "defined", "excludes", ".", "<br", ">", "[", "Java", "-", "&gt", ";", "JSON", "]" ]
9e2b3376ee8f511a48aa7ac05f75a7414e02280f
https://github.com/aalmiray/Json-lib/blob/9e2b3376ee8f511a48aa7ac05f75a7414e02280f/src/main/java/net/sf/json/JsonConfig.java#L566-L584
train
Get the merged exclusions.
Create a Java method that does the following: "Get the merged exclusions.".
Of course, here is the Java code you requested: ```java public Collection getMergedExcludes() { Collection exclusions = new HashSet(); for( int i = 0; i < excludes.length; i++ ) { String exclusion = excludes[i]; if( !StringUtils.isBlank( excludes[i] ) ) { exclusions.add( exclu...
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/ContentSpec.java
ContentSpec.setOutputStyle
public void setOutputStyle(final String outputStyle) { if (outputStyle == null && this.outputStyle == null) { return; } else if (outputStyle == null) { removeChild(this.outputStyle); this.outputStyle = null; } else if (this.outputStyle == null) { t...
java
public void setOutputStyle(final String outputStyle) { if (outputStyle == null && this.outputStyle == null) { return; } else if (outputStyle == null) { removeChild(this.outputStyle); this.outputStyle = null; } else if (this.outputStyle == null) { t...
[ "public", "void", "setOutputStyle", "(", "final", "String", "outputStyle", ")", "{", "if", "(", "outputStyle", "==", "null", "&&", "this", ".", "outputStyle", "==", "null", ")", "{", "return", ";", "}", "else", "if", "(", "outputStyle", "==", "null", ")"...
Sets the Content Specifications output style. @param outputStyle The output style for the content specification
[ "Sets", "the", "Content", "Specifications", "output", "style", "." ]
2bc02e2971e4522b47a130fb7ae5a0f5ad377df1
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/ContentSpec.java#L1068-L1080
train
Sets the outputStyle.
Create a Java method that does the following: "Sets the outputStyle.".
Of course, here is the Java code you requested: ```java public void setOutputStyle(final String outputStyle) { if (outputStyle == null && this.outputStyle == null) { return; } else if (outputStyle == null) { removeChild(this.outputStyle); this.outputStyle = null; ...
alexruiz/fest-reflect
src/main/java/org/fest/reflect/beanproperty/PropertyAccessor.java
PropertyAccessor.set
public void set(@Nullable T value) { try { descriptor.getWriteMethod().invoke(target, value); } catch (Exception e) { String format = "Failed to set value %s in property '%s'"; String msg = String.format(format, String.valueOf(value), descriptor.getName()); throw new ReflectionError(msg,...
java
public void set(@Nullable T value) { try { descriptor.getWriteMethod().invoke(target, value); } catch (Exception e) { String format = "Failed to set value %s in property '%s'"; String msg = String.format(format, String.valueOf(value), descriptor.getName()); throw new ReflectionError(msg,...
[ "public", "void", "set", "(", "@", "Nullable", "T", "value", ")", "{", "try", "{", "descriptor", ".", "getWriteMethod", "(", ")", ".", "invoke", "(", "target", ",", "value", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "String", "format",...
Sets a value of the <a href="http://docs.oracle.com/javase/tutorial/javabeans/index.html" target="_blank">JavaBeans</a> property. <p/> Examples: <pre> // import static {@link org.fest.reflect.core.Reflection#property(String) org.fest.reflect.core.Reflection.property}; // Equivalent to "String name = person.getName()" ...
[ "Sets", "a", "value", "of", "the", "<a", "href", "=", "http", ":", "//", "docs", ".", "oracle", ".", "com", "/", "javase", "/", "tutorial", "/", "javabeans", "/", "index", ".", "html", "target", "=", "_blank", ">", "JavaBeans<", "/", "a", ">", "pro...
6db30716808633ef880e439b3dc6602ecb3f1b08
https://github.com/alexruiz/fest-reflect/blob/6db30716808633ef880e439b3dc6602ecb3f1b08/src/main/java/org/fest/reflect/beanproperty/PropertyAccessor.java#L105-L113
train
Sets the value of the property.
Create a Java method that does the following: "Sets the value of the property.".
Of course, here is the Java code you requested: ```java public void set(@Nullable T value) { try { descriptor.getWriteMethod().invoke(target, value); } catch (Exception e) { String format = "Failed to set value %s in property '%s'"; String msg = String.format(format, String.valueOf(value), de...
drewwills/cernunnos
cernunnos-core/src/main/java/org/danann/cernunnos/concurrent/ThreadPoolTask.java
ThreadPoolTask.perform
public void perform(TaskRequest req, TaskResponse res) { final String poolAttributeName = (String) this.attributeNamePhrase.evaluate(req, res); final boolean useExisting = Boolean.valueOf((String) this.useExistingPhrase.evaluate(req, res)); final ExecutorService executorService; ...
java
public void perform(TaskRequest req, TaskResponse res) { final String poolAttributeName = (String) this.attributeNamePhrase.evaluate(req, res); final boolean useExisting = Boolean.valueOf((String) this.useExistingPhrase.evaluate(req, res)); final ExecutorService executorService; ...
[ "public", "void", "perform", "(", "TaskRequest", "req", ",", "TaskResponse", "res", ")", "{", "final", "String", "poolAttributeName", "=", "(", "String", ")", "this", ".", "attributeNamePhrase", ".", "evaluate", "(", "req", ",", "res", ")", ";", "final", "...
/* (non-Javadoc) @see org.danann.cernunnos.Task#perform(org.danann.cernunnos.TaskRequest, org.danann.cernunnos.TaskResponse)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
dc6848e0253775e22b6c869fd06506d4ddb6d728
https://github.com/drewwills/cernunnos/blob/dc6848e0253775e22b6c869fd06506d4ddb6d728/cernunnos-core/src/main/java/org/danann/cernunnos/concurrent/ThreadPoolTask.java#L66-L120
train
Perform the task.
Create a Java method that does the following: "Perform the task.".
Of course, here is the Java code you requested: ```java public void perform(TaskRequest req, TaskResponse res) { final String poolAttributeName = (String) this.attributeNamePhrase.evaluate(req, res); final boolean useExisting = Boolean.valueOf((String) this.useExistingPhrase.evaluate(req, res)); ...
ricksbrown/cowsay
src/main/java/com/github/ricksbrown/cowsay/Message.java
Message.formatMessage
private String formatMessage(final String message) { String result; if (message != null) { result = wrapMessage(message); int longestLine = getLongestLineLen(result); if (!isThought) { result = Bubble.formatSpeech(result, longestLine); } else { result = Bubble.formatThought(result, longestLine);...
java
private String formatMessage(final String message) { String result; if (message != null) { result = wrapMessage(message); int longestLine = getLongestLineLen(result); if (!isThought) { result = Bubble.formatSpeech(result, longestLine); } else { result = Bubble.formatThought(result, longestLine);...
[ "private", "String", "formatMessage", "(", "final", "String", "message", ")", "{", "String", "result", ";", "if", "(", "message", "!=", "null", ")", "{", "result", "=", "wrapMessage", "(", "message", ")", ";", "int", "longestLine", "=", "getLongestLineLen", ...
Builds the bubble around the message. @param message The plain message as provided by the user. @return The message, line-wrapped and bubble-wrapped.
[ "Builds", "the", "bubble", "around", "the", "message", "." ]
a18e4185090835e971d97fa178191ffc2e794b3c
https://github.com/ricksbrown/cowsay/blob/a18e4185090835e971d97fa178191ffc2e794b3c/src/main/java/com/github/ricksbrown/cowsay/Message.java#L78-L91
valid
Format the given message.
Create a Java method that does the following: "Format the given message.".
Of course, here is the Java code you requested: ```java private String formatMessage(final String message) { String result; if (message != null) { result = wrapMessage(message); int longestLine = getLongestLineLen(result); if (!isThought) { result = Bubble.formatSpeech(result, longestLine); } else ...
eFaps/eFaps-WebApp
src/main/java/org/efaps/ui/wicket/components/modalwindow/ModalWindowContainer.java
ModalWindowContainer.reset
public void reset() { super.setMinimalWidth(200); super.setMinimalHeight(200); super.setInitialHeight(400); super.setInitialWidth(600); super.setUseInitialHeight(true); super.setResizable(true); super.setHeightUnit("px"); super.setWidthUnit("px"); ...
java
public void reset() { super.setMinimalWidth(200); super.setMinimalHeight(200); super.setInitialHeight(400); super.setInitialWidth(600); super.setUseInitialHeight(true); super.setResizable(true); super.setHeightUnit("px"); super.setWidthUnit("px"); ...
[ "public", "void", "reset", "(", ")", "{", "super", ".", "setMinimalWidth", "(", "200", ")", ";", "super", ".", "setMinimalHeight", "(", "200", ")", ";", "super", ".", "setInitialHeight", "(", "400", ")", ";", "super", ".", "setInitialWidth", "(", "600", ...
This method sets this ModalWindowContainer into the state like it was just created. It uses the default values as they are defined in <code>org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow </code>
[ "This", "method", "sets", "this", "ModalWindowContainer", "into", "the", "state", "like", "it", "was", "just", "created", ".", "It", "uses", "the", "default", "values", "as", "they", "are", "defined", "in", "<code", ">", "org", ".", "apache", ".", "wicket"...
785c1aba0860dd65c673f123214fbe8c24ebdb17
https://github.com/eFaps/eFaps-WebApp/blob/785c1aba0860dd65c673f123214fbe8c24ebdb17/src/main/java/org/efaps/ui/wicket/components/modalwindow/ModalWindowContainer.java#L346-L359
valid
Reset the configuration of the .
Create a Java method that does the following: "Reset the configuration of the .".
Of course, here is the Java code you requested: ```java public void reset() { super.setMinimalWidth(200); super.setMinimalHeight(200); super.setInitialHeight(400); super.setInitialWidth(600); super.setUseInitialHeight(true); super.setResizable(true); super.se...
Stratio/bdt
src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java
CommandExecutionSpec.findShellOutput
@Then("^the command output contains '(.+?)'$") public void findShellOutput(String search) throws Exception { assertThat(commonspec.getCommandResult()).as("Contains " + search + ".").contains(search); }
java
@Then("^the command output contains '(.+?)'$") public void findShellOutput(String search) throws Exception { assertThat(commonspec.getCommandResult()).as("Contains " + search + ".").contains(search); }
[ "@", "Then", "(", "\"^the command output contains '(.+?)'$\"", ")", "public", "void", "findShellOutput", "(", "String", "search", ")", "throws", "Exception", "{", "assertThat", "(", "commonspec", ".", "getCommandResult", "(", ")", ")", ".", "as", "(", "\"Contains ...
Check the existence of a text at a command output @param search
[ "Check", "the", "existence", "of", "a", "text", "at", "a", "command", "output" ]
55324d19e7497764ad3dd7139923e13eb9841d75
https://github.com/Stratio/bdt/blob/55324d19e7497764ad3dd7139923e13eb9841d75/src/main/java/com/stratio/qa/specs/CommandExecutionSpec.java#L187-L190
train
Find the shell output.
Create a Java method that does the following: "Find the shell output.".
Of course, here is the Java code you requested: ```java @Then("^the command output contains '(.+?)'$") public void findShellOutput(String search) throws Exception { assertThat(commonspec.getCommandResult()).as("Contains " + search + ".").contains(search); } ``` Hope this helps!
alkacon/opencms-core
src-modules/org/opencms/workplace/tools/searchindex/CmsSearchIndexSourceList.java
CmsSearchIndexSourceList.searchIndexSources
private List<CmsSearchIndexSource> searchIndexSources() { CmsSearchManager manager = OpenCms.getSearchManager(); I_CmsSearchIndex index = manager.getIndex(getParamIndexName()); List<CmsSearchIndexSource> sources = index.getSources(); return sources; }
java
private List<CmsSearchIndexSource> searchIndexSources() { CmsSearchManager manager = OpenCms.getSearchManager(); I_CmsSearchIndex index = manager.getIndex(getParamIndexName()); List<CmsSearchIndexSource> sources = index.getSources(); return sources; }
[ "private", "List", "<", "CmsSearchIndexSource", ">", "searchIndexSources", "(", ")", "{", "CmsSearchManager", "manager", "=", "OpenCms", ".", "getSearchManager", "(", ")", ";", "I_CmsSearchIndex", "index", "=", "manager", ".", "getIndex", "(", "getParamIndexName", ...
Returns the available search indexes of this installation. @return the available search indexes of this installation
[ "Returns", "the", "available", "search", "indexes", "of", "this", "installation", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/tools/searchindex/CmsSearchIndexSourceList.java#L469-L475
train
Returns the list of search index sources.
Create a Java method that does the following: "Returns the list of search index sources.".
Of course, here is the Java code you requested: ```java private List<CmsSearchIndexSource> searchIndexSources() { CmsSearchManager manager = OpenCms.getSearchManager(); I_CmsSearchIndex index = manager.getIndex(getParamIndexName()); List<CmsSearchIndexSource> sources = index.getSources(); ...
moparisthebest/beehive
beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/HtmlBaseTag.java
HtmlBaseTag.getOnClick
public String getOnClick() { AbstractHtmlState tsh = getState(); return tsh.getAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, ONCLICK); }
java
public String getOnClick() { AbstractHtmlState tsh = getState(); return tsh.getAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, ONCLICK); }
[ "public", "String", "getOnClick", "(", ")", "{", "AbstractHtmlState", "tsh", "=", "getState", "(", ")", ";", "return", "tsh", ".", "getAttribute", "(", "AbstractHtmlState", ".", "ATTR_JAVASCRIPT", ",", "ONCLICK", ")", ";", "}" ]
Gets the onClick javascript event. @return the onClick event.
[ "Gets", "the", "onClick", "javascript", "event", "." ]
4246a0cc40ce3c05f1a02c2da2653ac622703d77
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/html/HtmlBaseTag.java#L273-L277
train
Gets the value of the onClick attribute.
Create a Java method that does the following: "Gets the value of the onClick attribute.".
Of course, here is the Java code you requested: ```java public String getOnClick() { AbstractHtmlState tsh = getState(); return tsh.getAttribute(AbstractHtmlState.ATTR_JAVASCRIPT, ONCLICK); } ``` Hope this helps!
HanSolo/Medusa
src/main/java/eu/hansolo/medusa/Gauge.java
Gauge.setThresholdVisible
public void setThresholdVisible(final boolean VISIBLE) { if (null == thresholdVisible) { _thresholdVisible = VISIBLE; fireUpdateEvent(VISIBILITY_EVENT); } else { thresholdVisible.set(VISIBLE); } }
java
public void setThresholdVisible(final boolean VISIBLE) { if (null == thresholdVisible) { _thresholdVisible = VISIBLE; fireUpdateEvent(VISIBILITY_EVENT); } else { thresholdVisible.set(VISIBLE); } }
[ "public", "void", "setThresholdVisible", "(", "final", "boolean", "VISIBLE", ")", "{", "if", "(", "null", "==", "thresholdVisible", ")", "{", "_thresholdVisible", "=", "VISIBLE", ";", "fireUpdateEvent", "(", "VISIBILITY_EVENT", ")", ";", "}", "else", "{", "thr...
Defines if the threshold indicator should be drawn @param VISIBLE
[ "Defines", "if", "the", "threshold", "indicator", "should", "be", "drawn" ]
1321e4925dcde659028d4b296e49e316494c114c
https://github.com/HanSolo/Medusa/blob/1321e4925dcde659028d4b296e49e316494c114c/src/main/java/eu/hansolo/medusa/Gauge.java#L3945-L3952
train
Defines if the threshold should be drawn in the image.
Create a Java method that does the following: "Defines if the threshold should be drawn in the image.".
Of course, here is the Java code you requested: ```java public void setThresholdVisible(final boolean VISIBLE) { if (null == thresholdVisible) { _thresholdVisible = VISIBLE; fireUpdateEvent(VISIBILITY_EVENT); } else { thresholdVisible.set(VISIBLE); } } ``...
jbundle/jbundle
main/db/src/main/java/org/jbundle/main/db/Person.java
Person.setupField
public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) { field = new CounterField(this, ID, 8, null, null); field.setHidden(true); } //if (iFieldSeq == 1) //{ // field = new RecordChangedField(this, LA...
java
public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) { field = new CounterField(this, ID, 8, null, null); field.setHidden(true); } //if (iFieldSeq == 1) //{ // field = new RecordChangedField(this, LA...
[ "public", "BaseField", "setupField", "(", "int", "iFieldSeq", ")", "{", "BaseField", "field", "=", "null", ";", "if", "(", "iFieldSeq", "==", "0", ")", "{", "field", "=", "new", "CounterField", "(", "this", ",", "ID", ",", "8", ",", "null", ",", "nul...
Add this field in the Record's field sequence.
[ "Add", "this", "field", "in", "the", "Record", "s", "field", "sequence", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/db/src/main/java/org/jbundle/main/db/Person.java#L63-L124
train
Set up the Field in the Record.
Create a Java method that does the following: "Set up the Field in the Record.".
Of course, here is the Java code you requested: ```java public BaseField setupField(int iFieldSeq) { BaseField field = null; if (iFieldSeq == 0) { field = new CounterField(this, ID, 8, null, null); field.setHidden(true); } //if (iFieldSeq == 1) ...
sockeqwe/mosby
presentermanager/src/main/java/com/hannesdorfmann/mosby3/ActivityScopedCache.java
ActivityScopedCache.remove
public void remove(@NonNull String viewId) { if (viewId == null) { throw new NullPointerException("View Id is null"); } presenterMap.remove(viewId); }
java
public void remove(@NonNull String viewId) { if (viewId == null) { throw new NullPointerException("View Id is null"); } presenterMap.remove(viewId); }
[ "public", "void", "remove", "(", "@", "NonNull", "String", "viewId", ")", "{", "if", "(", "viewId", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"View Id is null\"", ")", ";", "}", "presenterMap", ".", "remove", "(", "viewId", ")"...
Removes the Presenter (and ViewState) from the internal storage @param viewId The msoby internal view id
[ "Removes", "the", "Presenter", "(", "and", "ViewState", ")", "from", "the", "internal", "storage" ]
7f22118c950b5e6fbba0ec42d8e97586dfb08940
https://github.com/sockeqwe/mosby/blob/7f22118c950b5e6fbba0ec42d8e97586dfb08940/presentermanager/src/main/java/com/hannesdorfmann/mosby3/ActivityScopedCache.java#L150-L157
train
Removes a view from the presenter map.
Create a Java method that does the following: "Removes a view from the presenter map.".
Of course, here is the Java code you requested: ```java public void remove(@NonNull String viewId) { if (viewId == null) { throw new NullPointerException("View Id is null"); } presenterMap.remove(viewId); } ``` Hope this helps!
jbundle/jbundle
thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java
PDatabase.getFilename
public String getFilename(String strFilePath, boolean bCreatePath) { String strFilename = null; try { if (bCreatePath) { strFilename = m_strFilePrefix; File file = new File(strFilename); if (!file.isDirectory()) ...
java
public String getFilename(String strFilePath, boolean bCreatePath) { String strFilename = null; try { if (bCreatePath) { strFilename = m_strFilePrefix; File file = new File(strFilename); if (!file.isDirectory()) ...
[ "public", "String", "getFilename", "(", "String", "strFilePath", ",", "boolean", "bCreatePath", ")", "{", "String", "strFilename", "=", "null", ";", "try", "{", "if", "(", "bCreatePath", ")", "{", "strFilename", "=", "m_strFilePrefix", ";", "File", "file", "...
Get the physical table that matches this BaseTable and create it if it doesn't exist. This is just a utility for those implementations that use a physical file. Open the file and prepare to read objects from it. This method also creates the entire directory structure, but does not create the file. The file name is: ext...
[ "Get", "the", "physical", "table", "that", "matches", "this", "BaseTable", "and", "create", "it", "if", "it", "doesn", "t", "exist", ".", "This", "is", "just", "a", "utility", "for", "those", "implementations", "that", "use", "a", "physical", "file", ".", ...
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/db/base/src/main/java/org/jbundle/thin/base/db/mem/base/PDatabase.java#L361-L391
train
Get the filename for this file.
Create a Java method that does the following: "Get the filename for this file.".
Of course, here is the Java code you requested: ```java public String getFilename(String strFilePath, boolean bCreatePath) { String strFilename = null; try { if (bCreatePath) { strFilename = m_strFilePrefix; File file = new File(strFil...
EdwardRaff/JSAT
JSAT/src/jsat/distributions/kernels/RationalQuadraticKernel.java
RationalQuadraticKernel.setC
public void setC(double c) { if(c <= 0 || Double.isNaN(c) || Double.isInfinite(c)) throw new IllegalArgumentException("coefficient must be in (0, Inf), not " + c); this.c = c; }
java
public void setC(double c) { if(c <= 0 || Double.isNaN(c) || Double.isInfinite(c)) throw new IllegalArgumentException("coefficient must be in (0, Inf), not " + c); this.c = c; }
[ "public", "void", "setC", "(", "double", "c", ")", "{", "if", "(", "c", "<=", "0", "||", "Double", ".", "isNaN", "(", "c", ")", "||", "Double", ".", "isInfinite", "(", "c", ")", ")", "throw", "new", "IllegalArgumentException", "(", "\"coefficient must ...
Sets the positive additive coefficient @param c the positive additive coefficient
[ "Sets", "the", "positive", "additive", "coefficient" ]
0ff53b7b39684b2379cc1da522f5b3a954b15cfb
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/distributions/kernels/RationalQuadraticKernel.java#L36-L41
train
Sets the coefficient of the C - V phrase.
Create a Java method that does the following: "Sets the coefficient of the C - V phrase.".
Of course, here is the Java code you requested: ```java public void setC(double c) { if(c <= 0 || Double.isNaN(c) || Double.isInfinite(c)) throw new IllegalArgumentException("coefficient must be in (0, Inf), not " + c); this.c = c; } ``` Hope this helps!
glyptodon/guacamole-client
guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java
GuacamoleHTTPTunnelServlet.sendError
protected void sendError(HttpServletResponse response, int guacamoleStatusCode, int guacamoleHttpCode, String message) throws ServletException { try { // If response not committed, send error code and message if (!response.isCommitted()) { respon...
java
protected void sendError(HttpServletResponse response, int guacamoleStatusCode, int guacamoleHttpCode, String message) throws ServletException { try { // If response not committed, send error code and message if (!response.isCommitted()) { respon...
[ "protected", "void", "sendError", "(", "HttpServletResponse", "response", ",", "int", "guacamoleStatusCode", ",", "int", "guacamoleHttpCode", ",", "String", "message", ")", "throws", "ServletException", "{", "try", "{", "// If response not committed, send error code and mes...
Sends an error on the given HTTP response using the information within the given GuacamoleStatus. @param response The HTTP response to use to send the error. @param guacamoleStatusCode The GuacamoleStatus code to send. @param guacamoleHttpCode The numeric HTTP code to send. @param message The human-readable error m...
[ "Sends", "an", "error", "on", "the", "given", "HTTP", "response", "using", "the", "information", "within", "the", "given", "GuacamoleStatus", "." ]
ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9
https://github.com/glyptodon/guacamole-client/blob/ea1b10e9d1e3f1fa640dff2ca64d61b44bf1ace9/guacamole-common/src/main/java/org/apache/guacamole/servlet/GuacamoleHTTPTunnelServlet.java#L164-L186
train
Sends an error to the response.
Create a Java method that does the following: "Sends an error to the response.".
Of course, here is the Java code you requested: ```java protected void sendError(HttpServletResponse response, int guacamoleStatusCode, int guacamoleHttpCode, String message) throws ServletException { try { // If response not committed, send error code and message ...
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/Type3Font.java
Type3Font.defineGlyph
public PdfContentByte defineGlyph(char c, float wx, float llx, float lly, float urx, float ury) { if (c == 0 || c > 255) throw new IllegalArgumentException("The char " + (int)c + " doesn't belong in this Type3 font"); usedSlot[c] = true; Integer ck = Integer.valueOf(c); Type3...
java
public PdfContentByte defineGlyph(char c, float wx, float llx, float lly, float urx, float ury) { if (c == 0 || c > 255) throw new IllegalArgumentException("The char " + (int)c + " doesn't belong in this Type3 font"); usedSlot[c] = true; Integer ck = Integer.valueOf(c); Type3...
[ "public", "PdfContentByte", "defineGlyph", "(", "char", "c", ",", "float", "wx", ",", "float", "llx", ",", "float", "lly", ",", "float", "urx", ",", "float", "ury", ")", "{", "if", "(", "c", "==", "0", "||", "c", ">", "255", ")", "throw", "new", ...
Defines a glyph. If the character was already defined it will return the same content @param c the character to match this glyph. @param wx the advance this character will have @param llx the X lower left corner of the glyph bounding box. If the <CODE>colorize</CODE> option is <CODE>true</CODE> the value is ignored @pa...
[ "Defines", "a", "glyph", ".", "If", "the", "character", "was", "already", "defined", "it", "will", "return", "the", "same", "content" ]
438fc1899367fd13dfdfa8dfdca9a3c1a7783b84
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/Type3Font.java#L126-L152
train
Define a Type3 glyph.
Create a Java method that does the following: "Define a Type3 glyph.".
Of course, here is the Java code you requested: ```java public PdfContentByte defineGlyph(char c, float wx, float llx, float lly, float urx, float ury) { if (c == 0 || c > 255) throw new IllegalArgumentException("The char " + (int)c + " doesn't belong in this Type3 font"); usedSlot[c] = tru...
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java
ListManagementImageListsImpl.createWithServiceResponseAsync
public Observable<ServiceResponse<ImageList>> createWithServiceResponseAsync(String contentType, BodyModel bodyParameter) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (contentType ==...
java
public Observable<ServiceResponse<ImageList>> createWithServiceResponseAsync(String contentType, BodyModel bodyParameter) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (contentType ==...
[ "public", "Observable", "<", "ServiceResponse", "<", "ImageList", ">", ">", "createWithServiceResponseAsync", "(", "String", "contentType", ",", "BodyModel", "bodyParameter", ")", "{", "if", "(", "this", ".", "client", ".", "baseUrl", "(", ")", "==", "null", "...
Creates an image list. @param contentType The content type. @param bodyParameter Schema of the body. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the ImageList object
[ "Creates", "an", "image", "list", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java#L388-L412
train
Creates an image cache with the specified content type and body.
Create a Java method that does the following: "Creates an image cache with the specified content type and body.".
Of course, here is the Java code you requested: ```java public Observable<ServiceResponse<ImageList>> createWithServiceResponseAsync(String contentType, BodyModel bodyParameter) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required an...
m-m-m/util
collection/src/main/java/net/sf/mmm/util/collection/impl/CollectionFactoryManagerImpl.java
CollectionFactoryManagerImpl.getInstance
public static CollectionFactoryManager getInstance() { if (instance == null) { synchronized (CollectionFactoryManagerImpl.class) { if (instance == null) { CollectionFactoryManagerImpl manager = new CollectionFactoryManagerImpl(); manager.initialize(); instance = manager;...
java
public static CollectionFactoryManager getInstance() { if (instance == null) { synchronized (CollectionFactoryManagerImpl.class) { if (instance == null) { CollectionFactoryManagerImpl manager = new CollectionFactoryManagerImpl(); manager.initialize(); instance = manager;...
[ "public", "static", "CollectionFactoryManager", "getInstance", "(", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "synchronized", "(", "CollectionFactoryManagerImpl", ".", "class", ")", "{", "if", "(", "instance", "==", "null", ")", "{", "Collection...
This method gets the singleton instance of this {@link CollectionFactoryManager} implementation. <br> <b>ATTENTION:</b><br> Please prefer dependency-injection instead of using this method. @return the singleton instance.
[ "This", "method", "gets", "the", "singleton", "instance", "of", "this", "{", "@link", "CollectionFactoryManager", "}", "implementation", ".", "<br", ">", "<b", ">", "ATTENTION", ":", "<", "/", "b", ">", "<br", ">", "Please", "prefer", "dependency", "-", "i...
f0e4e084448f8dfc83ca682a9e1618034a094ce6
https://github.com/m-m-m/util/blob/f0e4e084448f8dfc83ca682a9e1618034a094ce6/collection/src/main/java/net/sf/mmm/util/collection/impl/CollectionFactoryManagerImpl.java#L97-L109
train
Get the instance of the CollectionFactoryManager.
Create a Java method that does the following: "Get the instance of the CollectionFactoryManager.".
Of course, here is the Java code you requested: ```java public static CollectionFactoryManager getInstance() { if (instance == null) { synchronized (CollectionFactoryManagerImpl.class) { if (instance == null) { CollectionFactoryManagerImpl manager = new CollectionFactoryManagerImpl(); ...
Alluxio/alluxio
underfs/hdfs/src/main/java/alluxio/underfs/hdfs/HdfsUnderFileSystem.java
HdfsUnderFileSystem.listStatusInternal
@Nullable private FileStatus[] listStatusInternal(String path) throws IOException { FileStatus[] files; FileSystem hdfs = getFs(); try { files = hdfs.listStatus(new Path(path)); } catch (FileNotFoundException e) { return null; } // Check if path is a file if (files != null && f...
java
@Nullable private FileStatus[] listStatusInternal(String path) throws IOException { FileStatus[] files; FileSystem hdfs = getFs(); try { files = hdfs.listStatus(new Path(path)); } catch (FileNotFoundException e) { return null; } // Check if path is a file if (files != null && f...
[ "@", "Nullable", "private", "FileStatus", "[", "]", "listStatusInternal", "(", "String", "path", ")", "throws", "IOException", "{", "FileStatus", "[", "]", "files", ";", "FileSystem", "hdfs", "=", "getFs", "(", ")", ";", "try", "{", "files", "=", "hdfs", ...
List status for given path. Returns an array of {@link FileStatus} with an entry for each file and directory in the directory denoted by this path. @param path the pathname to list @return {@code null} if the path is not a directory
[ "List", "status", "for", "given", "path", ".", "Returns", "an", "array", "of", "{", "@link", "FileStatus", "}", "with", "an", "entry", "for", "each", "file", "and", "directory", "in", "the", "directory", "denoted", "by", "this", "path", "." ]
af38cf3ab44613355b18217a3a4d961f8fec3a10
https://github.com/Alluxio/alluxio/blob/af38cf3ab44613355b18217a3a4d961f8fec3a10/underfs/hdfs/src/main/java/alluxio/underfs/hdfs/HdfsUnderFileSystem.java#L713-L727
train
List the files in the file system.
Create a Java method that does the following: "List the files in the file system.".
Of course, here is the Java code you requested: ```java @Nullable private FileStatus[] listStatusInternal(String path) throws IOException { FileStatus[] files; FileSystem hdfs = getFs(); try { files = hdfs.listStatus(new Path(path)); } catch (FileNotFoundException e) { return null; } ...
arnaudroger/SimpleFlatMapper
sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/ConnectedCrud.java
ConnectedCrud.read
public <RH extends CheckedConsumer<? super T>> RH read(final Collection<K> keys, final RH consumer) throws SQLException { transactionTemplate .doInTransaction(new SQLFunction<Connection, Object>() { @Override public Object apply(Connection connection) throws SQLExcept...
java
public <RH extends CheckedConsumer<? super T>> RH read(final Collection<K> keys, final RH consumer) throws SQLException { transactionTemplate .doInTransaction(new SQLFunction<Connection, Object>() { @Override public Object apply(Connection connection) throws SQLExcept...
[ "public", "<", "RH", "extends", "CheckedConsumer", "<", "?", "super", "T", ">", ">", "RH", "read", "(", "final", "Collection", "<", "K", ">", "keys", ",", "final", "RH", "consumer", ")", "throws", "SQLException", "{", "transactionTemplate", ".", "doInTrans...
retrieve the objects with the specified keys and pass them to the consumer. @param keys the keys @param consumer the handler that is callback for each row @throws SQLException if an error occurs
[ "retrieve", "the", "objects", "with", "the", "specified", "keys", "and", "pass", "them", "to", "the", "consumer", "." ]
93435438c18f26c87963d5e0f3ebf0f264dcd8c2
https://github.com/arnaudroger/SimpleFlatMapper/blob/93435438c18f26c87963d5e0f3ebf0f264dcd8c2/sfm-jdbc/src/main/java/org/simpleflatmapper/jdbc/ConnectedCrud.java#L129-L139
train
Read records from the database.
Create a Java method that does the following: "Read records from the database.".
Of course, here is the Java code you requested: ```java public <RH extends CheckedConsumer<? super T>> RH read(final Collection<K> keys, final RH consumer) throws SQLException { transactionTemplate .doInTransaction(new SQLFunction<Connection, Object>() { @Override pu...
albfernandez/javadbf
src/main/java/com/linuxense/javadbf/DBFUtils.java
DBFUtils.removeNullBytes
public static byte[] removeNullBytes(byte[] array) { ByteArrayOutputStream baos = new ByteArrayOutputStream(array.length); for (byte b : array) { if (b != 0x00) { baos.write(b); } } return baos.toByteArray(); }
java
public static byte[] removeNullBytes(byte[] array) { ByteArrayOutputStream baos = new ByteArrayOutputStream(array.length); for (byte b : array) { if (b != 0x00) { baos.write(b); } } return baos.toByteArray(); }
[ "public", "static", "byte", "[", "]", "removeNullBytes", "(", "byte", "[", "]", "array", ")", "{", "ByteArrayOutputStream", "baos", "=", "new", "ByteArrayOutputStream", "(", "array", ".", "length", ")", ";", "for", "(", "byte", "b", ":", "array", ")", "{...
Remove all nulls (0) found in the data. @param array the data @return the data cleared of whitespaces
[ "Remove", "all", "nulls", "(", "0", ")", "found", "in", "the", "data", "." ]
ac9867b46786cb055bce9323e2cf074365207693
https://github.com/albfernandez/javadbf/blob/ac9867b46786cb055bce9323e2cf074365207693/src/main/java/com/linuxense/javadbf/DBFUtils.java#L132-L140
train
Removes null bytes from the byte array.
Create a Java method that does the following: "Removes null bytes from the byte array.".
Of course, here is the Java code you requested: ```java public static byte[] removeNullBytes(byte[] array) { ByteArrayOutputStream baos = new ByteArrayOutputStream(array.length); for (byte b : array) { if (b != 0x00) { baos.write(b); } } return baos.toByteArray(); } ``` Hope this helps!
contentful/contentful-management.java
src/main/java/com/contentful/java/cma/CMAClient.java
CMAClient.setCallbackExecutor
private void setCallbackExecutor(Builder clientBuilder) { if (clientBuilder.callbackExecutor == null) { callbackExecutor = Platform.get().callbackExecutor(); } else { callbackExecutor = clientBuilder.callbackExecutor; } }
java
private void setCallbackExecutor(Builder clientBuilder) { if (clientBuilder.callbackExecutor == null) { callbackExecutor = Platform.get().callbackExecutor(); } else { callbackExecutor = clientBuilder.callbackExecutor; } }
[ "private", "void", "setCallbackExecutor", "(", "Builder", "clientBuilder", ")", "{", "if", "(", "clientBuilder", ".", "callbackExecutor", "==", "null", ")", "{", "callbackExecutor", "=", "Platform", ".", "get", "(", ")", ".", "callbackExecutor", "(", ")", ";",...
Sets the callback executor.
[ "Sets", "the", "callback", "executor", "." ]
ca310fb9ea9577fcff0ca57949ab7c2315fa2534
https://github.com/contentful/contentful-management.java/blob/ca310fb9ea9577fcff0ca57949ab7c2315fa2534/src/main/java/com/contentful/java/cma/CMAClient.java#L181-L187
train
Set the callback executor.
Create a Java method that does the following: "Set the callback executor.".
Of course, here is the Java code you requested: ```java private void setCallbackExecutor(Builder clientBuilder) { if (clientBuilder.callbackExecutor == null) { callbackExecutor = Platform.get().callbackExecutor(); } else { callbackExecutor = clientBuilder.callbackExecutor; } } ``` Hope this ...
BrunoEberhard/minimal-j
src/main/java/org/minimalj/frontend/page/Page.java
Page.validateRoute
public static boolean validateRoute(String route) { if (StringUtils.isBlank(route)) { return false; } if (route.startsWith("/") || route.endsWith("/")) { return false; } for (int i = 0; i<route.length(); i++) { char c = route.charAt(i); if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0...
java
public static boolean validateRoute(String route) { if (StringUtils.isBlank(route)) { return false; } if (route.startsWith("/") || route.endsWith("/")) { return false; } for (int i = 0; i<route.length(); i++) { char c = route.charAt(i); if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0...
[ "public", "static", "boolean", "validateRoute", "(", "String", "route", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "route", ")", ")", "{", "return", "false", ";", "}", "if", "(", "route", ".", "startsWith", "(", "\"/\"", ")", "||", "route...
Route String must obey some rules to be valid: <UL> <LI>no '/' at start or end <LI>Only characters or digits or the three characters -_/ are allowed </UL> @param route String provided by a page @return Frontend will accept route or not @see java.util.Base64#getUrlEncoder
[ "Route", "String", "must", "obey", "some", "rules", "to", "be", "valid", ":", "<UL", ">", "<LI", ">", "no", "/", "at", "start", "or", "end", "<LI", ">", "Only", "characters", "or", "digits", "or", "the", "three", "characters", "-", "_", "/", "are", ...
f7c5461b2b47a10b383aee1e2f1f150f6773703b
https://github.com/BrunoEberhard/minimal-j/blob/f7c5461b2b47a10b383aee1e2f1f150f6773703b/src/main/java/org/minimalj/frontend/page/Page.java#L69-L83
train
Validate the route.
Create a Java method that does the following: "Validate the route.".
Of course, here is the Java code you requested: ```java public static boolean validateRoute(String route) { if (StringUtils.isBlank(route)) { return false; } if (route.startsWith("/") || route.endsWith("/")) { return false; } for (int i = 0; i<route.length(); i++) { char c = route.charAt(i); if (...
ModeShape/modeshape
connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java
Properties.cmisValue
public Object cmisValue( PropertyDefinition<?> pdef, String jcrName, Document document ) { switch (pdef.getPropertyType()) { case STRING: return document.getString(jcrName); case BOOLEAN: return doc...
java
public Object cmisValue( PropertyDefinition<?> pdef, String jcrName, Document document ) { switch (pdef.getPropertyType()) { case STRING: return document.getString(jcrName); case BOOLEAN: return doc...
[ "public", "Object", "cmisValue", "(", "PropertyDefinition", "<", "?", ">", "pdef", ",", "String", "jcrName", ",", "Document", "document", ")", "{", "switch", "(", "pdef", ".", "getPropertyType", "(", ")", ")", "{", "case", "STRING", ":", "return", "documen...
Calculates value of the property corresponding to cmis domain. @param pdef property definition as declared in cmis repository. @param jcrName the name of the property in jcr domain @param document connectors's view of properties in jcr domain. @return value as declared by property definition.
[ "Calculates", "value", "of", "the", "property", "corresponding", "to", "cmis", "domain", "." ]
794cfdabb67a90f24629c4fff0424a6125f8f95b
https://github.com/ModeShape/modeshape/blob/794cfdabb67a90f24629c4fff0424a6125f8f95b/connectors/modeshape-connector-cmis/src/main/java/org/modeshape/connector/cmis/Properties.java#L177-L205
train
Get the value of a property in the document.
Create a Java method that does the following: "Get the value of a property in the document.".
Of course, here is the Java code you requested: ```java public Object cmisValue( PropertyDefinition<?> pdef, String jcrName, Document document ) { switch (pdef.getPropertyType()) { case STRING: return document.getString(jcrNa...
mapbox/mapbox-java
services-geocoding/src/main/java/com/mapbox/api/geocoding/v5/models/CarmenFeature.java
CarmenFeature.toJson
@Override @SuppressWarnings("unused") public String toJson() { Gson gson = new GsonBuilder() .registerTypeAdapterFactory(GeometryAdapterFactory.create()) .registerTypeAdapter(BoundingBox.class, new BoundingBoxTypeAdapter()) .registerTypeAdapterFactory(GeocodingAdapterFactory.create()) ....
java
@Override @SuppressWarnings("unused") public String toJson() { Gson gson = new GsonBuilder() .registerTypeAdapterFactory(GeometryAdapterFactory.create()) .registerTypeAdapter(BoundingBox.class, new BoundingBoxTypeAdapter()) .registerTypeAdapterFactory(GeocodingAdapterFactory.create()) ....
[ "@", "Override", "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "String", "toJson", "(", ")", "{", "Gson", "gson", "=", "new", "GsonBuilder", "(", ")", ".", "registerTypeAdapterFactory", "(", "GeometryAdapterFactory", ".", "create", "(", ")", ")", ...
This takes the currently defined values found inside this instance and converts it to a JSON string. @return a JSON string which represents this CarmenFeature @since 3.0.0
[ "This", "takes", "the", "currently", "defined", "values", "found", "inside", "this", "instance", "and", "converts", "it", "to", "a", "JSON", "string", "." ]
c0be138f462f91441388584c668f3760ba0e18e2
https://github.com/mapbox/mapbox-java/blob/c0be138f462f91441388584c668f3760ba0e18e2/services-geocoding/src/main/java/com/mapbox/api/geocoding/v5/models/CarmenFeature.java#L293-L310
train
Returns the Carmen feature as a JSON string
Create a Java method that does the following: "Returns the Carmen feature as a JSON string".
Of course, here is the Java code you requested: ```java @Override @SuppressWarnings("unused") public String toJson() { Gson gson = new GsonBuilder() .registerTypeAdapterFactory(GeometryAdapterFactory.create()) .registerTypeAdapter(BoundingBox.class, new BoundingBoxTypeAdapter()) .registerTyp...
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java
TopologyBuilder.setBolt
public BoltDeclarer setBolt(String id, IBasicBolt bolt) throws IllegalArgumentException { return setBolt(id, bolt, null); }
java
public BoltDeclarer setBolt(String id, IBasicBolt bolt) throws IllegalArgumentException { return setBolt(id, bolt, null); }
[ "public", "BoltDeclarer", "setBolt", "(", "String", "id", ",", "IBasicBolt", "bolt", ")", "throws", "IllegalArgumentException", "{", "return", "setBolt", "(", "id", ",", "bolt", ",", "null", ")", ";", "}" ]
Define a new bolt in this topology. This defines a basic bolt, which is a simpler to use but more restricted kind of bolt. Basic bolts are intended for non-aggregation processing and automate the anchoring/acking process to achieve proper reliability in the topology. @param id the id of this component. This id is refe...
[ "Define", "a", "new", "bolt", "in", "this", "topology", ".", "This", "defines", "a", "basic", "bolt", "which", "is", "a", "simpler", "to", "use", "but", "more", "restricted", "kind", "of", "bolt", ".", "Basic", "bolts", "are", "intended", "for", "non", ...
5d6cde22dbca7df3d6e6830bf94f98a6639ab559
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/topology/TopologyBuilder.java#L204-L206
train
Set a bolt to be used by the application.
Create a Java method that does the following: "Set a bolt to be used by the application.".
Of course, here is the Java code you requested: ```java public BoltDeclarer setBolt(String id, IBasicBolt bolt) throws IllegalArgumentException { return setBolt(id, bolt, null); } ``` Hope this helps!
SUSE/salt-netapi-client
src/main/java/com/suse/salt/netapi/client/impl/HttpAsyncClientImpl.java
HttpAsyncClientImpl.request
private <T> CompletionStage<T> request(URI uri, Map<String, String> headers, String data, JsonParser<T> parser) { return executeRequest(httpClient, prepareRequest(uri, headers, data), parser); }
java
private <T> CompletionStage<T> request(URI uri, Map<String, String> headers, String data, JsonParser<T> parser) { return executeRequest(httpClient, prepareRequest(uri, headers, data), parser); }
[ "private", "<", "T", ">", "CompletionStage", "<", "T", ">", "request", "(", "URI", "uri", ",", "Map", "<", "String", ",", "String", ">", "headers", ",", "String", "data", ",", "JsonParser", "<", "T", ">", "parser", ")", "{", "return", "executeRequest",...
Perform HTTP request and parse the result into a given result type. @param data the data to send with the request @return CompletionStage holding object of type T
[ "Perform", "HTTP", "request", "and", "parse", "the", "result", "into", "a", "given", "result", "type", "." ]
a0bdf643c8e34fa4def4b915366594c1491fdad5
https://github.com/SUSE/salt-netapi-client/blob/a0bdf643c8e34fa4def4b915366594c1491fdad5/src/main/java/com/suse/salt/netapi/client/impl/HttpAsyncClientImpl.java#L63-L65
train
Execute a request to the server.
Create a Java method that does the following: "Execute a request to the server.".
Of course, here is the Java code you requested: ```java private <T> CompletionStage<T> request(URI uri, Map<String, String> headers, String data, JsonParser<T> parser) { return executeRequest(httpClient, prepareRequest(uri, headers, data), parser); } ``` Hope this helps!
beanshell/beanshell
src/main/java/bsh/engine/ScriptContextEngineView.java
ScriptContextEngineView.remove
@Override public Object remove(Object key) { int scope = context.getAttributesScope((String) key); if (scope > -1) return context.removeAttribute((String) key, scope); return null; }
java
@Override public Object remove(Object key) { int scope = context.getAttributesScope((String) key); if (scope > -1) return context.removeAttribute((String) key, scope); return null; }
[ "@", "Override", "public", "Object", "remove", "(", "Object", "key", ")", "{", "int", "scope", "=", "context", ".", "getAttributesScope", "(", "(", "String", ")", "key", ")", ";", "if", "(", "scope", ">", "-", "1", ")", "return", "context", ".", "rem...
public Object remove( String key )
[ "public", "Object", "remove", "(", "String", "key", ")" ]
fdddee3de948c9e6babb2d1337028f6fd0a2ba5c
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/engine/ScriptContextEngineView.java#L181-L187
train
Removes an attribute from the context.
Create a Java method that does the following: "Removes an attribute from the context.".
Of course, here is the Java code you requested: ```java @Override public Object remove(Object key) { int scope = context.getAttributesScope((String) key); if (scope > -1) return context.removeAttribute((String) key, scope); return null; } ``` Hope this helps!
zaproxy/zaproxy
src/org/zaproxy/zap/spider/SpiderController.java
SpiderController.arrayKeyValueExists
private boolean arrayKeyValueExists(String key, String value) { if (visitedPost.containsKey(key)) { for(String s : visitedPost.get(key)) { if(s.equals(value)) { return true; } } } return false; }
java
private boolean arrayKeyValueExists(String key, String value) { if (visitedPost.containsKey(key)) { for(String s : visitedPost.get(key)) { if(s.equals(value)) { return true; } } } return false; }
[ "private", "boolean", "arrayKeyValueExists", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "visitedPost", ".", "containsKey", "(", "key", ")", ")", "{", "for", "(", "String", "s", ":", "visitedPost", ".", "get", "(", "key", ")", ")...
Checks whether the value exists in an ArrayList of certain key. @param key the string of the uri @param value the request body of the uri @return true or false depending whether the uri and request body have already been processed
[ "Checks", "whether", "the", "value", "exists", "in", "an", "ArrayList", "of", "certain", "key", "." ]
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/spider/SpiderController.java#L358-L369
train
Check if the array key value exists.
Create a Java method that does the following: "Check if the array key value exists.".
Of course, here is the Java code you requested: ```java private boolean arrayKeyValueExists(String key, String value) { if (visitedPost.containsKey(key)) { for(String s : visitedPost.get(key)) { if(s.equals(value)) { return true; } } } return false; } ``` Hope thi...
vst/commons-math-extensions
src/main/java/com/vsthost/rnd/commons/math/ext/linear/EMatrixUtils.java
EMatrixUtils.rbind
public static RealMatrix rbind (RealMatrix m1, RealMatrix m2) { return MatrixUtils.createRealMatrix(ArrayUtils.addAll(m1.getData(), m2.getData())); }
java
public static RealMatrix rbind (RealMatrix m1, RealMatrix m2) { return MatrixUtils.createRealMatrix(ArrayUtils.addAll(m1.getData(), m2.getData())); }
[ "public", "static", "RealMatrix", "rbind", "(", "RealMatrix", "m1", ",", "RealMatrix", "m2", ")", "{", "return", "MatrixUtils", ".", "createRealMatrix", "(", "ArrayUtils", ".", "addAll", "(", "m1", ".", "getData", "(", ")", ",", "m2", ".", "getData", "(", ...
Appends to matrices by rows. @param m1 The first matrix @param m2 The second matrix. @return Returns the new row-bound matrix.
[ "Appends", "to", "matrices", "by", "rows", "." ]
a11ee78ffe53ab7c016062be93c5af07aa8e1823
https://github.com/vst/commons-math-extensions/blob/a11ee78ffe53ab7c016062be93c5af07aa8e1823/src/main/java/com/vsthost/rnd/commons/math/ext/linear/EMatrixUtils.java#L285-L287
train
Rbinds two real matrices.
Create a Java method that does the following: "Rbinds two real matrices.".
Of course, here is the Java code you requested: ```java public static RealMatrix rbind (RealMatrix m1, RealMatrix m2) { return MatrixUtils.createRealMatrix(ArrayUtils.addAll(m1.getData(), m2.getData())); } ``` Hope this helps!
raydac/java-binary-block-parser
jbbp/src/main/java/com/igormaznitsa/jbbp/JBBPNamedNumericFieldMap.java
JBBPNamedNumericFieldMap.putField
public void putField(final JBBPNumericField field) { JBBPUtils.assertNotNull(field, "Field must not be null"); final JBBPNamedFieldInfo fieldName = field.getNameInfo(); JBBPUtils.assertNotNull(fieldName, "Field name info must not be null"); this.fieldMap.put(fieldName, field); }
java
public void putField(final JBBPNumericField field) { JBBPUtils.assertNotNull(field, "Field must not be null"); final JBBPNamedFieldInfo fieldName = field.getNameInfo(); JBBPUtils.assertNotNull(fieldName, "Field name info must not be null"); this.fieldMap.put(fieldName, field); }
[ "public", "void", "putField", "(", "final", "JBBPNumericField", "field", ")", "{", "JBBPUtils", ".", "assertNotNull", "(", "field", ",", "\"Field must not be null\"", ")", ";", "final", "JBBPNamedFieldInfo", "fieldName", "=", "field", ".", "getNameInfo", "(", ")",...
Put a numeric field into map. @param field a field to be added into map or replace already exists one, it must not be null @throws NullPointerException if the field is null or if it is an anonymous field
[ "Put", "a", "numeric", "field", "into", "map", "." ]
6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b
https://github.com/raydac/java-binary-block-parser/blob/6d98abcab01e0c72d525ebcc9e7b694f9ce49f5b/jbbp/src/main/java/com/igormaznitsa/jbbp/JBBPNamedNumericFieldMap.java#L93-L98
train
Put a numeric field into the map.
Create a Java method that does the following: "Put a numeric field into the map.".
Of course, here is the Java code you requested: ```java public void putField(final JBBPNumericField field) { JBBPUtils.assertNotNull(field, "Field must not be null"); final JBBPNamedFieldInfo fieldName = field.getNameInfo(); JBBPUtils.assertNotNull(fieldName, "Field name info must not be null"); this.f...
facebookarchive/hadoop-20
src/contrib/raid/src/java/org/apache/hadoop/raid/DistRaidNode.java
DistRaidNode.stop
@Override public void stop() { if (stopRequested) { return; } super.stop(); if (jobMonitor != null) jobMonitor.running = false; if (jobMonitorThread != null) jobMonitorThread.interrupt(); }
java
@Override public void stop() { if (stopRequested) { return; } super.stop(); if (jobMonitor != null) jobMonitor.running = false; if (jobMonitorThread != null) jobMonitorThread.interrupt(); }
[ "@", "Override", "public", "void", "stop", "(", ")", "{", "if", "(", "stopRequested", ")", "{", "return", ";", "}", "super", ".", "stop", "(", ")", ";", "if", "(", "jobMonitor", "!=", "null", ")", "jobMonitor", ".", "running", "=", "false", ";", "i...
{@inheritDocs}
[ "{" ]
2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/raid/src/java/org/apache/hadoop/raid/DistRaidNode.java#L73-L81
train
Stop the sequence.
Create a Java method that does the following: "Stop the sequence.".
Of course, here is the Java code you requested: ```java @Override public void stop() { if (stopRequested) { return; } super.stop(); if (jobMonitor != null) jobMonitor.running = false; if (jobMonitorThread != null) jobMonitorThread.interrupt(); } ``` Hope this helps!
tweea/matrixjavalib-main-app-support
src/main/java/net/matrix/app/message/CodedMessage.java
CodedMessage.formatAll
private void formatAll(final StringBuilder sb, final int depth) { for (int i = 0; i < depth; i++) { sb.append('\t'); } format(sb); sb.append('\n'); for (CodedMessage message : messages) { message.formatAll(sb, depth + 1); } }
java
private void formatAll(final StringBuilder sb, final int depth) { for (int i = 0; i < depth; i++) { sb.append('\t'); } format(sb); sb.append('\n'); for (CodedMessage message : messages) { message.formatAll(sb, depth + 1); } }
[ "private", "void", "formatAll", "(", "final", "StringBuilder", "sb", ",", "final", "int", "depth", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "depth", ";", "i", "++", ")", "{", "sb", ".", "append", "(", "'", "'", ")", ";", "}", ...
将所有消息格式化为字符串。
[ "将所有消息格式化为字符串。" ]
6993f4bed1a4378fe854e992cc8c0d265c15ea07
https://github.com/tweea/matrixjavalib-main-app-support/blob/6993f4bed1a4378fe854e992cc8c0d265c15ea07/src/main/java/net/matrix/app/message/CodedMessage.java#L214-L223
valid
Formats all the related data structures.
Create a Java method that does the following: "Formats all the related data structures.".
Of course, here is the Java code you requested: ```java private void formatAll(final StringBuilder sb, final int depth) { for (int i = 0; i < depth; i++) { sb.append('\t'); } format(sb); sb.append('\n'); for (CodedMessage message : messages) { message.formatAll(sb, depth + 1); } } ``` Hope...
oehf/ipf-oht-atna
auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PAMSourceAuditor.java
PAMSourceAuditor.getAuditor
public static PAMSourceAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (PAMSourceAuditor)ctx.getAuditor(PAMSourceAuditor.class); }
java
public static PAMSourceAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (PAMSourceAuditor)ctx.getAuditor(PAMSourceAuditor.class); }
[ "public", "static", "PAMSourceAuditor", "getAuditor", "(", ")", "{", "AuditorModuleContext", "ctx", "=", "AuditorModuleContext", ".", "getContext", "(", ")", ";", "return", "(", "PAMSourceAuditor", ")", "ctx", ".", "getAuditor", "(", "PAMSourceAuditor", ".", "clas...
Get an instance of the PAM Source Auditor from the global context @return PAM Source Auditor instance
[ "Get", "an", "instance", "of", "the", "PAM", "Source", "Auditor", "from", "the", "global", "context" ]
25ed1e926825169c94923a2c89a4618f60478ae8
https://github.com/oehf/ipf-oht-atna/blob/25ed1e926825169c94923a2c89a4618f60478ae8/auditor/src/main/java/org/openhealthtools/ihe/atna/auditor/PAMSourceAuditor.java#L39-L43
train
Get an instance of the PAM Source Auditor from the global context
Create a Java method that does the following: "Get an instance of the PAM Source Auditor from the global context".
Of course, here is the Java code you requested: ```java public static PAMSourceAuditor getAuditor() { AuditorModuleContext ctx = AuditorModuleContext.getContext(); return (PAMSourceAuditor)ctx.getAuditor(PAMSourceAuditor.class); } ``` Hope this helps!
tango-controls/JTango
common/src/main/java/fr/esrf/TangoApi/ApiUtil.java
ApiUtil.toStringArray
public static String[] toStringArray(String deviceNme, DbPipe dbPipe) { ArrayList<String> list = new ArrayList<String>(); list.add(deviceNme); list.add(Integer.toString(1)); // one pipe list.add(dbPipe.getName()); list.add(Integer.toString(dbPipe.size())); // property numbe...
java
public static String[] toStringArray(String deviceNme, DbPipe dbPipe) { ArrayList<String> list = new ArrayList<String>(); list.add(deviceNme); list.add(Integer.toString(1)); // one pipe list.add(dbPipe.getName()); list.add(Integer.toString(dbPipe.size())); // property numbe...
[ "public", "static", "String", "[", "]", "toStringArray", "(", "String", "deviceNme", ",", "DbPipe", "dbPipe", ")", "{", "ArrayList", "<", "String", ">", "list", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "list", ".", "add", "(", "devic...
==========================================================================
[ "==========================================================================" ]
1ccc9dcb83e6de2359a9f1906d170571cacf1345
https://github.com/tango-controls/JTango/blob/1ccc9dcb83e6de2359a9f1906d170571cacf1345/common/src/main/java/fr/esrf/TangoApi/ApiUtil.java#L472-L493
train
This method returns String array from deviceNme and dbPipe
Create a Java method that does the following: "This method returns String array from deviceNme and dbPipe".
Of course, here is the Java code you requested: ```java public static String[] toStringArray(String deviceNme, DbPipe dbPipe) { ArrayList<String> list = new ArrayList<String>(); list.add(deviceNme); list.add(Integer.toString(1)); // one pipe list.add(dbPipe.getName()); list....
aws/aws-sdk-java
aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/model/DescribeTapeArchivesResult.java
DescribeTapeArchivesResult.withTapeArchives
public DescribeTapeArchivesResult withTapeArchives(TapeArchive... tapeArchives) { if (this.tapeArchives == null) { setTapeArchives(new com.amazonaws.internal.SdkInternalList<TapeArchive>(tapeArchives.length)); } for (TapeArchive ele : tapeArchives) { this.tapeArchives.add...
java
public DescribeTapeArchivesResult withTapeArchives(TapeArchive... tapeArchives) { if (this.tapeArchives == null) { setTapeArchives(new com.amazonaws.internal.SdkInternalList<TapeArchive>(tapeArchives.length)); } for (TapeArchive ele : tapeArchives) { this.tapeArchives.add...
[ "public", "DescribeTapeArchivesResult", "withTapeArchives", "(", "TapeArchive", "...", "tapeArchives", ")", "{", "if", "(", "this", ".", "tapeArchives", "==", "null", ")", "{", "setTapeArchives", "(", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInt...
<p> An array of virtual tape objects in the virtual tape shelf (VTS). The description includes of the Amazon Resource Name (ARN) of the virtual tapes. The information returned includes the Amazon Resource Names (ARNs) of the tapes, size of the tapes, status of the tapes, progress of the description and tape barcode. </...
[ "<p", ">", "An", "array", "of", "virtual", "tape", "objects", "in", "the", "virtual", "tape", "shelf", "(", "VTS", ")", ".", "The", "description", "includes", "of", "the", "Amazon", "Resource", "Name", "(", "ARN", ")", "of", "the", "virtual", "tapes", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-storagegateway/src/main/java/com/amazonaws/services/storagegateway/model/DescribeTapeArchivesResult.java#L107-L115
train
Adds the value of the tapeArchives property.
Create a Java method that does the following: "Adds the value of the tapeArchives property.".
Of course, here is the Java code you requested: ```java public DescribeTapeArchivesResult withTapeArchives(TapeArchive... tapeArchives) { if (this.tapeArchives == null) { setTapeArchives(new com.amazonaws.internal.SdkInternalList<TapeArchive>(tapeArchives.length)); } for (TapeArchiv...
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getWvWMatchInfo
public List<? extends WvWMatch> getWvWMatchInfo(String[] ids, WvWMatch.Endpoint type) throws GuildWars2Exception { isParamValid(new ParamChecker(ids)); if (type == null) return getWvWMatchInfoUsingID(ids); try { switch (type) { case All: return getWvWMatchInfoUsingID(ids); case Overview: Resp...
java
public List<? extends WvWMatch> getWvWMatchInfo(String[] ids, WvWMatch.Endpoint type) throws GuildWars2Exception { isParamValid(new ParamChecker(ids)); if (type == null) return getWvWMatchInfoUsingID(ids); try { switch (type) { case All: return getWvWMatchInfoUsingID(ids); case Overview: Resp...
[ "public", "List", "<", "?", "extends", "WvWMatch", ">", "getWvWMatchInfo", "(", "String", "[", "]", "ids", ",", "WvWMatch", ".", "Endpoint", "type", ")", "throws", "GuildWars2Exception", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids", ")", ")", ...
For more info on WvW matches API go <a href="https://wiki.guildwars2.com/wiki/API:2/wvw/matches">here</a><br/> Get wvw match info using wvw match id(s) @param ids list of wvw match id(s) @param type endpoint type @return list of wvw match info, exact class depend on endpoint type @throws GuildWars2Exception see {@lin...
[ "For", "more", "info", "on", "WvW", "matches", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "wvw", "/", "matches", ">", "here<", "/", "a", ">", "<br", "/", ">...
c8a43b51f363b032074fb152ee6efe657e33e525
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L3572-L3597
train
Get a list of WvWMatch objects from the Guild Wars API using the specified ids and endpoint
Create a Java method that does the following: "Get a list of WvWMatch objects from the Guild Wars API using the specified ids and endpoint".
Of course, here is the Java code you requested: ```java public List<? extends WvWMatch> getWvWMatchInfo(String[] ids, WvWMatch.Endpoint type) throws GuildWars2Exception { isParamValid(new ParamChecker(ids)); if (type == null) return getWvWMatchInfoUsingID(ids); try { switch (type) { case All: return ...
jboss/jboss-jsf-api_spec
src/main/java/javax/faces/view/ViewMetadata.java
ViewMetadata.getViewActions
public static Collection<UIViewAction> getViewActions(UIViewRoot root) { Collection<UIViewAction> actions; UIComponent metadataFacet = root.getFacet(UIViewRoot.METADATA_FACET_NAME); if (metadataFacet == null) { actions = Collections.emptyList(); } else { actions ...
java
public static Collection<UIViewAction> getViewActions(UIViewRoot root) { Collection<UIViewAction> actions; UIComponent metadataFacet = root.getFacet(UIViewRoot.METADATA_FACET_NAME); if (metadataFacet == null) { actions = Collections.emptyList(); } else { actions ...
[ "public", "static", "Collection", "<", "UIViewAction", ">", "getViewActions", "(", "UIViewRoot", "root", ")", "{", "Collection", "<", "UIViewAction", ">", "actions", ";", "UIComponent", "metadataFacet", "=", "root", ".", "getFacet", "(", "UIViewRoot", ".", "META...
<p class="changed_added_2_2"> Utility method to extract view metadata from the provided {@link UIViewRoot}. </p> @param root the {@link UIViewRoot} from which the metadata will be extracted. @return a <code>Collection</code> of {@link UIViewAction} instances. If the view has no metadata, the collection will be empt...
[ "<p", "class", "=", "changed_added_2_2", ">", "Utility", "method", "to", "extract", "view", "metadata", "from", "the", "provided", "{", "@link", "UIViewRoot", "}", ".", "<", "/", "p", ">" ]
cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3
https://github.com/jboss/jboss-jsf-api_spec/blob/cb33d215acbab847f2db5cdf2c6fe4d99c0a01c3/src/main/java/javax/faces/view/ViewMetadata.java#L137-L156
train
Gets the view actions.
Create a Java method that does the following: "Gets the view actions.".
Of course, here is the Java code you requested: ```java public static Collection<UIViewAction> getViewActions(UIViewRoot root) { Collection<UIViewAction> actions; UIComponent metadataFacet = root.getFacet(UIViewRoot.METADATA_FACET_NAME); if (metadataFacet == null) { actions = Colle...
RestComm/jain-slee
container/congestion/src/main/java/org/mobicents/slee/container/congestion/CongestionControlNotification.java
CongestionControlNotification.compareTo
public int compareTo(Object obj) { if (obj == this) return 0; if (obj == null) throw new NullPointerException(); if (obj.getClass() == this.getClass()) { return ((CongestionControlNotification) obj).localAddress.compareTo(this.localAddress); } else { return -...
java
public int compareTo(Object obj) { if (obj == this) return 0; if (obj == null) throw new NullPointerException(); if (obj.getClass() == this.getClass()) { return ((CongestionControlNotification) obj).localAddress.compareTo(this.localAddress); } else { return -...
[ "public", "int", "compareTo", "(", "Object", "obj", ")", "{", "if", "(", "obj", "==", "this", ")", "return", "0", ";", "if", "(", "obj", "==", "null", ")", "throw", "new", "NullPointerException", "(", ")", ";", "if", "(", "obj", ".", "getClass", "(...
/* (non-Javadoc) @see javax.slee.management.NotificationSource#compareTo(java.lang.Object)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
0eaa16ff2d4b6faf43f0d99260e88878fd54dee0
https://github.com/RestComm/jain-slee/blob/0eaa16ff2d4b6faf43f0d99260e88878fd54dee0/container/congestion/src/main/java/org/mobicents/slee/container/congestion/CongestionControlNotification.java#L84-L93
test
Compare this object to another object.
Create a Java method that does the following: "Compare this object to another object.".
Of course, here is the Java code you requested: ```java public int compareTo(Object obj) { if (obj == this) return 0; if (obj == null) throw new NullPointerException(); if (obj.getClass() == this.getClass()) { return ((CongestionControlNotification) obj).localAddress.compareTo(this.loc...
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/id/impl/OgmTableGenerator.java
OgmTableGenerator.determineSegmentValue
protected String determineSegmentValue(Properties params) { String segmentValue = params.getProperty( SEGMENT_VALUE_PARAM ); if ( StringHelper.isEmpty( segmentValue ) ) { segmentValue = determineDefaultSegmentValue( params ); } return segmentValue; }
java
protected String determineSegmentValue(Properties params) { String segmentValue = params.getProperty( SEGMENT_VALUE_PARAM ); if ( StringHelper.isEmpty( segmentValue ) ) { segmentValue = determineDefaultSegmentValue( params ); } return segmentValue; }
[ "protected", "String", "determineSegmentValue", "(", "Properties", "params", ")", "{", "String", "segmentValue", "=", "params", ".", "getProperty", "(", "SEGMENT_VALUE_PARAM", ")", ";", "if", "(", "StringHelper", ".", "isEmpty", "(", "segmentValue", ")", ")", "{...
Determine the segment value corresponding to this generator instance. <p> Called during {@link #configure configuration}. @param params The params supplied in the generator config (plus some standard useful extras). @return The name of the value column
[ "Determine", "the", "segment", "value", "corresponding", "to", "this", "generator", "instance", ".", "<p", ">", "Called", "during", "{", "@link", "#configure", "configuration", "}", "." ]
9ea971df7c27277029006a6f748d8272fb1d69d2
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/id/impl/OgmTableGenerator.java#L250-L256
train
Determine the segment value from the parameters.
Create a Java method that does the following: "Determine the segment value from the parameters.".
Of course, here is the Java code you requested: ```java protected String determineSegmentValue(Properties params) { String segmentValue = params.getProperty( SEGMENT_VALUE_PARAM ); if ( StringHelper.isEmpty( segmentValue ) ) { segmentValue = determineDefaultSegmentValue( params ); } return segmentValue; } ...
apereo/cas
support/cas-server-support-rest-core/src/main/java/org/apereo/cas/support/rest/resources/TicketGrantingTicketResource.java
TicketGrantingTicketResource.createResponseEntityForTicket
protected ResponseEntity<String> createResponseEntityForTicket(final HttpServletRequest request, final TicketGrantingTicket tgtId) throws Exception { return this.ticketGrantingTicketResourceEntityResponseFactory.build(tgtId, request); }
java
protected ResponseEntity<String> createResponseEntityForTicket(final HttpServletRequest request, final TicketGrantingTicket tgtId) throws Exception { return this.ticketGrantingTicketResourceEntityResponseFactory.build(tgtId, request); }
[ "protected", "ResponseEntity", "<", "String", ">", "createResponseEntityForTicket", "(", "final", "HttpServletRequest", "request", ",", "final", "TicketGrantingTicket", "tgtId", ")", "throws", "Exception", "{", "return", "this", ".", "ticketGrantingTicketResourceEntityRespo...
Create response entity for ticket response entity. @param request the request @param tgtId the tgt id @return the response entity @throws Exception the exception
[ "Create", "response", "entity", "for", "ticket", "response", "entity", "." ]
b4b306433a8782cef803a39bea5b1f96740e0e9b
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-rest-core/src/main/java/org/apereo/cas/support/rest/resources/TicketGrantingTicketResource.java#L100-L103
train
Create response entity for ticket.
Create a Java method that does the following: "Create response entity for ticket.".
Of course, here is the Java code you requested: ```java protected ResponseEntity<String> createResponseEntityForTicket(final HttpServletRequest request, final TicketGrantingTicket tgtId) throws Exception { return this.ticketGrantingTicketResour...
DiUS/pact-jvm
pact-jvm-consumer-java8/src/main/java/io/pactfoundation/consumer/dsl/LambdaDslObject.java
LambdaDslObject.timestamp
public LambdaDslObject timestamp(String name, String format, Instant example) { object.timestamp(name, format, example); return this; }
java
public LambdaDslObject timestamp(String name, String format, Instant example) { object.timestamp(name, format, example); return this; }
[ "public", "LambdaDslObject", "timestamp", "(", "String", "name", ",", "String", "format", ",", "Instant", "example", ")", "{", "object", ".", "timestamp", "(", "name", ",", "format", ",", "example", ")", ";", "return", "this", ";", "}" ]
Attribute that must match the given timestamp format @param name attribute name @param format timestamp format @param example example date and time to use for generated bodies
[ "Attribute", "that", "must", "match", "the", "given", "timestamp", "format" ]
2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef
https://github.com/DiUS/pact-jvm/blob/2f447e9dd4ac152a6a36b7fcf8962d07de9ef3ef/pact-jvm-consumer-java8/src/main/java/io/pactfoundation/consumer/dsl/LambdaDslObject.java#L303-L306
train
Sets the timestamp of the object.
Create a Java method that does the following: "Sets the timestamp of the object.".
Of course, here is the Java code you requested: ```java public LambdaDslObject timestamp(String name, String format, Instant example) { object.timestamp(name, format, example); return this; } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ExceptionDestinationHandlerImpl.java
ExceptionDestinationHandlerImpl.handleUndeliverableMessage
@Override public UndeliverableReturnCode handleUndeliverableMessage( SIBusMessage msg, String alternateUser, TransactionCommon tra...
java
@Override public UndeliverableReturnCode handleUndeliverableMessage( SIBusMessage msg, String alternateUser, TransactionCommon tra...
[ "@", "Override", "public", "UndeliverableReturnCode", "handleUndeliverableMessage", "(", "SIBusMessage", "msg", ",", "String", "alternateUser", ",", "TransactionCommon", "tran", ",", "int", "exceptionReason", ",", "String", "[", "]", "exceptionStrings", ")", "{", "// ...
Wrapper method for handleUndeliverableMessage. This version will be called from an external component via the com.ibm.ws.sib.processor.ExceptionDestinationHandler interface. E.g. we need to access this routine from the MQLink in the comms component. @param msg - The undeliverable message @param tran - The transaction ...
[ "Wrapper", "method", "for", "handleUndeliverableMessage", ".", "This", "version", "will", "be", "called", "from", "an", "external", "component", "via", "the", "com", ".", "ibm", ".", "ws", ".", "sib", ".", "processor", ".", "ExceptionDestinationHandler", "interf...
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/ExceptionDestinationHandlerImpl.java#L428-L440
train
Override this method to provide an undeliverable return code for a message.
Create a Java method that does the following: "Override this method to provide an undeliverable return code for a message.".
Of course, here is the Java code you requested: ```java @Override public UndeliverableReturnCode handleUndeliverableMessage( SIBusMessage msg, String alternateUser, ...
Evol-Instruct
N/A
N/A
java
[]
[]
train
Write a method to take two strings as the inputs and check if the second string is a substring of the first one or not. The method should handle cases where the second string contains multiple occurrences of characters from the first string. Additionally, the method should return the number of occurrences of the second...
Here is a method that takes two strings as input and checks if the second string is a substring of the first one, while also counting the number of occurrences of the second string within the first string: ```java public static int countOccurrences(String firstString, String secondString) { int count = 0; int ...
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java
SelectBooleanCheckboxRenderer.renderInputTagHelper
protected void renderInputTagHelper(ResponseWriter rw, FacesContext context, SelectBooleanCheckbox selectBooleanCheckbox, String clientId) throws IOException { rw.startElement("input", selectBooleanCheckbox); rw.writeAttribute("name", clientId + "_helper", null); rw.writeAttribute("value", "on", "value"); rw...
java
protected void renderInputTagHelper(ResponseWriter rw, FacesContext context, SelectBooleanCheckbox selectBooleanCheckbox, String clientId) throws IOException { rw.startElement("input", selectBooleanCheckbox); rw.writeAttribute("name", clientId + "_helper", null); rw.writeAttribute("value", "on", "value"); rw...
[ "protected", "void", "renderInputTagHelper", "(", "ResponseWriter", "rw", ",", "FacesContext", "context", ",", "SelectBooleanCheckbox", "selectBooleanCheckbox", ",", "String", "clientId", ")", "throws", "IOException", "{", "rw", ".", "startElement", "(", "\"input\"", ...
Renders the start of the input tag. This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @param selectBooleanCheckbox the component to render @throws IOException may be thrown by the response writer
[ "Renders", "the", "start", "of", "the", "input", "tag", ".", "This", "method", "is", "protected", "in", "order", "to", "allow", "third", "-", "party", "frameworks", "to", "derive", "from", "it", "." ]
d1a70952bc240979b5272fa4fe1c7f100873add0
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java#L231-L240
train
Renders the helper input tag.
Create a Java method that does the following: "Renders the helper input tag.".
Of course, here is the Java code you requested: ```java protected void renderInputTagHelper(ResponseWriter rw, FacesContext context, SelectBooleanCheckbox selectBooleanCheckbox, String clientId) throws IOException { rw.startElement("input", selectBooleanCheckbox); rw.writeAttribute("name", clientId + "_helper",...
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java
DoubleIntIndex.addSorted
public synchronized boolean addSorted(int key, int value) { if (count == capacity) { if (fixedSize) { return false; } else { doubleCapacity(); } } if (count != 0 && value < values[count - 1]) { return false; ...
java
public synchronized boolean addSorted(int key, int value) { if (count == capacity) { if (fixedSize) { return false; } else { doubleCapacity(); } } if (count != 0 && value < values[count - 1]) { return false; ...
[ "public", "synchronized", "boolean", "addSorted", "(", "int", "key", ",", "int", "value", ")", "{", "if", "(", "count", "==", "capacity", ")", "{", "if", "(", "fixedSize", ")", "{", "return", "false", ";", "}", "else", "{", "doubleCapacity", "(", ")", ...
Adds a key, value pair into the table with the guarantee that the key is equal or larger than the largest existing key. This prevents a sort from taking place on next call to find() @param key the key @param value the value @return true or false depending on success
[ "Adds", "a", "key", "value", "pair", "into", "the", "table", "with", "the", "guarantee", "that", "the", "key", "is", "equal", "or", "larger", "than", "the", "largest", "existing", "key", ".", "This", "prevents", "a", "sort", "from", "taking", "place", "o...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/DoubleIntIndex.java#L185-L206
train
Add sorted.
Create a Java method that does the following: "Add sorted.".
Of course, here is the Java code you requested: ```java public synchronized boolean addSorted(int key, int value) { if (count == capacity) { if (fixedSize) { return false; } else { doubleCapacity(); } } if (count != 0 && valu...
apache/incubator-gobblin
gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnitComparator.java
HiveRegistrationUnitComparator.compareAll
@SuppressWarnings("unchecked") public T compareAll() { this.compareInputFormat().compareOutputFormat().compareIsCompressed().compareIsStoredAsSubDirs().compareNumBuckets() .compareBucketCols().compareRawLocation().compareParameters(); return (T) this; }
java
@SuppressWarnings("unchecked") public T compareAll() { this.compareInputFormat().compareOutputFormat().compareIsCompressed().compareIsStoredAsSubDirs().compareNumBuckets() .compareBucketCols().compareRawLocation().compareParameters(); return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "T", "compareAll", "(", ")", "{", "this", ".", "compareInputFormat", "(", ")", ".", "compareOutputFormat", "(", ")", ".", "compareIsCompressed", "(", ")", ".", "compareIsStoredAsSubDirs", "(", ")", ...
Compare all parameters.
[ "Compare", "all", "parameters", "." ]
f029b4c0fea0fe4aa62f36dda2512344ff708bae
https://github.com/apache/incubator-gobblin/blob/f029b4c0fea0fe4aa62f36dda2512344ff708bae/gobblin-hive-registration/src/main/java/org/apache/gobblin/hive/HiveRegistrationUnitComparator.java#L158-L163
train
Compare all the CID SEGMENTs.
Create a Java method that does the following: "Compare all the CID SEGMENTs.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") public T compareAll() { this.compareInputFormat().compareOutputFormat().compareIsCompressed().compareIsStoredAsSubDirs().compareNumBuckets() .compareBucketCols().compareRawLocation().compareParameters(); return (T)...
Azure/azure-sdk-for-java
marketplaceordering/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/marketplaceordering/v2015_06_01/implementation/MarketplaceAgreementsInner.java
MarketplaceAgreementsInner.cancelAsync
public ServiceFuture<AgreementTermsInner> cancelAsync(String publisherId, String offerId, String planId, final ServiceCallback<AgreementTermsInner> serviceCallback) { return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(publisherId, offerId, planId), serviceCallback); }
java
public ServiceFuture<AgreementTermsInner> cancelAsync(String publisherId, String offerId, String planId, final ServiceCallback<AgreementTermsInner> serviceCallback) { return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(publisherId, offerId, planId), serviceCallback); }
[ "public", "ServiceFuture", "<", "AgreementTermsInner", ">", "cancelAsync", "(", "String", "publisherId", ",", "String", "offerId", ",", "String", "planId", ",", "final", "ServiceCallback", "<", "AgreementTermsInner", ">", "serviceCallback", ")", "{", "return", "Serv...
Cancel marketplace terms. @param publisherId Publisher identifier string of image being deployed. @param offerId Offer identifier string of image being deployed. @param planId Plan identifier string of image being deployed. @param serviceCallback the async ServiceCallback to handle successful and failed responses. @th...
[ "Cancel", "marketplace", "terms", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/marketplaceordering/resource-manager/v2015_06_01/src/main/java/com/microsoft/azure/management/marketplaceordering/v2015_06_01/implementation/MarketplaceAgreementsInner.java#L402-L404
train
Cancels an App Service Environment. Cancels an App Service Environment.
Create a Java method that does the following: "Cancels an App Service Environment. Cancels an App Service Environment.".
Of course, here is the Java code you requested: ```java public ServiceFuture<AgreementTermsInner> cancelAsync(String publisherId, String offerId, String planId, final ServiceCallback<AgreementTermsInner> serviceCallback) { return ServiceFuture.fromResponse(cancelWithServiceResponseAsync(publisherId, offerId, p...
Azure/azure-sdk-for-java
storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java
BlobContainersInner.createAsync
public Observable<BlobContainerInner> createAsync(String resourceGroupName, String accountName, String containerName) { return createWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1<ServiceResponse<BlobContainerInner>, BlobContainerInner>() { @Override ...
java
public Observable<BlobContainerInner> createAsync(String resourceGroupName, String accountName, String containerName) { return createWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1<ServiceResponse<BlobContainerInner>, BlobContainerInner>() { @Override ...
[ "public", "Observable", "<", "BlobContainerInner", ">", "createAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "containerName", ")", "{", "return", "createWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", "...
Creates a new container under the specified account as described by request body. The container resource includes metadata and properties for that container. It does not include a list of the blobs contained by the container. @param resourceGroupName The name of the resource group within the user's subscription. The n...
[ "Creates", "a", "new", "container", "under", "the", "specified", "account", "as", "described", "by", "request", "body", ".", "The", "container", "resource", "includes", "metadata", "and", "properties", "for", "that", "container", ".", "It", "does", "not", "inc...
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/storage/resource-manager/v2018_03_01_preview/src/main/java/com/microsoft/azure/management/storage/v2018_03_01_preview/implementation/BlobContainersInner.java#L243-L250
train
Creates a CDN image in an Azure CDN image.
Create a Java method that does the following: "Creates a CDN image in an Azure CDN image.".
Of course, here is the Java code you requested: ```java public Observable<BlobContainerInner> createAsync(String resourceGroupName, String accountName, String containerName) { return createWithServiceResponseAsync(resourceGroupName, accountName, containerName).map(new Func1<ServiceResponse<BlobContainerInner>,...
aws/aws-sdk-java
aws-java-sdk-clouddirectory/src/main/java/com/amazonaws/services/clouddirectory/model/transform/BatchLookupPolicyMarshaller.java
BatchLookupPolicyMarshaller.marshall
public void marshall(BatchLookupPolicy batchLookupPolicy, ProtocolMarshaller protocolMarshaller) { if (batchLookupPolicy == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(batchLookupPolicy.getObjectR...
java
public void marshall(BatchLookupPolicy batchLookupPolicy, ProtocolMarshaller protocolMarshaller) { if (batchLookupPolicy == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(batchLookupPolicy.getObjectR...
[ "public", "void", "marshall", "(", "BatchLookupPolicy", "batchLookupPolicy", ",", "ProtocolMarshaller", "protocolMarshaller", ")", "{", "if", "(", "batchLookupPolicy", "==", "null", ")", "{", "throw", "new", "SdkClientException", "(", "\"Invalid argument passed to marshal...
Marshall the given parameter object.
[ "Marshall", "the", "given", "parameter", "object", "." ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-clouddirectory/src/main/java/com/amazonaws/services/clouddirectory/model/transform/BatchLookupPolicyMarshaller.java#L46-L59
train
marshalls the given BatchLookupPolicy object to the given protocolMarshaller.
Create a Java method that does the following: "marshalls the given BatchLookupPolicy object to the given protocolMarshaller.".
Of course, here is the Java code you requested: ```java public void marshall(BatchLookupPolicy batchLookupPolicy, ProtocolMarshaller protocolMarshaller) { if (batchLookupPolicy == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { ...
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java
Error.xmlAttributeInexistent
public static void xmlAttributeInexistent(String path, String attributeName, Class<?> aClass){ throw new XmlMappingAttributeDoesNotExistException (MSG.INSTANCE.message(xmlMappingAttributeDoesNotExistException2,attributeName,aClass.getSimpleName(),path)); }
java
public static void xmlAttributeInexistent(String path, String attributeName, Class<?> aClass){ throw new XmlMappingAttributeDoesNotExistException (MSG.INSTANCE.message(xmlMappingAttributeDoesNotExistException2,attributeName,aClass.getSimpleName(),path)); }
[ "public", "static", "void", "xmlAttributeInexistent", "(", "String", "path", ",", "String", "attributeName", ",", "Class", "<", "?", ">", "aClass", ")", "{", "throw", "new", "XmlMappingAttributeDoesNotExistException", "(", "MSG", ".", "INSTANCE", ".", "message", ...
Thrown if attribute is present in the xml file. @param path xml path @param attributeName attribute present @param aClass attribute's class
[ "Thrown", "if", "attribute", "is", "present", "in", "the", "xml", "file", "." ]
b48fd3527f35055b8b4a30f53a51136f183acc90
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/config/Error.java#L294-L296
train
Thrown when an attribute with the specified name is not found in the XML file.
Create a Java method that does the following: "Thrown when an attribute with the specified name is not found in the XML file.".
Of course, here is the Java code you requested: ```java public static void xmlAttributeInexistent(String path, String attributeName, Class<?> aClass){ throw new XmlMappingAttributeDoesNotExistException (MSG.INSTANCE.message(xmlMappingAttributeDoesNotExistException2,attributeName,aClass.getSimpleName(),path)); } `...
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java
TimeZoneGenericNames.getDisplayName
public String getDisplayName(TimeZone tz, GenericNameType type, long date) { String name = null; String tzCanonicalID = null; switch (type) { case LOCATION: tzCanonicalID = ZoneMeta.getCanonicalCLDRID(tz); if (tzCanonicalID != null) { name = getGen...
java
public String getDisplayName(TimeZone tz, GenericNameType type, long date) { String name = null; String tzCanonicalID = null; switch (type) { case LOCATION: tzCanonicalID = ZoneMeta.getCanonicalCLDRID(tz); if (tzCanonicalID != null) { name = getGen...
[ "public", "String", "getDisplayName", "(", "TimeZone", "tz", ",", "GenericNameType", "type", ",", "long", "date", ")", "{", "String", "name", "=", "null", ";", "String", "tzCanonicalID", "=", "null", ";", "switch", "(", "type", ")", "{", "case", "LOCATION"...
Returns the display name of the time zone for the given name type at the given date, or null if the display name is not available. @param tz the time zone @param type the generic name type - see {@link GenericNameType} @param date the date @return the display name of the time zone for the given name type at the given ...
[ "Returns", "the", "display", "name", "of", "the", "time", "zone", "for", "the", "given", "name", "type", "at", "the", "given", "date", "or", "null", "if", "the", "display", "name", "is", "not", "available", "." ]
471504a735b48d5d4ace51afa1542cc4790a921a
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/TimeZoneGenericNames.java#L197-L219
train
Get the display name for a generic name type and date.
Create a Java method that does the following: "Get the display name for a generic name type and date.".
Of course, here is the Java code you requested: ```java public String getDisplayName(TimeZone tz, GenericNameType type, long date) { String name = null; String tzCanonicalID = null; switch (type) { case LOCATION: tzCanonicalID = ZoneMeta.getCanonicalCLDRID(tz); i...
baratine/baratine
framework/src/main/java/com/caucho/v5/vfs/StreamSourceInputStream.java
StreamSourceInputStream.getInputStream
@Override public InputStream getInputStream() throws IOException { InputStream is = _is; _is = null; return is; }
java
@Override public InputStream getInputStream() throws IOException { InputStream is = _is; _is = null; return is; }
[ "@", "Override", "public", "InputStream", "getInputStream", "(", ")", "throws", "IOException", "{", "InputStream", "is", "=", "_is", ";", "_is", "=", "null", ";", "return", "is", ";", "}" ]
Returns an input stream, freeing the results
[ "Returns", "an", "input", "stream", "freeing", "the", "results" ]
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/framework/src/main/java/com/caucho/v5/vfs/StreamSourceInputStream.java#L63-L71
train
Get the input stream for the CID .
Create a Java method that does the following: "Get the input stream for the CID .".
Of course, here is the Java code you requested: ```java @Override public InputStream getInputStream() throws IOException { InputStream is = _is; _is = null; return is; } ``` Hope this helps!
osiam/connector4java
src/main/java/org/osiam/resources/scim/User.java
User.getExtension
public Extension getExtension(String urn) { if (urn == null || urn.isEmpty()) { throw new IllegalArgumentException("urn must be neither null nor empty"); } if (!extensions.containsKey(urn)) { throw new NoSuchElementException("extension " + urn + " is not available"); ...
java
public Extension getExtension(String urn) { if (urn == null || urn.isEmpty()) { throw new IllegalArgumentException("urn must be neither null nor empty"); } if (!extensions.containsKey(urn)) { throw new NoSuchElementException("extension " + urn + " is not available"); ...
[ "public", "Extension", "getExtension", "(", "String", "urn", ")", "{", "if", "(", "urn", "==", "null", "||", "urn", ".", "isEmpty", "(", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"urn must be neither null nor empty\"", ")", ";", "}", ...
Provides the {@link Extension} with the given URN @param urn The URN of the extension @return The extension for the given URN @throws IllegalArgumentException If urn is null or empty @throws NoSuchElementException If extension with given urn is not available
[ "Provides", "the", "{", "@link", "Extension", "}", "with", "the", "given", "URN" ]
a5e6ae1e706f4889d662a069fe2f3bf8e3848d12
https://github.com/osiam/connector4java/blob/a5e6ae1e706f4889d662a069fe2f3bf8e3848d12/src/main/java/org/osiam/resources/scim/User.java#L468-L478
train
Get an extension by its urn.
Create a Java method that does the following: "Get an extension by its urn.".
Of course, here is the Java code you requested: ```java public Extension getExtension(String urn) { if (urn == null || urn.isEmpty()) { throw new IllegalArgumentException("urn must be neither null nor empty"); } if (!extensions.containsKey(urn)) { throw new NoSuchElemen...
fuinorg/units4j
src/main/java/org/fuin/units4j/AssertUsage.java
AssertUsage.assertMethodsNotUsed
public static final void assertMethodsNotUsed(final File classesDir, final FileFilter filter, final List<MCAMethod> methodsToFind) { Utils4J.checkNotNull("classesDir", classesDir); Utils4J.checkValidDir(classesDir); Utils4J.checkNotNull("methodsToFind", methodsToFind); final Meth...
java
public static final void assertMethodsNotUsed(final File classesDir, final FileFilter filter, final List<MCAMethod> methodsToFind) { Utils4J.checkNotNull("classesDir", classesDir); Utils4J.checkValidDir(classesDir); Utils4J.checkNotNull("methodsToFind", methodsToFind); final Meth...
[ "public", "static", "final", "void", "assertMethodsNotUsed", "(", "final", "File", "classesDir", ",", "final", "FileFilter", "filter", ",", "final", "List", "<", "MCAMethod", ">", "methodsToFind", ")", "{", "Utils4J", ".", "checkNotNull", "(", "\"classesDir\"", ...
Asserts that a set of methods is not used. @param classesDir Directory with the ".class" files to check - Cannot be <code>null</code> and must be a valid directory. @param filter File filter or NULL (process all '*.class' files). @param methodsToFind List of methods to find - Cannot be NULL.
[ "Asserts", "that", "a", "set", "of", "methods", "is", "not", "used", "." ]
29383e30b0f9c246b309e734df9cc63dc5d5499e
https://github.com/fuinorg/units4j/blob/29383e30b0f9c246b309e734df9cc63dc5d5499e/src/main/java/org/fuin/units4j/AssertUsage.java#L70-L89
train
Asserts that the methods in the classes directory are not used.
Create a Java method that does the following: "Asserts that the methods in the classes directory are not used.".
Of course, here is the Java code you requested: ```java public static final void assertMethodsNotUsed(final File classesDir, final FileFilter filter, final List<MCAMethod> methodsToFind) { Utils4J.checkNotNull("classesDir", classesDir); Utils4J.checkValidDir(classesDir); Utils4J.checkNotNu...