id
int32
0
165k
repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
147,600
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java
PropertySheetTable.getCellRenderer
private TableCellRenderer getCellRenderer(Class<?> type) { // try to create one from the factory TableCellRenderer renderer = getRendererFactory().createTableCellRenderer(type); // if that fails, recursively try again with the superclass if (renderer == null && type != null) { ...
java
private TableCellRenderer getCellRenderer(Class<?> type) { // try to create one from the factory TableCellRenderer renderer = getRendererFactory().createTableCellRenderer(type); // if that fails, recursively try again with the superclass if (renderer == null && type != null) { ...
[ "private", "TableCellRenderer", "getCellRenderer", "(", "Class", "<", "?", ">", "type", ")", "{", "// try to create one from the factory\r", "TableCellRenderer", "renderer", "=", "getRendererFactory", "(", ")", ".", "createTableCellRenderer", "(", "type", ")", ";", "/...
Helper method to lookup a cell renderer based on type. @param type the type for which a renderer should be found @return a renderer for the given object type
[ "Helper", "method", "to", "lookup", "a", "cell", "renderer", "based", "on", "type", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java#L395-L410
147,601
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java
PropertySheetTable.setModel
@Override public void setModel(TableModel newModel) { if (!(newModel instanceof PropertySheetTableModel)) { throw new IllegalArgumentException("dataModel must be of type " + PropertySheetTableModel.class.getName()); } if (cancelEditing == null) { ...
java
@Override public void setModel(TableModel newModel) { if (!(newModel instanceof PropertySheetTableModel)) { throw new IllegalArgumentException("dataModel must be of type " + PropertySheetTableModel.class.getName()); } if (cancelEditing == null) { ...
[ "@", "Override", "public", "void", "setModel", "(", "TableModel", "newModel", ")", "{", "if", "(", "!", "(", "newModel", "instanceof", "PropertySheetTableModel", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"dataModel must be of type \"", "+", ...
Overriden to register a listener on the model. This listener ensures editing is canceled when editing row is being changed. @param newModel @see javax.swing.JTable#setModel(javax.swing.table.TableModel) @throws IllegalArgumentException if dataModel is not a {@link PropertySheetTableModel}
[ "Overriden", "to", "register", "a", "listener", "on", "the", "model", ".", "This", "listener", "ensures", "editing", "is", "canceled", "when", "editing", "row", "is", "being", "changed", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java#L449-L469
147,602
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java
PropertySheetTable.getIndent
static int getIndent(PropertySheetTable table, Item item) { int indent; if (item.isProperty()) { // it is a property, it has no parent or a category, and no child if ((item.getParent() == null || !item.getParent().isProperty()) && !item.hasToggle()) { ...
java
static int getIndent(PropertySheetTable table, Item item) { int indent; if (item.isProperty()) { // it is a property, it has no parent or a category, and no child if ((item.getParent() == null || !item.getParent().isProperty()) && !item.hasToggle()) { ...
[ "static", "int", "getIndent", "(", "PropertySheetTable", "table", ",", "Item", "item", ")", "{", "int", "indent", ";", "if", "(", "item", ".", "isProperty", "(", ")", ")", "{", "// it is a property, it has no parent or a category, and no child\r", "if", "(", "(", ...
Calculates the required left indent for a given item, given its type and its hierarchy level.
[ "Calculates", "the", "required", "left", "indent", "for", "a", "given", "item", "given", "its", "type", "and", "its", "hierarchy", "level", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/propertysheet/PropertySheetTable.java#L632-L659
147,603
awltech/org.parallelj
parallelj-ssh-parent/parallelj-ssh-publickey-common/src/main/java/org/parallelj/ssh/publickey/ParalleljSshPublicKey.java
ParalleljSshPublicKey.process
@Override public void process(SshServer sshd) throws ExtensionException { // load the URLKeyPairProvider implementation ParallelJURLKeyPairProvider urlKeyPairProvider = null; ServiceLoader<ParallelJURLKeyPairProvider> loader = CacheableServiceLoader.INSTANCE.load(ParallelJURLKeyPairProvider.class, ParallelJURLK...
java
@Override public void process(SshServer sshd) throws ExtensionException { // load the URLKeyPairProvider implementation ParallelJURLKeyPairProvider urlKeyPairProvider = null; ServiceLoader<ParallelJURLKeyPairProvider> loader = CacheableServiceLoader.INSTANCE.load(ParallelJURLKeyPairProvider.class, ParallelJURLK...
[ "@", "Override", "public", "void", "process", "(", "SshServer", "sshd", ")", "throws", "ExtensionException", "{", "// load the URLKeyPairProvider implementation", "ParallelJURLKeyPairProvider", "urlKeyPairProvider", "=", "null", ";", "ServiceLoader", "<", "ParallelJURLKeyPair...
Any others configurations for the sshd server can be done directly with the SshServer object from Apache mina SSHD Warnings: - The shell factory mustn't be changed if you want to be able to launch your Programs remotly...! - Changing the port of the Apache mina SSHD instance will not have any effect: sshd.setPort(port...
[ "Any", "others", "configurations", "for", "the", "sshd", "server", "can", "be", "done", "directly", "with", "the", "SshServer", "object", "from", "Apache", "mina", "SSHD" ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-ssh-parent/parallelj-ssh-publickey-common/src/main/java/org/parallelj/ssh/publickey/ParalleljSshPublicKey.java#L142-L164
147,604
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Filesystem.java
Filesystem.after
public String after(String schemeSpecific, String separator) { int idx; idx = schemeSpecific.indexOf(separator); if (idx == -1) { return null; } return schemeSpecific.substring(idx + separator.length()); }
java
public String after(String schemeSpecific, String separator) { int idx; idx = schemeSpecific.indexOf(separator); if (idx == -1) { return null; } return schemeSpecific.substring(idx + separator.length()); }
[ "public", "String", "after", "(", "String", "schemeSpecific", ",", "String", "separator", ")", "{", "int", "idx", ";", "idx", "=", "schemeSpecific", ".", "indexOf", "(", "separator", ")", ";", "if", "(", "idx", "==", "-", "1", ")", "{", "return", "null...
Helper Method for opaquePath implementations
[ "Helper", "Method", "for", "opaquePath", "implementations" ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Filesystem.java#L69-L77
147,605
kmi/iserve
iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestlet.java
EldaRouterRestlet.getRouterFor
public static synchronized Router getRouterFor(ServletContext con) { // log.info( "getting router for context path '" + givenContextPath + "'" ); String contextPath = EldaRouterRestletSupport.flatContextPath(con.getContextPath()); TimestampedRouter r = routers.get(contextPath); long time...
java
public static synchronized Router getRouterFor(ServletContext con) { // log.info( "getting router for context path '" + givenContextPath + "'" ); String contextPath = EldaRouterRestletSupport.flatContextPath(con.getContextPath()); TimestampedRouter r = routers.get(contextPath); long time...
[ "public", "static", "synchronized", "Router", "getRouterFor", "(", "ServletContext", "con", ")", "{", "// log.info( \"getting router for context path '\" + givenContextPath + \"'\" );", "String", "contextPath", "=", "EldaRouterRestletSupport", ".", "flatContextPath", "(", "con", ...
Answer a router initialised with the URI templates appropriate to this context path. Such a router may already be in the routers table, in which case it is used, otherwise a new router is created, initialised, put in the table, and returned.
[ "Answer", "a", "router", "initialised", "with", "the", "URI", "templates", "appropriate", "to", "this", "context", "path", ".", "Such", "a", "router", "may", "already", "be", "in", "the", "routers", "table", "in", "which", "case", "it", "is", "used", "othe...
13e7016e64c1d5a539b838c6debf1a5cc4aefcb7
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestlet.java#L95-L126
147,606
kmi/iserve
iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestlet.java
EldaRouterRestlet.notFormat
private boolean notFormat(Match m, String type) { return m.getEndpoint().getRendererNamed(type) == null; }
java
private boolean notFormat(Match m, String type) { return m.getEndpoint().getRendererNamed(type) == null; }
[ "private", "boolean", "notFormat", "(", "Match", "m", ",", "String", "type", ")", "{", "return", "m", ".", "getEndpoint", "(", ")", ".", "getRendererNamed", "(", "type", ")", "==", "null", ";", "}" ]
Answer true of m's endpoint has no formatter called type.
[ "Answer", "true", "of", "m", "s", "endpoint", "has", "no", "formatter", "called", "type", "." ]
13e7016e64c1d5a539b838c6debf1a5cc4aefcb7
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-elda/src/main/java/uk/ac/open/kmi/iserve/elda/EldaRouterRestlet.java#L369-L371
147,607
oaqa/cse-framework
src/main/java/edu/cmu/lti/oaqa/framework/eval/TraceConsumer.java
TraceConsumer.process
@Override public void process(CAS aCAS) throws AnalysisEngineProcessException { try { JCas jcas = aCAS.getJCas(); ExperimentUUID experiment = ProcessingStepUtils.getCurrentExperiment(jcas); AnnotationIndex<Annotation> steps = jcas.getAnnotationIndex(ProcessingStep.type); String uuid ...
java
@Override public void process(CAS aCAS) throws AnalysisEngineProcessException { try { JCas jcas = aCAS.getJCas(); ExperimentUUID experiment = ProcessingStepUtils.getCurrentExperiment(jcas); AnnotationIndex<Annotation> steps = jcas.getAnnotationIndex(ProcessingStep.type); String uuid ...
[ "@", "Override", "public", "void", "process", "(", "CAS", "aCAS", ")", "throws", "AnalysisEngineProcessException", "{", "try", "{", "JCas", "jcas", "=", "aCAS", ".", "getJCas", "(", ")", ";", "ExperimentUUID", "experiment", "=", "ProcessingStepUtils", ".", "ge...
Reads the results from the retrieval phase from the DOCUMENT and the DOCUEMNT_GS views of the JCAs, and generates and evaluates them using the evaluate method from the FMeasureConsumer class.
[ "Reads", "the", "results", "from", "the", "retrieval", "phase", "from", "the", "DOCUMENT", "and", "the", "DOCUEMNT_GS", "views", "of", "the", "JCAs", "and", "generates", "and", "evaluates", "them", "using", "the", "evaluate", "method", "from", "the", "FMeasure...
3a46b5828b3a33be4547345a0ac15e829c43c5ef
https://github.com/oaqa/cse-framework/blob/3a46b5828b3a33be4547345a0ac15e829c43c5ef/src/main/java/edu/cmu/lti/oaqa/framework/eval/TraceConsumer.java#L65-L81
147,608
colin-lee/mybatis-spring-support
src/main/java/com/github/mybatis/interceptor/PaginationAutoMapInterceptor.java
PaginationAutoMapInterceptor.resolveResultJavaType
private Class<?> resolveResultJavaType(Class<?> resultType, String property, Class<?> javaType) { if (javaType == null && property != null) { try { MetaClass metaResultType = MetaClass.forClass(resultType, REFLECTOR_FACTORY); javaType = metaResultType.getSetterType(property); } catch (Ex...
java
private Class<?> resolveResultJavaType(Class<?> resultType, String property, Class<?> javaType) { if (javaType == null && property != null) { try { MetaClass metaResultType = MetaClass.forClass(resultType, REFLECTOR_FACTORY); javaType = metaResultType.getSetterType(property); } catch (Ex...
[ "private", "Class", "<", "?", ">", "resolveResultJavaType", "(", "Class", "<", "?", ">", "resultType", ",", "String", "property", ",", "Class", "<", "?", ">", "javaType", ")", "{", "if", "(", "javaType", "==", "null", "&&", "property", "!=", "null", ")...
copy from mybatis sourceCode @param resultType @param property @param javaType @return
[ "copy", "from", "mybatis", "sourceCode" ]
de412e98d00e9a012c0619778fa1a61832863b82
https://github.com/colin-lee/mybatis-spring-support/blob/de412e98d00e9a012c0619778fa1a61832863b82/src/main/java/com/github/mybatis/interceptor/PaginationAutoMapInterceptor.java#L337-L351
147,609
awltech/org.parallelj
parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/reflect/callback/PipelineIterator.java
PipelineIterator.getNext
public Object getNext(KCall call) { if (map.get(call.getProcedure().getId()) == null) { Object context = call.getProcess().getContext(); // getting data by reflection Method readMethod = null; try { readMethod = new PropertyDescriptor(pipelineDataName, context.getClass()).getReadMethod(); ...
java
public Object getNext(KCall call) { if (map.get(call.getProcedure().getId()) == null) { Object context = call.getProcess().getContext(); // getting data by reflection Method readMethod = null; try { readMethod = new PropertyDescriptor(pipelineDataName, context.getClass()).getReadMethod(); ...
[ "public", "Object", "getNext", "(", "KCall", "call", ")", "{", "if", "(", "map", ".", "get", "(", "call", ".", "getProcedure", "(", ")", ".", "getId", "(", ")", ")", "==", "null", ")", "{", "Object", "context", "=", "call", ".", "getProcess", "(", ...
Based on KProcedure index for data, it will return next value from list @param call @return
[ "Based", "on", "KProcedure", "index", "for", "data", "it", "will", "return", "next", "value", "from", "list" ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-core-parent/parallelj-core-api/src/main/java/org/parallelj/internal/reflect/callback/PipelineIterator.java#L70-L103
147,610
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java
JCollapsiblePaneBeanInfo.getAdditionalBeanInfo
@Override public BeanInfo[] getAdditionalBeanInfo() { ArrayList<BeanInfo> bi = new ArrayList<BeanInfo>(); BeanInfo[] biarr = null; try { for (Class<?> cl = com.l2fprod.common.swing.JCollapsiblePane.class .getSuperclass(); !cl.equals(java.awt.Component.class.ge...
java
@Override public BeanInfo[] getAdditionalBeanInfo() { ArrayList<BeanInfo> bi = new ArrayList<BeanInfo>(); BeanInfo[] biarr = null; try { for (Class<?> cl = com.l2fprod.common.swing.JCollapsiblePane.class .getSuperclass(); !cl.equals(java.awt.Component.class.ge...
[ "@", "Override", "public", "BeanInfo", "[", "]", "getAdditionalBeanInfo", "(", ")", "{", "ArrayList", "<", "BeanInfo", ">", "bi", "=", "new", "ArrayList", "<", "BeanInfo", ">", "(", ")", ";", "BeanInfo", "[", "]", "biarr", "=", "null", ";", "try", "{",...
Gets the additionalBeanInfo. @return The additionalBeanInfo value
[ "Gets", "the", "additionalBeanInfo", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java#L90-L105
147,611
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java
JCollapsiblePaneBeanInfo.getDefaultPropertyIndex
@Override public int getDefaultPropertyIndex() { String defName = ""; if ("".equals(defName)) { return -1; } PropertyDescriptor[] pd = getPropertyDescriptors(); for (int i = 0; i < pd.length; i++) { if (pd[i].getName().equals(defName)) { ...
java
@Override public int getDefaultPropertyIndex() { String defName = ""; if ("".equals(defName)) { return -1; } PropertyDescriptor[] pd = getPropertyDescriptors(); for (int i = 0; i < pd.length; i++) { if (pd[i].getName().equals(defName)) { ...
[ "@", "Override", "public", "int", "getDefaultPropertyIndex", "(", ")", "{", "String", "defName", "=", "\"\"", ";", "if", "(", "\"\"", ".", "equals", "(", "defName", ")", ")", "{", "return", "-", "1", ";", "}", "PropertyDescriptor", "[", "]", "pd", "=",...
Gets the defaultPropertyIndex. @return The defaultPropertyIndex value
[ "Gets", "the", "defaultPropertyIndex", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java#L122-L135
147,612
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java
JCollapsiblePaneBeanInfo.getIcon
@Override public Image getIcon(int type) { if (type == BeanInfo.ICON_COLOR_16x16) { return iconColor16; } if (type == BeanInfo.ICON_MONO_16x16) { return iconMono16; } if (type == BeanInfo.ICON_COLOR_32x32) { return iconColor32; } ...
java
@Override public Image getIcon(int type) { if (type == BeanInfo.ICON_COLOR_16x16) { return iconColor16; } if (type == BeanInfo.ICON_MONO_16x16) { return iconMono16; } if (type == BeanInfo.ICON_COLOR_32x32) { return iconColor32; } ...
[ "@", "Override", "public", "Image", "getIcon", "(", "int", "type", ")", "{", "if", "(", "type", "==", "BeanInfo", ".", "ICON_COLOR_16x16", ")", "{", "return", "iconColor16", ";", "}", "if", "(", "type", "==", "BeanInfo", ".", "ICON_MONO_16x16", ")", "{",...
Gets the icon. @param type Description of the Parameter @return The icon value
[ "Gets", "the", "icon", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java#L143-L158
147,613
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java
JCollapsiblePaneBeanInfo.getPropertyDescriptors
@Override public PropertyDescriptor[] getPropertyDescriptors() { try { ArrayList<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); PropertyDescriptor descriptor; try { descriptor = new PropertyDescriptor("animated", ...
java
@Override public PropertyDescriptor[] getPropertyDescriptors() { try { ArrayList<PropertyDescriptor> descriptors = new ArrayList<PropertyDescriptor>(); PropertyDescriptor descriptor; try { descriptor = new PropertyDescriptor("animated", ...
[ "@", "Override", "public", "PropertyDescriptor", "[", "]", "getPropertyDescriptors", "(", ")", "{", "try", "{", "ArrayList", "<", "PropertyDescriptor", ">", "descriptors", "=", "new", "ArrayList", "<", "PropertyDescriptor", ">", "(", ")", ";", "PropertyDescriptor"...
Gets the Property Descriptors. @return The propertyDescriptors value
[ "Gets", "the", "Property", "Descriptors", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/JCollapsiblePaneBeanInfo.java#L165-L208
147,614
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java
WNExtendedSemanticGlossComparison.match
public char match(ISense source, ISense target) throws MatcherLibraryException { char result = IMappingElement.IDK; try { String sSynset = source.getGloss(); // get gloss of Immediate ancestor of target node String tLGExtendedGloss = getExtendedGloss(target, 1,...
java
public char match(ISense source, ISense target) throws MatcherLibraryException { char result = IMappingElement.IDK; try { String sSynset = source.getGloss(); // get gloss of Immediate ancestor of target node String tLGExtendedGloss = getExtendedGloss(target, 1,...
[ "public", "char", "match", "(", "ISense", "source", ",", "ISense", "target", ")", "throws", "MatcherLibraryException", "{", "char", "result", "=", "IMappingElement", ".", "IDK", ";", "try", "{", "String", "sSynset", "=", "source", ".", "getGloss", "(", ")", ...
Computes the relation for extended semantic gloss matcher. @param source the gloss of source @param target the gloss of target @return more general, less general or IDK relation
[ "Computes", "the", "relation", "for", "extended", "semantic", "gloss", "matcher", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java#L50-L81
147,615
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java
WNExtendedSemanticGlossComparison.getDominantRelation
private char getDominantRelation(String sExtendedGloss, String tExtendedGloss) throws MatcherLibraryException { int Equals = 0; int moreGeneral = 0; int lessGeneral = 0; int Opposite = 0; StringTokenizer stSource = new StringTokenizer(sExtendedGloss, " ,.\"'()"); St...
java
private char getDominantRelation(String sExtendedGloss, String tExtendedGloss) throws MatcherLibraryException { int Equals = 0; int moreGeneral = 0; int lessGeneral = 0; int Opposite = 0; StringTokenizer stSource = new StringTokenizer(sExtendedGloss, " ,.\"'()"); St...
[ "private", "char", "getDominantRelation", "(", "String", "sExtendedGloss", ",", "String", "tExtendedGloss", ")", "throws", "MatcherLibraryException", "{", "int", "Equals", "=", "0", ";", "int", "moreGeneral", "=", "0", ";", "int", "lessGeneral", "=", "0", ";", ...
Gets Semantic relation occurring more frequently between words in two extended glosses. @param sExtendedGloss extended gloss of source @param tExtendedGloss extended gloss of target @return more general, less general or IDK relation @throws MatcherLibraryException MatcherLibraryException
[ "Gets", "Semantic", "relation", "occurring", "more", "frequently", "between", "words", "in", "two", "extended", "glosses", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java#L91-L119
147,616
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java
WNExtendedSemanticGlossComparison.getRelationFromInts
private char getRelationFromInts(int lg, int mg, int syn, int opp) { if ((lg >= mg) && (lg >= syn) && (lg >= opp) && (lg > 0)) { return IMappingElement.LESS_GENERAL; } if ((mg >= lg) && (mg >= syn) && (mg >= opp) && (mg > 0)) { return IMappingElement.MORE_GENERAL; ...
java
private char getRelationFromInts(int lg, int mg, int syn, int opp) { if ((lg >= mg) && (lg >= syn) && (lg >= opp) && (lg > 0)) { return IMappingElement.LESS_GENERAL; } if ((mg >= lg) && (mg >= syn) && (mg >= opp) && (mg > 0)) { return IMappingElement.MORE_GENERAL; ...
[ "private", "char", "getRelationFromInts", "(", "int", "lg", ",", "int", "mg", ",", "int", "syn", ",", "int", "opp", ")", "{", "if", "(", "(", "lg", ">=", "mg", ")", "&&", "(", "lg", ">=", "syn", ")", "&&", "(", "lg", ">=", "opp", ")", "&&", "...
Decides which relation to return. @param lg number of less general words between two extended gloss @param mg number of more general words between two extended gloss @param syn number of synonym words between two extended gloss @param opp number of opposite words between two extended gloss @return the more frequent ...
[ "Decides", "which", "relation", "to", "return", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java#L130-L144
147,617
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java
WNExtendedSemanticGlossComparison.getRelationFromRels
private char getRelationFromRels(char builtForRel, char glossRel) { if (builtForRel == IMappingElement.EQUIVALENCE) { return glossRel; } if (builtForRel == IMappingElement.LESS_GENERAL) { if ((glossRel == IMappingElement.LESS_GENERAL) || (glossRel == IMappingElement....
java
private char getRelationFromRels(char builtForRel, char glossRel) { if (builtForRel == IMappingElement.EQUIVALENCE) { return glossRel; } if (builtForRel == IMappingElement.LESS_GENERAL) { if ((glossRel == IMappingElement.LESS_GENERAL) || (glossRel == IMappingElement....
[ "private", "char", "getRelationFromRels", "(", "char", "builtForRel", ",", "char", "glossRel", ")", "{", "if", "(", "builtForRel", "==", "IMappingElement", ".", "EQUIVALENCE", ")", "{", "return", "glossRel", ";", "}", "if", "(", "builtForRel", "==", "IMappingE...
Decides which relation to return as a function of relation for which extended gloss was built. @param builtForRel relation for which the gloss was built @param glossRel relation @return less general, more general or IDK relation
[ "Decides", "which", "relation", "to", "return", "as", "a", "function", "of", "relation", "for", "which", "extended", "gloss", "was", "built", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/element/gloss/WNExtendedSemanticGlossComparison.java#L153-L168
147,618
ykrasik/jaci
jaci-core/src/main/java/com/github/ykrasik/jaci/reflection/ReflectionClassProcessor.java
ReflectionClassProcessor.processObject
public Map<ParsedPath, List<CommandDef>> processObject(Object instance) { final ClassContext context = new ClassContext(); doProcess(instance, context); return context.commandPaths; }
java
public Map<ParsedPath, List<CommandDef>> processObject(Object instance) { final ClassContext context = new ClassContext(); doProcess(instance, context); return context.commandPaths; }
[ "public", "Map", "<", "ParsedPath", ",", "List", "<", "CommandDef", ">", ">", "processObject", "(", "Object", "instance", ")", "{", "final", "ClassContext", "context", "=", "new", "ClassContext", "(", ")", ";", "doProcess", "(", "instance", ",", "context", ...
Process the object's class and all declared inner classes and return all parsed commands with their paths. @param instance Object to process. @return The {@link CommandDef}s that were extracted out of the object. @throws RuntimeException If any error occurs.
[ "Process", "the", "object", "s", "class", "and", "all", "declared", "inner", "classes", "and", "return", "all", "parsed", "commands", "with", "their", "paths", "." ]
4615edef7c76288ad5ea8d678132b161645ca1e3
https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-core/src/main/java/com/github/ykrasik/jaci/reflection/ReflectionClassProcessor.java#L68-L72
147,619
netceteragroup/trema-core
src/main/java/com/netcetera/trema/core/importing/AbstractFile.java
AbstractFile.add
protected void add(String key, Status status, String masterValue, String value) { textNodeMap.put(key, new TextNode(key, status, masterValue, value)); }
java
protected void add(String key, Status status, String masterValue, String value) { textNodeMap.put(key, new TextNode(key, status, masterValue, value)); }
[ "protected", "void", "add", "(", "String", "key", ",", "Status", "status", ",", "String", "masterValue", ",", "String", "value", ")", "{", "textNodeMap", ".", "put", "(", "key", ",", "new", "TextNode", "(", "key", ",", "status", ",", "masterValue", ",", ...
Adds a record to this CSV file. @param key the key @param status the status @param masterValue the master value, may be <code>null</code> @param value the value
[ "Adds", "a", "record", "to", "this", "CSV", "file", "." ]
e5367f4b80b38038d462627aa146a62bc34fc489
https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/importing/AbstractFile.java#L67-L69
147,620
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/matchers/structure/tree/spsm/ted/TreeEditDistance.java
TreeEditDistance.preorder
private static List<INode> preorder(INode root) { ArrayList<INode> result = new ArrayList<INode>(); Deque<INode> stack = new ArrayDeque<INode>(); stack.push(root); while (!stack.isEmpty()) { INode c = stack.pop(); result.add(c); for (int i =...
java
private static List<INode> preorder(INode root) { ArrayList<INode> result = new ArrayList<INode>(); Deque<INode> stack = new ArrayDeque<INode>(); stack.push(root); while (!stack.isEmpty()) { INode c = stack.pop(); result.add(c); for (int i =...
[ "private", "static", "List", "<", "INode", ">", "preorder", "(", "INode", "root", ")", "{", "ArrayList", "<", "INode", ">", "result", "=", "new", "ArrayList", "<", "INode", ">", "(", ")", ";", "Deque", "<", "INode", ">", "stack", "=", "new", "ArrayDe...
Preorders the subtree rooted at the given node. @param root root node @return the converted list, empty if no elements in input
[ "Preorders", "the", "subtree", "rooted", "at", "the", "given", "node", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/matchers/structure/tree/spsm/ted/TreeEditDistance.java#L662-L677
147,621
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/swing/JCollapsiblePane.java
JCollapsiblePane.setContentPane
public void setContentPane(Container contentPanel) { if (contentPanel == null) { throw new IllegalArgumentException("Content pane can't be null"); } if (wrapper != null) { super.remove(wrapper); } wrapper = new WrapperContainer(contentPanel); supe...
java
public void setContentPane(Container contentPanel) { if (contentPanel == null) { throw new IllegalArgumentException("Content pane can't be null"); } if (wrapper != null) { super.remove(wrapper); } wrapper = new WrapperContainer(contentPanel); supe...
[ "public", "void", "setContentPane", "(", "Container", "contentPanel", ")", "{", "if", "(", "contentPanel", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Content pane can't be null\"", ")", ";", "}", "if", "(", "wrapper", "!=", "null...
Sets the content pane of this JCollapsiblePane. Components must be added to this content pane, not to the JCollapsiblePane. @param contentPanel @throws IllegalArgumentException if contentPanel is null
[ "Sets", "the", "content", "pane", "of", "this", "JCollapsiblePane", ".", "Components", "must", "be", "added", "to", "this", "content", "pane", "not", "to", "the", "JCollapsiblePane", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/JCollapsiblePane.java#L212-L222
147,622
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/swing/JCollapsiblePane.java
JCollapsiblePane.setAnimationParams
private void setAnimationParams(AnimationParams params) { if (params == null) { throw new IllegalArgumentException( "params can't be null"); } if (animateTimer != null) { animateTimer.stop(); } animationParams = params; animateT...
java
private void setAnimationParams(AnimationParams params) { if (params == null) { throw new IllegalArgumentException( "params can't be null"); } if (animateTimer != null) { animateTimer.stop(); } animationParams = params; animateT...
[ "private", "void", "setAnimationParams", "(", "AnimationParams", "params", ")", "{", "if", "(", "params", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"params can't be null\"", ")", ";", "}", "if", "(", "animateTimer", "!=", "null",...
Sets the parameters controlling the animation. @param params @throws IllegalArgumentException if params is null
[ "Sets", "the", "parameters", "controlling", "the", "animation", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/swing/JCollapsiblePane.java#L417-L428
147,623
wkgcass/Style
src/main/java/net/cassite/style/util/DateFuncSup.java
DateFuncSup.subtract
public DateFuncSup subtract(DateSeperator d) { date.setTime(date.getTime() - d.parse()); return this; }
java
public DateFuncSup subtract(DateSeperator d) { date.setTime(date.getTime() - d.parse()); return this; }
[ "public", "DateFuncSup", "subtract", "(", "DateSeperator", "d", ")", "{", "date", ".", "setTime", "(", "date", ".", "getTime", "(", ")", "-", "d", ".", "parse", "(", ")", ")", ";", "return", "this", ";", "}" ]
subtract date on supported date @param d date to subtract @return <code>this</code>
[ "subtract", "date", "on", "supported", "date" ]
db3ea64337251f46f734279480e365293bececbd
https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/util/DateFuncSup.java#L112-L115
147,624
wkgcass/Style
src/main/java/net/cassite/style/util/DateFuncSup.java
DateFuncSup.nextMonth
public DateFuncSup nextMonth(int next) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.MONTH, next); date.setTime(cal.getTimeInMillis()); return this; }
java
public DateFuncSup nextMonth(int next) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.MONTH, next); date.setTime(cal.getTimeInMillis()); return this; }
[ "public", "DateFuncSup", "nextMonth", "(", "int", "next", ")", "{", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "cal", ".", "setTime", "(", "date", ")", ";", "cal", ".", "add", "(", "Calendar", ".", "MONTH", ",", "next", ")...
set date to next months @param next count of next months to set to @return <code>this</code>
[ "set", "date", "to", "next", "months" ]
db3ea64337251f46f734279480e365293bececbd
https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/util/DateFuncSup.java#L180-L186
147,625
wkgcass/Style
src/main/java/net/cassite/style/util/DateFuncSup.java
DateFuncSup.nextYear
public DateFuncSup nextYear(int next) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.YEAR, next); date.setTime(cal.getTimeInMillis()); return this; }
java
public DateFuncSup nextYear(int next) { Calendar cal = Calendar.getInstance(); cal.setTime(date); cal.add(Calendar.YEAR, next); date.setTime(cal.getTimeInMillis()); return this; }
[ "public", "DateFuncSup", "nextYear", "(", "int", "next", ")", "{", "Calendar", "cal", "=", "Calendar", ".", "getInstance", "(", ")", ";", "cal", ".", "setTime", "(", "date", ")", ";", "cal", ".", "add", "(", "Calendar", ".", "YEAR", ",", "next", ")",...
set date to next years @param next count of next years to set to @return <code>this</code>
[ "set", "date", "to", "next", "years" ]
db3ea64337251f46f734279480e365293bececbd
https://github.com/wkgcass/Style/blob/db3ea64337251f46f734279480e365293bececbd/src/main/java/net/cassite/style/util/DateFuncSup.java#L194-L200
147,626
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/classifiers/CNFContextClassifier.java
CNFContextClassifier.toCNF
public static String toCNF(INode in, String formula) throws ContextClassifierException { PEParser parser = new PEParser(); CNFTransformer transformer = new CNFTransformer(); String result = formula; if ((formula.contains("&") && formula.contains("|")) || formula.contains("~")) { ...
java
public static String toCNF(INode in, String formula) throws ContextClassifierException { PEParser parser = new PEParser(); CNFTransformer transformer = new CNFTransformer(); String result = formula; if ((formula.contains("&") && formula.contains("|")) || formula.contains("~")) { ...
[ "public", "static", "String", "toCNF", "(", "INode", "in", ",", "String", "formula", ")", "throws", "ContextClassifierException", "{", "PEParser", "parser", "=", "new", "PEParser", "(", ")", ";", "CNFTransformer", "transformer", "=", "new", "CNFTransformer", "("...
Converts the formula into CNF. @param in the owner of the formula @param formula the formula to convert @return formula in CNF form @throws ContextClassifierException ContextClassifierException
[ "Converts", "the", "formula", "into", "CNF", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/classifiers/CNFContextClassifier.java#L66-L97
147,627
netceteragroup/trema-core
src/main/java/com/netcetera/trema/core/importing/CSVFile.java
CSVFile.extractLanguage
private String extractLanguage(String columnHeading) throws ParseException { int start = columnHeading.indexOf('('); int end = columnHeading.indexOf(')'); if (start == -1 || end == -1 || start >= end) { throwWrongHeaderException(); } return columnHeading.substring(start + 1, end); }
java
private String extractLanguage(String columnHeading) throws ParseException { int start = columnHeading.indexOf('('); int end = columnHeading.indexOf(')'); if (start == -1 || end == -1 || start >= end) { throwWrongHeaderException(); } return columnHeading.substring(start + 1, end); }
[ "private", "String", "extractLanguage", "(", "String", "columnHeading", ")", "throws", "ParseException", "{", "int", "start", "=", "columnHeading", ".", "indexOf", "(", "'", "'", ")", ";", "int", "end", "=", "columnHeading", ".", "indexOf", "(", "'", "'", ...
Extracts the language of the "master language value" and "value" column heading in the first line of the trema CSV file. @param columnHeading the column heading. The expected format is: <code>master (&lt;lang&gt;)</code> or <code>value (&lt;lang&gt;)</code>. @return the extracted language @throws ParseException if any ...
[ "Extracts", "the", "language", "of", "the", "master", "language", "value", "and", "value", "column", "heading", "in", "the", "first", "line", "of", "the", "trema", "CSV", "file", "." ]
e5367f4b80b38038d462627aa146a62bc34fc489
https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/importing/CSVFile.java#L182-L190
147,628
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/servers/jmx/MinimalJmxServer.java
MinimalJmxServer.registerMBean
public final boolean registerMBean(final Class<?> clazz) { if (this.mbs != null && clazz != null) { try { final String fqnName = clazz.getCanonicalName(); final String domain = fqnName.substring(0, fqnName.lastIndexOf('.')); final String type = fqnName.substring(fqnName.lastIndexOf('.') + 1); fina...
java
public final boolean registerMBean(final Class<?> clazz) { if (this.mbs != null && clazz != null) { try { final String fqnName = clazz.getCanonicalName(); final String domain = fqnName.substring(0, fqnName.lastIndexOf('.')); final String type = fqnName.substring(fqnName.lastIndexOf('.') + 1); fina...
[ "public", "final", "boolean", "registerMBean", "(", "final", "Class", "<", "?", ">", "clazz", ")", "{", "if", "(", "this", ".", "mbs", "!=", "null", "&&", "clazz", "!=", "null", ")", "{", "try", "{", "final", "String", "fqnName", "=", "clazz", ".", ...
Try to register standard MBean type in the JMX server @param beanClass the class name of the MBean
[ "Try", "to", "register", "standard", "MBean", "type", "in", "the", "JMX", "server" ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/servers/jmx/MinimalJmxServer.java#L123-L147
147,629
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/servers/jmx/MinimalJmxServer.java
MinimalJmxServer.unRegisterMBeans
private void unRegisterMBeans() { if (beanNames != null) { for (ObjectName objectName : beanNames) { // unRegister the bean in the JMX server... try { mbs.unregisterMBean(objectName); LaunchingMessageKind.IJMX0006.format(objectName); } catch (MBeanRegistrationException e) { // Do nothing...
java
private void unRegisterMBeans() { if (beanNames != null) { for (ObjectName objectName : beanNames) { // unRegister the bean in the JMX server... try { mbs.unregisterMBean(objectName); LaunchingMessageKind.IJMX0006.format(objectName); } catch (MBeanRegistrationException e) { // Do nothing...
[ "private", "void", "unRegisterMBeans", "(", ")", "{", "if", "(", "beanNames", "!=", "null", ")", "{", "for", "(", "ObjectName", "objectName", ":", "beanNames", ")", "{", "// unRegister the bean in the JMX server...", "try", "{", "mbs", ".", "unregisterMBean", "(...
Unregister all registered MBeans in the JMX server.
[ "Unregister", "all", "registered", "MBeans", "in", "the", "JMX", "server", "." ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/servers/jmx/MinimalJmxServer.java#L202-L217
147,630
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/loaders/context/TabContextLoader.java
TabContextLoader.numOfTabs
private int numOfTabs(String line) { int i = 0; while (i < line.length() && '\t' == line.charAt(i)) { i++; } return i; }
java
private int numOfTabs(String line) { int i = 0; while (i < line.length() && '\t' == line.charAt(i)) { i++; } return i; }
[ "private", "int", "numOfTabs", "(", "String", "line", ")", "{", "int", "i", "=", "0", ";", "while", "(", "i", "<", "line", ".", "length", "(", ")", "&&", "'", "'", "==", "line", ".", "charAt", "(", "i", ")", ")", "{", "i", "++", ";", "}", "...
Counts the number of tabs in the line. @param line the string of the each line of file @return the number of tabs at the beginning of the line
[ "Counts", "the", "number", "of", "tabs", "in", "the", "line", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/loaders/context/TabContextLoader.java#L92-L98
147,631
opendatatrentino/s-match
src/main/java/it/unitn/disi/smatch/loaders/context/TabContextLoader.java
TabContextLoader.setArrayNodeID
private void setArrayNodeID(int index, ArrayList<INode> array, INode node) { if (index < array.size()) { array.set(index, node); } else { array.add(index, node); } }
java
private void setArrayNodeID(int index, ArrayList<INode> array, INode node) { if (index < array.size()) { array.set(index, node); } else { array.add(index, node); } }
[ "private", "void", "setArrayNodeID", "(", "int", "index", ",", "ArrayList", "<", "INode", ">", "array", ",", "INode", "node", ")", "{", "if", "(", "index", "<", "array", ".", "size", "(", ")", ")", "{", "array", ".", "set", "(", "index", ",", "node...
Sets the node at a given position of the array. Changes the current value if there is one, if there is no value, adds a new one. @param index position to be filled @param array array to be modified @param node value to be set
[ "Sets", "the", "node", "at", "a", "given", "position", "of", "the", "array", ".", "Changes", "the", "current", "value", "if", "there", "is", "one", "if", "there", "is", "no", "value", "adds", "a", "new", "one", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/smatch/loaders/context/TabContextLoader.java#L108-L114
147,632
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/SmallSortedMap.java
SmallSortedMap.makeImmutable
public void makeImmutable() { if (!isImmutable) { // Note: There's no need to wrap the entryList in an unmodifiableList // because none of the list's accessors are exposed. The iterator() of // overflowEntries, on the other hand, is exposed so it must be made // unmodifiable. overflowE...
java
public void makeImmutable() { if (!isImmutable) { // Note: There's no need to wrap the entryList in an unmodifiableList // because none of the list's accessors are exposed. The iterator() of // overflowEntries, on the other hand, is exposed so it must be made // unmodifiable. overflowE...
[ "public", "void", "makeImmutable", "(", ")", "{", "if", "(", "!", "isImmutable", ")", "{", "// Note: There's no need to wrap the entryList in an unmodifiableList", "// because none of the list's accessors are exposed. The iterator() of", "// overflowEntries, on the other hand, is exposed...
Make this map immutable from this point forward.
[ "Make", "this", "map", "immutable", "from", "this", "point", "forward", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/SmallSortedMap.java#L160-L171
147,633
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/SmallSortedMap.java
SmallSortedMap.ensureEntryArrayMutable
private void ensureEntryArrayMutable() { checkMutable(); if (entryList.isEmpty() && !(entryList instanceof ArrayList)) { entryList = new ArrayList<Entry>(maxArraySize); } }
java
private void ensureEntryArrayMutable() { checkMutable(); if (entryList.isEmpty() && !(entryList instanceof ArrayList)) { entryList = new ArrayList<Entry>(maxArraySize); } }
[ "private", "void", "ensureEntryArrayMutable", "(", ")", "{", "checkMutable", "(", ")", ";", "if", "(", "entryList", ".", "isEmpty", "(", ")", "&&", "!", "(", "entryList", "instanceof", "ArrayList", ")", ")", "{", "entryList", "=", "new", "ArrayList", "<", ...
Lazily creates the entry list. Any code that adds to the list must first call this method.
[ "Lazily", "creates", "the", "entry", "list", ".", "Any", "code", "that", "adds", "to", "the", "list", "must", "first", "call", "this", "method", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/SmallSortedMap.java#L388-L393
147,634
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/mbeans/ConfigurationHandlerRemote.java
ConfigurationHandlerRemote.displayConfiguration
public String displayConfiguration() { StringBuffer result = new StringBuffer(); for (ConfigurationManager confManager : ConfigurationService .getConfigurationService().getConfigurationManager().values()) { Object configuration = confManager.getConfiguration(); StringWriter writer = new StringWriter(); ...
java
public String displayConfiguration() { StringBuffer result = new StringBuffer(); for (ConfigurationManager confManager : ConfigurationService .getConfigurationService().getConfigurationManager().values()) { Object configuration = confManager.getConfiguration(); StringWriter writer = new StringWriter(); ...
[ "public", "String", "displayConfiguration", "(", ")", "{", "StringBuffer", "result", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "ConfigurationManager", "confManager", ":", "ConfigurationService", ".", "getConfigurationService", "(", ")", ".", "getConfigu...
This method is used to display the configurations data loaded from all configuration files. @return String
[ "This", "method", "is", "used", "to", "display", "the", "configurations", "data", "loaded", "from", "all", "configuration", "files", "." ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/mbeans/ConfigurationHandlerRemote.java#L63-L77
147,635
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.readBytes
public byte[] readBytes() throws IOException { Buffer buffer; try (InputStream src = newInputStream()) { buffer = getWorld().getBuffer(); synchronized (buffer) { return buffer.readBytes(src); } } }
java
public byte[] readBytes() throws IOException { Buffer buffer; try (InputStream src = newInputStream()) { buffer = getWorld().getBuffer(); synchronized (buffer) { return buffer.readBytes(src); } } }
[ "public", "byte", "[", "]", "readBytes", "(", ")", "throws", "IOException", "{", "Buffer", "buffer", ";", "try", "(", "InputStream", "src", "=", "newInputStream", "(", ")", ")", "{", "buffer", "=", "getWorld", "(", ")", ".", "getBuffer", "(", ")", ";",...
Reads all bytes of the node. Default implementation that works for all nodes: reads the file in chunks and builds the result in memory. Derived classes should override it if they can provide a more efficient implementation, e.g. by determining the length first if getting the length is cheap.
[ "Reads", "all", "bytes", "of", "the", "node", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L487-L496
147,636
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.readProperties
public Properties readProperties() throws IOException { Properties p; try (Reader src = newReader()) { p = new Properties(); p.load(src); } return p; }
java
public Properties readProperties() throws IOException { Properties p; try (Reader src = newReader()) { p = new Properties(); p.load(src); } return p; }
[ "public", "Properties", "readProperties", "(", ")", "throws", "IOException", "{", "Properties", "p", ";", "try", "(", "Reader", "src", "=", "newReader", "(", ")", ")", "{", "p", "=", "new", "Properties", "(", ")", ";", "p", ".", "load", "(", "src", "...
Reads properties with the encoding for this node
[ "Reads", "properties", "with", "the", "encoding", "for", "this", "node" ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L517-L525
147,637
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.mkfile
public T mkfile() throws MkfileException { try { if (exists()) { throw new MkfileException(this); } return writeBytes(); } catch (IOException e) { throw new MkfileException(this, e); } }
java
public T mkfile() throws MkfileException { try { if (exists()) { throw new MkfileException(this); } return writeBytes(); } catch (IOException e) { throw new MkfileException(this, e); } }
[ "public", "T", "mkfile", "(", ")", "throws", "MkfileException", "{", "try", "{", "if", "(", "exists", "(", ")", ")", "{", "throw", "new", "MkfileException", "(", "this", ")", ";", "}", "return", "writeBytes", "(", ")", ";", "}", "catch", "(", "IOExce...
Fails if the file already exists. Features define whether this operation is atomic. This default implementation is not atomic. @return this
[ "Fails", "if", "the", "file", "already", "exists", ".", "Features", "define", "whether", "this", "operation", "is", "atomic", ".", "This", "default", "implementation", "is", "not", "atomic", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L563-L572
147,638
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.copy
public void copy(Node dest) throws NodeNotFoundException, CopyException { try { if (isDirectory()) { dest.mkdirOpt(); copyDirectory(dest); } else { copyFile(dest); } } catch (FileNotFoundException | CopyException e) { ...
java
public void copy(Node dest) throws NodeNotFoundException, CopyException { try { if (isDirectory()) { dest.mkdirOpt(); copyDirectory(dest); } else { copyFile(dest); } } catch (FileNotFoundException | CopyException e) { ...
[ "public", "void", "copy", "(", "Node", "dest", ")", "throws", "NodeNotFoundException", ",", "CopyException", "{", "try", "{", "if", "(", "isDirectory", "(", ")", ")", "{", "dest", ".", "mkdirOpt", "(", ")", ";", "copyDirectory", "(", "dest", ")", ";", ...
Copies this to dest. Overwrites existing file and adds to existing directories. @throws NodeNotFoundException if this does not exist
[ "Copies", "this", "to", "dest", ".", "Overwrites", "existing", "file", "and", "adds", "to", "existing", "directories", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L729-L742
147,639
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.copyFile
public Node copyFile(Node dest) throws FileNotFoundException, CopyException { try (OutputStream out = dest.newOutputStream()) { copyFileTo(out); } catch (FileNotFoundException e) { throw e; } catch (IOException e) { throw new CopyException(this, dest, e); ...
java
public Node copyFile(Node dest) throws FileNotFoundException, CopyException { try (OutputStream out = dest.newOutputStream()) { copyFileTo(out); } catch (FileNotFoundException e) { throw e; } catch (IOException e) { throw new CopyException(this, dest, e); ...
[ "public", "Node", "copyFile", "(", "Node", "dest", ")", "throws", "FileNotFoundException", ",", "CopyException", "{", "try", "(", "OutputStream", "out", "=", "dest", ".", "newOutputStream", "(", ")", ")", "{", "copyFileTo", "(", "out", ")", ";", "}", "catc...
Overwrites dest if it already exists. @return dest
[ "Overwrites", "dest", "if", "it", "already", "exists", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L753-L762
147,640
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.copyDirectory
public List<Node> copyDirectory(Node dest) throws DirectoryNotFoundException, CopyException { return copyDirectory(dest, new Filter().includeAll()); }
java
public List<Node> copyDirectory(Node dest) throws DirectoryNotFoundException, CopyException { return copyDirectory(dest, new Filter().includeAll()); }
[ "public", "List", "<", "Node", ">", "copyDirectory", "(", "Node", "dest", ")", "throws", "DirectoryNotFoundException", ",", "CopyException", "{", "return", "copyDirectory", "(", "dest", ",", "new", "Filter", "(", ")", ".", "includeAll", "(", ")", ")", ";", ...
Convenience method for copy all files. Does not use default-excludes @return list of files and directories created
[ "Convenience", "method", "for", "copy", "all", "files", ".", "Does", "not", "use", "default", "-", "excludes" ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L768-L770
147,641
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.copyDirectory
public List<Node> copyDirectory(Node destdir, Filter filter) throws DirectoryNotFoundException, CopyException { return new Copy(this, filter).directory(destdir); }
java
public List<Node> copyDirectory(Node destdir, Filter filter) throws DirectoryNotFoundException, CopyException { return new Copy(this, filter).directory(destdir); }
[ "public", "List", "<", "Node", ">", "copyDirectory", "(", "Node", "destdir", ",", "Filter", "filter", ")", "throws", "DirectoryNotFoundException", ",", "CopyException", "{", "return", "new", "Copy", "(", "this", ",", "filter", ")", ".", "directory", "(", "de...
Throws an exception is this or dest is not a directory. Overwrites existing files in dest. @return list of files and directories created
[ "Throws", "an", "exception", "is", "this", "or", "dest", "is", "not", "a", "directory", ".", "Overwrites", "existing", "files", "in", "dest", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L776-L778
147,642
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.move
public Node move(Node dest, boolean overwrite) throws NodeNotFoundException, MoveException { try { if (!overwrite) { dest.checkNotExists(); } copy(dest); deleteTree(); } catch (FileNotFoundException e) { throw e; } catch...
java
public Node move(Node dest, boolean overwrite) throws NodeNotFoundException, MoveException { try { if (!overwrite) { dest.checkNotExists(); } copy(dest); deleteTree(); } catch (FileNotFoundException e) { throw e; } catch...
[ "public", "Node", "move", "(", "Node", "dest", ",", "boolean", "overwrite", ")", "throws", "NodeNotFoundException", ",", "MoveException", "{", "try", "{", "if", "(", "!", "overwrite", ")", "{", "dest", ".", "checkNotExists", "(", ")", ";", "}", "copy", "...
Moves this file or directory to dest. Throws an exception if this does not exist or if dest already exists. This method is a default implementation with copy and delete, derived classes should override it with a native implementation when available. @param overwrite false reports an error if the target already exists....
[ "Moves", "this", "file", "or", "directory", "to", "dest", ".", "Throws", "an", "exception", "if", "this", "does", "not", "exist", "or", "if", "dest", "already", "exists", ".", "This", "method", "is", "a", "default", "implementation", "with", "copy", "and",...
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L874-L887
147,643
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.link
public T link(T dest) throws LinkException { if (!getClass().equals(dest.getClass())) { throw new IllegalArgumentException(this.getClass() + " vs " + dest.getClass()); } try { checkExists(); } catch (IOException e) { throw new LinkException(this, e); ...
java
public T link(T dest) throws LinkException { if (!getClass().equals(dest.getClass())) { throw new IllegalArgumentException(this.getClass() + " vs " + dest.getClass()); } try { checkExists(); } catch (IOException e) { throw new LinkException(this, e); ...
[ "public", "T", "link", "(", "T", "dest", ")", "throws", "LinkException", "{", "if", "(", "!", "getClass", "(", ")", ".", "equals", "(", "dest", ".", "getClass", "(", ")", ")", ")", "{", "throw", "new", "IllegalArgumentException", "(", "this", ".", "g...
Creates an absolute link dest pointing to this. The signature of this method resembles the copy method. @param dest link to be created @return dest;
[ "Creates", "an", "absolute", "link", "dest", "pointing", "to", "this", ".", "The", "signature", "of", "this", "method", "resembles", "the", "copy", "method", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L902-L914
147,644
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.resolveLink
public T resolveLink() throws ReadLinkException { String path; path = readLink(); if (path.startsWith(Filesystem.SEPARATOR_STRING)) { return getRoot().node(path.substring(1), null); } else { return (T) getParent().join(path); } }
java
public T resolveLink() throws ReadLinkException { String path; path = readLink(); if (path.startsWith(Filesystem.SEPARATOR_STRING)) { return getRoot().node(path.substring(1), null); } else { return (T) getParent().join(path); } }
[ "public", "T", "resolveLink", "(", ")", "throws", "ReadLinkException", "{", "String", "path", ";", "path", "=", "readLink", "(", ")", ";", "if", "(", "path", ".", "startsWith", "(", "Filesystem", ".", "SEPARATOR_STRING", ")", ")", "{", "return", "getRoot",...
Throws an exception if this is not a link.
[ "Throws", "an", "exception", "if", "this", "is", "not", "a", "link", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L930-L939
147,645
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/Node.java
Node.find
public List<T> find(String... includes) throws IOException { return find(getWorld().filter().include(includes)); }
java
public List<T> find(String... includes) throws IOException { return find(getWorld().filter().include(includes)); }
[ "public", "List", "<", "T", ">", "find", "(", "String", "...", "includes", ")", "throws", "IOException", "{", "return", "find", "(", "getWorld", "(", ")", ".", "filter", "(", ")", ".", "include", "(", "includes", ")", ")", ";", "}" ]
uses default excludes
[ "uses", "default", "excludes" ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/Node.java#L982-L984
147,646
eurekaclinical/aiw-i2b2-etl
src/main/java/edu/emory/cci/aiw/i2b2etl/dest/I2b2QueryResultsHandler.java
I2b2QueryResultsHandler.truncateTempTables
private void truncateTempTables() throws SQLException { Logger logger = I2b2ETLUtil.logger(); logger.log(Level.INFO, "Truncating temp data tables for query {0}", this.query.getName()); try (final Connection conn = openDataDatabaseConnection()) { conn.setAutoCommit(true); ...
java
private void truncateTempTables() throws SQLException { Logger logger = I2b2ETLUtil.logger(); logger.log(Level.INFO, "Truncating temp data tables for query {0}", this.query.getName()); try (final Connection conn = openDataDatabaseConnection()) { conn.setAutoCommit(true); ...
[ "private", "void", "truncateTempTables", "(", ")", "throws", "SQLException", "{", "Logger", "logger", "=", "I2b2ETLUtil", ".", "logger", "(", ")", ";", "logger", ".", "log", "(", "Level", ".", "INFO", ",", "\"Truncating temp data tables for query {0}\"", ",", "t...
Calls stored procedures to drop all of the temp tables created. @throws SQLException if an error occurs while interacting with the database
[ "Calls", "stored", "procedures", "to", "drop", "all", "of", "the", "temp", "tables", "created", "." ]
3eed6bda7755919cb9466d2930723a0f4748341a
https://github.com/eurekaclinical/aiw-i2b2-etl/blob/3eed6bda7755919cb9466d2930723a0f4748341a/src/main/java/edu/emory/cci/aiw/i2b2etl/dest/I2b2QueryResultsHandler.java#L402-L413
147,647
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.first
public int first() { int val; int i; for (i = 0; i < data.length; i++) { if (data[i] != 0) { val = data[i]; i <<= SHIFT; while ((val & 1) == 0) { val >>>= 1; i++; } ...
java
public int first() { int val; int i; for (i = 0; i < data.length; i++) { if (data[i] != 0) { val = data[i]; i <<= SHIFT; while ((val & 1) == 0) { val >>>= 1; i++; } ...
[ "public", "int", "first", "(", ")", "{", "int", "val", ";", "int", "i", ";", "for", "(", "i", "=", "0", ";", "i", "<", "data", ".", "length", ";", "i", "++", ")", "{", "if", "(", "data", "[", "i", "]", "!=", "0", ")", "{", "val", "=", "...
Gets the first element of the set. @return first element of the set, -1 if the set is empty
[ "Gets", "the", "first", "element", "of", "the", "set", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L95-L111
147,648
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.last
public int last() { int val; int i; for (i = data.length - 1; i >= 0; i--) { if (data[i] != 0) { val = data[i] >>> 1; i <<= SHIFT; while (val != 0) { val >>>= 1; i++; } ...
java
public int last() { int val; int i; for (i = data.length - 1; i >= 0; i--) { if (data[i] != 0) { val = data[i] >>> 1; i <<= SHIFT; while (val != 0) { val >>>= 1; i++; } ...
[ "public", "int", "last", "(", ")", "{", "int", "val", ";", "int", "i", ";", "for", "(", "i", "=", "data", ".", "length", "-", "1", ";", "i", ">=", "0", ";", "i", "--", ")", "{", "if", "(", "data", "[", "i", "]", "!=", "0", ")", "{", "va...
Gets the last element of the set. @return last element of the set, -1 if the set is empty
[ "Gets", "the", "last", "element", "of", "the", "set", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L117-L133
147,649
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.next
public int next(int ele) { int idx, bit, val; idx = ele >> SHIFT; bit = ele & MASK; val = data[idx] >>> bit; do { val >>>= 1; bit++; if (val == 0) { idx++; if (idx == data.length) { return -...
java
public int next(int ele) { int idx, bit, val; idx = ele >> SHIFT; bit = ele & MASK; val = data[idx] >>> bit; do { val >>>= 1; bit++; if (val == 0) { idx++; if (idx == data.length) { return -...
[ "public", "int", "next", "(", "int", "ele", ")", "{", "int", "idx", ",", "bit", ",", "val", ";", "idx", "=", "ele", ">>", "SHIFT", ";", "bit", "=", "ele", "&", "MASK", ";", "val", "=", "data", "[", "idx", "]", ">>>", "bit", ";", "do", "{", ...
Gets the element following ele. @param ele the element to start with @return the element following ele, -1 if nothing follows
[ "Gets", "the", "element", "following", "ele", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L140-L160
147,650
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.contains
public boolean contains(int ele) { int idx; idx = ele >> SHIFT; if (idx >= data.length) { return false; } return (data[idx] & (1 << ele)) != 0; }
java
public boolean contains(int ele) { int idx; idx = ele >> SHIFT; if (idx >= data.length) { return false; } return (data[idx] & (1 << ele)) != 0; }
[ "public", "boolean", "contains", "(", "int", "ele", ")", "{", "int", "idx", ";", "idx", "=", "ele", ">>", "SHIFT", ";", "if", "(", "idx", ">=", "data", ".", "length", ")", "{", "return", "false", ";", "}", "return", "(", "data", "[", "idx", "]", ...
Lookup a specific element. @param ele element to lookup @return true, if ele is contained in the set
[ "Lookup", "a", "specific", "element", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L181-L189
147,651
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.add
public void add(int ele) { int idx; idx = ele >> SHIFT; if (idx >= data.length) { resize(idx + 1 + GROW); } data[ele >> SHIFT] |= (1 << ele); }
java
public void add(int ele) { int idx; idx = ele >> SHIFT; if (idx >= data.length) { resize(idx + 1 + GROW); } data[ele >> SHIFT] |= (1 << ele); }
[ "public", "void", "add", "(", "int", "ele", ")", "{", "int", "idx", ";", "idx", "=", "ele", ">>", "SHIFT", ";", "if", "(", "idx", ">=", "data", ".", "length", ")", "{", "resize", "(", "idx", "+", "1", "+", "GROW", ")", ";", "}", "data", "[", ...
Add an element. @param ele the element to add
[ "Add", "an", "element", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L206-L214
147,652
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.addRange
public void addRange(int first, int last) { int ele; for (ele = first; ele <= last; ele++) { add(ele); } }
java
public void addRange(int first, int last) { int ele; for (ele = first; ele <= last; ele++) { add(ele); } }
[ "public", "void", "addRange", "(", "int", "first", ",", "int", "last", ")", "{", "int", "ele", ";", "for", "(", "ele", "=", "first", ";", "ele", "<=", "last", ";", "ele", "++", ")", "{", "add", "(", "ele", ")", ";", "}", "}" ]
Add all elements in the indicated range. Nothing is set for first &gt; last. @param first first element to add @param last last element to add
[ "Add", "all", "elements", "in", "the", "indicated", "range", ".", "Nothing", "is", "set", "for", "first", "&gt", ";", "last", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L221-L227
147,653
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.remove
public void remove(int ele) { int idx; idx = ele >> SHIFT; if (idx < data.length) { data[idx] &= ~(1 << ele); } }
java
public void remove(int ele) { int idx; idx = ele >> SHIFT; if (idx < data.length) { data[idx] &= ~(1 << ele); } }
[ "public", "void", "remove", "(", "int", "ele", ")", "{", "int", "idx", ";", "idx", "=", "ele", ">>", "SHIFT", ";", "if", "(", "idx", "<", "data", ".", "length", ")", "{", "data", "[", "idx", "]", "&=", "~", "(", "1", "<<", "ele", ")", ";", ...
Remove an element from the set. @param ele element to remove
[ "Remove", "an", "element", "from", "the", "set", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L233-L240
147,654
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.removeRange
public void removeRange(int first, int last) { int ele; for (ele = first; ele <= last; ele++) { remove(ele); } }
java
public void removeRange(int first, int last) { int ele; for (ele = first; ele <= last; ele++) { remove(ele); } }
[ "public", "void", "removeRange", "(", "int", "first", ",", "int", "last", ")", "{", "int", "ele", ";", "for", "(", "ele", "=", "first", ";", "ele", "<=", "last", ";", "ele", "++", ")", "{", "remove", "(", "ele", ")", ";", "}", "}" ]
Remove all elements in the indicated range. @param first first element to remove @param last last element to remove
[ "Remove", "all", "elements", "in", "the", "indicated", "range", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L247-L253
147,655
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.containsAll
public boolean containsAll(IntBitSet set) { int i, end; if (data.length < set.data.length) { end = data.length; for (i = end; i < set.data.length; i++) { if (set.data[i] != 0) { return false; } } } else { ...
java
public boolean containsAll(IntBitSet set) { int i, end; if (data.length < set.data.length) { end = data.length; for (i = end; i < set.data.length; i++) { if (set.data[i] != 0) { return false; } } } else { ...
[ "public", "boolean", "containsAll", "(", "IntBitSet", "set", ")", "{", "int", "i", ",", "end", ";", "if", "(", "data", ".", "length", "<", "set", ".", "data", ".", "length", ")", "{", "end", "=", "data", ".", "length", ";", "for", "(", "i", "=", ...
The subset test. @param set the set to be compared with @return true, if the argument is contained
[ "The", "subset", "test", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L319-L340
147,656
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.retainAll
public void retainAll(IntBitSet set) { int i; if (set.data.length > data.length) { resize(set.data.length); } for (i = 0; i < set.data.length; i++) { data[i] &= set.data[i]; } for ( ; i < data.length; i++) { data[i] = 0; } ...
java
public void retainAll(IntBitSet set) { int i; if (set.data.length > data.length) { resize(set.data.length); } for (i = 0; i < set.data.length; i++) { data[i] &= set.data[i]; } for ( ; i < data.length; i++) { data[i] = 0; } ...
[ "public", "void", "retainAll", "(", "IntBitSet", "set", ")", "{", "int", "i", ";", "if", "(", "set", ".", "data", ".", "length", ">", "data", ".", "length", ")", "{", "resize", "(", "set", ".", "data", ".", "length", ")", ";", "}", "for", "(", ...
Computes the intersection. The result is stored in this set. @param set the set to be combined with
[ "Computes", "the", "intersection", ".", "The", "result", "is", "stored", "in", "this", "set", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L348-L360
147,657
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.removeAll
public void removeAll(IntBitSet set) { int i, end; end = (set.data.length < data.length)? set.data.length : data.length; for (i = 0; i < end; i++) { data[i] &= ~set.data[i]; } }
java
public void removeAll(IntBitSet set) { int i, end; end = (set.data.length < data.length)? set.data.length : data.length; for (i = 0; i < end; i++) { data[i] &= ~set.data[i]; } }
[ "public", "void", "removeAll", "(", "IntBitSet", "set", ")", "{", "int", "i", ",", "end", ";", "end", "=", "(", "set", ".", "data", ".", "length", "<", "data", ".", "length", ")", "?", "set", ".", "data", ".", "length", ":", "data", ".", "length"...
Computes the set difference. The result is stored in this set. @param set the set to be combined with
[ "Computes", "the", "set", "difference", ".", "The", "result", "is", "stored", "in", "this", "set", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L366-L373
147,658
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.addAll
public void addAll(IntBitSet set) { int i; if (set.data.length > data.length) { resize(set.data.length); } for (i = 0; i < set.data.length; i++) { data[i] |= set.data[i]; } }
java
public void addAll(IntBitSet set) { int i; if (set.data.length > data.length) { resize(set.data.length); } for (i = 0; i < set.data.length; i++) { data[i] |= set.data[i]; } }
[ "public", "void", "addAll", "(", "IntBitSet", "set", ")", "{", "int", "i", ";", "if", "(", "set", ".", "data", ".", "length", ">", "data", ".", "length", ")", "{", "resize", "(", "set", ".", "data", ".", "length", ")", ";", "}", "for", "(", "i"...
Computes the union. The result is stored in this set. @param set the set to be combined with
[ "Computes", "the", "union", ".", "The", "result", "is", "stored", "in", "this", "set", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L379-L389
147,659
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.size
public int size() { int ele, count; count = 0; for (ele = first(); ele != -1; ele = next(ele)) { count++; } return count; }
java
public int size() { int ele, count; count = 0; for (ele = first(); ele != -1; ele = next(ele)) { count++; } return count; }
[ "public", "int", "size", "(", ")", "{", "int", "ele", ",", "count", ";", "count", "=", "0", ";", "for", "(", "ele", "=", "first", "(", ")", ";", "ele", "!=", "-", "1", ";", "ele", "=", "next", "(", "ele", ")", ")", "{", "count", "++", ";", ...
Counts the elements. @return number of elements in this set
[ "Counts", "the", "elements", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L407-L415
147,660
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.toArray
public int[] toArray() { int i, ele; int[] result; result = new int[size()]; for (ele = first(), i = 0; ele != -1; ele = next(ele), i++) { result[i] = ele; } return result; }
java
public int[] toArray() { int i, ele; int[] result; result = new int[size()]; for (ele = first(), i = 0; ele != -1; ele = next(ele), i++) { result[i] = ele; } return result; }
[ "public", "int", "[", "]", "toArray", "(", ")", "{", "int", "i", ",", "ele", ";", "int", "[", "]", "result", ";", "result", "=", "new", "int", "[", "size", "(", ")", "]", ";", "for", "(", "ele", "=", "first", "(", ")", ",", "i", "=", "0", ...
Creates an array with all elements of the set. @return array with all elements of the set
[ "Creates", "an", "array", "with", "all", "elements", "of", "the", "set", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L429-L438
147,661
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/IntBitSet.java
IntBitSet.resize
private void resize(int s) { int[] n; int count; n = new int[s]; count = (s < data.length)? s : data.length; System.arraycopy(data, 0, n, 0, count); data = n; }
java
private void resize(int s) { int[] n; int count; n = new int[s]; count = (s < data.length)? s : data.length; System.arraycopy(data, 0, n, 0, count); data = n; }
[ "private", "void", "resize", "(", "int", "s", ")", "{", "int", "[", "]", "n", ";", "int", "count", ";", "n", "=", "new", "int", "[", "s", "]", ";", "count", "=", "(", "s", "<", "data", ".", "length", ")", "?", "s", ":", "data", ".", "length...
Changes data to have data.length >= s components. All data components that fit into the new size are preserved. @param s new data size wanted
[ "Changes", "data", "to", "have", "data", ".", "length", ">", "=", "s", "components", ".", "All", "data", "components", "that", "fit", "into", "the", "new", "size", "are", "preserved", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/IntBitSet.java#L445-L453
147,662
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/transport/jmx/JmxServer.java
JmxServer.start
public final synchronized void start() throws IOException { LaunchingMessageKind.IJMX0001.format(this.host, this.port); this.mbs = ManagementFactory.getPlatformMBeanServer(); final String oldRmiServerName = System .getProperty("java.rmi.server.hostname"); System.setProperty("java.rmi.server.hostname", this...
java
public final synchronized void start() throws IOException { LaunchingMessageKind.IJMX0001.format(this.host, this.port); this.mbs = ManagementFactory.getPlatformMBeanServer(); final String oldRmiServerName = System .getProperty("java.rmi.server.hostname"); System.setProperty("java.rmi.server.hostname", this...
[ "public", "final", "synchronized", "void", "start", "(", ")", "throws", "IOException", "{", "LaunchingMessageKind", ".", "IJMX0001", ".", "format", "(", "this", ".", "host", ",", "this", ".", "port", ")", ";", "this", ".", "mbs", "=", "ManagementFactory", ...
Start the JMX Server @throws IOException
[ "Start", "the", "JMX", "Server" ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/transport/jmx/JmxServer.java#L96-L126
147,663
awltech/org.parallelj
parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/transport/jmx/JmxServer.java
JmxServer.stop
public final synchronized void stop() { LaunchingMessageKind.IJMX0003.format(); unRegisterMBeans(); try { if (this.jmxConnectorServer != null) { this.jmxConnectorServer.stop(); } } catch (IOException e1) { // Do nothing } try { UnicastRemoteObject.unexportObject(register, true); } catch (...
java
public final synchronized void stop() { LaunchingMessageKind.IJMX0003.format(); unRegisterMBeans(); try { if (this.jmxConnectorServer != null) { this.jmxConnectorServer.stop(); } } catch (IOException e1) { // Do nothing } try { UnicastRemoteObject.unexportObject(register, true); } catch (...
[ "public", "final", "synchronized", "void", "stop", "(", ")", "{", "LaunchingMessageKind", ".", "IJMX0003", ".", "format", "(", ")", ";", "unRegisterMBeans", "(", ")", ";", "try", "{", "if", "(", "this", ".", "jmxConnectorServer", "!=", "null", ")", "{", ...
Stop the JMX Server
[ "Stop", "the", "JMX", "Server" ]
2a2498cc4ac6227df6f45d295ec568cad3cffbc4
https://github.com/awltech/org.parallelj/blob/2a2498cc4ac6227df6f45d295ec568cad3cffbc4/parallelj-launching-parent/parallelj-launching-api/src/main/java/org/parallelj/launching/transport/jmx/JmxServer.java#L131-L147
147,664
opendatatrentino/s-match
src/main/java/it/unitn/disi/common/utils/ClassFactory.java
ClassFactory.getClassForName
public static Object getClassForName(String className) { Object object = null; try { Class classDefinition = Class.forName(className); object = classDefinition.newInstance(); } catch (ClassNotFoundException e) { if (log.isEnabledFor(Level.ERROR)) { ...
java
public static Object getClassForName(String className) { Object object = null; try { Class classDefinition = Class.forName(className); object = classDefinition.newInstance(); } catch (ClassNotFoundException e) { if (log.isEnabledFor(Level.ERROR)) { ...
[ "public", "static", "Object", "getClassForName", "(", "String", "className", ")", "{", "Object", "object", "=", "null", ";", "try", "{", "Class", "classDefinition", "=", "Class", ".", "forName", "(", "className", ")", ";", "object", "=", "classDefinition", "...
Returns object instance from the string representing its class name. @param className className @return Object instance
[ "Returns", "object", "instance", "from", "the", "string", "representing", "its", "class", "name", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/common/utils/ClassFactory.java#L28-L47
147,665
opendatatrentino/s-match
src/main/java/it/unitn/disi/common/utils/ClassFactory.java
ClassFactory.getClassInstance
@SuppressWarnings("unchecked") public static Object getClassInstance(String className, Class[] attrTypes, Object[] attrValues) throws DISIException { Constructor constr; try { Class cl = Class.for...
java
@SuppressWarnings("unchecked") public static Object getClassInstance(String className, Class[] attrTypes, Object[] attrValues) throws DISIException { Constructor constr; try { Class cl = Class.for...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "static", "Object", "getClassInstance", "(", "String", "className", ",", "Class", "[", "]", "attrTypes", ",", "Object", "[", "]", "attrValues", ")", "throws", "DISIException", "{", "Constructor", "con...
Creates an instance of the class whose name is passed as the parameter. @param className name of the class those instance is to be created @param attrTypes attrTypes @param attrValues attrValues @return instance of the class @throws DISIException DISIException
[ "Creates", "an", "instance", "of", "the", "class", "whose", "name", "is", "passed", "as", "the", "parameter", "." ]
ba5982ef406b7010c2f92592e43887a485935aa1
https://github.com/opendatatrentino/s-match/blob/ba5982ef406b7010c2f92592e43887a485935aa1/src/main/java/it/unitn/disi/common/utils/ClassFactory.java#L59-L97
147,666
kmi/iserve
iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java
RegistryManagerImpl.getSupportedInputMediaTypes
@Override public Set<String> getSupportedInputMediaTypes() { ImmutableSet.Builder<String> result = ImmutableSet.builder(); result.addAll(MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.keySet()); result.addAll(this.serviceTransformationEngine.getSupportedMediaTypes()); return result.build(); ...
java
@Override public Set<String> getSupportedInputMediaTypes() { ImmutableSet.Builder<String> result = ImmutableSet.builder(); result.addAll(MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.keySet()); result.addAll(this.serviceTransformationEngine.getSupportedMediaTypes()); return result.build(); ...
[ "@", "Override", "public", "Set", "<", "String", ">", "getSupportedInputMediaTypes", "(", ")", "{", "ImmutableSet", ".", "Builder", "<", "String", ">", "result", "=", "ImmutableSet", ".", "builder", "(", ")", ";", "result", ".", "addAll", "(", "MediaType", ...
Obtains the list of supported media types the engine can import @return the Set of media types
[ "Obtains", "the", "list", "of", "supported", "media", "types", "the", "engine", "can", "import" ]
13e7016e64c1d5a539b838c6debf1a5cc4aefcb7
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java#L166-L172
147,667
kmi/iserve
iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java
RegistryManagerImpl.canImport
@Override public boolean canImport(String mediaType) { return (MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType) || this.serviceTransformationEngine.canTransform(mediaType)); }
java
@Override public boolean canImport(String mediaType) { return (MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType) || this.serviceTransformationEngine.canTransform(mediaType)); }
[ "@", "Override", "public", "boolean", "canImport", "(", "String", "mediaType", ")", "{", "return", "(", "MediaType", ".", "NATIVE_MEDIATYPE_SYNTAX_MAP", ".", "containsKey", "(", "mediaType", ")", "||", "this", ".", "serviceTransformationEngine", ".", "canTransform",...
Checks if the given media type can be imported @param mediaType the media type we wish to check if it can be imported @return true if it is supported or false otherwise.
[ "Checks", "if", "the", "given", "media", "type", "can", "be", "imported" ]
13e7016e64c1d5a539b838c6debf1a5cc4aefcb7
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java#L180-L184
147,668
kmi/iserve
iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java
RegistryManagerImpl.getFilenameFilter
@Override public FilenameFilter getFilenameFilter(String mediaType) { if (mediaType == null) { return null; } if (MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType)) { return new FilenameFilterBySyntax(MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.get(mediaType)); ...
java
@Override public FilenameFilter getFilenameFilter(String mediaType) { if (mediaType == null) { return null; } if (MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType)) { return new FilenameFilterBySyntax(MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.get(mediaType)); ...
[ "@", "Override", "public", "FilenameFilter", "getFilenameFilter", "(", "String", "mediaType", ")", "{", "if", "(", "mediaType", "==", "null", ")", "{", "return", "null", ";", "}", "if", "(", "MediaType", ".", "NATIVE_MEDIATYPE_SYNTAX_MAP", ".", "containsKey", ...
Gets the corresponding filename filter to a given media type by checking both native formats and those supported through transformation @param mediaType the media type for which to obtain the file extension @return the filename filter or null if it is not supported. Callers are advised to check first that the media ty...
[ "Gets", "the", "corresponding", "filename", "filter", "to", "a", "given", "media", "type", "by", "checking", "both", "native", "formats", "and", "those", "supported", "through", "transformation" ]
13e7016e64c1d5a539b838c6debf1a5cc4aefcb7
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java#L194-L207
147,669
kmi/iserve
iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java
RegistryManagerImpl.importServices
@Override public List<URI> importServices(InputStream servicesContentStream, String mediaType) throws SalException { boolean isNativeFormat = MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType); // Throw error if Format Unsupported if (!isNativeF...
java
@Override public List<URI> importServices(InputStream servicesContentStream, String mediaType) throws SalException { boolean isNativeFormat = MediaType.NATIVE_MEDIATYPE_SYNTAX_MAP.containsKey(mediaType); // Throw error if Format Unsupported if (!isNativeF...
[ "@", "Override", "public", "List", "<", "URI", ">", "importServices", "(", "InputStream", "servicesContentStream", ",", "String", "mediaType", ")", "throws", "SalException", "{", "boolean", "isNativeFormat", "=", "MediaType", ".", "NATIVE_MEDIATYPE_SYNTAX_MAP", ".", ...
Imports a new service within iServe. The original document is stored in the server and the transformed version registered within iServe. @param servicesContentStream @param mediaType @return the List of URIs of the services imported @throws SalException
[ "Imports", "a", "new", "service", "within", "iServe", ".", "The", "original", "document", "is", "stored", "in", "the", "server", "and", "the", "transformed", "version", "registered", "within", "iServe", "." ]
13e7016e64c1d5a539b838c6debf1a5cc4aefcb7
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java#L218-L286
147,670
kmi/iserve
iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java
RegistryManagerImpl.unregisterService
@Override public boolean unregisterService(URI serviceUri) throws SalException { // Check the URI is correct and belongs to the server if (serviceUri == null || !UriUtil.isResourceLocalToServer(serviceUri, this.getIserveUri())) { return false; } if (this...
java
@Override public boolean unregisterService(URI serviceUri) throws SalException { // Check the URI is correct and belongs to the server if (serviceUri == null || !UriUtil.isResourceLocalToServer(serviceUri, this.getIserveUri())) { return false; } if (this...
[ "@", "Override", "public", "boolean", "unregisterService", "(", "URI", "serviceUri", ")", "throws", "SalException", "{", "// Check the URI is correct and belongs to the server", "if", "(", "serviceUri", "==", "null", "||", "!", "UriUtil", ".", "isResourceLocalToServer", ...
Unregisters a service from the registry. Effectively this will delete the service description and remove any related documents on the server. @param serviceUri the URI of the service to unregister @return true if it was properly unregistered, false otherwise. @throws SalException
[ "Unregisters", "a", "service", "from", "the", "registry", ".", "Effectively", "this", "will", "delete", "the", "service", "description", "and", "remove", "any", "related", "documents", "on", "the", "server", "." ]
13e7016e64c1d5a539b838c6debf1a5cc4aefcb7
https://github.com/kmi/iserve/blob/13e7016e64c1d5a539b838c6debf1a5cc4aefcb7/iserve-sal-core/src/main/java/uk/ac/open/kmi/iserve/sal/manager/impl/RegistryManagerImpl.java#L556-L576
147,671
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/ExtensionRegistry.java
ExtensionRegistry.add
public void add(final GeneratedMessage.GeneratedExtension<?, ?> extension) { if (extension.getDescriptor().getJavaType() == FieldDescriptor.JavaType.MESSAGE) { if (extension.getMessageDefaultInstance() == null) { throw new IllegalStateException( "Registered message-type extension h...
java
public void add(final GeneratedMessage.GeneratedExtension<?, ?> extension) { if (extension.getDescriptor().getJavaType() == FieldDescriptor.JavaType.MESSAGE) { if (extension.getMessageDefaultInstance() == null) { throw new IllegalStateException( "Registered message-type extension h...
[ "public", "void", "add", "(", "final", "GeneratedMessage", ".", "GeneratedExtension", "<", "?", ",", "?", ">", "extension", ")", "{", "if", "(", "extension", ".", "getDescriptor", "(", ")", ".", "getJavaType", "(", ")", "==", "FieldDescriptor", ".", "JavaT...
Add an extension from a generated file to the registry.
[ "Add", "an", "extension", "from", "a", "generated", "file", "to", "the", "registry", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/ExtensionRegistry.java#L157-L170
147,672
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/ExtensionRegistry.java
ExtensionRegistry.add
public void add(final FieldDescriptor type) { if (type.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { throw new IllegalArgumentException( "ExtensionRegistry.add() must be provided a default instance when " + "adding an embedded message extension."); } add(new ExtensionInfo(type, ...
java
public void add(final FieldDescriptor type) { if (type.getJavaType() == FieldDescriptor.JavaType.MESSAGE) { throw new IllegalArgumentException( "ExtensionRegistry.add() must be provided a default instance when " + "adding an embedded message extension."); } add(new ExtensionInfo(type, ...
[ "public", "void", "add", "(", "final", "FieldDescriptor", "type", ")", "{", "if", "(", "type", ".", "getJavaType", "(", ")", "==", "FieldDescriptor", ".", "JavaType", ".", "MESSAGE", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"ExtensionRegist...
Add a non-message-type extension to the registry by descriptor.
[ "Add", "a", "non", "-", "message", "-", "type", "extension", "to", "the", "registry", "by", "descriptor", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/ExtensionRegistry.java#L173-L180
147,673
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/ExtensionRegistry.java
ExtensionRegistry.add
public void add(final FieldDescriptor type, final Message defaultInstance) { if (type.getJavaType() != FieldDescriptor.JavaType.MESSAGE) { throw new IllegalArgumentException( "ExtensionRegistry.add() provided a default instance for a " + "non-message extension."); } add(new ExtensionIn...
java
public void add(final FieldDescriptor type, final Message defaultInstance) { if (type.getJavaType() != FieldDescriptor.JavaType.MESSAGE) { throw new IllegalArgumentException( "ExtensionRegistry.add() provided a default instance for a " + "non-message extension."); } add(new ExtensionIn...
[ "public", "void", "add", "(", "final", "FieldDescriptor", "type", ",", "final", "Message", "defaultInstance", ")", "{", "if", "(", "type", ".", "getJavaType", "(", ")", "!=", "FieldDescriptor", ".", "JavaType", ".", "MESSAGE", ")", "{", "throw", "new", "Il...
Add a message-type extension to the registry by descriptor.
[ "Add", "a", "message", "-", "type", "extension", "to", "the", "registry", "by", "descriptor", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/ExtensionRegistry.java#L183-L190
147,674
pulse00/Composer-Java-Bindings
java-api/src/main/java/com/dubture/getcomposer/core/collection/Versions.java
Versions.getMinors
public String[] getMinors(String major) { prepareDetailedVersions(); if (majors.containsKey(major)) { return majors.get(major).toArray(new String[]{}); } return null; }
java
public String[] getMinors(String major) { prepareDetailedVersions(); if (majors.containsKey(major)) { return majors.get(major).toArray(new String[]{}); } return null; }
[ "public", "String", "[", "]", "getMinors", "(", "String", "major", ")", "{", "prepareDetailedVersions", "(", ")", ";", "if", "(", "majors", ".", "containsKey", "(", "major", ")", ")", "{", "return", "majors", ".", "get", "(", "major", ")", ".", "toArra...
Returns all minor versions for the given major version or null if major version does not exist. @param major @return
[ "Returns", "all", "minor", "versions", "for", "the", "given", "major", "version", "or", "null", "if", "major", "version", "does", "not", "exist", "." ]
0aa572567db37d047a41a57c32ede7c7fd5d4938
https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/collection/Versions.java#L136-L144
147,675
pulse00/Composer-Java-Bindings
java-api/src/main/java/com/dubture/getcomposer/core/collection/Versions.java
Versions.getRecentMinor
public String getRecentMinor(String major) { if (major == null) { return null; } prepareDetailedVersions(); if (majors.containsKey(major) && majors.get(major).size() > 0) { return majors.get(major).get(0); } return null; }
java
public String getRecentMinor(String major) { if (major == null) { return null; } prepareDetailedVersions(); if (majors.containsKey(major) && majors.get(major).size() > 0) { return majors.get(major).get(0); } return null; }
[ "public", "String", "getRecentMinor", "(", "String", "major", ")", "{", "if", "(", "major", "==", "null", ")", "{", "return", "null", ";", "}", "prepareDetailedVersions", "(", ")", ";", "if", "(", "majors", ".", "containsKey", "(", "major", ")", "&&", ...
Returns the recent minor version for the given major version or null if neither major version or no minor version exists. @param major @return
[ "Returns", "the", "recent", "minor", "version", "for", "the", "given", "major", "version", "or", "null", "if", "neither", "major", "version", "or", "no", "minor", "version", "exists", "." ]
0aa572567db37d047a41a57c32ede7c7fd5d4938
https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/collection/Versions.java#L153-L164
147,676
pulse00/Composer-Java-Bindings
java-api/src/main/java/com/dubture/getcomposer/core/collection/Versions.java
Versions.getDetailedVersion
public Version getDetailedVersion(String version) { prepareDetailedVersions(); if (detailedVersions.containsKey(version)) { return detailedVersions.get(version); } return null; }
java
public Version getDetailedVersion(String version) { prepareDetailedVersions(); if (detailedVersions.containsKey(version)) { return detailedVersions.get(version); } return null; }
[ "public", "Version", "getDetailedVersion", "(", "String", "version", ")", "{", "prepareDetailedVersions", "(", ")", ";", "if", "(", "detailedVersions", ".", "containsKey", "(", "version", ")", ")", "{", "return", "detailedVersions", ".", "get", "(", "version", ...
Returns the detailed version for a given string version or null if the version doesn't exist in this version collection @param version @return
[ "Returns", "the", "detailed", "version", "for", "a", "given", "string", "version", "or", "null", "if", "the", "version", "doesn", "t", "exist", "in", "this", "version", "collection" ]
0aa572567db37d047a41a57c32ede7c7fd5d4938
https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/collection/Versions.java#L211-L219
147,677
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/RepeatedFieldBuilder.java
RepeatedFieldBuilder.getMessageOrBuilder
@SuppressWarnings("unchecked") public IType getMessageOrBuilder(int index) { if (this.builders == null) { // We don't have any builders -- return the current Message. // This is the case where no builder was created, so we MUST have a // Message. return (IType) messages.get(index); } ...
java
@SuppressWarnings("unchecked") public IType getMessageOrBuilder(int index) { if (this.builders == null) { // We don't have any builders -- return the current Message. // This is the case where no builder was created, so we MUST have a // Message. return (IType) messages.get(index); } ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "IType", "getMessageOrBuilder", "(", "int", "index", ")", "{", "if", "(", "this", ".", "builders", "==", "null", ")", "{", "// We don't have any builders -- return the current Message.", "// This is the case ...
Gets the base class interface for the specified index. This may either be a builder or a message. It will return whatever is more efficient. @param index the index of the message to get @return the message or builder for the index as the base class interface
[ "Gets", "the", "base", "class", "interface", "for", "the", "specified", "index", ".", "This", "may", "either", "be", "a", "builder", "or", "a", "message", ".", "It", "will", "return", "whatever", "is", "more", "efficient", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/RepeatedFieldBuilder.java#L262-L281
147,678
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/RepeatedFieldBuilder.java
RepeatedFieldBuilder.setMessage
public RepeatedFieldBuilder<MType, BType, IType> setMessage( int index, MType message) { if (message == null) { throw new NullPointerException(); } ensureMutableMessageList(); messages.set(index, message); if (builders != null) { SingleFieldBuilder<MType, BType, IType> entry = ...
java
public RepeatedFieldBuilder<MType, BType, IType> setMessage( int index, MType message) { if (message == null) { throw new NullPointerException(); } ensureMutableMessageList(); messages.set(index, message); if (builders != null) { SingleFieldBuilder<MType, BType, IType> entry = ...
[ "public", "RepeatedFieldBuilder", "<", "MType", ",", "BType", ",", "IType", ">", "setMessage", "(", "int", "index", ",", "MType", "message", ")", "{", "if", "(", "message", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}...
Sets a message at the specified index replacing the existing item at that index. @param index the index to set. @param message the message to set @return the builder
[ "Sets", "a", "message", "at", "the", "specified", "index", "replacing", "the", "existing", "item", "at", "that", "index", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/RepeatedFieldBuilder.java#L291-L308
147,679
udoprog/ffwd-client-java
src/main/java/com/google/protobuf250/RepeatedFieldBuilder.java
RepeatedFieldBuilder.build
public List<MType> build() { // Now that build has been called, we are required to dispatch // invalidations. isClean = true; if (!isMessagesListMutable && builders == null) { // We still have an immutable list and we never created a builder. return messages; } boolean allMessagesI...
java
public List<MType> build() { // Now that build has been called, we are required to dispatch // invalidations. isClean = true; if (!isMessagesListMutable && builders == null) { // We still have an immutable list and we never created a builder. return messages; } boolean allMessagesI...
[ "public", "List", "<", "MType", ">", "build", "(", ")", "{", "// Now that build has been called, we are required to dispatch", "// invalidations.", "isClean", "=", "true", ";", "if", "(", "!", "isMessagesListMutable", "&&", "builders", "==", "null", ")", "{", "// We...
Builds the list of messages from the builder and returns them. @return an immutable list of messages
[ "Builds", "the", "list", "of", "messages", "from", "the", "builder", "and", "returns", "them", "." ]
b4161d2b138e3edb8fa9420cc3cc653d5764cf5b
https://github.com/udoprog/ffwd-client-java/blob/b4161d2b138e3edb8fa9420cc3cc653d5764cf5b/src/main/java/com/google/protobuf250/RepeatedFieldBuilder.java#L478-L519
147,680
mlhartme/sushi
src/main/java/net/oneandone/sushi/util/Separator.java
Separator.trim
public Separator trim(LineFormat.Trim trim) { return new Separator(separator, pattern, trim, skipEmpty, forNull, skipNull); }
java
public Separator trim(LineFormat.Trim trim) { return new Separator(separator, pattern, trim, skipEmpty, forNull, skipNull); }
[ "public", "Separator", "trim", "(", "LineFormat", ".", "Trim", "trim", ")", "{", "return", "new", "Separator", "(", "separator", ",", "pattern", ",", "trim", ",", "skipEmpty", ",", "forNull", ",", "skipNull", ")", ";", "}" ]
Trim elements before joining or after splitting
[ "Trim", "elements", "before", "joining", "or", "after", "splitting" ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/util/Separator.java#L104-L106
147,681
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/beans/editor/CalendarStringPropertyEditor.java
CalendarStringPropertyEditor.getValue
@Override public Object getValue() { Date d = Calendar.getInstance().getTime(); try { d = DEFAULT_DATE_FORMAT.parse(((JTextField) editor).getText()); } catch (ParseException ex) { Logger.getLogger(CalendarStringPropertyEditor.class.getName()).log(Level.SEVERE, null, e...
java
@Override public Object getValue() { Date d = Calendar.getInstance().getTime(); try { d = DEFAULT_DATE_FORMAT.parse(((JTextField) editor).getText()); } catch (ParseException ex) { Logger.getLogger(CalendarStringPropertyEditor.class.getName()).log(Level.SEVERE, null, e...
[ "@", "Override", "public", "Object", "getValue", "(", ")", "{", "Date", "d", "=", "Calendar", ".", "getInstance", "(", ")", ".", "getTime", "(", ")", ";", "try", "{", "d", "=", "DEFAULT_DATE_FORMAT", ".", "parse", "(", "(", "(", "JTextField", ")", "e...
Returns the Date of the Calendar. @return the date choosed as a <b>java.util.Date </b>b> object or null is the date is not set
[ "Returns", "the", "Date", "of", "the", "Calendar", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/beans/editor/CalendarStringPropertyEditor.java#L64-L75
147,682
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/beans/editor/CalendarStringPropertyEditor.java
CalendarStringPropertyEditor.setValue
@Override public void setValue(Object value) { if (value != null) { Calendar c = (Calendar) value; ((JTextField) editor).setText(DEFAULT_DATE_FORMAT.format(c.getTime())); } }
java
@Override public void setValue(Object value) { if (value != null) { Calendar c = (Calendar) value; ((JTextField) editor).setText(DEFAULT_DATE_FORMAT.format(c.getTime())); } }
[ "@", "Override", "public", "void", "setValue", "(", "Object", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "Calendar", "c", "=", "(", "Calendar", ")", "value", ";", "(", "(", "JTextField", ")", "editor", ")", ".", "setText", "(", ...
Sets the Date of the Calendar. @param value the Date object
[ "Sets", "the", "Date", "of", "the", "Calendar", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/beans/editor/CalendarStringPropertyEditor.java#L82-L88
147,683
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/beans/editor/CalendarStringPropertyEditor.java
CalendarStringPropertyEditor.getAsText
@Override public String getAsText() { Calendar localDate = (Calendar) getValue(); String s = DEFAULT_DATE_FORMAT.format(localDate.getTime()); LOGGER.log(Level.WARNING, "getAsText(): {0}", s); return s; }
java
@Override public String getAsText() { Calendar localDate = (Calendar) getValue(); String s = DEFAULT_DATE_FORMAT.format(localDate.getTime()); LOGGER.log(Level.WARNING, "getAsText(): {0}", s); return s; }
[ "@", "Override", "public", "String", "getAsText", "(", ")", "{", "Calendar", "localDate", "=", "(", "Calendar", ")", "getValue", "(", ")", ";", "String", "s", "=", "DEFAULT_DATE_FORMAT", ".", "format", "(", "localDate", ".", "getTime", "(", ")", ")", ";"...
Returns the Date formated with the locale and formatString set. @return the choosen Date as String
[ "Returns", "the", "Date", "formated", "with", "the", "locale", "and", "formatString", "set", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/beans/editor/CalendarStringPropertyEditor.java#L95-L102
147,684
ykrasik/jaci
jaci-cli-core/src/main/java/com/github/ykrasik/jaci/cli/param/BooleanCliParam.java
BooleanCliParam.optional
public static BooleanCliParam optional(Identifier identifier, boolean defaultValue, boolean nullable) { return new BooleanCliParam(identifier, Opt.of(MoreSuppliers.of(defaultValue)), nullable); }
java
public static BooleanCliParam optional(Identifier identifier, boolean defaultValue, boolean nullable) { return new BooleanCliParam(identifier, Opt.of(MoreSuppliers.of(defaultValue)), nullable); }
[ "public", "static", "BooleanCliParam", "optional", "(", "Identifier", "identifier", ",", "boolean", "defaultValue", ",", "boolean", "nullable", ")", "{", "return", "new", "BooleanCliParam", "(", "identifier", ",", "Opt", ".", "of", "(", "MoreSuppliers", ".", "of...
Construct an optional CLI boolean parameter with the given default value. @param identifier Parameter identifier. @param defaultValue Default value to be used by the parameter if it isn't explicitly bound. @param nullable Whether the parameter is nullable. @return A CLI boolean parameter constructed from the given par...
[ "Construct", "an", "optional", "CLI", "boolean", "parameter", "with", "the", "given", "default", "value", "." ]
4615edef7c76288ad5ea8d678132b161645ca1e3
https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-cli-core/src/main/java/com/github/ykrasik/jaci/cli/param/BooleanCliParam.java#L103-L105
147,685
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/World.java
World.locateClasspathEntry
public FileNode locateClasspathEntry(Class<?> c) { return locateEntry(c, Reflect.resourceName(c), false); }
java
public FileNode locateClasspathEntry(Class<?> c) { return locateEntry(c, Reflect.resourceName(c), false); }
[ "public", "FileNode", "locateClasspathEntry", "(", "Class", "<", "?", ">", "c", ")", "{", "return", "locateEntry", "(", "c", ",", "Reflect", ".", "resourceName", "(", "c", ")", ",", "false", ")", ";", "}" ]
Returns the file or directory containing the specified class. Does not search modules @param c the source class @return the physical file defining the class
[ "Returns", "the", "file", "or", "directory", "containing", "the", "specified", "class", ".", "Does", "not", "search", "modules" ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/World.java#L539-L541
147,686
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/World.java
World.locatePathEntry
public FileNode locatePathEntry(Class<?> c) { return locateEntry(c, Reflect.resourceName(c), true); }
java
public FileNode locatePathEntry(Class<?> c) { return locateEntry(c, Reflect.resourceName(c), true); }
[ "public", "FileNode", "locatePathEntry", "(", "Class", "<", "?", ">", "c", ")", "{", "return", "locateEntry", "(", "c", ",", "Reflect", ".", "resourceName", "(", "c", ")", ",", "true", ")", ";", "}" ]
Returns the file or directory or module containing the specified class. @param c the source class @return the physical file defining the class
[ "Returns", "the", "file", "or", "directory", "or", "module", "containing", "the", "specified", "class", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/World.java#L550-L552
147,687
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/ssh/SshNode.java
SshNode.copyFileTo
@Override public long copyFileTo(OutputStream dest, long skip) throws FileNotFoundException, CopyFileToException { ChannelSftp sftp; Progress monitor; try { sftp = alloc(); monitor = new Progress(); try { sftp.get(escape(slashPath), dest, ...
java
@Override public long copyFileTo(OutputStream dest, long skip) throws FileNotFoundException, CopyFileToException { ChannelSftp sftp; Progress monitor; try { sftp = alloc(); monitor = new Progress(); try { sftp.get(escape(slashPath), dest, ...
[ "@", "Override", "public", "long", "copyFileTo", "(", "OutputStream", "dest", ",", "long", "skip", ")", "throws", "FileNotFoundException", ",", "CopyFileToException", "{", "ChannelSftp", "sftp", ";", "Progress", "monitor", ";", "try", "{", "sftp", "=", "alloc", ...
This is the core function to read an ssh node. Does not close dest. @throws FileNotFoundException if this is not a file
[ "This", "is", "the", "core", "function", "to", "read", "an", "ssh", "node", ".", "Does", "not", "close", "dest", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/ssh/SshNode.java#L706-L728
147,688
mlhartme/sushi
src/main/java/net/oneandone/sushi/fs/ssh/SshNode.java
SshNode.copyFileFrom
public void copyFileFrom(InputStream src, boolean append) throws CopyFileFromException { ChannelSftp sftp; try { sftp = alloc(); try { sftp.put(src, escape(slashPath), append ? ChannelSftp.APPEND : ChannelSftp.OVERWRITE); } finally { f...
java
public void copyFileFrom(InputStream src, boolean append) throws CopyFileFromException { ChannelSftp sftp; try { sftp = alloc(); try { sftp.put(src, escape(slashPath), append ? ChannelSftp.APPEND : ChannelSftp.OVERWRITE); } finally { f...
[ "public", "void", "copyFileFrom", "(", "InputStream", "src", ",", "boolean", "append", ")", "throws", "CopyFileFromException", "{", "ChannelSftp", "sftp", ";", "try", "{", "sftp", "=", "alloc", "(", ")", ";", "try", "{", "sftp", ".", "put", "(", "src", "...
This is the core function to write an ssh node. Does not close src.
[ "This", "is", "the", "core", "function", "to", "write", "an", "ssh", "node", ".", "Does", "not", "close", "src", "." ]
4af33414b04bd58584d4febe5cc63ef6c7346a75
https://github.com/mlhartme/sushi/blob/4af33414b04bd58584d4febe5cc63ef6c7346a75/src/main/java/net/oneandone/sushi/fs/ssh/SshNode.java#L738-L751
147,689
ykrasik/jaci
jaci-cli-core/src/main/java/com/github/ykrasik/jaci/cli/commandline/CommandLineHistory.java
CommandLineHistory.pushCommandLine
public void pushCommandLine(String commandLine) { // Add new history entry to the end. history.add(commandLine); // Maintain max history size. if (history.size() > maxHistory) { history.remove(0); } // Reset the iteration index. resetCurrentIndex(); ...
java
public void pushCommandLine(String commandLine) { // Add new history entry to the end. history.add(commandLine); // Maintain max history size. if (history.size() > maxHistory) { history.remove(0); } // Reset the iteration index. resetCurrentIndex(); ...
[ "public", "void", "pushCommandLine", "(", "String", "commandLine", ")", "{", "// Add new history entry to the end.", "history", ".", "add", "(", "commandLine", ")", ";", "// Maintain max history size.", "if", "(", "history", ".", "size", "(", ")", ">", "maxHistory",...
Adds a new command line to the history buffer. Resets the current history index. @param commandLine Command line to add to history.
[ "Adds", "a", "new", "command", "line", "to", "the", "history", "buffer", ".", "Resets", "the", "current", "history", "index", "." ]
4615edef7c76288ad5ea8d678132b161645ca1e3
https://github.com/ykrasik/jaci/blob/4615edef7c76288ad5ea8d678132b161645ca1e3/jaci-cli-core/src/main/java/com/github/ykrasik/jaci/cli/commandline/CommandLineHistory.java#L94-L105
147,690
netceteragroup/trema-core
src/main/java/com/netcetera/trema/core/importing/Change.java
Change.getDescription
public static String getDescription(Change change) { switch (change.getType()) { case Change.TYPE_MASTER_VALUE_CHANGED: return "The master value has changed"; case Change.TYPE_IMPORTED_STATUS_OLDER: return "The imported status is older than the database status"; case Change.TYPE_IM...
java
public static String getDescription(Change change) { switch (change.getType()) { case Change.TYPE_MASTER_VALUE_CHANGED: return "The master value has changed"; case Change.TYPE_IMPORTED_STATUS_OLDER: return "The imported status is older than the database status"; case Change.TYPE_IM...
[ "public", "static", "String", "getDescription", "(", "Change", "change", ")", "{", "switch", "(", "change", ".", "getType", "(", ")", ")", "{", "case", "Change", ".", "TYPE_MASTER_VALUE_CHANGED", ":", "return", "\"The master value has changed\"", ";", "case", "C...
Gets a human readable description for a given change. @param change the change @return a human readable description for the given change.
[ "Gets", "a", "human", "readable", "description", "for", "a", "given", "change", "." ]
e5367f4b80b38038d462627aa146a62bc34fc489
https://github.com/netceteragroup/trema-core/blob/e5367f4b80b38038d462627aa146a62bc34fc489/src/main/java/com/netcetera/trema/core/importing/Change.java#L392-L419
147,691
pulse00/Composer-Java-Bindings
java-api/src/main/java/com/dubture/getcomposer/core/objects/JsonObject.java
JsonObject.is
public boolean is(String property, Type type) { if (super.has(property)) { return get(property).is(type); } return false; }
java
public boolean is(String property, Type type) { if (super.has(property)) { return get(property).is(type); } return false; }
[ "public", "boolean", "is", "(", "String", "property", ",", "Type", "type", ")", "{", "if", "(", "super", ".", "has", "(", "property", ")", ")", "{", "return", "get", "(", "property", ")", ".", "is", "(", "type", ")", ";", "}", "return", "false", ...
Returns whether the property is instance of the given type. @param property the property @param type the type @return <ul> <li><code>true</code> property is instance of type</li> <li><code>false</code> property is not an instance of type or it doesn't exist.</li> </ul>
[ "Returns", "whether", "the", "property", "is", "instance", "of", "the", "given", "type", "." ]
0aa572567db37d047a41a57c32ede7c7fd5d4938
https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/objects/JsonObject.java#L58-L63
147,692
pulse00/Composer-Java-Bindings
java-api/src/main/java/com/dubture/getcomposer/core/objects/JsonObject.java
JsonObject.getAsArray
public JsonArray getAsArray(String property) { if (!super.has(property)) { super.set(property, new JsonValue(new JsonArray()), false); } return get(property).getAsArray(); }
java
public JsonArray getAsArray(String property) { if (!super.has(property)) { super.set(property, new JsonValue(new JsonArray()), false); } return get(property).getAsArray(); }
[ "public", "JsonArray", "getAsArray", "(", "String", "property", ")", "{", "if", "(", "!", "super", ".", "has", "(", "property", ")", ")", "{", "super", ".", "set", "(", "property", ",", "new", "JsonValue", "(", "new", "JsonArray", "(", ")", ")", ",",...
Returns the property value as array. @param property the property @return the value
[ "Returns", "the", "property", "value", "as", "array", "." ]
0aa572567db37d047a41a57c32ede7c7fd5d4938
https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/objects/JsonObject.java#L122-L127
147,693
pulse00/Composer-Java-Bindings
java-api/src/main/java/com/dubture/getcomposer/core/objects/JsonObject.java
JsonObject.getAsObject
public JsonObject getAsObject(String property) { if (!super.has(property)) { super.set(property, new JsonValue(new JsonObject()), false); } return get(property).getAsObject(); }
java
public JsonObject getAsObject(String property) { if (!super.has(property)) { super.set(property, new JsonValue(new JsonObject()), false); } return get(property).getAsObject(); }
[ "public", "JsonObject", "getAsObject", "(", "String", "property", ")", "{", "if", "(", "!", "super", ".", "has", "(", "property", ")", ")", "{", "super", ".", "set", "(", "property", ",", "new", "JsonValue", "(", "new", "JsonObject", "(", ")", ")", "...
Returns the property value as object. @param property the property @return the value as entity
[ "Returns", "the", "property", "value", "as", "object", "." ]
0aa572567db37d047a41a57c32ede7c7fd5d4938
https://github.com/pulse00/Composer-Java-Bindings/blob/0aa572567db37d047a41a57c32ede7c7fd5d4938/java-api/src/main/java/com/dubture/getcomposer/core/objects/JsonObject.java#L192-L197
147,694
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.newOrderBy
@Override public CpoOrderBy newOrderBy(String attribute, boolean ascending) throws CpoException { return new BindableCpoOrderBy(attribute, ascending); }
java
@Override public CpoOrderBy newOrderBy(String attribute, boolean ascending) throws CpoException { return new BindableCpoOrderBy(attribute, ascending); }
[ "@", "Override", "public", "CpoOrderBy", "newOrderBy", "(", "String", "attribute", ",", "boolean", "ascending", ")", "throws", "CpoException", "{", "return", "new", "BindableCpoOrderBy", "(", "attribute", ",", "ascending", ")", ";", "}" ]
newOrderBy allows you to dynamically change the order of the objects in the resulting collection. This allows you to apply user input in determining the order of the collection @param attribute The name of the attribute from the pojo that will be sorted. @param ascending If true, sort ascending. If false sort descendi...
[ "newOrderBy", "allows", "you", "to", "dynamically", "change", "the", "order", "of", "the", "objects", "in", "the", "resulting", "collection", ".", "This", "allows", "you", "to", "apply", "user", "input", "in", "determining", "the", "order", "of", "the", "col...
dc745aca3b3206abf80b85d9689b0132f5baa694
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L1045-L1048
147,695
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.getReadSession
protected Session getReadSession() throws CpoException { Session session; try { if (!(invalidReadSession)) { session = getReadDataSource().getSession(); } else { session = getWriteDataSource().getSession(); } } catch (Exception e) { invalidReadSession = true; ...
java
protected Session getReadSession() throws CpoException { Session session; try { if (!(invalidReadSession)) { session = getReadDataSource().getSession(); } else { session = getWriteDataSource().getSession(); } } catch (Exception e) { invalidReadSession = true; ...
[ "protected", "Session", "getReadSession", "(", ")", "throws", "CpoException", "{", "Session", "session", ";", "try", "{", "if", "(", "!", "(", "invalidReadSession", ")", ")", "{", "session", "=", "getReadDataSource", "(", ")", ".", "getSession", "(", ")", ...
getReadSession returns the read session for Cassandra @return A Session object for reading @throws CpoException
[ "getReadSession", "returns", "the", "read", "session", "for", "Cassandra" ]
dc745aca3b3206abf80b85d9689b0132f5baa694
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L1927-L1946
147,696
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.getWriteSession
protected Session getWriteSession() throws CpoException { Session session; try { session = getWriteDataSource().getSession(); } catch (Throwable t) { String msg = "getWriteConnection(): failed"; logger.error(msg, t); throw new CpoException(msg, t); } return session; }
java
protected Session getWriteSession() throws CpoException { Session session; try { session = getWriteDataSource().getSession(); } catch (Throwable t) { String msg = "getWriteConnection(): failed"; logger.error(msg, t); throw new CpoException(msg, t); } return session; }
[ "protected", "Session", "getWriteSession", "(", ")", "throws", "CpoException", "{", "Session", "session", ";", "try", "{", "session", "=", "getWriteDataSource", "(", ")", ".", "getSession", "(", ")", ";", "}", "catch", "(", "Throwable", "t", ")", "{", "Str...
getWriteSession returns the write session for Cassandra @return A Session object for writing @throws CpoException
[ "getWriteSession", "returns", "the", "write", "session", "for", "Cassandra" ]
dc745aca3b3206abf80b85d9689b0132f5baa694
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L1954-L1966
147,697
synchronoss/cpo-api
cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java
CassandraCpoAdapter.getCpoAttributes
@Override public List<CpoAttribute> getCpoAttributes(String expression) throws CpoException { List<CpoAttribute> attributes = new ArrayList<>(); if (expression != null && !expression.isEmpty()) { Session session; ResultSet rs; try { session = getWriteSession(); rs = session....
java
@Override public List<CpoAttribute> getCpoAttributes(String expression) throws CpoException { List<CpoAttribute> attributes = new ArrayList<>(); if (expression != null && !expression.isEmpty()) { Session session; ResultSet rs; try { session = getWriteSession(); rs = session....
[ "@", "Override", "public", "List", "<", "CpoAttribute", ">", "getCpoAttributes", "(", "String", "expression", ")", "throws", "CpoException", "{", "List", "<", "CpoAttribute", ">", "attributes", "=", "new", "ArrayList", "<>", "(", ")", ";", "if", "(", "expres...
Get the cpo attributes for this expression @param expression - A string expression @return A List of CpoAttribute @throws CpoException
[ "Get", "the", "cpo", "attributes", "for", "this", "expression" ]
dc745aca3b3206abf80b85d9689b0132f5baa694
https://github.com/synchronoss/cpo-api/blob/dc745aca3b3206abf80b85d9689b0132f5baa694/cpo-cassandra/src/main/java/org/synchronoss/cpo/cassandra/CassandraCpoAdapter.java#L1975-L2004
147,698
ZenHarbinger/l2fprod-properties-editor
src/main/java/com/l2fprod/common/beans/BeanInfoFactory.java
BeanInfoFactory.createBeanInfo
public static BeanInfo createBeanInfo(Class<? extends Object> c) { BeanInfo bi = DefaultBeanInfoResolver.getBeanInfoHelper(c); if (bi == null) { bi = new ConfigBeanInfo(c); DefaultBeanInfoResolver.addBeanInfo(c, bi); } return bi; }
java
public static BeanInfo createBeanInfo(Class<? extends Object> c) { BeanInfo bi = DefaultBeanInfoResolver.getBeanInfoHelper(c); if (bi == null) { bi = new ConfigBeanInfo(c); DefaultBeanInfoResolver.addBeanInfo(c, bi); } return bi; }
[ "public", "static", "BeanInfo", "createBeanInfo", "(", "Class", "<", "?", "extends", "Object", ">", "c", ")", "{", "BeanInfo", "bi", "=", "DefaultBeanInfoResolver", ".", "getBeanInfoHelper", "(", "c", ")", ";", "if", "(", "bi", "==", "null", ")", "{", "b...
Get the bean information of a type. @param c The type to get the bean information of. @return The BeanInfo of the specified type.
[ "Get", "the", "bean", "information", "of", "a", "type", "." ]
d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32
https://github.com/ZenHarbinger/l2fprod-properties-editor/blob/d9b15c3f0b6ac1d9a2a9d315be073d2a4a419c32/src/main/java/com/l2fprod/common/beans/BeanInfoFactory.java#L49-L56
147,699
yfpeng/pengyifan-bioc
src/main/java/com/pengyifan/bioc/util/BioCValidate3.java
BioCValidate3.check
public void check(BioCDocument document) { String text = checkText(document); check(document, 0, text); for (BioCPassage passage : document.getPassages()) { check(passage, 0, text, document); for (BioCSentence sentence : passage.getSentences()) { check(sentence, 0, text, document, passag...
java
public void check(BioCDocument document) { String text = checkText(document); check(document, 0, text); for (BioCPassage passage : document.getPassages()) { check(passage, 0, text, document); for (BioCSentence sentence : passage.getSentences()) { check(sentence, 0, text, document, passag...
[ "public", "void", "check", "(", "BioCDocument", "document", ")", "{", "String", "text", "=", "checkText", "(", "document", ")", ";", "check", "(", "document", ",", "0", ",", "text", ")", ";", "for", "(", "BioCPassage", "passage", ":", "document", ".", ...
Checks text, annotations and relations of the document. @param document input document
[ "Checks", "text", "annotations", "and", "relations", "of", "the", "document", "." ]
e09cce1969aa598ff89e7957237375715d7a1a3a
https://github.com/yfpeng/pengyifan-bioc/blob/e09cce1969aa598ff89e7957237375715d7a1a3a/src/main/java/com/pengyifan/bioc/util/BioCValidate3.java#L56-L65