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
38,900
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.findEntityRecursively
public static boolean findEntityRecursively(final EntityContainer container, final UUID id) { final AtomicBoolean found = new AtomicBoolean(); walkEntityTree(container, e -> { if (id.equals(e.getID())) { found.set(true); return EntityVisitResult.EXIT; } else { return EntityVisitResult.CONTINUE; ...
java
public static boolean findEntityRecursively(final EntityContainer container, final UUID id) { final AtomicBoolean found = new AtomicBoolean(); walkEntityTree(container, e -> { if (id.equals(e.getID())) { found.set(true); return EntityVisitResult.EXIT; } else { return EntityVisitResult.CONTINUE; ...
[ "public", "static", "boolean", "findEntityRecursively", "(", "final", "EntityContainer", "container", ",", "final", "UUID", "id", ")", "{", "final", "AtomicBoolean", "found", "=", "new", "AtomicBoolean", "(", ")", ";", "walkEntityTree", "(", "container", ",", "e...
Walks through the entity tree looking for an entity. @param container Entity container. @param id Entity ID to look for. @return Whether the entity was found. @see #walkEntityTree(EntityContainer, EntityVisitor)
[ "Walks", "through", "the", "entity", "tree", "looking", "for", "an", "entity", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L143-L156
38,901
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.getRootContainer
public static EntityContainer getRootContainer(final EntityContainer container) { Objects.requireNonNull(container); if (container instanceof Entity) { final EntityContainer parent = ((Entity) container).getContainer(); if (parent != null) { return getRootContainer(parent); } } return container; ...
java
public static EntityContainer getRootContainer(final EntityContainer container) { Objects.requireNonNull(container); if (container instanceof Entity) { final EntityContainer parent = ((Entity) container).getContainer(); if (parent != null) { return getRootContainer(parent); } } return container; ...
[ "public", "static", "EntityContainer", "getRootContainer", "(", "final", "EntityContainer", "container", ")", "{", "Objects", ".", "requireNonNull", "(", "container", ")", ";", "if", "(", "container", "instanceof", "Entity", ")", "{", "final", "EntityContainer", "...
Gets the highest level parent of this container. @param container Container to get parent for. @return Highest level parent (or this container if it has no parent).
[ "Gets", "the", "highest", "level", "parent", "of", "this", "container", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L209-L219
38,902
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.isMarkedAsType
public static Predicate<Entity> isMarkedAsType(final Class<? extends Entity> type) { return i -> i.isMarkedAsType(type); }
java
public static Predicate<Entity> isMarkedAsType(final Class<? extends Entity> type) { return i -> i.isMarkedAsType(type); }
[ "public", "static", "Predicate", "<", "Entity", ">", "isMarkedAsType", "(", "final", "Class", "<", "?", "extends", "Entity", ">", "type", ")", "{", "return", "i", "->", "i", ".", "isMarkedAsType", "(", "type", ")", ";", "}" ]
Checks to see if the entity has been tagged with the type. @param type Entity type to check for. @return Predicate of {@code true} if the entity is of the type or {@code false} if it is not.
[ "Checks", "to", "see", "if", "the", "entity", "has", "been", "tagged", "with", "the", "type", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L270-L272
38,903
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.isOrSubtype
public static boolean isOrSubtype(final Class<? extends Entity> descendant, final Class<? extends Entity> ancestor) { return ancestor.isAssignableFrom(descendant); }
java
public static boolean isOrSubtype(final Class<? extends Entity> descendant, final Class<? extends Entity> ancestor) { return ancestor.isAssignableFrom(descendant); }
[ "public", "static", "boolean", "isOrSubtype", "(", "final", "Class", "<", "?", "extends", "Entity", ">", "descendant", ",", "final", "Class", "<", "?", "extends", "Entity", ">", "ancestor", ")", "{", "return", "ancestor", ".", "isAssignableFrom", "(", "desce...
Checks if the specified type is equal to or a descendant from the specified ancestor type. @param descendant Descendant type. @param ancestor Ancestor type. @return Whether the descendant is equal or descended from the ancestor type.
[ "Checks", "if", "the", "specified", "type", "is", "equal", "to", "or", "a", "descendant", "from", "the", "specified", "ancestor", "type", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L283-L286
38,904
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.isSubtype
public static boolean isSubtype(final Class<? extends Entity> descendant, final Class<? extends Entity> ancestor) { return !ancestor.equals(descendant) && ancestor.isAssignableFrom(descendant); }
java
public static boolean isSubtype(final Class<? extends Entity> descendant, final Class<? extends Entity> ancestor) { return !ancestor.equals(descendant) && ancestor.isAssignableFrom(descendant); }
[ "public", "static", "boolean", "isSubtype", "(", "final", "Class", "<", "?", "extends", "Entity", ">", "descendant", ",", "final", "Class", "<", "?", "extends", "Entity", ">", "ancestor", ")", "{", "return", "!", "ancestor", ".", "equals", "(", "descendant...
Checks if the specified type is a descendant from the specified ancestor type. @param descendant Descendant type. @param ancestor Ancestor type. @return Whether the descendant is descended from the ancestor type.
[ "Checks", "if", "the", "specified", "type", "is", "a", "descendant", "from", "the", "specified", "ancestor", "type", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L297-L299
38,905
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.newRecursiveAttributeListener
public static <T> EntityListener newRecursiveAttributeListener(final NamedAttributeType<T> namedType, final Supplier<AttributeListener<T>> supplier) { return newRecursiveAttributeListener(namedType, supplier, Integer.MAX_VALUE); }
java
public static <T> EntityListener newRecursiveAttributeListener(final NamedAttributeType<T> namedType, final Supplier<AttributeListener<T>> supplier) { return newRecursiveAttributeListener(namedType, supplier, Integer.MAX_VALUE); }
[ "public", "static", "<", "T", ">", "EntityListener", "newRecursiveAttributeListener", "(", "final", "NamedAttributeType", "<", "T", ">", "namedType", ",", "final", "Supplier", "<", "AttributeListener", "<", "T", ">", ">", "supplier", ")", "{", "return", "newRecu...
Creates an recursive entity listener for named attribute type and the supplied attribute listener supplier with Integer.MAX_VALUE recursion limit. @param namedType Named attribute type being listened for by supplier's listeners. @param supplier Supplier of the attribute listener to be added to created entities. @retur...
[ "Creates", "an", "recursive", "entity", "listener", "for", "named", "attribute", "type", "and", "the", "supplied", "attribute", "listener", "supplier", "with", "Integer", ".", "MAX_VALUE", "recursion", "limit", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L311-L314
38,906
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.newRecursiveAttributeListener
public static <T> EntityListener newRecursiveAttributeListener(final NamedAttributeType<T> namedType, final Supplier<AttributeListener<T>> supplier, final int depth) { if (depth <= 0) { throw new IllegalArgumentException(); } return new RecursiveAttributeListener<>(namedType, supplier, depth); }
java
public static <T> EntityListener newRecursiveAttributeListener(final NamedAttributeType<T> namedType, final Supplier<AttributeListener<T>> supplier, final int depth) { if (depth <= 0) { throw new IllegalArgumentException(); } return new RecursiveAttributeListener<>(namedType, supplier, depth); }
[ "public", "static", "<", "T", ">", "EntityListener", "newRecursiveAttributeListener", "(", "final", "NamedAttributeType", "<", "T", ">", "namedType", ",", "final", "Supplier", "<", "AttributeListener", "<", "T", ">", ">", "supplier", ",", "final", "int", "depth"...
Creates an recursive entity listener for named attribute type and the supplied attribute listener supplier with specified recursion limit. @param namedType Named attribute type being listened for by supplier's listeners. @param supplier Supplier of the attribute listener to be added to created entities. @param depth T...
[ "Creates", "an", "recursive", "entity", "listener", "for", "named", "attribute", "type", "and", "the", "supplied", "attribute", "listener", "supplier", "with", "specified", "recursion", "limit", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L328-L334
38,907
Ellzord/JALSE
src/main/java/jalse/entities/Entities.java
Entities.newRecursiveEntityListener
public static EntityListener newRecursiveEntityListener(final Supplier<EntityListener> supplier, final int depth) { if (depth <= 0) { throw new IllegalArgumentException(); } return new RecursiveEntityListener(supplier, depth); }
java
public static EntityListener newRecursiveEntityListener(final Supplier<EntityListener> supplier, final int depth) { if (depth <= 0) { throw new IllegalArgumentException(); } return new RecursiveEntityListener(supplier, depth); }
[ "public", "static", "EntityListener", "newRecursiveEntityListener", "(", "final", "Supplier", "<", "EntityListener", ">", "supplier", ",", "final", "int", "depth", ")", "{", "if", "(", "depth", "<=", "0", ")", "{", "throw", "new", "IllegalArgumentException", "("...
Creates a recursive entity listener for the supplied entity listener supplier and specified recursion limit. @param supplier Supplier of the entity listener to be added to created entities. @param depth The recursion limit of the listener. @return Recursive entity listener with specified recursion limit.
[ "Creates", "a", "recursive", "entity", "listener", "for", "the", "supplied", "entity", "listener", "supplier", "and", "specified", "recursion", "limit", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/Entities.java#L358-L363
38,908
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/tracker/ZKStringDataReader.java
ZKStringDataReader.isEqual
@Override public boolean isEqual(String data1, String data2) { return LangUtils.isEqual(data1, data2); }
java
@Override public boolean isEqual(String data1, String data2) { return LangUtils.isEqual(data1, data2); }
[ "@", "Override", "public", "boolean", "isEqual", "(", "String", "data1", ",", "String", "data2", ")", "{", "return", "LangUtils", ".", "isEqual", "(", "data1", ",", "data2", ")", ";", "}" ]
Compare 2 data equality @return <code>true</code> if equal (in the {@link Object#equals(Object)} definition)
[ "Compare", "2", "data", "equality" ]
600b1d01318594ed425ede566bbbdc94b026a53e
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/tracker/ZKStringDataReader.java#L51-L55
38,909
projectodd/stilts
stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java
ServerHandshakeHandler.handleHttpRequest
protected void handleHttpRequest(final ChannelHandlerContext channelContext, final HttpRequest request) throws Exception { if (isWebSocketsUpgradeRequest( request )) { final Handshake handshake = findHandshake( request ); if (handshake != null) { HttpResponse response ...
java
protected void handleHttpRequest(final ChannelHandlerContext channelContext, final HttpRequest request) throws Exception { if (isWebSocketsUpgradeRequest( request )) { final Handshake handshake = findHandshake( request ); if (handshake != null) { HttpResponse response ...
[ "protected", "void", "handleHttpRequest", "(", "final", "ChannelHandlerContext", "channelContext", ",", "final", "HttpRequest", "request", ")", "throws", "Exception", "{", "if", "(", "isWebSocketsUpgradeRequest", "(", "request", ")", ")", "{", "final", "Handshake", ...
Handle initial HTTP portion of the handshake. @param channelContext @param request @throws Exception
[ "Handle", "initial", "HTTP", "portion", "of", "the", "handshake", "." ]
6ba81d4162325b98f591c206520476cf575d0567
https://github.com/projectodd/stilts/blob/6ba81d4162325b98f591c206520476cf575d0567/stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java#L101-L134
38,910
projectodd/stilts
stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java
ServerHandshakeHandler.findHandshake
protected Handshake findHandshake(HttpRequest request) { for (Handshake handshake : this.handshakes) { if (handshake.matches( request )) { return handshake; } } return null; }
java
protected Handshake findHandshake(HttpRequest request) { for (Handshake handshake : this.handshakes) { if (handshake.matches( request )) { return handshake; } } return null; }
[ "protected", "Handshake", "findHandshake", "(", "HttpRequest", "request", ")", "{", "for", "(", "Handshake", "handshake", ":", "this", ".", "handshakes", ")", "{", "if", "(", "handshake", ".", "matches", "(", "request", ")", ")", "{", "return", "handshake", ...
Locate a matching handshake version. @param request The HTTP request. @return The matching handshake, otherwise <code>null</code> if none match.
[ "Locate", "a", "matching", "handshake", "version", "." ]
6ba81d4162325b98f591c206520476cf575d0567
https://github.com/projectodd/stilts/blob/6ba81d4162325b98f591c206520476cf575d0567/stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java#L183-L191
38,911
projectodd/stilts
stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java
ServerHandshakeHandler.reconfigureUpstream
protected void reconfigureUpstream(ChannelPipeline pipeline, Handshake handshake) { pipeline.replace( "http-decoder", "websockets-decoder", handshake.newDecoder() ); ChannelHandler[] additionalHandlers = handshake.newAdditionalHandlers(); String currentTail = "websockets-decoder"; for (C...
java
protected void reconfigureUpstream(ChannelPipeline pipeline, Handshake handshake) { pipeline.replace( "http-decoder", "websockets-decoder", handshake.newDecoder() ); ChannelHandler[] additionalHandlers = handshake.newAdditionalHandlers(); String currentTail = "websockets-decoder"; for (C...
[ "protected", "void", "reconfigureUpstream", "(", "ChannelPipeline", "pipeline", ",", "Handshake", "handshake", ")", "{", "pipeline", ".", "replace", "(", "\"http-decoder\"", ",", "\"websockets-decoder\"", ",", "handshake", ".", "newDecoder", "(", ")", ")", ";", "C...
Remove HTTP handlers, replace with web-socket handlers. @param pipeline The pipeline to reconfigure.
[ "Remove", "HTTP", "handlers", "replace", "with", "web", "-", "socket", "handlers", "." ]
6ba81d4162325b98f591c206520476cf575d0567
https://github.com/projectodd/stilts/blob/6ba81d4162325b98f591c206520476cf575d0567/stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java#L198-L207
38,912
projectodd/stilts
stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java
ServerHandshakeHandler.isWebSocketsUpgradeRequest
protected boolean isWebSocketsUpgradeRequest(HttpRequest request) { String connectionHeader = request.getHeader( Names.CONNECTION ); String upgradeHeader = request.getHeader( Names.UPGRADE ); if (connectionHeader == null || upgradeHeader == null) { return false; } i...
java
protected boolean isWebSocketsUpgradeRequest(HttpRequest request) { String connectionHeader = request.getHeader( Names.CONNECTION ); String upgradeHeader = request.getHeader( Names.UPGRADE ); if (connectionHeader == null || upgradeHeader == null) { return false; } i...
[ "protected", "boolean", "isWebSocketsUpgradeRequest", "(", "HttpRequest", "request", ")", "{", "String", "connectionHeader", "=", "request", ".", "getHeader", "(", "Names", ".", "CONNECTION", ")", ";", "String", "upgradeHeader", "=", "request", ".", "getHeader", "...
Determine if this request represents a web-socket upgrade request. @param request The request to inspect. @return <code>true</code> if this request is indeed a web-socket upgrade request, otherwise <code>false</code>.
[ "Determine", "if", "this", "request", "represents", "a", "web", "-", "socket", "upgrade", "request", "." ]
6ba81d4162325b98f591c206520476cf575d0567
https://github.com/projectodd/stilts/blob/6ba81d4162325b98f591c206520476cf575d0567/stomp-server-core/src/main/java/org/projectodd/stilts/stomp/server/protocol/websockets/ServerHandshakeHandler.java#L225-L240
38,913
Ellzord/JALSE
src/main/java/jalse/entities/DefaultEntity.java
DefaultEntity.addContainerTags
protected void addContainerTags() { // Only add root if we aren't it final RootContainer rc = getRootContainer(container); if (rc != null) { tags.add(rc); } final TreeDepth parentDepth = getTreeDepth(container); tags.add(parentDepth != null ? parentDepth.increment() : TreeDepth.ROOT); }
java
protected void addContainerTags() { // Only add root if we aren't it final RootContainer rc = getRootContainer(container); if (rc != null) { tags.add(rc); } final TreeDepth parentDepth = getTreeDepth(container); tags.add(parentDepth != null ? parentDepth.increment() : TreeDepth.ROOT); }
[ "protected", "void", "addContainerTags", "(", ")", "{", "// Only add root if we aren't it", "final", "RootContainer", "rc", "=", "getRootContainer", "(", "container", ")", ";", "if", "(", "rc", "!=", "null", ")", "{", "tags", ".", "add", "(", "rc", ")", ";",...
Adds tree based tags for when a non-null container is set. @see RootContainer @see TreeDepth
[ "Adds", "tree", "based", "tags", "for", "when", "a", "non", "-", "null", "container", "is", "set", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/DefaultEntity.java#L127-L136
38,914
Ellzord/JALSE
src/main/java/jalse/entities/DefaultEntity.java
DefaultEntity.removeContainerTags
protected void removeContainerTags() { tags.removeOfType(TreeMember.class); tags.removeOfType(RootContainer.class); tags.removeOfType(TreeDepth.class); }
java
protected void removeContainerTags() { tags.removeOfType(TreeMember.class); tags.removeOfType(RootContainer.class); tags.removeOfType(TreeDepth.class); }
[ "protected", "void", "removeContainerTags", "(", ")", "{", "tags", ".", "removeOfType", "(", "TreeMember", ".", "class", ")", ";", "tags", ".", "removeOfType", "(", "RootContainer", ".", "class", ")", ";", "tags", ".", "removeOfType", "(", "TreeDepth", ".", ...
Removes tree based tags for when a null container is set. @see TreeMember @see RootContainer @see TreeDepth
[ "Removes", "tree", "based", "tags", "for", "when", "a", "null", "container", "is", "set", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/DefaultEntity.java#L407-L411
38,915
Ellzord/JALSE
src/main/java/jalse/entities/DefaultEntity.java
DefaultEntity.setContainer
protected void setContainer(final EntityContainer container) { if (!Objects.equals(this.container, container)) { this.container = container; if (!isAlive()) { return; } // Fix container based tags if (container == null) { removeContainerTags(); } else { addContainerTags(); } }...
java
protected void setContainer(final EntityContainer container) { if (!Objects.equals(this.container, container)) { this.container = container; if (!isAlive()) { return; } // Fix container based tags if (container == null) { removeContainerTags(); } else { addContainerTags(); } }...
[ "protected", "void", "setContainer", "(", "final", "EntityContainer", "container", ")", "{", "if", "(", "!", "Objects", ".", "equals", "(", "this", ".", "container", ",", "container", ")", ")", "{", "this", ".", "container", "=", "container", ";", "if", ...
Sets the parent container for the entity. @param container New parent container (can be null);
[ "Sets", "the", "parent", "container", "for", "the", "entity", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/DefaultEntity.java#L463-L476
38,916
Ellzord/JALSE
src/main/java/jalse/entities/DefaultEntityProxyFactory.java
DefaultEntityProxyFactory.uncacheProxyOfEntity
public void uncacheProxyOfEntity(final Entity e, final Class<? extends Entity> type) { cache.invalidateType(e, type); }
java
public void uncacheProxyOfEntity(final Entity e, final Class<? extends Entity> type) { cache.invalidateType(e, type); }
[ "public", "void", "uncacheProxyOfEntity", "(", "final", "Entity", "e", ",", "final", "Class", "<", "?", "extends", "Entity", ">", "type", ")", "{", "cache", ".", "invalidateType", "(", "e", ",", "type", ")", ";", "}" ]
Uncaches the specific type proxy for an entity. @param e Entity to uncache for. @param type Proxy type.
[ "Uncaches", "the", "specific", "type", "proxy", "for", "an", "entity", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/DefaultEntityProxyFactory.java#L277-L279
38,917
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/tracker/ZooKeeperTreeTracker.java
ZooKeeperTreeTracker.trackNode
private Map<String, TrackedNode<T>> trackNode(String path, Map<String, TrackedNode<T>> tree, Collection<NodeEvent<T>> events, int depth) throws InterruptedException, Keeper...
java
private Map<String, TrackedNode<T>> trackNode(String path, Map<String, TrackedNode<T>> tree, Collection<NodeEvent<T>> events, int depth) throws InterruptedException, Keeper...
[ "private", "Map", "<", "String", ",", "TrackedNode", "<", "T", ">", ">", "trackNode", "(", "String", "path", ",", "Map", "<", "String", ",", "TrackedNode", "<", "T", ">", ">", "tree", ",", "Collection", "<", "NodeEvent", "<", "T", ">", ">", "events",...
Must be called from a synchronized section
[ "Must", "be", "called", "from", "a", "synchronized", "section" ]
600b1d01318594ed425ede566bbbdc94b026a53e
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/tracker/ZooKeeperTreeTracker.java#L262-L341
38,918
Ellzord/JALSE
src/main/java/jalse/attributes/Attributes.java
Attributes.newNamedTypeOf
public static <T> NamedAttributeType<T> newNamedTypeOf(final String name, final Class<T> type) { return new NamedAttributeType<>(name, newTypeOf(type)); }
java
public static <T> NamedAttributeType<T> newNamedTypeOf(final String name, final Class<T> type) { return new NamedAttributeType<>(name, newTypeOf(type)); }
[ "public", "static", "<", "T", ">", "NamedAttributeType", "<", "T", ">", "newNamedTypeOf", "(", "final", "String", "name", ",", "final", "Class", "<", "T", ">", "type", ")", "{", "return", "new", "NamedAttributeType", "<>", "(", "name", ",", "newTypeOf", ...
Creates a new named type of the supplied simple type. @param name Name of the attribute type. @param type Simple type. @return New named attribute type. @see #newTypeOf(Class)
[ "Creates", "a", "new", "named", "type", "of", "the", "supplied", "simple", "type", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/attributes/Attributes.java#L219-L221
38,919
Ellzord/JALSE
src/main/java/jalse/attributes/Attributes.java
Attributes.newNamedUnknownType
public static NamedAttributeType<Object> newNamedUnknownType(final String name, final Type type) { return new NamedAttributeType<>(name, new AttributeType<Object>(type) {}); }
java
public static NamedAttributeType<Object> newNamedUnknownType(final String name, final Type type) { return new NamedAttributeType<>(name, new AttributeType<Object>(type) {}); }
[ "public", "static", "NamedAttributeType", "<", "Object", ">", "newNamedUnknownType", "(", "final", "String", "name", ",", "final", "Type", "type", ")", "{", "return", "new", "NamedAttributeType", "<>", "(", "name", ",", "new", "AttributeType", "<", "Object", "...
Creates a new named unknown type. @param name Attribute type name. @param type Unknown type. @return New named unknown type.
[ "Creates", "a", "new", "named", "unknown", "type", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/attributes/Attributes.java#L232-L234
38,920
Ellzord/JALSE
src/main/java/jalse/attributes/Attributes.java
Attributes.newTypeOf
public static <T> AttributeType<T> newTypeOf(final Class<T> type) { return new AttributeType<T>(type) {}; }
java
public static <T> AttributeType<T> newTypeOf(final Class<T> type) { return new AttributeType<T>(type) {}; }
[ "public", "static", "<", "T", ">", "AttributeType", "<", "T", ">", "newTypeOf", "(", "final", "Class", "<", "T", ">", "type", ")", "{", "return", "new", "AttributeType", "<", "T", ">", "(", "type", ")", "{", "}", ";", "}" ]
Creates a new attribute type of the supplied simple type. @param type Simple type. @return Newly created simple type. @see AttributeType
[ "Creates", "a", "new", "attribute", "type", "of", "the", "supplied", "simple", "type", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/attributes/Attributes.java#L245-L247
38,921
Ellzord/JALSE
src/main/java/jalse/attributes/Attributes.java
Attributes.requireNotEmpty
public static String requireNotEmpty(final String str) throws NullPointerException, IllegalArgumentException { if (str.length() == 0) { throw new IllegalArgumentException(); } return str; }
java
public static String requireNotEmpty(final String str) throws NullPointerException, IllegalArgumentException { if (str.length() == 0) { throw new IllegalArgumentException(); } return str; }
[ "public", "static", "String", "requireNotEmpty", "(", "final", "String", "str", ")", "throws", "NullPointerException", ",", "IllegalArgumentException", "{", "if", "(", "str", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "IllegalArgumentException...
Ensures the String is not null or empty. @param str String to check. @return The string. @throws IllegalArgumentException If the string was null or empty.
[ "Ensures", "the", "String", "is", "not", "null", "or", "empty", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/attributes/Attributes.java#L270-L275
38,922
Ellzord/JALSE
src/main/java/jalse/actions/ManualWorkQueue.java
ManualWorkQueue.addWaitingWork
public boolean addWaitingWork(final T context) { write.lock(); try { boolean result = !waitingWork.contains(context); if (result) { waitingWork.add(context); workChanged.signalAll(); // Wake up! } return result; } finally { write.unlock(); } }
java
public boolean addWaitingWork(final T context) { write.lock(); try { boolean result = !waitingWork.contains(context); if (result) { waitingWork.add(context); workChanged.signalAll(); // Wake up! } return result; } finally { write.unlock(); } }
[ "public", "boolean", "addWaitingWork", "(", "final", "T", "context", ")", "{", "write", ".", "lock", "(", ")", ";", "try", "{", "boolean", "result", "=", "!", "waitingWork", ".", "contains", "(", "context", ")", ";", "if", "(", "result", ")", "{", "w...
Adds work to the queue. @param context Work to add. @return Whether the work was not previously within the queue.
[ "Adds", "work", "to", "the", "queue", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/actions/ManualWorkQueue.java#L50-L62
38,923
Ellzord/JALSE
src/main/java/jalse/actions/ManualWorkQueue.java
ManualWorkQueue.isWaitingWork
public boolean isWaitingWork(final T context) { read.lock(); try { return waitingWork.contains(context); } finally { read.unlock(); } }
java
public boolean isWaitingWork(final T context) { read.lock(); try { return waitingWork.contains(context); } finally { read.unlock(); } }
[ "public", "boolean", "isWaitingWork", "(", "final", "T", "context", ")", "{", "read", ".", "lock", "(", ")", ";", "try", "{", "return", "waitingWork", ".", "contains", "(", "context", ")", ";", "}", "finally", "{", "read", ".", "unlock", "(", ")", ";...
Whether the work is contained in the queue. @param context Work to check. @return Whether the work was already waiting.
[ "Whether", "the", "work", "is", "contained", "in", "the", "queue", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/actions/ManualWorkQueue.java#L111-L118
38,924
Ellzord/JALSE
src/main/java/jalse/actions/ManualWorkQueue.java
ManualWorkQueue.removeWaitingWork
public boolean removeWaitingWork(final T context) { write.lock(); try { boolean result = waitingWork.remove(context); if (result) { workChanged.signalAll(); } return result; } finally { write.unlock(); } }
java
public boolean removeWaitingWork(final T context) { write.lock(); try { boolean result = waitingWork.remove(context); if (result) { workChanged.signalAll(); } return result; } finally { write.unlock(); } }
[ "public", "boolean", "removeWaitingWork", "(", "final", "T", "context", ")", "{", "write", ".", "lock", "(", ")", ";", "try", "{", "boolean", "result", "=", "waitingWork", ".", "remove", "(", "context", ")", ";", "if", "(", "result", ")", "{", "workCha...
Removes work from the queue. @param context Work to remove. @return Whether the work was already in the queue.
[ "Removes", "work", "from", "the", "queue", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/actions/ManualWorkQueue.java#L177-L188
38,925
Ellzord/JALSE
src/main/java/jalse/entities/functions/EntityFunctionResolver.java
EntityFunctionResolver.unresolveType
public boolean unresolveType(final Class<? extends Entity> type) { return resolved.remove(Objects.requireNonNull(type)) != null; }
java
public boolean unresolveType(final Class<? extends Entity> type) { return resolved.remove(Objects.requireNonNull(type)) != null; }
[ "public", "boolean", "unresolveType", "(", "final", "Class", "<", "?", "extends", "Entity", ">", "type", ")", "{", "return", "resolved", ".", "remove", "(", "Objects", ".", "requireNonNull", "(", "type", ")", ")", "!=", "null", ";", "}" ]
Uncaches a resolved type. @param type Type to uncache. @return Whether the type was present in the resolver.
[ "Uncaches", "a", "resolved", "type", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/entities/functions/EntityFunctionResolver.java#L224-L226
38,926
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java
AbstractZKClient.exists
@Override public Stat exists(String path) throws InterruptedException, KeeperException { return exists(path, false); }
java
@Override public Stat exists(String path) throws InterruptedException, KeeperException { return exists(path, false); }
[ "@", "Override", "public", "Stat", "exists", "(", "String", "path", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "return", "exists", "(", "path", ",", "false", ")", ";", "}" ]
ZooKeeper convenient calls
[ "ZooKeeper", "convenient", "calls" ]
600b1d01318594ed425ede566bbbdc94b026a53e
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java#L51-L55
38,927
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java
AbstractZKClient.getZKStringData
@Override public ZKData<String> getZKStringData(String path) throws InterruptedException, KeeperException { return getZKStringData(path, null); }
java
@Override public ZKData<String> getZKStringData(String path) throws InterruptedException, KeeperException { return getZKStringData(path, null); }
[ "@", "Override", "public", "ZKData", "<", "String", ">", "getZKStringData", "(", "String", "path", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "return", "getZKStringData", "(", "path", ",", "null", ")", ";", "}" ]
Returns both the data as a string as well as the stat
[ "Returns", "both", "the", "data", "as", "a", "string", "as", "well", "as", "the", "stat" ]
600b1d01318594ed425ede566bbbdc94b026a53e
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java#L176-L180
38,928
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java
AbstractZKClient.createOrSetWithParents
@Override public Stat createOrSetWithParents(String path, String data, List<ACL> acl, CreateMode createMode) throws InterruptedException, KeeperException { if(exists(path) != null) return setData(path, data); try { createWithParents(path, data, acl, createMode); return null; ...
java
@Override public Stat createOrSetWithParents(String path, String data, List<ACL> acl, CreateMode createMode) throws InterruptedException, KeeperException { if(exists(path) != null) return setData(path, data); try { createWithParents(path, data, acl, createMode); return null; ...
[ "@", "Override", "public", "Stat", "createOrSetWithParents", "(", "String", "path", ",", "String", "data", ",", "List", "<", "ACL", ">", "acl", ",", "CreateMode", "createMode", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "if", "(", "exi...
Tries to create first and if the node exists, then does a setData. @return <code>null</code> if create worked, otherwise the result of setData
[ "Tries", "to", "create", "first", "and", "if", "the", "node", "exists", "then", "does", "a", "setData", "." ]
600b1d01318594ed425ede566bbbdc94b026a53e
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java#L233-L251
38,929
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java
AbstractZKClient.deleteWithChildren
@Override public void deleteWithChildren(String path) throws InterruptedException, KeeperException { List<String> allChildren = findAllChildren(path); for(String child : allChildren) { delete(PathUtils.addPaths(path, child)); } delete(path); }
java
@Override public void deleteWithChildren(String path) throws InterruptedException, KeeperException { List<String> allChildren = findAllChildren(path); for(String child : allChildren) { delete(PathUtils.addPaths(path, child)); } delete(path); }
[ "@", "Override", "public", "void", "deleteWithChildren", "(", "String", "path", ")", "throws", "InterruptedException", ",", "KeeperException", "{", "List", "<", "String", ">", "allChildren", "=", "findAllChildren", "(", "path", ")", ";", "for", "(", "String", ...
delete all the children if they exist
[ "delete", "all", "the", "children", "if", "they", "exist" ]
600b1d01318594ed425ede566bbbdc94b026a53e
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/client/AbstractZKClient.java#L262-L273
38,930
linkedin/linkedin-zookeeper
org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/server/StandaloneZooKeeperServer.java
StandaloneZooKeeperServer.waitForShutdown
@Override public void waitForShutdown(Object timeout) throws InterruptedException, IllegalStateException, TimeoutException { if(!_shutdown) throw new IllegalStateException("call shutdown first"); ConcurrentUtils.joinFor(clock, _mainThread, timeout); }
java
@Override public void waitForShutdown(Object timeout) throws InterruptedException, IllegalStateException, TimeoutException { if(!_shutdown) throw new IllegalStateException("call shutdown first"); ConcurrentUtils.joinFor(clock, _mainThread, timeout); }
[ "@", "Override", "public", "void", "waitForShutdown", "(", "Object", "timeout", ")", "throws", "InterruptedException", ",", "IllegalStateException", ",", "TimeoutException", "{", "if", "(", "!", "_shutdown", ")", "throw", "new", "IllegalStateException", "(", "\"call...
Waits for shutdown to be completed. After calling shutdown, there may still be some pending work that needs to be accomplised. This method will block until it is done but no longer than the timeout. @param timeout how long to wait maximum for the shutdown (see {@link ClockUtils#toTimespan(Object)}) @throws Interrupted...
[ "Waits", "for", "shutdown", "to", "be", "completed", ".", "After", "calling", "shutdown", "there", "may", "still", "be", "some", "pending", "work", "that", "needs", "to", "be", "accomplised", ".", "This", "method", "will", "block", "until", "it", "is", "do...
600b1d01318594ed425ede566bbbdc94b026a53e
https://github.com/linkedin/linkedin-zookeeper/blob/600b1d01318594ed425ede566bbbdc94b026a53e/org.linkedin.zookeeper-impl/src/main/java/org/linkedin/zookeeper/server/StandaloneZooKeeperServer.java#L219-L227
38,931
Ellzord/JALSE
src/main/java/jalse/actions/ForkJoinActionEngine.java
ForkJoinActionEngine.addWork
protected boolean addWork(final ForkJoinContext<?> context) { requireNotStopped(this); final boolean result = workQueue.addWaitingWork(context); if (result) { addWorkerIfNeeded(); } return result; }
java
protected boolean addWork(final ForkJoinContext<?> context) { requireNotStopped(this); final boolean result = workQueue.addWaitingWork(context); if (result) { addWorkerIfNeeded(); } return result; }
[ "protected", "boolean", "addWork", "(", "final", "ForkJoinContext", "<", "?", ">", "context", ")", "{", "requireNotStopped", "(", "this", ")", ";", "final", "boolean", "result", "=", "workQueue", ".", "addWaitingWork", "(", "context", ")", ";", "if", "(", ...
Adds work to the engine. @param context Work to add. @return Whether the work was not already in the queue. @see Actions#requireNotStopped(ActionEngine)
[ "Adds", "work", "to", "the", "engine", "." ]
43fc6572de9b16eb8474aa21a88b6b2d11291615
https://github.com/Ellzord/JALSE/blob/43fc6572de9b16eb8474aa21a88b6b2d11291615/src/main/java/jalse/actions/ForkJoinActionEngine.java#L167-L176
38,932
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java
JFreeChartRender.setDomainAxis
public JFreeChartRender setDomainAxis(double lowerBound, double upperBound) { ValueAxis valueAxis = getPlot().getDomainAxis(); valueAxis.setUpperBound(upperBound); valueAxis.setLowerBound(lowerBound); return this; }
java
public JFreeChartRender setDomainAxis(double lowerBound, double upperBound) { ValueAxis valueAxis = getPlot().getDomainAxis(); valueAxis.setUpperBound(upperBound); valueAxis.setLowerBound(lowerBound); return this; }
[ "public", "JFreeChartRender", "setDomainAxis", "(", "double", "lowerBound", ",", "double", "upperBound", ")", "{", "ValueAxis", "valueAxis", "=", "getPlot", "(", ")", ".", "getDomainAxis", "(", ")", ";", "valueAxis", ".", "setUpperBound", "(", "upperBound", ")",...
Sets bounds for domain axis. @param lowerBound lower domain bound @param upperBound upper domain bound @return itself (fluent interface)
[ "Sets", "bounds", "for", "domain", "axis", "." ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java#L259-L264
38,933
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java
JFreeChartRender.setRangeAxis
public JFreeChartRender setRangeAxis(double lowerBound, double upperBound) { ValueAxis valueAxis = getPlot().getRangeAxis(); valueAxis.setUpperBound(upperBound); valueAxis.setLowerBound(lowerBound); return this; }
java
public JFreeChartRender setRangeAxis(double lowerBound, double upperBound) { ValueAxis valueAxis = getPlot().getRangeAxis(); valueAxis.setUpperBound(upperBound); valueAxis.setLowerBound(lowerBound); return this; }
[ "public", "JFreeChartRender", "setRangeAxis", "(", "double", "lowerBound", ",", "double", "upperBound", ")", "{", "ValueAxis", "valueAxis", "=", "getPlot", "(", ")", ".", "getRangeAxis", "(", ")", ";", "valueAxis", ".", "setUpperBound", "(", "upperBound", ")", ...
Sets bounds for range axis. @param lowerBound lower range bound @param upperBound upper range bound @return itself (fluent interface)
[ "Sets", "bounds", "for", "range", "axis", "." ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java#L273-L278
38,934
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java
JFreeChartRender.setStyle
public JFreeChartRender setStyle(int style) { switch (style) { case JFreeChartRender.STYLE_THESIS: return this.setBaseShapesVisible(true). setBaseShapesFilled(false). setBaseLinesVisible(false). setLegendItemFont...
java
public JFreeChartRender setStyle(int style) { switch (style) { case JFreeChartRender.STYLE_THESIS: return this.setBaseShapesVisible(true). setBaseShapesFilled(false). setBaseLinesVisible(false). setLegendItemFont...
[ "public", "JFreeChartRender", "setStyle", "(", "int", "style", ")", "{", "switch", "(", "style", ")", "{", "case", "JFreeChartRender", ".", "STYLE_THESIS", ":", "return", "this", ".", "setBaseShapesVisible", "(", "true", ")", ".", "setBaseShapesFilled", "(", "...
Applies prepared style to a chart. Recognizes {@link JFreeChartRender#STYLE_THESIS} and {@link JFreeChartRender#STYLE_THESIS_LEGEND}. @param style code of style @return updated chart
[ "Applies", "prepared", "style", "to", "a", "chart", "." ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/result/render/JFreeChartRender.java#L288-L310
38,935
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/internal/BatchWorker.java
BatchWorker.enqueue
@NotNull protected CompletableFuture<R> enqueue(@NotNull final Meta meta, @NotNull final T context) { State<T, R> state = objectQueue.get(meta.getOid()); if (state != null) { if (state.future.isCancelled()) { objectQueue.remove(meta.getOid(), state); state = null; } } if (s...
java
@NotNull protected CompletableFuture<R> enqueue(@NotNull final Meta meta, @NotNull final T context) { State<T, R> state = objectQueue.get(meta.getOid()); if (state != null) { if (state.future.isCancelled()) { objectQueue.remove(meta.getOid(), state); state = null; } } if (s...
[ "@", "NotNull", "protected", "CompletableFuture", "<", "R", ">", "enqueue", "(", "@", "NotNull", "final", "Meta", "meta", ",", "@", "NotNull", "final", "T", "context", ")", "{", "State", "<", "T", ",", "R", ">", "state", "=", "objectQueue", ".", "get",...
This method start send object metadata to server. @param context Object worker context. @param meta Object metadata. @return Return future with result. For same objects can return same future.
[ "This", "method", "start", "send", "object", "metadata", "to", "server", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/internal/BatchWorker.java#L73-L91
38,936
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.postBatch
@NotNull public BatchRes postBatch(@NotNull final BatchReq batchReq) throws IOException { return doWork(auth -> doRequest(auth, new JsonPost<>(batchReq, BatchRes.class), AuthHelper.join(auth.getHref(), PATH_BATCH)), batchReq.getOperation()); }
java
@NotNull public BatchRes postBatch(@NotNull final BatchReq batchReq) throws IOException { return doWork(auth -> doRequest(auth, new JsonPost<>(batchReq, BatchRes.class), AuthHelper.join(auth.getHref(), PATH_BATCH)), batchReq.getOperation()); }
[ "@", "NotNull", "public", "BatchRes", "postBatch", "(", "@", "NotNull", "final", "BatchReq", "batchReq", ")", "throws", "IOException", "{", "return", "doWork", "(", "auth", "->", "doRequest", "(", "auth", ",", "new", "JsonPost", "<>", "(", "batchReq", ",", ...
Send batch request to the LFS-server. @param batchReq Batch request. @return Object metadata. @throws IOException
[ "Send", "batch", "request", "to", "the", "LFS", "-", "server", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L116-L119
38,937
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.getObject
@NotNull public <T> T getObject(@NotNull final String hash, @NotNull final StreamHandler<T> handler) throws IOException { return doWork(auth -> { final ObjectRes links = doRequest(auth, new MetaGet(), AuthHelper.join(auth.getHref(), PATH_OBJECTS + "/" + hash)); if (links == null) { throw new F...
java
@NotNull public <T> T getObject(@NotNull final String hash, @NotNull final StreamHandler<T> handler) throws IOException { return doWork(auth -> { final ObjectRes links = doRequest(auth, new MetaGet(), AuthHelper.join(auth.getHref(), PATH_OBJECTS + "/" + hash)); if (links == null) { throw new F...
[ "@", "NotNull", "public", "<", "T", ">", "T", "getObject", "(", "@", "NotNull", "final", "String", "hash", ",", "@", "NotNull", "final", "StreamHandler", "<", "T", ">", "handler", ")", "throws", "IOException", "{", "return", "doWork", "(", "auth", "->", ...
Download object by hash. @param hash Object hash. @param handler Stream handler. @return Stream handler result. @throws FileNotFoundException File not found exception if object don't exists on LFS server. @throws IOException On some errors.
[ "Download", "object", "by", "hash", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L130-L139
38,938
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.getObject
@NotNull public <T> T getObject(@Nullable final Meta meta, @NotNull final Links links, @NotNull final StreamHandler<T> handler) throws IOException { final Link link = links.getLinks().get(LinkType.Download); if (link == null) { throw new FileNotFoundException(); } return doRequest(link, new Obje...
java
@NotNull public <T> T getObject(@Nullable final Meta meta, @NotNull final Links links, @NotNull final StreamHandler<T> handler) throws IOException { final Link link = links.getLinks().get(LinkType.Download); if (link == null) { throw new FileNotFoundException(); } return doRequest(link, new Obje...
[ "@", "NotNull", "public", "<", "T", ">", "T", "getObject", "(", "@", "Nullable", "final", "Meta", "meta", ",", "@", "NotNull", "final", "Links", "links", ",", "@", "NotNull", "final", "StreamHandler", "<", "T", ">", "handler", ")", "throws", "IOException...
Download object by metadata. @param meta Object metadata for stream validation. @param links Object links. @param handler Stream handler. @return Stream handler result. @throws FileNotFoundException File not found exception if object don't exists on LFS server. @throws IOException On some errors.
[ "Download", "object", "by", "metadata", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L151-L158
38,939
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.generateMeta
public static Meta generateMeta(@NotNull final StreamProvider streamProvider) throws IOException { final MessageDigest digest = sha256(); final byte[] buffer = new byte[0x10000]; long size = 0; try (InputStream stream = streamProvider.getStream()) { while (true) { int read = stream.read(bu...
java
public static Meta generateMeta(@NotNull final StreamProvider streamProvider) throws IOException { final MessageDigest digest = sha256(); final byte[] buffer = new byte[0x10000]; long size = 0; try (InputStream stream = streamProvider.getStream()) { while (true) { int read = stream.read(bu...
[ "public", "static", "Meta", "generateMeta", "(", "@", "NotNull", "final", "StreamProvider", "streamProvider", ")", "throws", "IOException", "{", "final", "MessageDigest", "digest", "=", "sha256", "(", ")", ";", "final", "byte", "[", "]", "buffer", "=", "new", ...
Generate object metadata. @param streamProvider Object stream provider. @return Return object metadata. @throws IOException On some errors.
[ "Generate", "object", "metadata", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L178-L191
38,940
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java
Client.putObject
public boolean putObject(@NotNull final StreamProvider streamProvider, @NotNull final Meta meta, @NotNull final Links links) throws IOException { if (links.getLinks().containsKey(LinkType.Download)) { return false; } final Link uploadLink = links.getLinks().get(LinkType.Upload); if (uploadLink == ...
java
public boolean putObject(@NotNull final StreamProvider streamProvider, @NotNull final Meta meta, @NotNull final Links links) throws IOException { if (links.getLinks().containsKey(LinkType.Download)) { return false; } final Link uploadLink = links.getLinks().get(LinkType.Upload); if (uploadLink == ...
[ "public", "boolean", "putObject", "(", "@", "NotNull", "final", "StreamProvider", "streamProvider", ",", "@", "NotNull", "final", "Meta", "meta", ",", "@", "NotNull", "final", "Links", "links", ")", "throws", "IOException", "{", "if", "(", "links", ".", "get...
Upload object by metadata. @param links Object links. @param streamProvider Object stream provider. @param meta Object metadata. @return Return true is object is uploaded successfully and false if object is already uploaded. @throws IOException On some errors.
[ "Upload", "object", "by", "metadata", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/Client.java#L230-L245
38,941
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/problem/knapsack/Knapsack.java
Knapsack.getPrice
public long getPrice(Configuration configuration) { long total = 0; for (KnapsackItem knapsackItem : getKnapsackItems()) { if (configuration.valueAt(knapsackItem.getIndex()) == 1) { total += knapsackItem.getPrice(); } } return total; }
java
public long getPrice(Configuration configuration) { long total = 0; for (KnapsackItem knapsackItem : getKnapsackItems()) { if (configuration.valueAt(knapsackItem.getIndex()) == 1) { total += knapsackItem.getPrice(); } } return total; }
[ "public", "long", "getPrice", "(", "Configuration", "configuration", ")", "{", "long", "total", "=", "0", ";", "for", "(", "KnapsackItem", "knapsackItem", ":", "getKnapsackItems", "(", ")", ")", "{", "if", "(", "configuration", ".", "valueAt", "(", "knapsack...
Returns price of items in given configuration. Does not check for capacity. @param configuration configuration to calculate price of @return price of configuration
[ "Returns", "price", "of", "items", "in", "given", "configuration", "." ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/problem/knapsack/Knapsack.java#L197-L205
38,942
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/problem/tsp/City.java
City.addDistance
public City addDistance(City city, Integer distance) { this.distances.put(city, distance); return this; }
java
public City addDistance(City city, Integer distance) { this.distances.put(city, distance); return this; }
[ "public", "City", "addDistance", "(", "City", "city", ",", "Integer", "distance", ")", "{", "this", ".", "distances", ".", "put", "(", "city", ",", "distance", ")", ";", "return", "this", ";", "}" ]
Adds new distance to city. @param city target city @param distance distance to city @return self, fluent interface
[ "Adds", "new", "distance", "to", "city", "." ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/problem/tsp/City.java#L67-L70
38,943
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/problem/jobshop/JobShopIterator.java
JobShopIterator.counterToOperation
protected MoveOperation counterToOperation(int counter) { int jobIndex = counter / (this.problem.machines - 1); int machineIndex = counter % (this.problem.machines - 1); if (machineIndex >= this.configuration.valueAt(jobIndex)) machineIndex++; return this.problem.moveOperatio...
java
protected MoveOperation counterToOperation(int counter) { int jobIndex = counter / (this.problem.machines - 1); int machineIndex = counter % (this.problem.machines - 1); if (machineIndex >= this.configuration.valueAt(jobIndex)) machineIndex++; return this.problem.moveOperatio...
[ "protected", "MoveOperation", "counterToOperation", "(", "int", "counter", ")", "{", "int", "jobIndex", "=", "counter", "/", "(", "this", ".", "problem", ".", "machines", "-", "1", ")", ";", "int", "machineIndex", "=", "counter", "%", "(", "this", ".", "...
Returns operation for given counter. @param counter counter to return operation for @return operation for this counter
[ "Returns", "operation", "for", "given", "counter", "." ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/problem/jobshop/JobShopIterator.java#L53-L59
38,944
cvut/JCOP
src/main/java/cz/cvut/felk/cig/jcop/problem/tspfast/TSPPaths.java
TSPPaths.randomPathFast
public static void randomPathFast(int[] result, int size) { //Random generator = new Random(); for (int i = 0; i < size; i++) result[i] = i; for (int k = size - 1; k > 0; k--) { int w = (int)Math.floor(Math.random() * (k+1)); int temp = result[w]; result[w] =...
java
public static void randomPathFast(int[] result, int size) { //Random generator = new Random(); for (int i = 0; i < size; i++) result[i] = i; for (int k = size - 1; k > 0; k--) { int w = (int)Math.floor(Math.random() * (k+1)); int temp = result[w]; result[w] =...
[ "public", "static", "void", "randomPathFast", "(", "int", "[", "]", "result", ",", "int", "size", ")", "{", "//Random generator = new Random();", "for", "(", "int", "i", "=", "0", ";", "i", "<", "size", ";", "i", "++", ")", "result", "[", "i", "]", "...
generates random permutation of cities
[ "generates", "random", "permutation", "of", "cities" ]
2ec18315a9a452e5f4e3d07cccfde0310adc465a
https://github.com/cvut/JCOP/blob/2ec18315a9a452e5f4e3d07cccfde0310adc465a/src/main/java/cz/cvut/felk/cig/jcop/problem/tspfast/TSPPaths.java#L13-L23
38,945
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/BatchUploader.java
BatchUploader.upload
@NotNull public CompletableFuture<Meta> upload(@NotNull final StreamProvider streamProvider) { final CompletableFuture<Meta> future = new CompletableFuture<>(); getPool().submit(() -> { try { future.complete(Client.generateMeta(streamProvider)); } catch (Throwable e) { future.compl...
java
@NotNull public CompletableFuture<Meta> upload(@NotNull final StreamProvider streamProvider) { final CompletableFuture<Meta> future = new CompletableFuture<>(); getPool().submit(() -> { try { future.complete(Client.generateMeta(streamProvider)); } catch (Throwable e) { future.compl...
[ "@", "NotNull", "public", "CompletableFuture", "<", "Meta", ">", "upload", "(", "@", "NotNull", "final", "StreamProvider", "streamProvider", ")", "{", "final", "CompletableFuture", "<", "Meta", ">", "future", "=", "new", "CompletableFuture", "<>", "(", ")", ";...
This method computes stream metadata and upload object. @param streamProvider Stream provider. @return Return future with upload result.
[ "This", "method", "computes", "stream", "metadata", "and", "upload", "object", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/BatchUploader.java#L36-L47
38,946
bozaro/git-lfs-java
gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/BatchUploader.java
BatchUploader.upload
@NotNull public CompletableFuture<Meta> upload(@NotNull final Meta meta, @NotNull final StreamProvider streamProvider) { return enqueue(meta, streamProvider); }
java
@NotNull public CompletableFuture<Meta> upload(@NotNull final Meta meta, @NotNull final StreamProvider streamProvider) { return enqueue(meta, streamProvider); }
[ "@", "NotNull", "public", "CompletableFuture", "<", "Meta", ">", "upload", "(", "@", "NotNull", "final", "Meta", "meta", ",", "@", "NotNull", "final", "StreamProvider", "streamProvider", ")", "{", "return", "enqueue", "(", "meta", ",", "streamProvider", ")", ...
This method start uploading object to server. @param meta Object metadata. @param streamProvider Stream provider. @return Return future with upload result. For same objects can return same future.
[ "This", "method", "start", "uploading", "object", "to", "server", "." ]
ee05bf0472ee61bf362cf93d283e5ee5d44ef685
https://github.com/bozaro/git-lfs-java/blob/ee05bf0472ee61bf362cf93d283e5ee5d44ef685/gitlfs-client/src/main/java/ru/bozaro/gitlfs/client/BatchUploader.java#L56-L59
38,947
orientechnologies/orientdb-etl
src/main/java/com/orientechnologies/orient/etl/OETLProcessor.java
OETLProcessor.parse
public OETLProcessor parse(final Collection<ODocument> iBeginBlocks, final ODocument iSource, final ODocument iExtractor, final Collection<ODocument> iTransformers, final ODocument iLoader, final Collection<ODocument> iEndBlocks, final OCommandContext iContext) { if (iExtractor == null) throw new ...
java
public OETLProcessor parse(final Collection<ODocument> iBeginBlocks, final ODocument iSource, final ODocument iExtractor, final Collection<ODocument> iTransformers, final ODocument iLoader, final Collection<ODocument> iEndBlocks, final OCommandContext iContext) { if (iExtractor == null) throw new ...
[ "public", "OETLProcessor", "parse", "(", "final", "Collection", "<", "ODocument", ">", "iBeginBlocks", ",", "final", "ODocument", "iSource", ",", "final", "ODocument", "iExtractor", ",", "final", "Collection", "<", "ODocument", ">", "iTransformers", ",", "final", ...
Creates an ETL processor by setting the configuration of each component. @param iBeginBlocks List of Block configurations to execute at the beginning of processing @param iSource Source component configuration @param iExtractor Extractor component configuration @param iTransformers List of Transformer configurations @...
[ "Creates", "an", "ETL", "processor", "by", "setting", "the", "configuration", "of", "each", "component", "." ]
ce082edb0e7e1b804e8aaf24298aeaef4fb9fdd4
https://github.com/orientechnologies/orientdb-etl/blob/ce082edb0e7e1b804e8aaf24298aeaef4fb9fdd4/src/main/java/com/orientechnologies/orient/etl/OETLProcessor.java#L183-L252
38,948
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.fill
protected boolean fill(final Context2D context, final Attributes attr, double alpha) { final boolean filled = attr.hasFill(); if ((filled) || (attr.isFillShapeForSelection())) { alpha = alpha * attr.getFillAlpha(); if (alpha <= 0) { retur...
java
protected boolean fill(final Context2D context, final Attributes attr, double alpha) { final boolean filled = attr.hasFill(); if ((filled) || (attr.isFillShapeForSelection())) { alpha = alpha * attr.getFillAlpha(); if (alpha <= 0) { retur...
[ "protected", "boolean", "fill", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "double", "alpha", ")", "{", "final", "boolean", "filled", "=", "attr", ".", "hasFill", "(", ")", ";", "if", "(", "(", "filled", ")", "||", "...
Fills the Shape using the passed attributes. This method will silently also fill the Shape to its unique rgb color if the context is a buffer. @param context @param attr
[ "Fills", "the", "Shape", "using", "the", "passed", "attributes", ".", "This", "method", "will", "silently", "also", "fill", "the", "Shape", "to", "its", "unique", "rgb", "color", "if", "the", "context", "is", "a", "buffer", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L286-L380
38,949
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.setStrokeParams
protected boolean setStrokeParams(final Context2D context, final Attributes attr, double alpha, final boolean filled) { double width = attr.getStrokeWidth(); String color = attr.getStrokeColor(); if (null == color) { if (width > 0) { color = ...
java
protected boolean setStrokeParams(final Context2D context, final Attributes attr, double alpha, final boolean filled) { double width = attr.getStrokeWidth(); String color = attr.getStrokeColor(); if (null == color) { if (width > 0) { color = ...
[ "protected", "boolean", "setStrokeParams", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "double", "alpha", ",", "final", "boolean", "filled", ")", "{", "double", "width", "=", "attr", ".", "getStrokeWidth", "(", ")", ";", "S...
Sets the Shape Stroke parameters. @param context @param attr @return boolean
[ "Sets", "the", "Shape", "Stroke", "parameters", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L525-L622
38,950
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.doApplyShadow
protected final void doApplyShadow(final Context2D context, final Attributes attr) { if ((false == isAppliedShadow()) && (attr.hasShadow())) { setAppliedShadow(true); final Shadow shadow = attr.getShadow(); if (null != shadow) { conte...
java
protected final void doApplyShadow(final Context2D context, final Attributes attr) { if ((false == isAppliedShadow()) && (attr.hasShadow())) { setAppliedShadow(true); final Shadow shadow = attr.getShadow(); if (null != shadow) { conte...
[ "protected", "final", "void", "doApplyShadow", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ")", "{", "if", "(", "(", "false", "==", "isAppliedShadow", "(", ")", ")", "&&", "(", "attr", ".", "hasShadow", "(", ")", ")", ")", ...
Applies this shape's Shadow. @param context @param attr @return boolean
[ "Applies", "this", "shape", "s", "Shadow", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L670-L683
38,951
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.setDashArray
public T setDashArray(final double dash, final double... dashes) { getAttributes().setDashArray(new DashArray(dash, dashes)); return cast(); }
java
public T setDashArray(final double dash, final double... dashes) { getAttributes().setDashArray(new DashArray(dash, dashes)); return cast(); }
[ "public", "T", "setDashArray", "(", "final", "double", "dash", ",", "final", "double", "...", "dashes", ")", "{", "getAttributes", "(", ")", ".", "setDashArray", "(", "new", "DashArray", "(", "dash", ",", "dashes", ")", ")", ";", "return", "cast", "(", ...
Sets the dash array with individual dash lengths. @param dash length of dash @param dashes if specified, length of remaining dashes @return this Line
[ "Sets", "the", "dash", "array", "with", "individual", "dash", "lengths", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L755-L760
38,952
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.moveUp
@SuppressWarnings("unchecked") @Override public T moveUp() { final Node<?> parent = getParent(); if (null != parent) { final IContainer<?, IPrimitive<?>> container = (IContainer<?, IPrimitive<?>>) parent.asContainer(); if (null != container) { ...
java
@SuppressWarnings("unchecked") @Override public T moveUp() { final Node<?> parent = getParent(); if (null != parent) { final IContainer<?, IPrimitive<?>> container = (IContainer<?, IPrimitive<?>>) parent.asContainer(); if (null != container) { ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "@", "Override", "public", "T", "moveUp", "(", ")", "{", "final", "Node", "<", "?", ">", "parent", "=", "getParent", "(", ")", ";", "if", "(", "null", "!=", "parent", ")", "{", "final", "IContainer", ...
Moves this shape one layer up. @return T
[ "Moves", "this", "shape", "one", "layer", "up", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L842-L858
38,953
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.setScale
@Override public T setScale(final double x, final double y) { getAttributes().setScale(x, y); return cast(); }
java
@Override public T setScale(final double x, final double y) { getAttributes().setScale(x, y); return cast(); }
[ "@", "Override", "public", "T", "setScale", "(", "final", "double", "x", ",", "final", "double", "y", ")", "{", "getAttributes", "(", ")", ".", "setScale", "(", "x", ",", "y", ")", ";", "return", "cast", "(", ")", ";", "}" ]
Sets this shape's scale, starting at the given x and y @param x @param y @return T
[ "Sets", "this", "shape", "s", "scale", "starting", "at", "the", "given", "x", "and", "y" ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L1154-L1160
38,954
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.setShear
@Override public T setShear(final double x, final double y) { getAttributes().setShear(x, y); return cast(); }
java
@Override public T setShear(final double x, final double y) { getAttributes().setShear(x, y); return cast(); }
[ "@", "Override", "public", "T", "setShear", "(", "final", "double", "x", ",", "final", "double", "y", ")", "{", "getAttributes", "(", ")", ".", "setShear", "(", "x", ",", "y", ")", ";", "return", "cast", "(", ")", ";", "}" ]
Sets this shape's shear @param offset @return T
[ "Sets", "this", "shape", "s", "shear" ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L1243-L1249
38,955
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.setOffset
@Override public T setOffset(final double x, final double y) { getAttributes().setOffset(x, y); return cast(); }
java
@Override public T setOffset(final double x, final double y) { getAttributes().setOffset(x, y); return cast(); }
[ "@", "Override", "public", "T", "setOffset", "(", "final", "double", "x", ",", "final", "double", "y", ")", "{", "getAttributes", "(", ")", ".", "setOffset", "(", "x", ",", "y", ")", ";", "return", "cast", "(", ")", ";", "}" ]
Sets this shape's offset, at the given x and y coordinates. @param x @param y @return T
[ "Sets", "this", "shape", "s", "offset", "at", "the", "given", "x", "and", "y", "coordinates", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L1297-L1303
38,956
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.setFillColor
public T setFillColor(final IColor color) { return setFillColor(null == color ? null : color.getColorString()); }
java
public T setFillColor(final IColor color) { return setFillColor(null == color ? null : color.getColorString()); }
[ "public", "T", "setFillColor", "(", "final", "IColor", "color", ")", "{", "return", "setFillColor", "(", "null", "==", "color", "?", "null", ":", "color", ".", "getColorString", "(", ")", ")", ";", "}" ]
Sets the fill color. @param color ColorName @return T
[ "Sets", "the", "fill", "color", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L1473-L1476
38,957
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Shape.java
Shape.setStrokeColor
public T setStrokeColor(final IColor color) { return setStrokeColor(null == color ? null : color.getColorString()); }
java
public T setStrokeColor(final IColor color) { return setStrokeColor(null == color ? null : color.getColorString()); }
[ "public", "T", "setStrokeColor", "(", "final", "IColor", "color", ")", "{", "return", "setStrokeColor", "(", "null", "==", "color", "?", "null", ":", "color", ".", "getColorString", "(", ")", ")", ";", "}" ]
Sets the stroke color. @param color Color or ColorName @return T
[ "Sets", "the", "stroke", "color", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Shape.java#L1558-L1561
38,958
mqlight/java-mqlight
mqlight/src/main/java/com/ibm/mqlight/api/impl/network/NettyNetworkService.java
NettyNetworkService.decrementUseCount
private static synchronized void decrementUseCount() { final String methodName = "decrementUseCount"; logger.entry(methodName); --useCount; if (useCount <= 0) { if (bootstrap != null) { bootstrap.group().shutdownGracefully(0, 500, TimeUnit.MILLISECONDS); ...
java
private static synchronized void decrementUseCount() { final String methodName = "decrementUseCount"; logger.entry(methodName); --useCount; if (useCount <= 0) { if (bootstrap != null) { bootstrap.group().shutdownGracefully(0, 500, TimeUnit.MILLISECONDS); ...
[ "private", "static", "synchronized", "void", "decrementUseCount", "(", ")", "{", "final", "String", "methodName", "=", "\"decrementUseCount\"", ";", "logger", ".", "entry", "(", "methodName", ")", ";", "--", "useCount", ";", "if", "(", "useCount", "<=", "0", ...
Decrement the use count of the workerGroup and request a graceful shutdown once it is no longer being used by anyone.
[ "Decrement", "the", "use", "count", "of", "the", "workerGroup", "and", "request", "a", "graceful", "shutdown", "once", "it", "is", "no", "longer", "being", "used", "by", "anyone", "." ]
a565dfa6044050826d1221697da9e3268b557aeb
https://github.com/mqlight/java-mqlight/blob/a565dfa6044050826d1221697da9e3268b557aeb/mqlight/src/main/java/com/ibm/mqlight/api/impl/network/NettyNetworkService.java#L475-L489
38,959
mqlight/java-mqlight
mqlight/src/main/java/com/ibm/mqlight/api/impl/network/NettyNetworkService.java
NettyNetworkService.awaitTermination
public boolean awaitTermination(long timeout) throws InterruptedException { final String methodName = "awaitTermination"; logger.entry(methodName); final boolean terminated; if (bootstrap != null) { terminated = bootstrap.group().awaitTermination(timeout, TimeUnit.SECONDS); ...
java
public boolean awaitTermination(long timeout) throws InterruptedException { final String methodName = "awaitTermination"; logger.entry(methodName); final boolean terminated; if (bootstrap != null) { terminated = bootstrap.group().awaitTermination(timeout, TimeUnit.SECONDS); ...
[ "public", "boolean", "awaitTermination", "(", "long", "timeout", ")", "throws", "InterruptedException", "{", "final", "String", "methodName", "=", "\"awaitTermination\"", ";", "logger", ".", "entry", "(", "methodName", ")", ";", "final", "boolean", "terminated", "...
Waits for the underlying network service to terminate. @param timeout Maximum time to wait in seconds. @return {@code true} if the underlying network service has terminated, {@code false} if the underlying network service is still active after waiting the specified time. @throws InterruptedException if the thread perf...
[ "Waits", "for", "the", "underlying", "network", "service", "to", "terminate", "." ]
a565dfa6044050826d1221697da9e3268b557aeb
https://github.com/mqlight/java-mqlight/blob/a565dfa6044050826d1221697da9e3268b557aeb/mqlight/src/main/java/com/ibm/mqlight/api/impl/network/NettyNetworkService.java#L499-L513
38,960
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/json/validators/ValidationContext.java
ValidationContext.getDebugString
public String getDebugString() { final StringBuilder b = new StringBuilder(); boolean first = true; for (final ValidationError e : m_errors) { if (first) { first = false; } else { ...
java
public String getDebugString() { final StringBuilder b = new StringBuilder(); boolean first = true; for (final ValidationError e : m_errors) { if (first) { first = false; } else { ...
[ "public", "String", "getDebugString", "(", ")", "{", "final", "StringBuilder", "b", "=", "new", "StringBuilder", "(", ")", ";", "boolean", "first", "=", "true", ";", "for", "(", "final", "ValidationError", "e", ":", "m_errors", ")", "{", "if", "(", "firs...
Returns a string with all error messages for debugging purposes. @return String
[ "Returns", "a", "string", "with", "all", "error", "messages", "for", "debugging", "purposes", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/json/validators/ValidationContext.java#L289-L308
38,961
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/JavaHelper.java
JavaHelper.removeJavaPackageName
public static String removeJavaPackageName(String className) { int idx = className.lastIndexOf('.'); if (idx >= 0) { return className.substring(idx + 1); } else { return className; } }
java
public static String removeJavaPackageName(String className) { int idx = className.lastIndexOf('.'); if (idx >= 0) { return className.substring(idx + 1); } else { return className; } }
[ "public", "static", "String", "removeJavaPackageName", "(", "String", "className", ")", "{", "int", "idx", "=", "className", ".", "lastIndexOf", "(", "'", "'", ")", ";", "if", "(", "idx", ">=", "0", ")", "{", "return", "className", ".", "substring", "(",...
Removes the package from the type name from the given type
[ "Removes", "the", "package", "from", "the", "type", "name", "from", "the", "given", "type" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/JavaHelper.java#L29-L36
38,962
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/JavaHelper.java
JavaHelper.loadProjectClass
public static Class<?> loadProjectClass(Project project, String className) { URLClassLoader classLoader = getProjectClassLoader(project); if (classLoader != null ){ try { return classLoader.loadClass(className); } catch (ClassNotFoundException e) { ...
java
public static Class<?> loadProjectClass(Project project, String className) { URLClassLoader classLoader = getProjectClassLoader(project); if (classLoader != null ){ try { return classLoader.loadClass(className); } catch (ClassNotFoundException e) { ...
[ "public", "static", "Class", "<", "?", ">", "loadProjectClass", "(", "Project", "project", ",", "String", "className", ")", "{", "URLClassLoader", "classLoader", "=", "getProjectClassLoader", "(", "project", ")", ";", "if", "(", "classLoader", "!=", "null", ")...
Loads a class of the given name from the project class loader or returns null if its not found
[ "Loads", "a", "class", "of", "the", "given", "name", "from", "the", "project", "class", "loader", "or", "returns", "null", "if", "its", "not", "found" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/JavaHelper.java#L64-L80
38,963
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/QuadraticCurve.java
QuadraticCurve.prepare
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final Point2DArray points = attr.getControlPoints(); if ((points != null) && (points.size() == 3)) { context.beginPath(); final Point2D p0 = points.get(0); ...
java
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final Point2DArray points = attr.getControlPoints(); if ((points != null) && (points.size() == 3)) { context.beginPath(); final Point2D p0 = points.get(0); ...
[ "@", "Override", "protected", "boolean", "prepare", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "final", "double", "alpha", ")", "{", "final", "Point2DArray", "points", "=", "attr", ".", "getControlPoints", "(", ")", ";", "...
Draws this quadratic curve @param context
[ "Draws", "this", "quadratic", "curve" ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/QuadraticCurve.java#L91-L113
38,964
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/types/ImageData.java
ImageData.copy
public final ImageData copy() { final Context2D context = new ScratchPad(getWidth(), getHeight()).getContext(); context.putImageData(this, 0, 0); return context.getImageData(0, 0, getWidth(), getHeight()); }
java
public final ImageData copy() { final Context2D context = new ScratchPad(getWidth(), getHeight()).getContext(); context.putImageData(this, 0, 0); return context.getImageData(0, 0, getWidth(), getHeight()); }
[ "public", "final", "ImageData", "copy", "(", ")", "{", "final", "Context2D", "context", "=", "new", "ScratchPad", "(", "getWidth", "(", ")", ",", "getHeight", "(", ")", ")", ".", "getContext", "(", ")", ";", "context", ".", "putImageData", "(", "this", ...
ImageData can't be cloned or deep-copied, it's an internal data structure and has some CRAZY crap in it, this is cheeeeeezy, but hey, it works, and it's portable!!!
[ "ImageData", "can", "t", "be", "cloned", "or", "deep", "-", "copied", "it", "s", "an", "internal", "data", "structure", "and", "has", "some", "CRAZY", "crap", "in", "it", "this", "is", "cheeeeeezy", "but", "hey", "it", "works", "and", "it", "s", "porta...
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/types/ImageData.java#L51-L58
38,965
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Star.java
Star.prepare
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { if (m_list.size() < 1) { if (false == parse(attr)) { return false; } } if (m_list.size() < 1) { return...
java
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { if (m_list.size() < 1) { if (false == parse(attr)) { return false; } } if (m_list.size() < 1) { return...
[ "@", "Override", "protected", "boolean", "prepare", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "final", "double", "alpha", ")", "{", "if", "(", "m_list", ".", "size", "(", ")", "<", "1", ")", "{", "if", "(", "false",...
Draws this star. @param context
[ "Draws", "this", "star", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Star.java#L84-L101
38,966
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Circle.java
Circle.prepare
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final double r = attr.getRadius(); if (r > 0) { context.beginPath(); context.arc(0, 0, r, 0, Math.PI * 2, true); context.closePath(); ...
java
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final double r = attr.getRadius(); if (r > 0) { context.beginPath(); context.arc(0, 0, r, 0, Math.PI * 2, true); context.closePath(); ...
[ "@", "Override", "protected", "boolean", "prepare", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "final", "double", "alpha", ")", "{", "final", "double", "r", "=", "attr", ".", "getRadius", "(", ")", ";", "if", "(", "r",...
Draws this circle @param context the {@link Context2D} used to draw this circle.
[ "Draws", "this", "circle" ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Circle.java#L64-L80
38,967
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Node.java
Node.getLayer
@Override public Layer getLayer() { final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Layer, and Layer returns itself, CYCLES!!! if (null != parent) { return parent.getLayer(); } return null; }
java
@Override public Layer getLayer() { final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Layer, and Layer returns itself, CYCLES!!! if (null != parent) { return parent.getLayer(); } return null; }
[ "@", "Override", "public", "Layer", "getLayer", "(", ")", "{", "final", "Node", "<", "?", ">", "parent", "=", "getParent", "(", ")", ";", "// change, no iteration, no testing, no casting, recurses upwards to a Layer, and Layer returns itself, CYCLES!!!", "if", "(", "null"...
Returns the Layer that this Node is on. @return {@link Layer}
[ "Returns", "the", "Layer", "that", "this", "Node", "is", "on", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Node.java#L381-L391
38,968
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Node.java
Node.getScene
@Override public Scene getScene() { final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Scene, and Scene returns itself, CYCLES!!! if (null != parent) { return parent.getScene(); } return null; }
java
@Override public Scene getScene() { final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Scene, and Scene returns itself, CYCLES!!! if (null != parent) { return parent.getScene(); } return null; }
[ "@", "Override", "public", "Scene", "getScene", "(", ")", "{", "final", "Node", "<", "?", ">", "parent", "=", "getParent", "(", ")", ";", "// change, no iteration, no testing, no casting, recurses upwards to a Scene, and Scene returns itself, CYCLES!!!", "if", "(", "null"...
Returns the Scene that this Node is on. @return Scene
[ "Returns", "the", "Scene", "that", "this", "Node", "is", "on", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Node.java#L398-L408
38,969
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Node.java
Node.getViewport
@Override public Viewport getViewport() { final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Viewport, and Viewport returns itself, CYCLES!!! if (null != parent) { return parent.getViewport(); } return nu...
java
@Override public Viewport getViewport() { final Node<?> parent = getParent();// change, no iteration, no testing, no casting, recurses upwards to a Viewport, and Viewport returns itself, CYCLES!!! if (null != parent) { return parent.getViewport(); } return nu...
[ "@", "Override", "public", "Viewport", "getViewport", "(", ")", "{", "final", "Node", "<", "?", ">", "parent", "=", "getParent", "(", ")", ";", "// change, no iteration, no testing, no casting, recurses upwards to a Viewport, and Viewport returns itself, CYCLES!!!", "if", "...
Returns the Viewport that this Node is on.
[ "Returns", "the", "Viewport", "that", "this", "Node", "is", "on", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Node.java#L413-L423
38,970
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.findPlugin
public static Plugin findPlugin(List<Plugin> plugins, String artifactId) { if (plugins != null) { for (Plugin plugin : plugins) { String groupId = plugin.getGroupId(); if (Strings.isNullOrBlank(groupId) || Objects.equal(groupId, mavenPluginsGroupId)) { ...
java
public static Plugin findPlugin(List<Plugin> plugins, String artifactId) { if (plugins != null) { for (Plugin plugin : plugins) { String groupId = plugin.getGroupId(); if (Strings.isNullOrBlank(groupId) || Objects.equal(groupId, mavenPluginsGroupId)) { ...
[ "public", "static", "Plugin", "findPlugin", "(", "List", "<", "Plugin", ">", "plugins", ",", "String", "artifactId", ")", "{", "if", "(", "plugins", "!=", "null", ")", "{", "for", "(", "Plugin", "plugin", ":", "plugins", ")", "{", "String", "groupId", ...
Returns the maven plugin for the given artifact id or returns null if it cannot be found
[ "Returns", "the", "maven", "plugin", "for", "the", "given", "artifact", "id", "or", "returns", "null", "if", "it", "cannot", "be", "found" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L64-L76
38,971
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.findProfile
public static Profile findProfile(Model mavenModel, String profileId) { List<Profile> profiles = mavenModel.getProfiles(); if (profiles != null) { for (Profile profile : profiles) { if (Objects.equal(profile.getId(), profileId)) { return profile; ...
java
public static Profile findProfile(Model mavenModel, String profileId) { List<Profile> profiles = mavenModel.getProfiles(); if (profiles != null) { for (Profile profile : profiles) { if (Objects.equal(profile.getId(), profileId)) { return profile; ...
[ "public", "static", "Profile", "findProfile", "(", "Model", "mavenModel", ",", "String", "profileId", ")", "{", "List", "<", "Profile", ">", "profiles", "=", "mavenModel", ".", "getProfiles", "(", ")", ";", "if", "(", "profiles", "!=", "null", ")", "{", ...
Returns the profile for the given id or null if it could not be found
[ "Returns", "the", "profile", "for", "the", "given", "id", "or", "null", "if", "it", "could", "not", "be", "found" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L106-L116
38,972
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.ensureMavenDependencyAdded
public static boolean ensureMavenDependencyAdded(Project project, DependencyInstaller dependencyInstaller, String groupId, String artifactId, String scope) { List<Dependency> dependencies = project.getFacet(DependencyFacet.class).getEffectiveDependencies(); for (Dependency d : dependencies) { ...
java
public static boolean ensureMavenDependencyAdded(Project project, DependencyInstaller dependencyInstaller, String groupId, String artifactId, String scope) { List<Dependency> dependencies = project.getFacet(DependencyFacet.class).getEffectiveDependencies(); for (Dependency d : dependencies) { ...
[ "public", "static", "boolean", "ensureMavenDependencyAdded", "(", "Project", "project", ",", "DependencyInstaller", "dependencyInstaller", ",", "String", "groupId", ",", "String", "artifactId", ",", "String", "scope", ")", "{", "List", "<", "Dependency", ">", "depen...
Returns true if the dependency was added or false if its already there
[ "Returns", "true", "if", "the", "dependency", "was", "added", "or", "false", "if", "its", "already", "there" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L121-L147
38,973
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.hasDependency
public static boolean hasDependency(Model pom, String groupId, String artifactId) { if (pom != null) { List<org.apache.maven.model.Dependency> dependencies = pom.getDependencies(); return hasDependency(dependencies, groupId, artifactId); } return false; }
java
public static boolean hasDependency(Model pom, String groupId, String artifactId) { if (pom != null) { List<org.apache.maven.model.Dependency> dependencies = pom.getDependencies(); return hasDependency(dependencies, groupId, artifactId); } return false; }
[ "public", "static", "boolean", "hasDependency", "(", "Model", "pom", ",", "String", "groupId", ",", "String", "artifactId", ")", "{", "if", "(", "pom", "!=", "null", ")", "{", "List", "<", "org", ".", "apache", ".", "maven", ".", "model", ".", "Depende...
Returns true if the pom has the given dependency
[ "Returns", "true", "if", "the", "pom", "has", "the", "given", "dependency" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L221-L227
38,974
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.hasDependency
public static boolean hasDependency(List<org.apache.maven.model.Dependency> dependencies, String groupId, String artifactId) { if (dependencies != null) { for (org.apache.maven.model.Dependency dependency : dependencies) { if (Objects.equal(groupId, dependency.getGroupId()) && Object...
java
public static boolean hasDependency(List<org.apache.maven.model.Dependency> dependencies, String groupId, String artifactId) { if (dependencies != null) { for (org.apache.maven.model.Dependency dependency : dependencies) { if (Objects.equal(groupId, dependency.getGroupId()) && Object...
[ "public", "static", "boolean", "hasDependency", "(", "List", "<", "org", ".", "apache", ".", "maven", ".", "model", ".", "Dependency", ">", "dependencies", ",", "String", "groupId", ",", "String", "artifactId", ")", "{", "if", "(", "dependencies", "!=", "n...
Returns true if the list has the given dependency
[ "Returns", "true", "if", "the", "list", "has", "the", "given", "dependency" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L232-L241
38,975
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.hasManagedDependency
public static boolean hasManagedDependency(Model pom, String groupId, String artifactId) { if (pom != null) { DependencyManagement dependencyManagement = pom.getDependencyManagement(); if (dependencyManagement != null) { return hasDependency(dependencyManagement.getDepend...
java
public static boolean hasManagedDependency(Model pom, String groupId, String artifactId) { if (pom != null) { DependencyManagement dependencyManagement = pom.getDependencyManagement(); if (dependencyManagement != null) { return hasDependency(dependencyManagement.getDepend...
[ "public", "static", "boolean", "hasManagedDependency", "(", "Model", "pom", ",", "String", "groupId", ",", "String", "artifactId", ")", "{", "if", "(", "pom", "!=", "null", ")", "{", "DependencyManagement", "dependencyManagement", "=", "pom", ".", "getDependency...
Returns true if the pom has the given managed dependency
[ "Returns", "true", "if", "the", "pom", "has", "the", "given", "managed", "dependency" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L246-L254
38,976
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.updatePomProperty
public static boolean updatePomProperty(Properties properties, String name, Object value, boolean updated) { if (value != null) { Object oldValue = properties.get(name); if (!Objects.equal(oldValue, value)) { getLOG().debug("Updating pom.xml property: " + name + " to " + ...
java
public static boolean updatePomProperty(Properties properties, String name, Object value, boolean updated) { if (value != null) { Object oldValue = properties.get(name); if (!Objects.equal(oldValue, value)) { getLOG().debug("Updating pom.xml property: " + name + " to " + ...
[ "public", "static", "boolean", "updatePomProperty", "(", "Properties", "properties", ",", "String", "name", ",", "Object", "value", ",", "boolean", "updated", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "Object", "oldValue", "=", "properties", ".",...
Updates the given maven property value if value is not null and returns true if the pom has been changed @return true if the value changed and was non null or updated was true
[ "Updates", "the", "given", "maven", "property", "value", "if", "value", "is", "not", "null", "and", "returns", "true", "if", "the", "pom", "has", "been", "changed" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L261-L272
38,977
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Ellipse.java
Ellipse.prepare
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final double w = attr.getWidth(); final double h = attr.getHeight(); if ((w > 0) && (h > 0)) { context.beginPath(); context.ellipse(0, 0, w / 2, h ...
java
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final double w = attr.getWidth(); final double h = attr.getHeight(); if ((w > 0) && (h > 0)) { context.beginPath(); context.ellipse(0, 0, w / 2, h ...
[ "@", "Override", "protected", "boolean", "prepare", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "final", "double", "alpha", ")", "{", "final", "double", "w", "=", "attr", ".", "getWidth", "(", ")", ";", "final", "double",...
Draws this ellipse. @param context the {@link Context2D} used to draw this ellipse.
[ "Draws", "this", "ellipse", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Ellipse.java#L77-L95
38,978
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCommandsHelper.java
CamelCommandsHelper.loadCamelComponentDetails
public static Result loadCamelComponentDetails(CamelCatalog camelCatalog, String camelComponentName, CamelComponentDetails details) { String json = camelCatalog.componentJSonSchema(camelComponentName); if (json == null) { return Results.fail("Could not find catalog entry for component name: ...
java
public static Result loadCamelComponentDetails(CamelCatalog camelCatalog, String camelComponentName, CamelComponentDetails details) { String json = camelCatalog.componentJSonSchema(camelComponentName); if (json == null) { return Results.fail("Could not find catalog entry for component name: ...
[ "public", "static", "Result", "loadCamelComponentDetails", "(", "CamelCatalog", "camelCatalog", ",", "String", "camelComponentName", ",", "CamelComponentDetails", "details", ")", "{", "String", "json", "=", "camelCatalog", ".", "componentJSonSchema", "(", "camelComponentN...
Populates the details for the given component, returning a Result if it fails.
[ "Populates", "the", "details", "for", "the", "given", "component", "returning", "a", "Result", "if", "it", "fails", "." ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCommandsHelper.java#L125-L154
38,979
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCommandsHelper.java
CamelCommandsHelper.loadValidInputTypes
public static Class<Object> loadValidInputTypes(String javaType, String type) { // we have generics in the javatype, if so remove it so its loadable from a classloader int idx = javaType.indexOf('<'); if (idx > 0) { javaType = javaType.substring(0, idx); } try { ...
java
public static Class<Object> loadValidInputTypes(String javaType, String type) { // we have generics in the javatype, if so remove it so its loadable from a classloader int idx = javaType.indexOf('<'); if (idx > 0) { javaType = javaType.substring(0, idx); } try { ...
[ "public", "static", "Class", "<", "Object", ">", "loadValidInputTypes", "(", "String", "javaType", ",", "String", "type", ")", "{", "// we have generics in the javatype, if so remove it so its loadable from a classloader", "int", "idx", "=", "javaType", ".", "indexOf", "(...
Converts a java type as a string to a valid input type and returns the class or null if its not supported
[ "Converts", "a", "java", "type", "as", "a", "string", "to", "a", "valid", "input", "type", "and", "returns", "the", "class", "or", "null", "if", "its", "not", "supported" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCommandsHelper.java#L280-L322
38,980
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCommandsHelper.java
CamelCommandsHelper.getPrimitiveWrapperClassType
public static Class getPrimitiveWrapperClassType(String name) { if ("string".equals(name)) { return String.class; } else if ("boolean".equals(name)) { return Boolean.class; } else if ("integer".equals(name)) { return Integer.class; } else if ("number"....
java
public static Class getPrimitiveWrapperClassType(String name) { if ("string".equals(name)) { return String.class; } else if ("boolean".equals(name)) { return Boolean.class; } else if ("integer".equals(name)) { return Integer.class; } else if ("number"....
[ "public", "static", "Class", "getPrimitiveWrapperClassType", "(", "String", "name", ")", "{", "if", "(", "\"string\"", ".", "equals", "(", "name", ")", ")", "{", "return", "String", ".", "class", ";", "}", "else", "if", "(", "\"boolean\"", ".", "equals", ...
Gets the JSon schema primitive type. @param name the json type @return the primitive Java Class type
[ "Gets", "the", "JSon", "schema", "primitive", "type", "." ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/helper/CamelCommandsHelper.java#L341-L353
38,981
fabric8io/fabric8-forge
fabric8-forge-core/src/main/java/io/fabric8/forge/rest/dto/ValidationResult.java
ValidationResult.addValidationError
public void addValidationError(String message) { messages.add(new UIMessageDTO(message, null, UIMessage.Severity.ERROR)); valid = false; canExecute = false; }
java
public void addValidationError(String message) { messages.add(new UIMessageDTO(message, null, UIMessage.Severity.ERROR)); valid = false; canExecute = false; }
[ "public", "void", "addValidationError", "(", "String", "message", ")", "{", "messages", ".", "add", "(", "new", "UIMessageDTO", "(", "message", ",", "null", ",", "UIMessage", ".", "Severity", ".", "ERROR", ")", ")", ";", "valid", "=", "false", ";", "canE...
Adds an extra validation error
[ "Adds", "an", "extra", "validation", "error" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/fabric8-forge-core/src/main/java/io/fabric8/forge/rest/dto/ValidationResult.java#L105-L109
38,982
fabric8io/fabric8-forge
addons/camel-tooling-util/src/main/java/io/fabric8/camel/tooling/util/XmlModel.java
XmlModel.marshalRootElement
public Object marshalRootElement() { if (justRoutes) { RoutesDefinition routes = new RoutesDefinition(); routes.setRoutes(contextElement.getRoutes()); return routes; } else { return contextElement; } }
java
public Object marshalRootElement() { if (justRoutes) { RoutesDefinition routes = new RoutesDefinition(); routes.setRoutes(contextElement.getRoutes()); return routes; } else { return contextElement; } }
[ "public", "Object", "marshalRootElement", "(", ")", "{", "if", "(", "justRoutes", ")", "{", "RoutesDefinition", "routes", "=", "new", "RoutesDefinition", "(", ")", ";", "routes", ".", "setRoutes", "(", "contextElement", ".", "getRoutes", "(", ")", ")", ";", ...
Returns the root element to be marshalled as XML @return
[ "Returns", "the", "root", "element", "to", "be", "marshalled", "as", "XML" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel-tooling-util/src/main/java/io/fabric8/camel/tooling/util/XmlModel.java#L99-L107
38,983
fabric8io/fabric8-forge
addons/camel-tooling-util/src/main/java/io/fabric8/camel/tooling/util/XmlModel.java
XmlModel.endpointUris
public Set<String> endpointUris() { try { // we must use reflection for now until Camel supports the getEndpoints() method // https://issues.apache.org/jira/browse/CAMEL-3644 // ... // the above is no longer valid since Camel 2.7.0 List<CamelEndpointFa...
java
public Set<String> endpointUris() { try { // we must use reflection for now until Camel supports the getEndpoints() method // https://issues.apache.org/jira/browse/CAMEL-3644 // ... // the above is no longer valid since Camel 2.7.0 List<CamelEndpointFa...
[ "public", "Set", "<", "String", ">", "endpointUris", "(", ")", "{", "try", "{", "// we must use reflection for now until Camel supports the getEndpoints() method", "// https://issues.apache.org/jira/browse/CAMEL-3644", "// ...", "// the above is no longer valid since Camel 2.7.0", "Lis...
Returns the endpoint URIs used in the context @return
[ "Returns", "the", "endpoint", "URIs", "used", "in", "the", "context" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel-tooling-util/src/main/java/io/fabric8/camel/tooling/util/XmlModel.java#L146-L188
38,984
fabric8io/fabric8-forge
fabric8-forge-core/src/main/java/io/fabric8/forge/rest/CommandsResource.java
CommandsResource.isValidCommandName
protected boolean isValidCommandName(String name) { if (Strings.isNullOrBlank(name) || ignoreCommands.contains(name)) { return false; } for (String prefix : ignoreCommandPrefixes) { if (name.startsWith(prefix)) { return false; } } ...
java
protected boolean isValidCommandName(String name) { if (Strings.isNullOrBlank(name) || ignoreCommands.contains(name)) { return false; } for (String prefix : ignoreCommandPrefixes) { if (name.startsWith(prefix)) { return false; } } ...
[ "protected", "boolean", "isValidCommandName", "(", "String", "name", ")", "{", "if", "(", "Strings", ".", "isNullOrBlank", "(", "name", ")", "||", "ignoreCommands", ".", "contains", "(", "name", ")", ")", "{", "return", "false", ";", "}", "for", "(", "St...
Returns true if the name is valid. Lets filter out commands which are not suitable to run inside fabric8-forge
[ "Returns", "true", "if", "the", "name", "is", "valid", ".", "Lets", "filter", "out", "commands", "which", "are", "not", "suitable", "to", "run", "inside", "fabric8", "-", "forge" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/fabric8-forge-core/src/main/java/io/fabric8/forge/rest/CommandsResource.java#L608-L618
38,985
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/ConfigureEipPropertiesStep.java
ConfigureEipPropertiesStep.mandatoryAttributeValue
public static String mandatoryAttributeValue(Map<Object, Object> attributeMap, String name) { Object value = attributeMap.get(name); if (value != null) { String text = value.toString(); if (!Strings.isBlank(text)) { return text; } } thr...
java
public static String mandatoryAttributeValue(Map<Object, Object> attributeMap, String name) { Object value = attributeMap.get(name); if (value != null) { String text = value.toString(); if (!Strings.isBlank(text)) { return text; } } thr...
[ "public", "static", "String", "mandatoryAttributeValue", "(", "Map", "<", "Object", ",", "Object", ">", "attributeMap", ",", "String", "name", ")", "{", "Object", "value", "=", "attributeMap", ".", "get", "(", "name", ")", ";", "if", "(", "value", "!=", ...
Returns the mandatory String value of the given name @throws IllegalArgumentException if the value is not available in the given attribute map
[ "Returns", "the", "mandatory", "String", "value", "of", "the", "given", "name" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/ConfigureEipPropertiesStep.java#L319-L328
38,986
fabric8io/fabric8-forge
addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/completer/XmlFileCompleter.java
XmlFileCompleter.validateFileDoesNotExist
public void validateFileDoesNotExist(UIInput<String> directory, UIInput<String> fileName, UIValidationContext validator) { String resourcePath = CamelXmlHelper.createFileName(directory, fileName); if (files.contains(resourcePath)) { validator.addValidationError(fileName, "A file with that na...
java
public void validateFileDoesNotExist(UIInput<String> directory, UIInput<String> fileName, UIValidationContext validator) { String resourcePath = CamelXmlHelper.createFileName(directory, fileName); if (files.contains(resourcePath)) { validator.addValidationError(fileName, "A file with that na...
[ "public", "void", "validateFileDoesNotExist", "(", "UIInput", "<", "String", ">", "directory", ",", "UIInput", "<", "String", ">", "fileName", ",", "UIValidationContext", "validator", ")", "{", "String", "resourcePath", "=", "CamelXmlHelper", ".", "createFileName", ...
Validates that the given selected directory and fileName are valid and that the file doesn't already exist
[ "Validates", "that", "the", "given", "selected", "directory", "and", "fileName", "are", "valid", "and", "that", "the", "file", "doesn", "t", "already", "exist" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/camel/src/main/java/io/fabric8/forge/camel/commands/project/completer/XmlFileCompleter.java#L78-L83
38,987
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/Chord.java
Chord.prepare
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final double r = attr.getRadius(); final double beg = attr.getStartAngle(); final double end = attr.getEndAngle(); if (r > 0) { context.beginPath(); ...
java
@Override protected boolean prepare(final Context2D context, final Attributes attr, final double alpha) { final double r = attr.getRadius(); final double beg = attr.getStartAngle(); final double end = attr.getEndAngle(); if (r > 0) { context.beginPath(); ...
[ "@", "Override", "protected", "boolean", "prepare", "(", "final", "Context2D", "context", ",", "final", "Attributes", "attr", ",", "final", "double", "alpha", ")", "{", "final", "double", "r", "=", "attr", ".", "getRadius", "(", ")", ";", "final", "double"...
Draws this chord. @param context
[ "Draws", "this", "chord", "." ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/Chord.java#L82-L108
38,988
mqlight/java-mqlight
mqlight/src/main/java/com/ibm/mqlight/api/impl/engine/Engine.java
Engine.writeToNetwork
private void writeToNetwork(EngineConnection engineConnection) { final String methodName = "writeToNetwork"; logger.entry(this, methodName, engineConnection); if (engineConnection.transport.pending() > 0) { ByteBuffer head = engineConnection.transport.head(); int amount = he...
java
private void writeToNetwork(EngineConnection engineConnection) { final String methodName = "writeToNetwork"; logger.entry(this, methodName, engineConnection); if (engineConnection.transport.pending() > 0) { ByteBuffer head = engineConnection.transport.head(); int amount = he...
[ "private", "void", "writeToNetwork", "(", "EngineConnection", "engineConnection", ")", "{", "final", "String", "methodName", "=", "\"writeToNetwork\"", ";", "logger", ".", "entry", "(", "this", ",", "methodName", ",", "engineConnection", ")", ";", "if", "(", "en...
Drains any pending data from a Proton transport object onto the network
[ "Drains", "any", "pending", "data", "from", "a", "Proton", "transport", "object", "onto", "the", "network" ]
a565dfa6044050826d1221697da9e3268b557aeb
https://github.com/mqlight/java-mqlight/blob/a565dfa6044050826d1221697da9e3268b557aeb/mqlight/src/main/java/com/ibm/mqlight/api/impl/engine/Engine.java#L440-L453
38,989
mqlight/java-mqlight
mqlight/src/main/java/com/ibm/mqlight/api/impl/engine/Engine.java
Engine.resetReceiveIdleTimer
private void resetReceiveIdleTimer(Event event) { final String methodName = "resetReceiveIdleTimer"; logger.entry(this, methodName, event); if (receiveScheduledFuture != null) { receiveScheduledFuture.cancel(false); } final Transport transport = event.getTransport()...
java
private void resetReceiveIdleTimer(Event event) { final String methodName = "resetReceiveIdleTimer"; logger.entry(this, methodName, event); if (receiveScheduledFuture != null) { receiveScheduledFuture.cancel(false); } final Transport transport = event.getTransport()...
[ "private", "void", "resetReceiveIdleTimer", "(", "Event", "event", ")", "{", "final", "String", "methodName", "=", "\"resetReceiveIdleTimer\"", ";", "logger", ".", "entry", "(", "this", ",", "methodName", ",", "event", ")", ";", "if", "(", "receiveScheduledFutur...
Reset the local idle timers, now that we have received some data. If we have set an idle timeout the client must send some data at least that often, we double the timeout before checking.
[ "Reset", "the", "local", "idle", "timers", "now", "that", "we", "have", "received", "some", "data", "." ]
a565dfa6044050826d1221697da9e3268b557aeb
https://github.com/mqlight/java-mqlight/blob/a565dfa6044050826d1221697da9e3268b557aeb/mqlight/src/main/java/com/ibm/mqlight/api/impl/engine/Engine.java#L466-L493
38,990
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/wires/handlers/impl/WiresDockingControlImpl.java
WiresDockingControlImpl.getCloserMagnet
private WiresMagnet getCloserMagnet(final WiresShape shape, final WiresContainer parent, final boolean allowOverlap) { final WiresShape parentShape = (WiresShape) parent; final MagnetManager.Magnets magnets = parentShape.getMagnets(); final Point2D shapeLocation = shape.getComputedLocation()...
java
private WiresMagnet getCloserMagnet(final WiresShape shape, final WiresContainer parent, final boolean allowOverlap) { final WiresShape parentShape = (WiresShape) parent; final MagnetManager.Magnets magnets = parentShape.getMagnets(); final Point2D shapeLocation = shape.getComputedLocation()...
[ "private", "WiresMagnet", "getCloserMagnet", "(", "final", "WiresShape", "shape", ",", "final", "WiresContainer", "parent", ",", "final", "boolean", "allowOverlap", ")", "{", "final", "WiresShape", "parentShape", "=", "(", "WiresShape", ")", "parent", ";", "final"...
Reurn the closer magnet @param shape @param parent @param allowOverlap should allow overlapping docked shape or not @return closer magnet or null if none are available
[ "Reurn", "the", "closer", "magnet" ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/wires/handlers/impl/WiresDockingControlImpl.java#L215-L245
38,991
mqlight/java-mqlight
mqlight/src/main/java/com/ibm/mqlight/api/impl/logging/logback/LogbackLoggingImpl.java
LogbackLoggingImpl.stop
public static void stop() { final ILoggerFactory loggerFactory = org.slf4j.LoggerFactory.getILoggerFactory(); if (loggerFactory instanceof LoggerContext) { final LoggerContext context = (LoggerContext) loggerFactory; context.stop(); } setup.getAndSet(false); }
java
public static void stop() { final ILoggerFactory loggerFactory = org.slf4j.LoggerFactory.getILoggerFactory(); if (loggerFactory instanceof LoggerContext) { final LoggerContext context = (LoggerContext) loggerFactory; context.stop(); } setup.getAndSet(false); }
[ "public", "static", "void", "stop", "(", ")", "{", "final", "ILoggerFactory", "loggerFactory", "=", "org", ".", "slf4j", ".", "LoggerFactory", ".", "getILoggerFactory", "(", ")", ";", "if", "(", "loggerFactory", "instanceof", "LoggerContext", ")", "{", "final"...
Stops the logging.
[ "Stops", "the", "logging", "." ]
a565dfa6044050826d1221697da9e3268b557aeb
https://github.com/mqlight/java-mqlight/blob/a565dfa6044050826d1221697da9e3268b557aeb/mqlight/src/main/java/com/ibm/mqlight/api/impl/logging/logback/LogbackLoggingImpl.java#L484-L491
38,992
ahome-it/lienzo-core
src/main/java/com/ait/lienzo/client/core/shape/wires/handlers/impl/WiresConnectorControlImpl.java
WiresConnectorControlImpl.move
@Override public void move(final double dx, final double dy, final boolean midPointsOnly, final boolean moveLinePoints) { final IControlHandleList handles = m_connector.getPointHandles(); int start = 0; int end = handles.size(); if (midPointsOnly) { if (m_c...
java
@Override public void move(final double dx, final double dy, final boolean midPointsOnly, final boolean moveLinePoints) { final IControlHandleList handles = m_connector.getPointHandles(); int start = 0; int end = handles.size(); if (midPointsOnly) { if (m_c...
[ "@", "Override", "public", "void", "move", "(", "final", "double", "dx", ",", "final", "double", "dy", ",", "final", "boolean", "midPointsOnly", ",", "final", "boolean", "moveLinePoints", ")", "{", "final", "IControlHandleList", "handles", "=", "m_connector", ...
See class javadocs to explain why we have these booleans
[ "See", "class", "javadocs", "to", "explain", "why", "we", "have", "these", "booleans" ]
8e03723700dec366f77064d12fb8676d8cd6be99
https://github.com/ahome-it/lienzo-core/blob/8e03723700dec366f77064d12fb8676d8cd6be99/src/main/java/com/ait/lienzo/client/core/shape/wires/handlers/impl/WiresConnectorControlImpl.java#L137-L182
38,993
mqlight/java-mqlight
mqlight/src/main/java/com/ibm/mqlight/api/impl/logging/Version.java
Version.getVersion
public static String getVersion() { String version = "unknown"; final URLClassLoader cl = (URLClassLoader)cclass.getClassLoader(); try { final URL url = cl.findResource("META-INF/MANIFEST.MF"); final Manifest manifest = new Manifest(url.openStream()); for (Entry<Object,Object> entry : mani...
java
public static String getVersion() { String version = "unknown"; final URLClassLoader cl = (URLClassLoader)cclass.getClassLoader(); try { final URL url = cl.findResource("META-INF/MANIFEST.MF"); final Manifest manifest = new Manifest(url.openStream()); for (Entry<Object,Object> entry : mani...
[ "public", "static", "String", "getVersion", "(", ")", "{", "String", "version", "=", "\"unknown\"", ";", "final", "URLClassLoader", "cl", "=", "(", "URLClassLoader", ")", "cclass", ".", "getClassLoader", "(", ")", ";", "try", "{", "final", "URL", "url", "=...
obtains the MQ Light version information from the manifest. @return The MQ Light version.
[ "obtains", "the", "MQ", "Light", "version", "information", "from", "the", "manifest", "." ]
a565dfa6044050826d1221697da9e3268b557aeb
https://github.com/mqlight/java-mqlight/blob/a565dfa6044050826d1221697da9e3268b557aeb/mqlight/src/main/java/com/ibm/mqlight/api/impl/logging/Version.java#L46-L62
38,994
fabric8io/fabric8-forge
addons/devops/src/main/java/io/fabric8/forge/devops/springboot/SpringBootVersionHelper.java
SpringBootVersionHelper.after
public static String after(String text, String after) { if (!text.contains(after)) { return null; } return text.substring(text.indexOf(after) + after.length()); }
java
public static String after(String text, String after) { if (!text.contains(after)) { return null; } return text.substring(text.indexOf(after) + after.length()); }
[ "public", "static", "String", "after", "(", "String", "text", ",", "String", "after", ")", "{", "if", "(", "!", "text", ".", "contains", "(", "after", ")", ")", "{", "return", "null", ";", "}", "return", "text", ".", "substring", "(", "text", ".", ...
Returns the string after the given token @param text the text @param after the token @return the text after the token, or <tt>null</tt> if text does not contain the token
[ "Returns", "the", "string", "after", "the", "given", "token" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/devops/src/main/java/io/fabric8/forge/devops/springboot/SpringBootVersionHelper.java#L42-L47
38,995
fabric8io/fabric8-forge
addons/devops/src/main/java/io/fabric8/forge/devops/springboot/SpringBootVersionHelper.java
SpringBootVersionHelper.before
public static String before(String text, String before) { if (!text.contains(before)) { return null; } return text.substring(0, text.indexOf(before)); }
java
public static String before(String text, String before) { if (!text.contains(before)) { return null; } return text.substring(0, text.indexOf(before)); }
[ "public", "static", "String", "before", "(", "String", "text", ",", "String", "before", ")", "{", "if", "(", "!", "text", ".", "contains", "(", "before", ")", ")", "{", "return", "null", ";", "}", "return", "text", ".", "substring", "(", "0", ",", ...
Returns the string before the given token @param text the text @param before the token @return the text before the token, or <tt>null</tt> if text does not contain the token
[ "Returns", "the", "string", "before", "the", "given", "token" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/devops/src/main/java/io/fabric8/forge/devops/springboot/SpringBootVersionHelper.java#L56-L61
38,996
fabric8io/fabric8-forge
addons/devops/src/main/java/io/fabric8/forge/devops/springboot/SpringBootVersionHelper.java
SpringBootVersionHelper.between
public static String between(String text, String after, String before) { text = after(text, after); if (text == null) { return null; } return before(text, before); }
java
public static String between(String text, String after, String before) { text = after(text, after); if (text == null) { return null; } return before(text, before); }
[ "public", "static", "String", "between", "(", "String", "text", ",", "String", "after", ",", "String", "before", ")", "{", "text", "=", "after", "(", "text", ",", "after", ")", ";", "if", "(", "text", "==", "null", ")", "{", "return", "null", ";", ...
Returns the string between the given tokens @param text the text @param after the before token @param before the after token @return the text between the tokens, or <tt>null</tt> if text does not contain the tokens
[ "Returns", "the", "string", "between", "the", "given", "tokens" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/devops/src/main/java/io/fabric8/forge/devops/springboot/SpringBootVersionHelper.java#L71-L77
38,997
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/CommandHelpers.java
CommandHelpers.addInputComponents
public static List<InputComponent> addInputComponents(UIBuilder builder, InputComponent... components) { List<InputComponent> inputComponents = new ArrayList<>(); for (InputComponent component : components) { builder.add(component); inputComponents.add(component); } ...
java
public static List<InputComponent> addInputComponents(UIBuilder builder, InputComponent... components) { List<InputComponent> inputComponents = new ArrayList<>(); for (InputComponent component : components) { builder.add(component); inputComponents.add(component); } ...
[ "public", "static", "List", "<", "InputComponent", ">", "addInputComponents", "(", "UIBuilder", "builder", ",", "InputComponent", "...", "components", ")", "{", "List", "<", "InputComponent", ">", "inputComponents", "=", "new", "ArrayList", "<>", "(", ")", ";", ...
A helper function to add the components to the builder and return a list of all the components
[ "A", "helper", "function", "to", "add", "the", "components", "to", "the", "builder", "and", "return", "a", "list", "of", "all", "the", "components" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/CommandHelpers.java#L49-L56
38,998
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/CommandHelpers.java
CommandHelpers.setInitialComponentValue
public static <T> void setInitialComponentValue(UIInput<T> inputComponent, T value) { if (value != null) { inputComponent.setValue(value); } }
java
public static <T> void setInitialComponentValue(UIInput<T> inputComponent, T value) { if (value != null) { inputComponent.setValue(value); } }
[ "public", "static", "<", "T", ">", "void", "setInitialComponentValue", "(", "UIInput", "<", "T", ">", "inputComponent", ",", "T", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "inputComponent", ".", "setValue", "(", "value", ")", ";", ...
If the initial value is not blank lets set the value on the underlying component
[ "If", "the", "initial", "value", "is", "not", "blank", "lets", "set", "the", "value", "on", "the", "underlying", "component" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/CommandHelpers.java#L74-L78
38,999
fabric8io/fabric8-forge
fabric8-forge-core/src/main/java/io/fabric8/forge/rest/dto/ExecutionRequest.java
ExecutionRequest.createCommitMessage
public static String createCommitMessage(String name, ExecutionRequest executionRequest) { StringBuilder builder = new StringBuilder(name); List<Map<String, Object>> inputList = executionRequest.getInputList(); for (Map<String, Object> map : inputList) { Set<Map.Entry<String, Object>...
java
public static String createCommitMessage(String name, ExecutionRequest executionRequest) { StringBuilder builder = new StringBuilder(name); List<Map<String, Object>> inputList = executionRequest.getInputList(); for (Map<String, Object> map : inputList) { Set<Map.Entry<String, Object>...
[ "public", "static", "String", "createCommitMessage", "(", "String", "name", ",", "ExecutionRequest", "executionRequest", ")", "{", "StringBuilder", "builder", "=", "new", "StringBuilder", "(", "name", ")", ";", "List", "<", "Map", "<", "String", ",", "Object", ...
Lets generate a commit message with the command name and all the parameters we specify
[ "Lets", "generate", "a", "commit", "message", "with", "the", "command", "name", "and", "all", "the", "parameters", "we", "specify" ]
a59871bae4d5c5d3ece10f1e8758e73663087f19
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/fabric8-forge-core/src/main/java/io/fabric8/forge/rest/dto/ExecutionRequest.java#L52-L73