repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphExtractSubgraphByVertex
public static int nvgraphExtractSubgraphByVertex( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subvertices, long numvertices) { return checkResult(nvgraphExtractSubgraphByVertexNative(handle, descrG, subdescrG, subvertices, ...
java
public static int nvgraphExtractSubgraphByVertex( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subvertices, long numvertices) { return checkResult(nvgraphExtractSubgraphByVertexNative(handle, descrG, subdescrG, subvertices, ...
[ "public", "static", "int", "nvgraphExtractSubgraphByVertex", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "nvgraphGraphDescr", "subdescrG", ",", "Pointer", "subvertices", ",", "long", "numvertices", ")", "{", "return", "checkResult", "(", "...
create a new graph by extracting a subgraph given a list of vertices
[ "create", "a", "new", "graph", "by", "extracting", "a", "subgraph", "given", "a", "list", "of", "vertices" ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L383-L391
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphExtractSubgraphByEdge
public static int nvgraphExtractSubgraphByEdge( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subedges, long numedges) { return checkResult(nvgraphExtractSubgraphByEdgeNative(handle, descrG, subdescrG, subedges, numedges)); ...
java
public static int nvgraphExtractSubgraphByEdge( nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subedges, long numedges) { return checkResult(nvgraphExtractSubgraphByEdgeNative(handle, descrG, subdescrG, subedges, numedges)); ...
[ "public", "static", "int", "nvgraphExtractSubgraphByEdge", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "nvgraphGraphDescr", "subdescrG", ",", "Pointer", "subedges", ",", "long", "numedges", ")", "{", "return", "checkResult", "(", "nvgraphE...
create a new graph by extracting a subgraph given a list of edges
[ "create", "a", "new", "graph", "by", "extracting", "a", "subgraph", "given", "a", "list", "of", "edges" ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L402-L410
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphSrSpmv
public static int nvgraphSrSpmv( nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer alpha, long x_index, Pointer beta, long y_index, int SR) { return checkResult(nvgraphSrSpmvNative(handle, descrG, weight_index, a...
java
public static int nvgraphSrSpmv( nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer alpha, long x_index, Pointer beta, long y_index, int SR) { return checkResult(nvgraphSrSpmvNative(handle, descrG, weight_index, a...
[ "public", "static", "int", "nvgraphSrSpmv", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "long", "weight_index", ",", "Pointer", "alpha", ",", "long", "x_index", ",", "Pointer", "beta", ",", "long", "y_index", ",", "int", "SR", ")",...
nvGRAPH Semi-ring sparse matrix vector multiplication
[ "nvGRAPH", "Semi", "-", "ring", "sparse", "matrix", "vector", "multiplication" ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L421-L432
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphWidestPath
public static int nvgraphWidestPath( nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer source_vert, long widest_path_index) { return checkResult(nvgraphWidestPathNative(handle, descrG, weight_index, source_vert, widest_path_index)); }
java
public static int nvgraphWidestPath( nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer source_vert, long widest_path_index) { return checkResult(nvgraphWidestPathNative(handle, descrG, weight_index, source_vert, widest_path_index)); }
[ "public", "static", "int", "nvgraphWidestPath", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "long", "weight_index", ",", "Pointer", "source_vert", ",", "long", "widest_path_index", ")", "{", "return", "checkResult", "(", "nvgraphWidestPath...
nvGRAPH WidestPath Find widest path potential from source_index to every other vertices.
[ "nvGRAPH", "WidestPath", "Find", "widest", "path", "potential", "from", "source_index", "to", "every", "other", "vertices", "." ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L625-L633
train
jcuda/jnvgraph
JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java
JNvgraph.nvgraphPagerank
public static int nvgraphPagerank( nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer alpha, long bookmark_index, int has_guess, long pagerank_index, float tolerance, int max_iter) { return checkResult(nv...
java
public static int nvgraphPagerank( nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer alpha, long bookmark_index, int has_guess, long pagerank_index, float tolerance, int max_iter) { return checkResult(nv...
[ "public", "static", "int", "nvgraphPagerank", "(", "nvgraphHandle", "handle", ",", "nvgraphGraphDescr", "descrG", ",", "long", "weight_index", ",", "Pointer", "alpha", ",", "long", "bookmark_index", ",", "int", "has_guess", ",", "long", "pagerank_index", ",", "flo...
nvGRAPH PageRank Find PageRank for each vertex of a graph with a given transition probabilities, a bookmark vector of dangling vertices, and the damping factor.
[ "nvGRAPH", "PageRank", "Find", "PageRank", "for", "each", "vertex", "of", "a", "graph", "with", "a", "given", "transition", "probabilities", "a", "bookmark", "vector", "of", "dangling", "vertices", "and", "the", "damping", "factor", "." ]
2c6bd7c58edac181753bacf30af2cceeb1989a78
https://github.com/jcuda/jnvgraph/blob/2c6bd7c58edac181753bacf30af2cceeb1989a78/JNvgraphJava/src/main/java/jcuda/jnvgraph/JNvgraph.java#L645-L657
train
opencb/java-common-libs
bioformats/src/main/java/org/opencb/commons/bioformats/alignment/tasks/AlignmentCoverageCalculatorTask.java
AlignmentCoverageCalculatorTask.setRegionCoverageSize
public void setRegionCoverageSize(int size){ if(size < 0){ return; } int lg = (int)Math.ceil(Math.log(size)/Math.log(2)); //int lg = 31 - Integer.numberOfLeadingZeros(size); int newRegionCoverageSize = 1 << lg; int newRegionCoverageMask = newRegionCoverageSize...
java
public void setRegionCoverageSize(int size){ if(size < 0){ return; } int lg = (int)Math.ceil(Math.log(size)/Math.log(2)); //int lg = 31 - Integer.numberOfLeadingZeros(size); int newRegionCoverageSize = 1 << lg; int newRegionCoverageMask = newRegionCoverageSize...
[ "public", "void", "setRegionCoverageSize", "(", "int", "size", ")", "{", "if", "(", "size", "<", "0", ")", "{", "return", ";", "}", "int", "lg", "=", "(", "int", ")", "Math", ".", "ceil", "(", "Math", ".", "log", "(", "size", ")", "/", "Math", ...
Set size to the nearest upper 2^n number for quick modulus operation @param size
[ "Set", "size", "to", "the", "nearest", "upper", "2^n", "number", "for", "quick", "modulus", "operation" ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/bioformats/src/main/java/org/opencb/commons/bioformats/alignment/tasks/AlignmentCoverageCalculatorTask.java#L391-L411
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/AbstractStickerFeedback.java
AbstractStickerFeedback.attach
public void attach(JComponent owner) { detach(); toolTipDialog = new TransparentToolTipDialog(owner, new AnchorLink(Anchor.CENTER_RIGHT, Anchor.CENTER_LEFT)); }
java
public void attach(JComponent owner) { detach(); toolTipDialog = new TransparentToolTipDialog(owner, new AnchorLink(Anchor.CENTER_RIGHT, Anchor.CENTER_LEFT)); }
[ "public", "void", "attach", "(", "JComponent", "owner", ")", "{", "detach", "(", ")", ";", "toolTipDialog", "=", "new", "TransparentToolTipDialog", "(", "owner", ",", "new", "AnchorLink", "(", "Anchor", ".", "CENTER_RIGHT", ",", "Anchor", ".", "CENTER_LEFT", ...
Attaches the tooltip sticker to the specified component. @param owner Component to attach to.
[ "Attaches", "the", "tooltip", "sticker", "to", "the", "specified", "component", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/AbstractStickerFeedback.java#L62-L65
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/AbstractStickerFeedback.java
AbstractStickerFeedback.getToolTipText
protected String getToolTipText() { String tip = null; if (toolTipDialog != null) { tip = toolTipDialog.getText(); } return tip; }
java
protected String getToolTipText() { String tip = null; if (toolTipDialog != null) { tip = toolTipDialog.getText(); } return tip; }
[ "protected", "String", "getToolTipText", "(", ")", "{", "String", "tip", "=", "null", ";", "if", "(", "toolTipDialog", "!=", "null", ")", "{", "tip", "=", "toolTipDialog", ".", "getText", "(", ")", ";", "}", "return", "tip", ";", "}" ]
Gets the tooltip text to be displayed. @return Text displaued as a tooltip.
[ "Gets", "the", "tooltip", "text", "to", "be", "displayed", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/AbstractStickerFeedback.java#L82-L90
train
ArpNetworking/commons
src/main/java/com/arpnetworking/commons/builder/OvalBuilder.java
OvalBuilder.construct
protected T construct() { if (_targetConstructor.isPresent()) { return _targetConstructor.get().apply(this); } try { final Constructor<? extends T> constructor = _targetClass.get().getDeclaredConstructor(this.getClass()); AccessController.doPrivileged((Privile...
java
protected T construct() { if (_targetConstructor.isPresent()) { return _targetConstructor.get().apply(this); } try { final Constructor<? extends T> constructor = _targetClass.get().getDeclaredConstructor(this.getClass()); AccessController.doPrivileged((Privile...
[ "protected", "T", "construct", "(", ")", "{", "if", "(", "_targetConstructor", ".", "isPresent", "(", ")", ")", "{", "return", "_targetConstructor", ".", "get", "(", ")", ".", "apply", "(", "this", ")", ";", "}", "try", "{", "final", "Constructor", "<"...
Protected method to construct the target class reflectively from the specified type by passing its constructor an instance of this builder. @return Instance of target class created from this builder.
[ "Protected", "method", "to", "construct", "the", "target", "class", "reflectively", "from", "the", "specified", "type", "by", "passing", "its", "constructor", "an", "instance", "of", "this", "builder", "." ]
36e18ee63312921551ade91dfbf769eccd04dc96
https://github.com/ArpNetworking/commons/blob/36e18ee63312921551ade91dfbf769eccd04dc96/src/main/java/com/arpnetworking/commons/builder/OvalBuilder.java#L201-L233
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JTableSelectedRowCountProperty.java
JTableSelectedRowCountProperty.updateValue
private void updateValue() { if (table != null) { int oldCount = this.count; this.count = table.getSelectedRowCount(); maybeNotifyListeners(oldCount, count); } }
java
private void updateValue() { if (table != null) { int oldCount = this.count; this.count = table.getSelectedRowCount(); maybeNotifyListeners(oldCount, count); } }
[ "private", "void", "updateValue", "(", ")", "{", "if", "(", "table", "!=", "null", ")", "{", "int", "oldCount", "=", "this", ".", "count", ";", "this", ".", "count", "=", "table", ".", "getSelectedRowCount", "(", ")", ";", "maybeNotifyListeners", "(", ...
Updates the value of this property based on the table's selection model and notify the listeners.
[ "Updates", "the", "value", "of", "this", "property", "based", "on", "the", "table", "s", "selection", "model", "and", "notify", "the", "listeners", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JTableSelectedRowCountProperty.java#L130-L136
train
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/lucene/LuceneUtil.java
LuceneUtil.katakanaToRomaji
public static void katakanaToRomaji(Appendable builder, CharSequence s) throws IOException { ToStringUtil.getRomanization(builder, s); }
java
public static void katakanaToRomaji(Appendable builder, CharSequence s) throws IOException { ToStringUtil.getRomanization(builder, s); }
[ "public", "static", "void", "katakanaToRomaji", "(", "Appendable", "builder", ",", "CharSequence", "s", ")", "throws", "IOException", "{", "ToStringUtil", ".", "getRomanization", "(", "builder", ",", "s", ")", ";", "}" ]
Romanize katakana with modified hepburn @throws IOException
[ "Romanize", "katakana", "with", "modified", "hepburn" ]
58d6af66b1b1c738326c74d9ad5e4ad514120e27
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/lucene/LuceneUtil.java#L46-L49
train
checkstyle-addons/checkstyle-addons
src/main/java/com/thomasjensen/checkstyle/addons/checks/regexp/RegexpOnStringCheck.java
RegexpOnStringCheck.getExprAst
@CheckForNull private DetailAST getExprAst(@Nonnull final DetailAST pAst) { DetailAST result = null; for (DetailAST a = pAst.getFirstChild(); a != null; a = a.getNextSibling()) { if (a.getType() != TokenTypes.LPAREN && a.getType() != TokenTypes.RPAREN) { result = a; ...
java
@CheckForNull private DetailAST getExprAst(@Nonnull final DetailAST pAst) { DetailAST result = null; for (DetailAST a = pAst.getFirstChild(); a != null; a = a.getNextSibling()) { if (a.getType() != TokenTypes.LPAREN && a.getType() != TokenTypes.RPAREN) { result = a; ...
[ "@", "CheckForNull", "private", "DetailAST", "getExprAst", "(", "@", "Nonnull", "final", "DetailAST", "pAst", ")", "{", "DetailAST", "result", "=", "null", ";", "for", "(", "DetailAST", "a", "=", "pAst", ".", "getFirstChild", "(", ")", ";", "a", "!=", "n...
Find the "meaningful" child of an EXPR AST. This is usually the only child present, but it may be surrounded by parentheses. @param pAst an EXPR AST @return the meaningful child of the EXPR, or <code>null</code> if such could not be determined
[ "Find", "the", "meaningful", "child", "of", "an", "EXPR", "AST", ".", "This", "is", "usually", "the", "only", "child", "present", "but", "it", "may", "be", "surrounded", "by", "parentheses", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/src/main/java/com/thomasjensen/checkstyle/addons/checks/regexp/RegexpOnStringCheck.java#L124-L135
train
opencb/java-common-libs
commons-datastore/commons-datastore-core/src/main/java/org/opencb/commons/datastore/core/QueryResponse.java
QueryResponse.first
public QueryResult<T> first() { if (response != null && response.size() > 0) { return response.get(0); } return null; }
java
public QueryResult<T> first() { if (response != null && response.size() > 0) { return response.get(0); } return null; }
[ "public", "QueryResult", "<", "T", ">", "first", "(", ")", "{", "if", "(", "response", "!=", "null", "&&", "response", ".", "size", "(", ")", ">", "0", ")", "{", "return", "response", ".", "get", "(", "0", ")", ";", "}", "return", "null", ";", ...
This method just returns the first QueryResult of response, or null if response is null or empty. @return the first QueryResult in the response
[ "This", "method", "just", "returns", "the", "first", "QueryResult", "of", "response", "or", "null", "if", "response", "is", "null", "or", "empty", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-core/src/main/java/org/opencb/commons/datastore/core/QueryResponse.java#L72-L77
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.attach
private void attach(JComponent componentToBeDecorated) { detach(); decoratedComponent = componentToBeDecorated; if (decoratedComponent != null) { decoratedComponent.addComponentListener(decoratedComponentTracker); decoratedComponent.addAncestorListener(decoratedComponen...
java
private void attach(JComponent componentToBeDecorated) { detach(); decoratedComponent = componentToBeDecorated; if (decoratedComponent != null) { decoratedComponent.addComponentListener(decoratedComponentTracker); decoratedComponent.addAncestorListener(decoratedComponen...
[ "private", "void", "attach", "(", "JComponent", "componentToBeDecorated", ")", "{", "detach", "(", ")", ";", "decoratedComponent", "=", "componentToBeDecorated", ";", "if", "(", "decoratedComponent", "!=", "null", ")", "{", "decoratedComponent", ".", "addComponentLi...
Attaches the decoration to the specified component. @param componentToBeDecorated Component to be decorated.
[ "Attaches", "the", "decoration", "to", "the", "specified", "component", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L395-L410
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.detach
private void detach() { // Do not call setVisible(false) here: that would make it invisible by default (detach() is called in attach()) if (decoratedComponent != null) { decoratedComponent.removeComponentListener(decoratedComponentTracker); decoratedComponent.removeAncestorListe...
java
private void detach() { // Do not call setVisible(false) here: that would make it invisible by default (detach() is called in attach()) if (decoratedComponent != null) { decoratedComponent.removeComponentListener(decoratedComponentTracker); decoratedComponent.removeAncestorListe...
[ "private", "void", "detach", "(", ")", "{", "// Do not call setVisible(false) here: that would make it invisible by default (detach() is called in attach())", "if", "(", "decoratedComponent", "!=", "null", ")", "{", "decoratedComponent", ".", "removeComponentListener", "(", "deco...
Detaches the decoration from the decorated component.
[ "Detaches", "the", "decoration", "from", "the", "decorated", "component", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L415-L429
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.attachToLayeredPane
private void attachToLayeredPane() { // Get ancestor layered pane that will get the decoration holder component Container ancestor = SwingUtilities.getAncestorOfClass(JLayeredPane.class, decoratedComponent); if (ancestor instanceof JLayeredPane) { attachedLayeredPane = (JLayeredPane)...
java
private void attachToLayeredPane() { // Get ancestor layered pane that will get the decoration holder component Container ancestor = SwingUtilities.getAncestorOfClass(JLayeredPane.class, decoratedComponent); if (ancestor instanceof JLayeredPane) { attachedLayeredPane = (JLayeredPane)...
[ "private", "void", "attachToLayeredPane", "(", ")", "{", "// Get ancestor layered pane that will get the decoration holder component", "Container", "ancestor", "=", "SwingUtilities", ".", "getAncestorOfClass", "(", "JLayeredPane", ".", "class", ",", "decoratedComponent", ")", ...
Inserts the decoration to the layered pane right above the decorated component.
[ "Inserts", "the", "decoration", "to", "the", "layered", "pane", "right", "above", "the", "decorated", "component", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L434-L446
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.getDecoratedComponentLayerInLayeredPane
private Integer getDecoratedComponentLayerInLayeredPane(JLayeredPane layeredPane) { Container ancestorInLayer = decoratedComponent; while (!layeredPane.equals(ancestorInLayer.getParent())) { ancestorInLayer = ancestorInLayer.getParent(); } return (layeredPane.getLayer(ancest...
java
private Integer getDecoratedComponentLayerInLayeredPane(JLayeredPane layeredPane) { Container ancestorInLayer = decoratedComponent; while (!layeredPane.equals(ancestorInLayer.getParent())) { ancestorInLayer = ancestorInLayer.getParent(); } return (layeredPane.getLayer(ancest...
[ "private", "Integer", "getDecoratedComponentLayerInLayeredPane", "(", "JLayeredPane", "layeredPane", ")", "{", "Container", "ancestorInLayer", "=", "decoratedComponent", ";", "while", "(", "!", "layeredPane", ".", "equals", "(", "ancestorInLayer", ".", "getParent", "(",...
Retrieves the layer index of the decorated component in the layered pane of the window. @param layeredPane Layered pane of the window. @return Index of the decorated component in the layered pane.
[ "Retrieves", "the", "layer", "index", "of", "the", "decorated", "component", "in", "the", "layered", "pane", "of", "the", "window", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L455-L462
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.updateDecorationPainterVisibility
private void updateDecorationPainterVisibility() { boolean shouldBeVisible = (decoratedComponent != null) && // (paintWhenDisabled || decoratedComponent.isEnabled()) && // decoratedComponent.isShowing() && // visible; if (shouldBeVisible != decorationPaint...
java
private void updateDecorationPainterVisibility() { boolean shouldBeVisible = (decoratedComponent != null) && // (paintWhenDisabled || decoratedComponent.isEnabled()) && // decoratedComponent.isShowing() && // visible; if (shouldBeVisible != decorationPaint...
[ "private", "void", "updateDecorationPainterVisibility", "(", ")", "{", "boolean", "shouldBeVisible", "=", "(", "decoratedComponent", "!=", "null", ")", "&&", "//", "(", "paintWhenDisabled", "||", "decoratedComponent", ".", "isEnabled", "(", ")", ")", "&&", "//", ...
Updates the visibility of the decoration painter according to the visible state set by the programmer and the state of the decorated component. @see DecorationPainter
[ "Updates", "the", "visibility", "of", "the", "decoration", "painter", "according", "to", "the", "visible", "state", "set", "by", "the", "programmer", "and", "the", "state", "of", "the", "decorated", "component", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L610-L618
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.followDecoratedComponent
private void followDecoratedComponent(JLayeredPane layeredPane) { Point relativeLocationToOwner = anchorLink.getRelativeSlaveLocation(decoratedComponent.getWidth(), decoratedComponent.getHeight(), getWidth(), getHeight()); updateDecorationPainterUnclippedBounds(layeredPane, relativeLoca...
java
private void followDecoratedComponent(JLayeredPane layeredPane) { Point relativeLocationToOwner = anchorLink.getRelativeSlaveLocation(decoratedComponent.getWidth(), decoratedComponent.getHeight(), getWidth(), getHeight()); updateDecorationPainterUnclippedBounds(layeredPane, relativeLoca...
[ "private", "void", "followDecoratedComponent", "(", "JLayeredPane", "layeredPane", ")", "{", "Point", "relativeLocationToOwner", "=", "anchorLink", ".", "getRelativeSlaveLocation", "(", "decoratedComponent", ".", "getWidth", "(", ")", ",", "decoratedComponent", ".", "ge...
Updates the decoration painter in the specified layered pane. @param layeredPane Layered pane containing the decoration. @see #followDecoratedComponent()
[ "Updates", "the", "decoration", "painter", "in", "the", "specified", "layered", "pane", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L645-L657
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.updateDecorationPainterUnclippedBounds
private void updateDecorationPainterUnclippedBounds(JLayeredPane layeredPane, Point relativeLocationToOwner) { Rectangle decorationBoundsInLayeredPane; if (layeredPane == null) { decorationBoundsInLayeredPane = new Rectangle(); } else { // Calculate location of the decor...
java
private void updateDecorationPainterUnclippedBounds(JLayeredPane layeredPane, Point relativeLocationToOwner) { Rectangle decorationBoundsInLayeredPane; if (layeredPane == null) { decorationBoundsInLayeredPane = new Rectangle(); } else { // Calculate location of the decor...
[ "private", "void", "updateDecorationPainterUnclippedBounds", "(", "JLayeredPane", "layeredPane", ",", "Point", "relativeLocationToOwner", ")", "{", "Rectangle", "decorationBoundsInLayeredPane", ";", "if", "(", "layeredPane", "==", "null", ")", "{", "decorationBoundsInLayere...
Calculates and updates the unclipped bounds of the decoration painter in layered pane coordinates. @param layeredPane Layered pane containing the decoration painter. @param relativeLocationToOwner Location of the decoration painter relatively to the decorated component.
[ "Calculates", "and", "updates", "the", "unclipped", "bounds", "of", "the", "decoration", "painter", "in", "layered", "pane", "coordinates", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L665-L683
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java
AbstractComponentDecoration.updateDecorationPainterClippedBounds
private void updateDecorationPainterClippedBounds(JLayeredPane layeredPane, Point relativeLocationToOwner) { if (layeredPane == null) { decorationPainter.setClipBounds(null); } else { JComponent clippingComponent = getEffectiveClippingAncestor(); if (clippingComponent...
java
private void updateDecorationPainterClippedBounds(JLayeredPane layeredPane, Point relativeLocationToOwner) { if (layeredPane == null) { decorationPainter.setClipBounds(null); } else { JComponent clippingComponent = getEffectiveClippingAncestor(); if (clippingComponent...
[ "private", "void", "updateDecorationPainterClippedBounds", "(", "JLayeredPane", "layeredPane", ",", "Point", "relativeLocationToOwner", ")", "{", "if", "(", "layeredPane", "==", "null", ")", "{", "decorationPainter", ".", "setClipBounds", "(", "null", ")", ";", "}",...
Calculates and updates the clipped bounds of the decoration painter in layered pane coordinates. @param layeredPane Layered pane containing the decoration painter. @param relativeLocationToOwner Location of the decoration painter relatively to the decorated component.
[ "Calculates", "and", "updates", "the", "clipped", "bounds", "of", "the", "decoration", "painter", "in", "layered", "pane", "coordinates", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/AbstractComponentDecoration.java#L691-L727
train
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/cssbox/CssBoxPngRenderer.java
CssBoxPngRenderer.setDefaultFonts
private void setDefaultFonts(BrowserConfig config) { config.setDefaultFont(Font.SERIF, "Times New Roman"); config.setDefaultFont(Font.SANS_SERIF, "Arial"); config.setDefaultFont(Font.MONOSPACED, "Courier New"); }
java
private void setDefaultFonts(BrowserConfig config) { config.setDefaultFont(Font.SERIF, "Times New Roman"); config.setDefaultFont(Font.SANS_SERIF, "Arial"); config.setDefaultFont(Font.MONOSPACED, "Courier New"); }
[ "private", "void", "setDefaultFonts", "(", "BrowserConfig", "config", ")", "{", "config", ".", "setDefaultFont", "(", "Font", ".", "SERIF", ",", "\"Times New Roman\"", ")", ";", "config", ".", "setDefaultFont", "(", "Font", ".", "SANS_SERIF", ",", "\"Arial\"", ...
Sets some common fonts as the defaults for generic font families.
[ "Sets", "some", "common", "fonts", "as", "the", "defaults", "for", "generic", "font", "families", "." ]
58d6af66b1b1c738326c74d9ad5e4ad514120e27
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/cssbox/CssBoxPngRenderer.java#L162-L166
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.addResultCollector
public void addResultCollector(ResultCollector<?, DPO> resultCollector) { if (resultCollector != null) { addTrigger(resultCollector); addDataProvider(resultCollector); } }
java
public void addResultCollector(ResultCollector<?, DPO> resultCollector) { if (resultCollector != null) { addTrigger(resultCollector); addDataProvider(resultCollector); } }
[ "public", "void", "addResultCollector", "(", "ResultCollector", "<", "?", ",", "DPO", ">", "resultCollector", ")", "{", "if", "(", "resultCollector", "!=", "null", ")", "{", "addTrigger", "(", "resultCollector", ")", ";", "addDataProvider", "(", "resultCollector...
Adds the specified result collector to the triggers and data providers. @param resultCollector Result collector to be added.
[ "Adds", "the", "specified", "result", "collector", "to", "the", "triggers", "and", "data", "providers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L165-L170
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.removeResultCollector
public void removeResultCollector(ResultCollector<?, DPO> resultCollector) { if (resultCollector != null) { removeTrigger(resultCollector); removeDataProvider(resultCollector); } }
java
public void removeResultCollector(ResultCollector<?, DPO> resultCollector) { if (resultCollector != null) { removeTrigger(resultCollector); removeDataProvider(resultCollector); } }
[ "public", "void", "removeResultCollector", "(", "ResultCollector", "<", "?", ",", "DPO", ">", "resultCollector", ")", "{", "if", "(", "resultCollector", "!=", "null", ")", "{", "removeTrigger", "(", "resultCollector", ")", ";", "removeDataProvider", "(", "result...
Removes the specified result collector from the triggers and data providers. @param resultCollector Result collector to be removed.
[ "Removes", "the", "specified", "result", "collector", "from", "the", "triggers", "and", "data", "providers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L177-L182
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.getDataProviderOutputTransformers
public Transformer[] getDataProviderOutputTransformers() { Transformer[] transformers; if (dataProviderOutputTransformers == null) { transformers = null; } else { transformers = dataProviderOutputTransformers.toArray(new Transformer[dataProviderOutputTransformers.size ...
java
public Transformer[] getDataProviderOutputTransformers() { Transformer[] transformers; if (dataProviderOutputTransformers == null) { transformers = null; } else { transformers = dataProviderOutputTransformers.toArray(new Transformer[dataProviderOutputTransformers.size ...
[ "public", "Transformer", "[", "]", "getDataProviderOutputTransformers", "(", ")", "{", "Transformer", "[", "]", "transformers", ";", "if", "(", "dataProviderOutputTransformers", "==", "null", ")", "{", "transformers", "=", "null", ";", "}", "else", "{", "transfo...
Gets the transformers transforming the output of each data provider before they are mapped to the rules. @return Data provider output transformers.
[ "Gets", "the", "transformers", "transforming", "the", "output", "of", "each", "data", "provider", "before", "they", "are", "mapped", "to", "the", "rules", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L189-L200
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.processEachDataProviderWithEachRule
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processEachDataProviderWithEachRule() { // For each data provider for (DataProvider<DPO> dataProvider : dataProviders) { // Get the data provider output Object transformedOutput = dataProvider.g...
java
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processEachDataProviderWithEachRule() { // For each data provider for (DataProvider<DPO> dataProvider : dataProviders) { // Get the data provider output Object transformedOutput = dataProvider.g...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// NOSONAR (Avoid Duplicate Literals)", "private", "void", "processEachDataProviderWithEachRule", "(", ")", "{", "// For each data provider", "for", "(", "DataProvider", "<", "DPO", ">", "dataProvider", ":", "dataProvider...
Processes the output of each data provider one by one with each rule.
[ "Processes", "the", "output", "of", "each", "data", "provider", "one", "by", "one", "with", "each", "rule", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L367-L392
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.processAllDataProvidersWithEachRule
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processAllDataProvidersWithEachRule() { // For each data provider List<Object> transformedDataProvidersOutput = new ArrayList<Object>(dataProviders.size()); for (DataProvider<DPO> dataProvider : dataProviders) ...
java
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processAllDataProvidersWithEachRule() { // For each data provider List<Object> transformedDataProvidersOutput = new ArrayList<Object>(dataProviders.size()); for (DataProvider<DPO> dataProvider : dataProviders) ...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// NOSONAR (Avoid Duplicate Literals)", "private", "void", "processAllDataProvidersWithEachRule", "(", ")", "{", "// For each data provider", "List", "<", "Object", ">", "transformedDataProvidersOutput", "=", "new", "ArrayL...
Processes the output of all data providers, all at once, with each rule.
[ "Processes", "the", "output", "of", "all", "data", "providers", "all", "at", "once", "with", "each", "rule", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L397-L427
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.processRules
private void processRules(RI ruleInput) { switch (ruleToResultHandlerMapping) { case SPLIT: processEachRuleWithEachResultHandler(ruleInput); break; case JOIN: processAllRulesWithEachResultHandler(ruleInput); break; ...
java
private void processRules(RI ruleInput) { switch (ruleToResultHandlerMapping) { case SPLIT: processEachRuleWithEachResultHandler(ruleInput); break; case JOIN: processAllRulesWithEachResultHandler(ruleInput); break; ...
[ "private", "void", "processRules", "(", "RI", "ruleInput", ")", "{", "switch", "(", "ruleToResultHandlerMapping", ")", "{", "case", "SPLIT", ":", "processEachRuleWithEachResultHandler", "(", "ruleInput", ")", ";", "break", ";", "case", "JOIN", ":", "processAllRule...
Processes the specified rule input. @param ruleInput Rule input to be validated.
[ "Processes", "the", "specified", "rule", "input", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L434-L446
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.processEachRuleWithEachResultHandler
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processEachRuleWithEachResultHandler(RI ruleInput) { // For each rule for (Rule<RI, RO> rule : rules) { // Validate the data and get the rule output Object ruleOutput = rule.validate(ruleInput);...
java
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processEachRuleWithEachResultHandler(RI ruleInput) { // For each rule for (Rule<RI, RO> rule : rules) { // Validate the data and get the rule output Object ruleOutput = rule.validate(ruleInput);...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// NOSONAR (Avoid Duplicate Literals)", "private", "void", "processEachRuleWithEachResultHandler", "(", "RI", "ruleInput", ")", "{", "// For each rule", "for", "(", "Rule", "<", "RI", ",", "RO", ">", "rule", ":", ...
Processes the specified rule input with each rule, and processes the results of each rule one by one with each result handler. @param ruleInput Rule input to be validated.
[ "Processes", "the", "specified", "rule", "input", "with", "each", "rule", "and", "processes", "the", "results", "of", "each", "rule", "one", "by", "one", "with", "each", "result", "handler", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L454-L479
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.processAllRulesWithEachResultHandler
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processAllRulesWithEachResultHandler(RI ruleInput) { // For each rule List<Object> combinedRulesOutput = new ArrayList<Object>(rules.size()); for (Rule<RI, RO> rule : rules) { // Validate the data a...
java
@SuppressWarnings("unchecked") // NOSONAR (Avoid Duplicate Literals) private void processAllRulesWithEachResultHandler(RI ruleInput) { // For each rule List<Object> combinedRulesOutput = new ArrayList<Object>(rules.size()); for (Rule<RI, RO> rule : rules) { // Validate the data a...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "// NOSONAR (Avoid Duplicate Literals)", "private", "void", "processAllRulesWithEachResultHandler", "(", "RI", "ruleInput", ")", "{", "// For each rule", "List", "<", "Object", ">", "combinedRulesOutput", "=", "new", "Ar...
Processes the specified rule input with each rule, and processes the result of all rules, all at once, with each result handler. @param ruleInput Rule input to be validated.
[ "Processes", "the", "specified", "rule", "input", "with", "each", "rule", "and", "processes", "the", "result", "of", "all", "rules", "all", "at", "once", "with", "each", "result", "handler", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L487-L517
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.processResultHandlers
private void processResultHandlers(RHI resultHandlerInput) { for (ResultHandler<RHI> resultHandler : resultHandlers) { resultHandler.handleResult(resultHandlerInput); } }
java
private void processResultHandlers(RHI resultHandlerInput) { for (ResultHandler<RHI> resultHandler : resultHandlers) { resultHandler.handleResult(resultHandlerInput); } }
[ "private", "void", "processResultHandlers", "(", "RHI", "resultHandlerInput", ")", "{", "for", "(", "ResultHandler", "<", "RHI", ">", "resultHandler", ":", "resultHandlers", ")", "{", "resultHandler", ".", "handleResult", "(", "resultHandlerInput", ")", ";", "}", ...
Processes the specified result handler input with each result handler. @param resultHandlerInput Result handler input to be handled.
[ "Processes", "the", "specified", "result", "handler", "input", "with", "each", "result", "handler", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L524-L528
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java
GeneralValidator.dispose
private void dispose(Collection<Transformer> elements) { if (elements != null) { for (Transformer<?, ?> element : elements) { if (element instanceof Disposable) { ((Disposable) element).dispose(); } } elements.clear(); ...
java
private void dispose(Collection<Transformer> elements) { if (elements != null) { for (Transformer<?, ?> element : elements) { if (element instanceof Disposable) { ((Disposable) element).dispose(); } } elements.clear(); ...
[ "private", "void", "dispose", "(", "Collection", "<", "Transformer", ">", "elements", ")", "{", "if", "(", "elements", "!=", "null", ")", "{", "for", "(", "Transformer", "<", "?", ",", "?", ">", "element", ":", "elements", ")", "{", "if", "(", "eleme...
Disposes the elements of the specified collection. @param elements Elements to be disposed.
[ "Disposes", "the", "elements", "of", "the", "specified", "collection", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/GeneralValidator.java#L550-L559
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/AbstractCellIconFeedback.java
AbstractCellIconFeedback.getAbsoluteAnchorLinkWithCell
private AnchorLink getAbsoluteAnchorLinkWithCell(int dragOffsetX) { AnchorLink absoluteAnchorLink; TableModel tableModel = table.getModel(); if ((0 <= modelRowIndex) && (modelRowIndex < tableModel.getRowCount()) && (0 <= modelColumnIndex) && (modelColumnIndex < tableModel.getCol...
java
private AnchorLink getAbsoluteAnchorLinkWithCell(int dragOffsetX) { AnchorLink absoluteAnchorLink; TableModel tableModel = table.getModel(); if ((0 <= modelRowIndex) && (modelRowIndex < tableModel.getRowCount()) && (0 <= modelColumnIndex) && (modelColumnIndex < tableModel.getCol...
[ "private", "AnchorLink", "getAbsoluteAnchorLinkWithCell", "(", "int", "dragOffsetX", ")", "{", "AnchorLink", "absoluteAnchorLink", ";", "TableModel", "tableModel", "=", "table", ".", "getModel", "(", ")", ";", "if", "(", "(", "0", "<=", "modelRowIndex", ")", "&&...
Retrieves the absolute anchor link to attach the decoration to the cell. @param dragOffsetX Dragged distance in case the column is being dragged, 0 otherwise. @return Absolute anchor link to attach the decoration to the cell.
[ "Retrieves", "the", "absolute", "anchor", "link", "to", "attach", "the", "decoration", "to", "the", "cell", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/resulthandler/AbstractCellIconFeedback.java#L371-L397
train
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrFacetToFacetQueryResultItemConverter.java
SolrFacetToFacetQueryResultItemConverter.convert
public static List<FacetQueryResult.Field> convert(QueryResponse solrResponse, Map<String, String> alias) { // Sanity check if (solrResponse == null || solrResponse.getResponse() == null || solrResponse.getResponse().get("facets") == null) { return null; } if (alias == null)...
java
public static List<FacetQueryResult.Field> convert(QueryResponse solrResponse, Map<String, String> alias) { // Sanity check if (solrResponse == null || solrResponse.getResponse() == null || solrResponse.getResponse().get("facets") == null) { return null; } if (alias == null)...
[ "public", "static", "List", "<", "FacetQueryResult", ".", "Field", ">", "convert", "(", "QueryResponse", "solrResponse", ",", "Map", "<", "String", ",", "String", ">", "alias", ")", "{", "// Sanity check", "if", "(", "solrResponse", "==", "null", "||", "solr...
Convert a generic solrResponse into our FacetQueryResult. @param solrResponse SolrResponse. @param alias Map containing the solr keys present in the solrResponse and the key we actually want to be visible for the user. This is mainly to be able to hide private solr keys to the user and use better user-friendly ...
[ "Convert", "a", "generic", "solrResponse", "into", "our", "FacetQueryResult", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrFacetToFacetQueryResultItemConverter.java#L26-L61
train
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrFacetToFacetQueryResultItemConverter.java
SolrFacetToFacetQueryResultItemConverter.getBucketCount
private static int getBucketCount(SimpleOrderedMap<Object> solrFacets, int defaultCount) { List<SimpleOrderedMap<Object>> solrBuckets = (List<SimpleOrderedMap<Object>>) solrFacets.get("buckets"); if (solrBuckets == null) { for (int i = 0; i < solrFacets.size(); i++) { if (sol...
java
private static int getBucketCount(SimpleOrderedMap<Object> solrFacets, int defaultCount) { List<SimpleOrderedMap<Object>> solrBuckets = (List<SimpleOrderedMap<Object>>) solrFacets.get("buckets"); if (solrBuckets == null) { for (int i = 0; i < solrFacets.size(); i++) { if (sol...
[ "private", "static", "int", "getBucketCount", "(", "SimpleOrderedMap", "<", "Object", ">", "solrFacets", ",", "int", "defaultCount", ")", "{", "List", "<", "SimpleOrderedMap", "<", "Object", ">>", "solrBuckets", "=", "(", "List", "<", "SimpleOrderedMap", "<", ...
In order to process type=query facets with a nested type=range. @param solrFacets Solr facet @param defaultCount Default count @return Actual count
[ "In", "order", "to", "process", "type", "=", "query", "facets", "with", "a", "nested", "type", "=", "range", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrFacetToFacetQueryResultItemConverter.java#L70-L80
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/DependencyConfigs.java
DependencyConfigs.printAll
@SuppressWarnings("unused") public void printAll() { project.getLogger().lifecycle("Full contents of dependency configurations:"); project.getLogger().lifecycle("-------------------------------------------"); for (final Map.Entry<String, DependencyConfig> entry : depConfigs.entrySet()) {...
java
@SuppressWarnings("unused") public void printAll() { project.getLogger().lifecycle("Full contents of dependency configurations:"); project.getLogger().lifecycle("-------------------------------------------"); for (final Map.Entry<String, DependencyConfig> entry : depConfigs.entrySet()) {...
[ "@", "SuppressWarnings", "(", "\"unused\"", ")", "public", "void", "printAll", "(", ")", "{", "project", ".", "getLogger", "(", ")", ".", "lifecycle", "(", "\"Full contents of dependency configurations:\"", ")", ";", "project", ".", "getLogger", "(", ")", ".", ...
Prints all dependency configurations with full contents for debugging purposes.
[ "Prints", "all", "dependency", "configurations", "with", "full", "contents", "for", "debugging", "purposes", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/DependencyConfigs.java#L228-L236
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JTableRolloverCellProperty.java
JTableRolloverCellProperty.updateValue
private void updateValue(Point location) { CellPosition oldValue = value; if (location == null) { value = null; } else { int row = table.rowAtPoint(location); int column = table.columnAtPoint(location); value = new CellPosition(row, column); ...
java
private void updateValue(Point location) { CellPosition oldValue = value; if (location == null) { value = null; } else { int row = table.rowAtPoint(location); int column = table.columnAtPoint(location); value = new CellPosition(row, column); ...
[ "private", "void", "updateValue", "(", "Point", "location", ")", "{", "CellPosition", "oldValue", "=", "value", ";", "if", "(", "location", "==", "null", ")", "{", "value", "=", "null", ";", "}", "else", "{", "int", "row", "=", "table", ".", "rowAtPoin...
Updates the value of this property based on the location of the mouse pointer. @param location Location of the mouse in the relatively to the table.
[ "Updates", "the", "value", "of", "this", "property", "based", "on", "the", "location", "of", "the", "mouse", "pointer", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JTableRolloverCellProperty.java#L104-L114
train
hdinsight/storm-eventhubs
src/main/java/org/apache/storm/eventhubs/spout/EventHubSpout.java
EventHubSpout.preparePartitions
public void preparePartitions(Map config, int totalTasks, int taskIndex, SpoutOutputCollector collector) throws Exception { this.collector = collector; if(stateStore == null) { String zkEndpointAddress = eventHubConfig.getZkConnectionString(); if (zkEndpointAddress == null || zkEndpointAddress.lengt...
java
public void preparePartitions(Map config, int totalTasks, int taskIndex, SpoutOutputCollector collector) throws Exception { this.collector = collector; if(stateStore == null) { String zkEndpointAddress = eventHubConfig.getZkConnectionString(); if (zkEndpointAddress == null || zkEndpointAddress.lengt...
[ "public", "void", "preparePartitions", "(", "Map", "config", ",", "int", "totalTasks", ",", "int", "taskIndex", ",", "SpoutOutputCollector", "collector", ")", "throws", "Exception", "{", "this", ".", "collector", "=", "collector", ";", "if", "(", "stateStore", ...
This is a extracted method that is easy to test @param config @param totalTasks @param taskIndex @param collector @throws Exception
[ "This", "is", "a", "extracted", "method", "that", "is", "easy", "to", "test" ]
86c99201e6df5e1caee3f664de8843bd656c0f1c
https://github.com/hdinsight/storm-eventhubs/blob/86c99201e6df5e1caee3f664de8843bd656c0f1c/src/main/java/org/apache/storm/eventhubs/spout/EventHubSpout.java#L105-L136
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/trigger/PropertyChangeTrigger.java
PropertyChangeTrigger.propertyChange
@Override public void propertyChange(PropertyChangeEvent propertyChangeEvent) { if ((triggerProperties == null) || triggerProperties.isEmpty() || triggerProperties.contains (propertyChangeEvent.getPropertyName())) { fireTriggerEvent(new TriggerEvent(propertyChangeEvent.getSource(...
java
@Override public void propertyChange(PropertyChangeEvent propertyChangeEvent) { if ((triggerProperties == null) || triggerProperties.isEmpty() || triggerProperties.contains (propertyChangeEvent.getPropertyName())) { fireTriggerEvent(new TriggerEvent(propertyChangeEvent.getSource(...
[ "@", "Override", "public", "void", "propertyChange", "(", "PropertyChangeEvent", "propertyChangeEvent", ")", "{", "if", "(", "(", "triggerProperties", "==", "null", ")", "||", "triggerProperties", ".", "isEmpty", "(", ")", "||", "triggerProperties", ".", "contains...
Triggers the validation when the property change event is received. @see PropertyChangeListener#propertyChange(PropertyChangeEvent)
[ "Triggers", "the", "validation", "when", "the", "property", "change", "event", "is", "received", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/trigger/PropertyChangeTrigger.java#L91-L97
train
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java
SolrManager.existsCore
public boolean existsCore(String coreName) { try { CoreStatus status = CoreAdminRequest.getCoreStatus(coreName, solrClient); status.getInstanceDirectory(); } catch (Exception e) { return false; } return true; }
java
public boolean existsCore(String coreName) { try { CoreStatus status = CoreAdminRequest.getCoreStatus(coreName, solrClient); status.getInstanceDirectory(); } catch (Exception e) { return false; } return true; }
[ "public", "boolean", "existsCore", "(", "String", "coreName", ")", "{", "try", "{", "CoreStatus", "status", "=", "CoreAdminRequest", ".", "getCoreStatus", "(", "coreName", ",", "solrClient", ")", ";", "status", ".", "getInstanceDirectory", "(", ")", ";", "}", ...
Check if a given core exists. @param coreName Core name @return True or false
[ "Check", "if", "a", "given", "core", "exists", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java#L187-L195
train
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java
SolrManager.existsCollection
public boolean existsCollection(String collectionName) throws SolrException { try { List<String> collections = CollectionAdminRequest.listCollections(solrClient); for (String collection : collections) { if (collection.equals(collectionName)) { return t...
java
public boolean existsCollection(String collectionName) throws SolrException { try { List<String> collections = CollectionAdminRequest.listCollections(solrClient); for (String collection : collections) { if (collection.equals(collectionName)) { return t...
[ "public", "boolean", "existsCollection", "(", "String", "collectionName", ")", "throws", "SolrException", "{", "try", "{", "List", "<", "String", ">", "collections", "=", "CollectionAdminRequest", ".", "listCollections", "(", "solrClient", ")", ";", "for", "(", ...
Check if a given collection exists. @param collectionName Collection name @return True or false @throws SolrException SolrException
[ "Check", "if", "a", "given", "collection", "exists", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java#L204-L216
train
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java
SolrManager.removeCollection
public void removeCollection(String collectionName) throws SolrException { try { CollectionAdminRequest request = CollectionAdminRequest.deleteCollection(collectionName); request.process(solrClient); } catch (SolrServerException | IOException e) { throw new SolrExcept...
java
public void removeCollection(String collectionName) throws SolrException { try { CollectionAdminRequest request = CollectionAdminRequest.deleteCollection(collectionName); request.process(solrClient); } catch (SolrServerException | IOException e) { throw new SolrExcept...
[ "public", "void", "removeCollection", "(", "String", "collectionName", ")", "throws", "SolrException", "{", "try", "{", "CollectionAdminRequest", "request", "=", "CollectionAdminRequest", ".", "deleteCollection", "(", "collectionName", ")", ";", "request", ".", "proce...
Remove a collection. @param collectionName Collection name @throws SolrException SolrException
[ "Remove", "a", "collection", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java#L238-L245
train
opencb/java-common-libs
commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java
SolrManager.removeCore
public void removeCore(String coreName) throws SolrException { try { CoreAdminRequest.unloadCore(coreName, true, true, solrClient); } catch (SolrServerException | IOException e) { throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e); } }
java
public void removeCore(String coreName) throws SolrException { try { CoreAdminRequest.unloadCore(coreName, true, true, solrClient); } catch (SolrServerException | IOException e) { throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e); } }
[ "public", "void", "removeCore", "(", "String", "coreName", ")", "throws", "SolrException", "{", "try", "{", "CoreAdminRequest", ".", "unloadCore", "(", "coreName", ",", "true", ",", "true", ",", "solrClient", ")", ";", "}", "catch", "(", "SolrServerException",...
Remove a core. @param coreName Core name @throws SolrException SolrException
[ "Remove", "a", "core", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-solr/src/main/java/org/opencb/commons/datastore/solr/SolrManager.java#L253-L259
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCLocalLauncher.java
BMPCLocalLauncher.install
public synchronized static void install() { if (!isInstalled()) { InputStream is = BMPCLocalLauncher.class.getResourceAsStream(BMP_LOCAL_ZIP_RES); try { // Unzip BrowserMob Proxy contained in the project "/resources" unzip(is, BMPC_USER_DIR); ...
java
public synchronized static void install() { if (!isInstalled()) { InputStream is = BMPCLocalLauncher.class.getResourceAsStream(BMP_LOCAL_ZIP_RES); try { // Unzip BrowserMob Proxy contained in the project "/resources" unzip(is, BMPC_USER_DIR); ...
[ "public", "synchronized", "static", "void", "install", "(", ")", "{", "if", "(", "!", "isInstalled", "(", ")", ")", "{", "InputStream", "is", "=", "BMPCLocalLauncher", ".", "class", ".", "getResourceAsStream", "(", "BMP_LOCAL_ZIP_RES", ")", ";", "try", "{", ...
Install Local BrowserMob Proxy.
[ "Install", "Local", "BrowserMob", "Proxy", "." ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCLocalLauncher.java#L118-L135
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCLocalLauncher.java
BMPCLocalLauncher.installedVersion
public synchronized static String installedVersion() { BufferedReader versionReader = null; try { versionReader = new BufferedReader(new FileReader(BMP_LOCAL_VERSION_FILE)); // Read version and verify it's there String version = versionReader.readLine(); ...
java
public synchronized static String installedVersion() { BufferedReader versionReader = null; try { versionReader = new BufferedReader(new FileReader(BMP_LOCAL_VERSION_FILE)); // Read version and verify it's there String version = versionReader.readLine(); ...
[ "public", "synchronized", "static", "String", "installedVersion", "(", ")", "{", "BufferedReader", "versionReader", "=", "null", ";", "try", "{", "versionReader", "=", "new", "BufferedReader", "(", "new", "FileReader", "(", "BMP_LOCAL_VERSION_FILE", ")", ")", ";",...
Installed version of Local BrowserMob Proxy @return Version of Local BrowserMob Proxy, if installed. Throws @see BMPCLocalLauncherNotInstallerException if not installed. Please use BMPCLocalLauncher#isInstalled() to check first.
[ "Installed", "version", "of", "Local", "BrowserMob", "Proxy" ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCLocalLauncher.java#L154-L174
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCLocalLauncher.java
BMPCLocalLauncher.delete
private synchronized static void delete(File file) { // Check if file is directory if (file.isDirectory()) { // Get all files in the folder File[] files = file.listFiles(); // Delete each file in the folder for (int i = 0; i < files.length; ++i) { ...
java
private synchronized static void delete(File file) { // Check if file is directory if (file.isDirectory()) { // Get all files in the folder File[] files = file.listFiles(); // Delete each file in the folder for (int i = 0; i < files.length; ++i) { ...
[ "private", "synchronized", "static", "void", "delete", "(", "File", "file", ")", "{", "// Check if file is directory", "if", "(", "file", ".", "isDirectory", "(", ")", ")", "{", "// Get all files in the folder", "File", "[", "]", "files", "=", "file", ".", "li...
Delete file, recursively if needed @param file File/Directory to delete
[ "Delete", "file", "recursively", "if", "needed" ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCLocalLauncher.java#L234-L251
train
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/lucene/LuceneParser.java
LuceneParser.parse
public List<LuceneToken> parse(String fieldName, String text) throws IOException { return readTokens(analyzer.tokenStream(fieldName, text)); }
java
public List<LuceneToken> parse(String fieldName, String text) throws IOException { return readTokens(analyzer.tokenStream(fieldName, text)); }
[ "public", "List", "<", "LuceneToken", ">", "parse", "(", "String", "fieldName", ",", "String", "text", ")", "throws", "IOException", "{", "return", "readTokens", "(", "analyzer", ".", "tokenStream", "(", "fieldName", ",", "text", ")", ")", ";", "}" ]
Parses one line of text
[ "Parses", "one", "line", "of", "text" ]
58d6af66b1b1c738326c74d9ad5e4ad514120e27
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/lucene/LuceneParser.java#L62-L65
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/resulthandler/CompositeResultHandler.java
CompositeResultHandler.handleResult
@Override public void handleResult(RHI result) { for (ResultHandler<RHI> resultHandler : resultHandlers) { resultHandler.handleResult(result); } }
java
@Override public void handleResult(RHI result) { for (ResultHandler<RHI> resultHandler : resultHandlers) { resultHandler.handleResult(result); } }
[ "@", "Override", "public", "void", "handleResult", "(", "RHI", "result", ")", "{", "for", "(", "ResultHandler", "<", "RHI", ">", "resultHandler", ":", "resultHandlers", ")", "{", "resultHandler", ".", "handleResult", "(", "result", ")", ";", "}", "}" ]
Processes the specified result using all delegate result handlers. @param result Validation result to be handled. @see ResultHandler#handleResult(Object)
[ "Processes", "the", "specified", "result", "using", "all", "delegate", "result", "handlers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/resulthandler/CompositeResultHandler.java#L96-L101
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/tasks/CreateJarEclipseTask.java
CreateJarEclipseTask.getPublishedDependencyLibs
public static Set<File> getPublishedDependencyLibs(@Nonnull final Task pTask, @Nonnull final DependencyConfig pDepConfig) { Set<File> result = new HashSet<>(); Configuration cfg = new ClasspathBuilder(pTask.getProject()).buildMainRuntimeConfiguration(pDepConfig); for (ResolvedDepende...
java
public static Set<File> getPublishedDependencyLibs(@Nonnull final Task pTask, @Nonnull final DependencyConfig pDepConfig) { Set<File> result = new HashSet<>(); Configuration cfg = new ClasspathBuilder(pTask.getProject()).buildMainRuntimeConfiguration(pDepConfig); for (ResolvedDepende...
[ "public", "static", "Set", "<", "File", ">", "getPublishedDependencyLibs", "(", "@", "Nonnull", "final", "Task", "pTask", ",", "@", "Nonnull", "final", "DependencyConfig", "pDepConfig", ")", "{", "Set", "<", "File", ">", "result", "=", "new", "HashSet", "<>"...
Scan the dependencies of the specified configurations and return a list of File objects for each dependency. Resolves the configurations if they are still unresolved. @param pTask the calling task @param pDepConfig the current dependency configuration @return list of files
[ "Scan", "the", "dependencies", "of", "the", "specified", "configurations", "and", "return", "a", "list", "of", "File", "objects", "for", "each", "dependency", ".", "Resolves", "the", "configurations", "if", "they", "are", "still", "unresolved", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/tasks/CreateJarEclipseTask.java#L77-L90
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java
DefaultMappableValidator.processTrigger
@Override protected void processTrigger(final Trigger trigger) { // Get data providers matching the trigger final List<DataProvider<RI>> mappedDataProviders = triggersToDataProviders.get(trigger); if ((mappedDataProviders == null) || mappedDataProviders.isEmpty()) { LOGGER.warn("...
java
@Override protected void processTrigger(final Trigger trigger) { // Get data providers matching the trigger final List<DataProvider<RI>> mappedDataProviders = triggersToDataProviders.get(trigger); if ((mappedDataProviders == null) || mappedDataProviders.isEmpty()) { LOGGER.warn("...
[ "@", "Override", "protected", "void", "processTrigger", "(", "final", "Trigger", "trigger", ")", "{", "// Get data providers matching the trigger", "final", "List", "<", "DataProvider", "<", "RI", ">", ">", "mappedDataProviders", "=", "triggersToDataProviders", ".", "...
Processes the specified trigger by finding all the mapped data providers, and so on. @see AbstractMappableValidator#processTrigger(Trigger)
[ "Processes", "the", "specified", "trigger", "by", "finding", "all", "the", "mapped", "data", "providers", "and", "so", "on", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java#L67-L79
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java
DefaultMappableValidator.processDataProvider
private void processDataProvider(final DataProvider<RI> dataProvider) { // Get rules matching the data provider final List<Rule<RI, RO>> mappedRules = dataProvidersToRules.get(dataProvider); if ((mappedRules == null) || mappedRules.isEmpty()) { LOGGER.warn("No matching rule in mappab...
java
private void processDataProvider(final DataProvider<RI> dataProvider) { // Get rules matching the data provider final List<Rule<RI, RO>> mappedRules = dataProvidersToRules.get(dataProvider); if ((mappedRules == null) || mappedRules.isEmpty()) { LOGGER.warn("No matching rule in mappab...
[ "private", "void", "processDataProvider", "(", "final", "DataProvider", "<", "RI", ">", "dataProvider", ")", "{", "// Get rules matching the data provider", "final", "List", "<", "Rule", "<", "RI", ",", "RO", ">", ">", "mappedRules", "=", "dataProvidersToRules", "...
Process the specified data provider by finding all the mapped rules, and so on. @param dataProvider Data provider to be processed.
[ "Process", "the", "specified", "data", "provider", "by", "finding", "all", "the", "mapped", "rules", "and", "so", "on", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java#L86-L100
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java
DefaultMappableValidator.processRule
private void processRule(final Rule<RI, RO> rule, final RI data) { // Get result handlers matching the rule final List<ResultHandler<RO>> mappedResultHandlers = rulesToResultHandlers.get(rule); if ((mappedResultHandlers == null) || mappedResultHandlers.isEmpty()) { LOGGER.warn("No ma...
java
private void processRule(final Rule<RI, RO> rule, final RI data) { // Get result handlers matching the rule final List<ResultHandler<RO>> mappedResultHandlers = rulesToResultHandlers.get(rule); if ((mappedResultHandlers == null) || mappedResultHandlers.isEmpty()) { LOGGER.warn("No ma...
[ "private", "void", "processRule", "(", "final", "Rule", "<", "RI", ",", "RO", ">", "rule", ",", "final", "RI", "data", ")", "{", "// Get result handlers matching the rule", "final", "List", "<", "ResultHandler", "<", "RO", ">", ">", "mappedResultHandlers", "="...
Processes the specified rule by finding all the mapped results handlers, checking the rule and processing the rule result using all found result handlers. @param rule Rule to be processed. @param data Data to be checked against the rule.
[ "Processes", "the", "specified", "rule", "by", "finding", "all", "the", "mapped", "results", "handlers", "checking", "the", "rule", "and", "processing", "the", "rule", "result", "using", "all", "found", "result", "handlers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/DefaultMappableValidator.java#L110-L124
train
padrig64/ValidationFramework
validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/resultcollectorvalidator/ValidatorContext.java
ValidatorContext.handleWith
public ValidatorContext<D, O> handleWith(final ResultHandler<O>... resultHandlers) { if (resultHandlers != null) { Collections.addAll(registeredResultHandlers, resultHandlers); } return this; }
java
public ValidatorContext<D, O> handleWith(final ResultHandler<O>... resultHandlers) { if (resultHandlers != null) { Collections.addAll(registeredResultHandlers, resultHandlers); } return this; }
[ "public", "ValidatorContext", "<", "D", ",", "O", ">", "handleWith", "(", "final", "ResultHandler", "<", "O", ">", "...", "resultHandlers", ")", "{", "if", "(", "resultHandlers", "!=", "null", ")", "{", "Collections", ".", "addAll", "(", "registeredResultHan...
Adds more result handlers to the validator. @param resultHandlers Result handlers to be added. @return Same validator context.
[ "Adds", "more", "result", "handlers", "to", "the", "validator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/resultcollectorvalidator/ValidatorContext.java#L72-L77
train
google/cloud-reporting
src/main/java/com/google/cloud/metrics/MetricsUtils.java
MetricsUtils.buildCombinedType
static String buildCombinedType(String eventType, Optional<String> objectType) { return Joiner.on("/").skipNulls().join(eventType, objectType.orNull()); }
java
static String buildCombinedType(String eventType, Optional<String> objectType) { return Joiner.on("/").skipNulls().join(eventType, objectType.orNull()); }
[ "static", "String", "buildCombinedType", "(", "String", "eventType", ",", "Optional", "<", "String", ">", "objectType", ")", "{", "return", "Joiner", ".", "on", "(", "\"/\"", ")", ".", "skipNulls", "(", ")", ".", "join", "(", "eventType", ",", "objectType"...
Combines event and object type into a single type string. @param eventType type or category of the reporting event. @param objectType optional type of the object this event applies to. @return Combined type string.
[ "Combines", "event", "and", "object", "type", "into", "a", "single", "type", "string", "." ]
af2a8ff6077a9763f7f2d405dd55c82efaead0ac
https://github.com/google/cloud-reporting/blob/af2a8ff6077a9763f7f2d405dd55c82efaead0ac/src/main/java/com/google/cloud/metrics/MetricsUtils.java#L128-L130
train
google/cloud-reporting
src/main/java/com/google/cloud/metrics/MetricsUtils.java
MetricsUtils.buildVirtualPageTitle
static String buildVirtualPageTitle(Map<String, String> metadata) { checkNotNull(metadata); List<String> escapedMetadata = new ArrayList<>(); for (Map.Entry<String, String> entry : metadata.entrySet()) { escapedMetadata.add(METADATA_ESCAPER.escape(entry.getKey()) + "=" + METADATA_ESCAPER.esc...
java
static String buildVirtualPageTitle(Map<String, String> metadata) { checkNotNull(metadata); List<String> escapedMetadata = new ArrayList<>(); for (Map.Entry<String, String> entry : metadata.entrySet()) { escapedMetadata.add(METADATA_ESCAPER.escape(entry.getKey()) + "=" + METADATA_ESCAPER.esc...
[ "static", "String", "buildVirtualPageTitle", "(", "Map", "<", "String", ",", "String", ">", "metadata", ")", "{", "checkNotNull", "(", "metadata", ")", ";", "List", "<", "String", ">", "escapedMetadata", "=", "new", "ArrayList", "<>", "(", ")", ";", "for",...
Creates a virtual page title from a set of metadata key-value pairs. @param metadata Metadata map. @return Virtual page title constructed from the metadata, escaped as required by the format.
[ "Creates", "a", "virtual", "page", "title", "from", "a", "set", "of", "metadata", "key", "-", "value", "pairs", "." ]
af2a8ff6077a9763f7f2d405dd55c82efaead0ac
https://github.com/google/cloud-reporting/blob/af2a8ff6077a9763f7f2d405dd55c82efaead0ac/src/main/java/com/google/cloud/metrics/MetricsUtils.java#L152-L160
train
google/cloud-reporting
src/main/java/com/google/cloud/metrics/MetricsUtils.java
MetricsUtils.buildParameters
static ImmutableList<NameValuePair> buildParameters( String analyticsId, String clientId, String virtualPageName, String virtualPageTitle, String eventType, String eventName, boolean isUserSignedIn, boolean isUserInternal, Optional<Boolean> isUserTrialEligible, ...
java
static ImmutableList<NameValuePair> buildParameters( String analyticsId, String clientId, String virtualPageName, String virtualPageTitle, String eventType, String eventName, boolean isUserSignedIn, boolean isUserInternal, Optional<Boolean> isUserTrialEligible, ...
[ "static", "ImmutableList", "<", "NameValuePair", ">", "buildParameters", "(", "String", "analyticsId", ",", "String", "clientId", ",", "String", "virtualPageName", ",", "String", "virtualPageTitle", ",", "String", "eventType", ",", "String", "eventName", ",", "boole...
Creates the parameters required to record the Google Analytics event. @see https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters @param analyticsId Google Analytics ID to receive the report data. @param clientId Client ID - must not include PII. @param virtualPageName Full relative URL o...
[ "Creates", "the", "parameters", "required", "to", "record", "the", "Google", "Analytics", "event", "." ]
af2a8ff6077a9763f7f2d405dd55c82efaead0ac
https://github.com/google/cloud-reporting/blob/af2a8ff6077a9763f7f2d405dd55c82efaead0ac/src/main/java/com/google/cloud/metrics/MetricsUtils.java#L183-L252
train
padrig64/ValidationFramework
validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/simplevalidator/RuleContext.java
RuleContext.read
public RuleContext<D> read(final DataProvider<D>... dataProviders) { if (dataProviders != null) { Collections.addAll(registeredDataProviders, dataProviders); } return this; }
java
public RuleContext<D> read(final DataProvider<D>... dataProviders) { if (dataProviders != null) { Collections.addAll(registeredDataProviders, dataProviders); } return this; }
[ "public", "RuleContext", "<", "D", ">", "read", "(", "final", "DataProvider", "<", "D", ">", "...", "dataProviders", ")", "{", "if", "(", "dataProviders", "!=", "null", ")", "{", "Collections", ".", "addAll", "(", "registeredDataProviders", ",", "dataProvide...
Adds more data providers to the validator. @param dataProviders Data providers to be added. @return Same rule context.
[ "Adds", "more", "data", "providers", "to", "the", "validator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/simplevalidator/RuleContext.java#L85-L90
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/CompositeReadableProperty.java
CompositeReadableProperty.updateFromProperties
private void updateFromProperties() { // Get value from all properties: use a new collection so that equals() returns false List<R> newValues = new ArrayList<R>(); for (ReadableProperty<R> master : properties) { newValues.add(master.getValue()); } // Notify slaves ...
java
private void updateFromProperties() { // Get value from all properties: use a new collection so that equals() returns false List<R> newValues = new ArrayList<R>(); for (ReadableProperty<R> master : properties) { newValues.add(master.getValue()); } // Notify slaves ...
[ "private", "void", "updateFromProperties", "(", ")", "{", "// Get value from all properties: use a new collection so that equals() returns false", "List", "<", "R", ">", "newValues", "=", "new", "ArrayList", "<", "R", ">", "(", ")", ";", "for", "(", "ReadableProperty", ...
Updates the current collection of values from the sub-properties and notifies the listeners.
[ "Updates", "the", "current", "collection", "of", "values", "from", "the", "sub", "-", "properties", "and", "notifies", "the", "listeners", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/CompositeReadableProperty.java#L169-L178
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractSimpleValidator.java
AbstractSimpleValidator.dispose
private void dispose(Collection<?> elements) { // Dispose all disposable elements for (Object element : elements) { if (element instanceof Disposable) { ((Disposable) element).dispose(); } } // Clear collection dataProviders.clear(); }
java
private void dispose(Collection<?> elements) { // Dispose all disposable elements for (Object element : elements) { if (element instanceof Disposable) { ((Disposable) element).dispose(); } } // Clear collection dataProviders.clear(); }
[ "private", "void", "dispose", "(", "Collection", "<", "?", ">", "elements", ")", "{", "// Dispose all disposable elements", "for", "(", "Object", "element", ":", "elements", ")", "{", "if", "(", "element", "instanceof", "Disposable", ")", "{", "(", "(", "Dis...
Clears all elements from the specified collection. @param elements Collection of elements to be disposed (for instance, data providers, rules, result handlers).
[ "Clears", "all", "elements", "from", "the", "specified", "collection", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractSimpleValidator.java#L268-L278
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/binding/SimpleBond.java
SimpleBond.init
private void init(ReadableProperty<MO> master, Transformer<MO, SI> transformer, WritableProperty<SI> slave) { this.master = master; this.transformer = transformer; this.slave = slave; master.addValueChangeListener(masterAdapter); // Slave initial values updateSlaves(mas...
java
private void init(ReadableProperty<MO> master, Transformer<MO, SI> transformer, WritableProperty<SI> slave) { this.master = master; this.transformer = transformer; this.slave = slave; master.addValueChangeListener(masterAdapter); // Slave initial values updateSlaves(mas...
[ "private", "void", "init", "(", "ReadableProperty", "<", "MO", ">", "master", ",", "Transformer", "<", "MO", ",", "SI", ">", "transformer", ",", "WritableProperty", "<", "SI", ">", "slave", ")", "{", "this", ".", "master", "=", "master", ";", "this", "...
Initializes the bond. @param master Master (possibly composite) property. @param transformer Value transformer. @param slave Slave (possibly composite) property.
[ "Initializes", "the", "bond", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/binding/SimpleBond.java#L133-L142
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/binding/SimpleBond.java
SimpleBond.updateSlaves
private void updateSlaves(MO masterOutputValue) { // Transform value SI slaveInputValue = transformer.transform(masterOutputValue); // Notify slave(s) slave.setValue(slaveInputValue); }
java
private void updateSlaves(MO masterOutputValue) { // Transform value SI slaveInputValue = transformer.transform(masterOutputValue); // Notify slave(s) slave.setValue(slaveInputValue); }
[ "private", "void", "updateSlaves", "(", "MO", "masterOutputValue", ")", "{", "// Transform value", "SI", "slaveInputValue", "=", "transformer", ".", "transform", "(", "masterOutputValue", ")", ";", "// Notify slave(s)", "slave", ".", "setValue", "(", "slaveInputValue"...
Sets the value of the slaves according the value of the master. @param masterOutputValue Master value.
[ "Sets", "the", "value", "of", "the", "slaves", "according", "the", "value", "of", "the", "master", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/binding/SimpleBond.java#L149-L155
train
hdinsight/storm-eventhubs
src/main/java/org/apache/storm/eventhubs/trident/TransactionalTridentEventHubEmitter.java
TransactionalTridentEventHubEmitter.getOrCreatePartitionManager
private ITridentPartitionManager getOrCreatePartitionManager(Partition partition) { ITridentPartitionManager pm; if(!pmMap.containsKey(partition.getId())) { IEventHubReceiver receiver = recvFactory.create(spoutConfig, partition.getId()); pm = pmFactory.create(receiver); pmMap.put(partition.get...
java
private ITridentPartitionManager getOrCreatePartitionManager(Partition partition) { ITridentPartitionManager pm; if(!pmMap.containsKey(partition.getId())) { IEventHubReceiver receiver = recvFactory.create(spoutConfig, partition.getId()); pm = pmFactory.create(receiver); pmMap.put(partition.get...
[ "private", "ITridentPartitionManager", "getOrCreatePartitionManager", "(", "Partition", "partition", ")", "{", "ITridentPartitionManager", "pm", ";", "if", "(", "!", "pmMap", ".", "containsKey", "(", "partition", ".", "getId", "(", ")", ")", ")", "{", "IEventHubRe...
Check if partition manager for a given partiton is created if not, create it. @param partition
[ "Check", "if", "partition", "manager", "for", "a", "given", "partiton", "is", "created", "if", "not", "create", "it", "." ]
86c99201e6df5e1caee3f664de8843bd656c0f1c
https://github.com/hdinsight/storm-eventhubs/blob/86c99201e6df5e1caee3f664de8843bd656c0f1c/src/main/java/org/apache/storm/eventhubs/trident/TransactionalTridentEventHubEmitter.java#L94-L105
train
padrig64/ValidationFramework
validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/simplevalidator/TriggerContext.java
TriggerContext.on
public DataProviderContext on(final Trigger... triggers) { final List<Trigger> registeredTriggers = new ArrayList<Trigger>(); if (triggers != null) { Collections.addAll(registeredTriggers, triggers); } return new DataProviderContext(registeredTriggers); }
java
public DataProviderContext on(final Trigger... triggers) { final List<Trigger> registeredTriggers = new ArrayList<Trigger>(); if (triggers != null) { Collections.addAll(registeredTriggers, triggers); } return new DataProviderContext(registeredTriggers); }
[ "public", "DataProviderContext", "on", "(", "final", "Trigger", "...", "triggers", ")", "{", "final", "List", "<", "Trigger", ">", "registeredTriggers", "=", "new", "ArrayList", "<", "Trigger", ">", "(", ")", ";", "if", "(", "triggers", "!=", "null", ")", ...
Adds the first triggers to the validator. @param triggers Triggers to be added. @return Data provider context allowing to add triggers and data providers.
[ "Adds", "the", "first", "triggers", "to", "the", "validator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/simplevalidator/TriggerContext.java#L73-L79
train
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/jmdict/JMDictSenseLazy.java
JMDictSenseLazy.create
public static JMDictSense create() { if (index >= instances.size()) { instances.add(new JMDictSense()); } return instances.get(index++); }
java
public static JMDictSense create() { if (index >= instances.size()) { instances.add(new JMDictSense()); } return instances.get(index++); }
[ "public", "static", "JMDictSense", "create", "(", ")", "{", "if", "(", "index", ">=", "instances", ".", "size", "(", ")", ")", "{", "instances", ".", "add", "(", "new", "JMDictSense", "(", ")", ")", ";", "}", "return", "instances", ".", "get", "(", ...
Returns a JMDictSense object, a new one of an existing one
[ "Returns", "a", "JMDictSense", "object", "a", "new", "one", "of", "an", "existing", "one" ]
58d6af66b1b1c738326c74d9ad5e4ad514120e27
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/jmdict/JMDictSenseLazy.java#L41-L46
train
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/jmdict/JMDictSenseLazy.java
JMDictSenseLazy.clear
public static void clear() { for (int i = 0; i < index; ++i) { instances.get(i).clear(); } index = 0; }
java
public static void clear() { for (int i = 0; i < index; ++i) { instances.get(i).clear(); } index = 0; }
[ "public", "static", "void", "clear", "(", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "index", ";", "++", "i", ")", "{", "instances", ".", "get", "(", "i", ")", ".", "clear", "(", ")", ";", "}", "index", "=", "0", ";", "}" ]
Reset all created JMDictSense object so that they can be reused
[ "Reset", "all", "created", "JMDictSense", "object", "so", "that", "they", "can", "be", "reused" ]
58d6af66b1b1c738326c74d9ad5e4ad514120e27
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/jmdict/JMDictSenseLazy.java#L51-L56
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/anchor/AnchorLink.java
AnchorLink.getRelativeSlaveLocation
public Point getRelativeSlaveLocation(final Component masterComponent, final Component slaveComponent) { return getRelativeSlaveLocation(masterComponent.getWidth(), masterComponent.getHeight(), slaveComponent.getWidth(), slaveComponent.getHeight()); }
java
public Point getRelativeSlaveLocation(final Component masterComponent, final Component slaveComponent) { return getRelativeSlaveLocation(masterComponent.getWidth(), masterComponent.getHeight(), slaveComponent.getWidth(), slaveComponent.getHeight()); }
[ "public", "Point", "getRelativeSlaveLocation", "(", "final", "Component", "masterComponent", ",", "final", "Component", "slaveComponent", ")", "{", "return", "getRelativeSlaveLocation", "(", "masterComponent", ".", "getWidth", "(", ")", ",", "masterComponent", ".", "g...
Computes the location of the specified component that is slaved to the specified master component using this anchor link. @param masterComponent Master component to which the other component is slaved. @param slaveComponent Slave component that is slaved to the master component. @return Location where the slave comp...
[ "Computes", "the", "location", "of", "the", "specified", "component", "that", "is", "slaved", "to", "the", "specified", "master", "component", "using", "this", "anchor", "link", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/anchor/AnchorLink.java#L113-L116
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java
AbstractMappableValidator.unhookFromTrigger
private void unhookFromTrigger(final T trigger) { // Unhook from trigger final TriggerListener triggerAdapter = triggersToTriggerAdapters.get(trigger); trigger.removeTriggerListener(triggerAdapter); // Check if trigger was added several times if (!triggersToTriggerAdapters.conta...
java
private void unhookFromTrigger(final T trigger) { // Unhook from trigger final TriggerListener triggerAdapter = triggersToTriggerAdapters.get(trigger); trigger.removeTriggerListener(triggerAdapter); // Check if trigger was added several times if (!triggersToTriggerAdapters.conta...
[ "private", "void", "unhookFromTrigger", "(", "final", "T", "trigger", ")", "{", "// Unhook from trigger", "final", "TriggerListener", "triggerAdapter", "=", "triggersToTriggerAdapters", ".", "get", "(", "trigger", ")", ";", "trigger", ".", "removeTriggerListener", "("...
De-registers the trigger listener. @param trigger Trigger to unhook from.
[ "De", "-", "registers", "the", "trigger", "listener", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java#L150-L160
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java
AbstractMappableValidator.unmapTriggerFromAllDataProviders
private void unmapTriggerFromAllDataProviders(final T trigger) { if (trigger != null) { unhookFromTrigger(trigger); triggersToDataProviders.remove(trigger); } }
java
private void unmapTriggerFromAllDataProviders(final T trigger) { if (trigger != null) { unhookFromTrigger(trigger); triggersToDataProviders.remove(trigger); } }
[ "private", "void", "unmapTriggerFromAllDataProviders", "(", "final", "T", "trigger", ")", "{", "if", "(", "trigger", "!=", "null", ")", "{", "unhookFromTrigger", "(", "trigger", ")", ";", "triggersToDataProviders", ".", "remove", "(", "trigger", ")", ";", "}",...
Disconnects the specified trigger from all data providers. @param trigger Trigger to be unmapped.
[ "Disconnects", "the", "specified", "trigger", "from", "all", "data", "providers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java#L192-L197
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java
AbstractMappableValidator.unmapDataProviderFromAllTriggers
private void unmapDataProviderFromAllTriggers(final DP dataProvider) { if (dataProvider != null) { for (final List<DP> mappedDataProviders : triggersToDataProviders.values()) { mappedDataProviders.remove(dataProvider); } } }
java
private void unmapDataProviderFromAllTriggers(final DP dataProvider) { if (dataProvider != null) { for (final List<DP> mappedDataProviders : triggersToDataProviders.values()) { mappedDataProviders.remove(dataProvider); } } }
[ "private", "void", "unmapDataProviderFromAllTriggers", "(", "final", "DP", "dataProvider", ")", "{", "if", "(", "dataProvider", "!=", "null", ")", "{", "for", "(", "final", "List", "<", "DP", ">", "mappedDataProviders", ":", "triggersToDataProviders", ".", "valu...
Disconnects the specified data providers from all triggers. @param dataProvider Data provider to be unmapped.
[ "Disconnects", "the", "specified", "data", "providers", "from", "all", "triggers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java#L204-L210
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java
AbstractMappableValidator.unmapRuleFromAllDataProviders
private void unmapRuleFromAllDataProviders(final R rule) { if (rule != null) { for (final List<R> mappedRules : dataProvidersToRules.values()) { mappedRules.remove(rule); } } }
java
private void unmapRuleFromAllDataProviders(final R rule) { if (rule != null) { for (final List<R> mappedRules : dataProvidersToRules.values()) { mappedRules.remove(rule); } } }
[ "private", "void", "unmapRuleFromAllDataProviders", "(", "final", "R", "rule", ")", "{", "if", "(", "rule", "!=", "null", ")", "{", "for", "(", "final", "List", "<", "R", ">", "mappedRules", ":", "dataProvidersToRules", ".", "values", "(", ")", ")", "{",...
Disconnects the specified rule from all data providers. @param rule Rule to be unmapped.
[ "Disconnects", "the", "specified", "rule", "from", "all", "data", "providers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java#L249-L255
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java
AbstractMappableValidator.unmapResultHandlerFromAllRules
private void unmapResultHandlerFromAllRules(final RH resultHandler) { if (resultHandler != null) { for (final List<RH> mappedResultHandlers : rulesToResultHandlers.values()) { mappedResultHandlers.remove(resultHandler); } } }
java
private void unmapResultHandlerFromAllRules(final RH resultHandler) { if (resultHandler != null) { for (final List<RH> mappedResultHandlers : rulesToResultHandlers.values()) { mappedResultHandlers.remove(resultHandler); } } }
[ "private", "void", "unmapResultHandlerFromAllRules", "(", "final", "RH", "resultHandler", ")", "{", "if", "(", "resultHandler", "!=", "null", ")", "{", "for", "(", "final", "List", "<", "RH", ">", "mappedResultHandlers", ":", "rulesToResultHandlers", ".", "value...
Disconnects the specified result handler from all rules. @param resultHandler Result handler to be unmapped.
[ "Disconnects", "the", "specified", "result", "handler", "from", "all", "rules", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java#L294-L300
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java
AbstractMappableValidator.disposeTriggersAndDataProviders
private void disposeTriggersAndDataProviders() { for (final Map.Entry<T, List<DP>> entry : triggersToDataProviders.entrySet()) { // Disconnect from trigger unhookFromTrigger(entry.getKey()); // Dispose trigger itself final T trigger = entry.getKey(); ...
java
private void disposeTriggersAndDataProviders() { for (final Map.Entry<T, List<DP>> entry : triggersToDataProviders.entrySet()) { // Disconnect from trigger unhookFromTrigger(entry.getKey()); // Dispose trigger itself final T trigger = entry.getKey(); ...
[ "private", "void", "disposeTriggersAndDataProviders", "(", ")", "{", "for", "(", "final", "Map", ".", "Entry", "<", "T", ",", "List", "<", "DP", ">", ">", "entry", ":", "triggersToDataProviders", ".", "entrySet", "(", ")", ")", "{", "// Disconnect from trigg...
Disposes all triggers and data providers that are mapped to each other.
[ "Disposes", "all", "triggers", "and", "data", "providers", "that", "are", "mapped", "to", "each", "other", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java#L315-L339
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java
AbstractMappableValidator.disposeRulesAndResultHandlers
private void disposeRulesAndResultHandlers() { for (final Map.Entry<R, List<RH>> entry : rulesToResultHandlers.entrySet()) { // Dispose rule final R rule = entry.getKey(); if (rule instanceof Disposable) { ((Disposable) rule).dispose(); } ...
java
private void disposeRulesAndResultHandlers() { for (final Map.Entry<R, List<RH>> entry : rulesToResultHandlers.entrySet()) { // Dispose rule final R rule = entry.getKey(); if (rule instanceof Disposable) { ((Disposable) rule).dispose(); } ...
[ "private", "void", "disposeRulesAndResultHandlers", "(", ")", "{", "for", "(", "final", "Map", ".", "Entry", "<", "R", ",", "List", "<", "RH", ">", ">", "entry", ":", "rulesToResultHandlers", ".", "entrySet", "(", ")", ")", "{", "// Dispose rule", "final",...
Disposes all rules and result handlers that are mapped to each other.
[ "Disposes", "all", "rules", "and", "result", "handlers", "that", "are", "mapped", "to", "each", "other", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/AbstractMappableValidator.java#L372-L393
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/ComponentRolloverProperty.java
ComponentRolloverProperty.setValue
private void setValue(boolean rollover) { if (!ValueUtils.areEqual(this.rollover, rollover)) { boolean oldValue = this.rollover; this.rollover = rollover; maybeNotifyListeners(oldValue, rollover); } }
java
private void setValue(boolean rollover) { if (!ValueUtils.areEqual(this.rollover, rollover)) { boolean oldValue = this.rollover; this.rollover = rollover; maybeNotifyListeners(oldValue, rollover); } }
[ "private", "void", "setValue", "(", "boolean", "rollover", ")", "{", "if", "(", "!", "ValueUtils", ".", "areEqual", "(", "this", ".", "rollover", ",", "rollover", ")", ")", "{", "boolean", "oldValue", "=", "this", ".", "rollover", ";", "this", ".", "ro...
Applies the specified value and notifies the value change listeners if needed. @param rollover New value.
[ "Applies", "the", "specified", "value", "and", "notifies", "the", "value", "change", "listeners", "if", "needed", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/ComponentRolloverProperty.java#L114-L120
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/dsl/ResultHandlerContext.java
ResultHandlerContext.build
private GeneralValidator<DPO, RI, RO, RHI> build() { // Create validator GeneralValidator<DPO, RI, RO, RHI> validator = new GeneralValidator<DPO, RI, RO, RHI>(); // Add triggers for (Trigger trigger : addedTriggers) { validator.addTrigger(trigger); } // Add ...
java
private GeneralValidator<DPO, RI, RO, RHI> build() { // Create validator GeneralValidator<DPO, RI, RO, RHI> validator = new GeneralValidator<DPO, RI, RO, RHI>(); // Add triggers for (Trigger trigger : addedTriggers) { validator.addTrigger(trigger); } // Add ...
[ "private", "GeneralValidator", "<", "DPO", ",", "RI", ",", "RO", ",", "RHI", ">", "build", "(", ")", "{", "// Create validator", "GeneralValidator", "<", "DPO", ",", "RI", ",", "RO", ",", "RHI", ">", "validator", "=", "new", "GeneralValidator", "<", "DPO...
Builds the validator. @return Fully constructed validator.
[ "Builds", "the", "validator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/generalvalidator/dsl/ResultHandlerContext.java#L173-L206
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java
BMPCProxy.asSeleniumProxy
public Proxy asSeleniumProxy() { Proxy seleniumProxyConfig = new Proxy(); seleniumProxyConfig.setProxyType(Proxy.ProxyType.MANUAL); seleniumProxyConfig.setHttpProxy(asHostAndPort()); return seleniumProxyConfig; }
java
public Proxy asSeleniumProxy() { Proxy seleniumProxyConfig = new Proxy(); seleniumProxyConfig.setProxyType(Proxy.ProxyType.MANUAL); seleniumProxyConfig.setHttpProxy(asHostAndPort()); return seleniumProxyConfig; }
[ "public", "Proxy", "asSeleniumProxy", "(", ")", "{", "Proxy", "seleniumProxyConfig", "=", "new", "Proxy", "(", ")", ";", "seleniumProxyConfig", ".", "setProxyType", "(", "Proxy", ".", "ProxyType", ".", "MANUAL", ")", ";", "seleniumProxyConfig", ".", "setHttpProx...
Returns the Proxy this client wraps, in form of a Selenium Proxy configuration object. @return Selenium Proxy configuration object
[ "Returns", "the", "Proxy", "this", "client", "wraps", "in", "form", "of", "a", "Selenium", "Proxy", "configuration", "object", "." ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java#L195-L202
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java
BMPCProxy.newHar
public JsonObject newHar(String initialPageRef, boolean captureHeaders, boolean captureContent, boolean captureBinaryContent) { try { // Request BMP to create a new HAR for this Proxy HttpPut request =...
java
public JsonObject newHar(String initialPageRef, boolean captureHeaders, boolean captureContent, boolean captureBinaryContent) { try { // Request BMP to create a new HAR for this Proxy HttpPut request =...
[ "public", "JsonObject", "newHar", "(", "String", "initialPageRef", ",", "boolean", "captureHeaders", ",", "boolean", "captureContent", ",", "boolean", "captureBinaryContent", ")", "{", "try", "{", "// Request BMP to create a new HAR for this Proxy", "HttpPut", "request", ...
Creates a new HAR attached to the proxy. @param initialPageRef Name of the first pageRef that should be used by the HAR. If "null", default to "Page 1" @param captureHeaders Enables capturing of HTTP Headers @param captureContent Enables capturing of HTTP Response Content (body) @param captureBinaryContent Enabled cap...
[ "Creates", "a", "new", "HAR", "attached", "to", "the", "proxy", "." ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java#L277-L306
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java
BMPCProxy.newPage
public void newPage(String pageRef) { try { // Request BMP to create a new HAR for this Proxy HttpPut request = new HttpPut(requestURIBuilder() .setPath(proxyURIPath() + "/har/pageRef") .build()); // Add form parameters to the request ...
java
public void newPage(String pageRef) { try { // Request BMP to create a new HAR for this Proxy HttpPut request = new HttpPut(requestURIBuilder() .setPath(proxyURIPath() + "/har/pageRef") .build()); // Add form parameters to the request ...
[ "public", "void", "newPage", "(", "String", "pageRef", ")", "{", "try", "{", "// Request BMP to create a new HAR for this Proxy", "HttpPut", "request", "=", "new", "HttpPut", "(", "requestURIBuilder", "(", ")", ".", "setPath", "(", "proxyURIPath", "(", ")", "+", ...
Starts a new page on the existing HAR. All the traffic recorded in the HAR from this point on will be considered part of this new Page. @param pageRef Name of this new pageRef that should be used by the HAR. If "null" defaults to "Page N", where "N" is the number of pages so far.
[ "Starts", "a", "new", "page", "on", "the", "existing", "HAR", ".", "All", "the", "traffic", "recorded", "in", "the", "HAR", "from", "this", "point", "on", "will", "be", "considered", "part", "of", "this", "new", "Page", "." ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java#L324-L354
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java
BMPCProxy.har
public JsonObject har() { try { // Request BMP to create a new HAR for this Proxy HttpGet request = new HttpGet(requestURIBuilder() .setPath(proxyURIPath() + "/har") .build()); // Execute request CloseableHttpResponse respo...
java
public JsonObject har() { try { // Request BMP to create a new HAR for this Proxy HttpGet request = new HttpGet(requestURIBuilder() .setPath(proxyURIPath() + "/har") .build()); // Execute request CloseableHttpResponse respo...
[ "public", "JsonObject", "har", "(", ")", "{", "try", "{", "// Request BMP to create a new HAR for this Proxy", "HttpGet", "request", "=", "new", "HttpGet", "(", "requestURIBuilder", "(", ")", ".", "setPath", "(", "proxyURIPath", "(", ")", "+", "\"/har\"", ")", "...
Produces the HAR so far, based on the traffic generated so far. Contains Headers, Content and so forth, based on the parameters used passed to {@link BMPCProxy#newHar(String, boolean, boolean, boolean)}. @return JsonObject in HAR format.
[ "Produces", "the", "HAR", "so", "far", "based", "on", "the", "traffic", "generated", "so", "far", "." ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java#L364-L383
train
detro/browsermob-proxy-client
src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java
BMPCProxy.harToFile
public static void harToFile(JsonObject har, String destinationDir, String destinationFile) { // Prepare HAR destination directory File harDestinationDir = new File(destinationDir); if (!harDestinationDir.exists()) harDestinationDir.mkdirs(); // Store HAR to disk PrintWriter har...
java
public static void harToFile(JsonObject har, String destinationDir, String destinationFile) { // Prepare HAR destination directory File harDestinationDir = new File(destinationDir); if (!harDestinationDir.exists()) harDestinationDir.mkdirs(); // Store HAR to disk PrintWriter har...
[ "public", "static", "void", "harToFile", "(", "JsonObject", "har", ",", "String", "destinationDir", ",", "String", "destinationFile", ")", "{", "// Prepare HAR destination directory", "File", "harDestinationDir", "=", "new", "File", "(", "destinationDir", ")", ";", ...
Utility to store HAR to file. @param har JsonObject containing HAR data @param destinationDir Path to destination Directory @param destinationFile Path to destination File
[ "Utility", "to", "store", "HAR", "to", "file", "." ]
da03deff8211b7e1153e36100c5ba60acd470a4f
https://github.com/detro/browsermob-proxy-client/blob/da03deff8211b7e1153e36100c5ba60acd470a4f/src/main/java/com/github/detro/browsermobproxyclient/BMPCProxy.java#L403-L429
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/validator/ResultCollectorValidator.java
ResultCollectorValidator.processResult
protected void processResult(RO result) { for (ResultHandler<RO> resultHandler : resultHandlers) { resultHandler.handleResult(result); } }
java
protected void processResult(RO result) { for (ResultHandler<RO> resultHandler : resultHandlers) { resultHandler.handleResult(result); } }
[ "protected", "void", "processResult", "(", "RO", "result", ")", "{", "for", "(", "ResultHandler", "<", "RO", ">", "resultHandler", ":", "resultHandlers", ")", "{", "resultHandler", ".", "handleResult", "(", "result", ")", ";", "}", "}" ]
Handles the specified result using all result handlers. @param result Result to be processed by all result handlers.
[ "Handles", "the", "specified", "result", "using", "all", "result", "handlers", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/validator/ResultCollectorValidator.java#L127-L131
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/TaskCreator.java
TaskCreator.setupCrossCheckTasks
public void setupCrossCheckTasks() { final TaskContainer tasks = project.getTasks(); final Task xtest = tasks.create(XTEST_TASK_NAME); xtest.setGroup(XTEST_GROUP_NAME); xtest.setDescription("Run the unit tests against all supported Checkstyle runtimes"); tasks.getByName(Java...
java
public void setupCrossCheckTasks() { final TaskContainer tasks = project.getTasks(); final Task xtest = tasks.create(XTEST_TASK_NAME); xtest.setGroup(XTEST_GROUP_NAME); xtest.setDescription("Run the unit tests against all supported Checkstyle runtimes"); tasks.getByName(Java...
[ "public", "void", "setupCrossCheckTasks", "(", ")", "{", "final", "TaskContainer", "tasks", "=", "project", ".", "getTasks", "(", ")", ";", "final", "Task", "xtest", "=", "tasks", ".", "create", "(", "XTEST_TASK_NAME", ")", ";", "xtest", ".", "setGroup", "...
Set up cross-check feature. We provide an 'xcheck' task which depends on a number of Test tasks that run the unit tests compiled against every Checkstyle version against all the other Checkstyle libraries. In this way, we find out which versions are compatible.
[ "Set", "up", "cross", "-", "check", "feature", ".", "We", "provide", "an", "xcheck", "task", "which", "depends", "on", "a", "number", "of", "Test", "tasks", "that", "run", "the", "unit", "tests", "compiled", "against", "every", "Checkstyle", "version", "ag...
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/TaskCreator.java#L185-L212
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/TaskCreator.java
TaskCreator.adjustTaskGroupAssignments
public void adjustTaskGroupAssignments() { final TaskContainer tasks = project.getTasks(); tasks.getByName(BasePlugin.ASSEMBLE_TASK_NAME).setGroup(ARTIFACTS_GROUP_NAME); tasks.getByName(JavaPlugin.JAR_TASK_NAME).setGroup(ARTIFACTS_GROUP_NAME); final SourceSet sqSourceSet = buildUtil...
java
public void adjustTaskGroupAssignments() { final TaskContainer tasks = project.getTasks(); tasks.getByName(BasePlugin.ASSEMBLE_TASK_NAME).setGroup(ARTIFACTS_GROUP_NAME); tasks.getByName(JavaPlugin.JAR_TASK_NAME).setGroup(ARTIFACTS_GROUP_NAME); final SourceSet sqSourceSet = buildUtil...
[ "public", "void", "adjustTaskGroupAssignments", "(", ")", "{", "final", "TaskContainer", "tasks", "=", "project", ".", "getTasks", "(", ")", ";", "tasks", ".", "getByName", "(", "BasePlugin", ".", "ASSEMBLE_TASK_NAME", ")", ".", "setGroup", "(", "ARTIFACTS_GROUP...
Assign some standard tasks and tasks created by third-party plugins to their task groups according to the order of things for Checkstyle Addons.
[ "Assign", "some", "standard", "tasks", "and", "tasks", "created", "by", "third", "-", "party", "plugins", "to", "their", "task", "groups", "according", "to", "the", "order", "of", "things", "for", "Checkstyle", "Addons", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/TaskCreator.java#L310-L332
train
padrig64/ValidationFramework
validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/simplevalidator/ResultHandlerContext.java
ResultHandlerContext.check
public ResultHandlerContext<D, O> check(final Rule<D, O>... rules) { if (rules != null) { Collections.addAll(registeredRules, rules); } return this; }
java
public ResultHandlerContext<D, O> check(final Rule<D, O>... rules) { if (rules != null) { Collections.addAll(registeredRules, rules); } return this; }
[ "public", "ResultHandlerContext", "<", "D", ",", "O", ">", "check", "(", "final", "Rule", "<", "D", ",", "O", ">", "...", "rules", ")", "{", "if", "(", "rules", "!=", "null", ")", "{", "Collections", ".", "addAll", "(", "registeredRules", ",", "rules...
Adds another rule to the validator. @param rules Rule to be added. @return Same result handler context.
[ "Adds", "another", "rule", "to", "the", "validator", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-experimental/src/main/java/com/google/code/validationframework/experimental/builder/context/simplevalidator/ResultHandlerContext.java#L91-L96
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/utils/IconUtils.java
IconUtils.loadImageIcon
public static ImageIcon loadImageIcon(final String iconName, final Class<?> clazz) { ImageIcon icon = null; if (iconName != null) { final URL iconResource = clazz.getResource(iconName); if (iconResource == null) { LOGGER.error("Icon could not be loaded: '" + icon...
java
public static ImageIcon loadImageIcon(final String iconName, final Class<?> clazz) { ImageIcon icon = null; if (iconName != null) { final URL iconResource = clazz.getResource(iconName); if (iconResource == null) { LOGGER.error("Icon could not be loaded: '" + icon...
[ "public", "static", "ImageIcon", "loadImageIcon", "(", "final", "String", "iconName", ",", "final", "Class", "<", "?", ">", "clazz", ")", "{", "ImageIcon", "icon", "=", "null", ";", "if", "(", "iconName", "!=", "null", ")", "{", "final", "URL", "iconReso...
Loads an image icon from a resource file. @param iconName Name of the resource file to be loaded. @param clazz Class for which the resource exists. @return Image icon if it could be loaded, null otherwise.
[ "Loads", "an", "image", "icon", "from", "a", "resource", "file", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/utils/IconUtils.java#L68-L82
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/tasks/CreateJarTask.java
CreateJarTask.mfAttrStd
public static Map<String, String> mfAttrStd(final Project pProject) { Map<String, String> result = new HashMap<>(); result.put("Manifest-Version", "1.0"); result.put("Website", new BuildUtil(pProject).getExtraPropertyValue(ExtProp.Website)); result.put("Created-By", GradleVersion.cur...
java
public static Map<String, String> mfAttrStd(final Project pProject) { Map<String, String> result = new HashMap<>(); result.put("Manifest-Version", "1.0"); result.put("Website", new BuildUtil(pProject).getExtraPropertyValue(ExtProp.Website)); result.put("Created-By", GradleVersion.cur...
[ "public", "static", "Map", "<", "String", ",", "String", ">", "mfAttrStd", "(", "final", "Project", "pProject", ")", "{", "Map", "<", "String", ",", "String", ">", "result", "=", "new", "HashMap", "<>", "(", ")", ";", "result", ".", "put", "(", "\"Ma...
Build a little map with standard manifest attributes. @param pProject Gradle project @return the map
[ "Build", "a", "little", "map", "with", "standard", "manifest", "attributes", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/tasks/CreateJarTask.java#L59-L68
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JTableRowCountProperty.java
JTableRowCountProperty.updateValue
private void updateValue() { if (table != null) { int oldCount = this.count; this.count = table.getRowCount(); maybeNotifyListeners(oldCount, count); } }
java
private void updateValue() { if (table != null) { int oldCount = this.count; this.count = table.getRowCount(); maybeNotifyListeners(oldCount, count); } }
[ "private", "void", "updateValue", "(", ")", "{", "if", "(", "table", "!=", "null", ")", "{", "int", "oldCount", "=", "this", ".", "count", ";", "this", ".", "count", "=", "table", ".", "getRowCount", "(", ")", ";", "maybeNotifyListeners", "(", "oldCoun...
Updates the value of this property and notify the listeners.
[ "Updates", "the", "value", "of", "this", "property", "and", "notify", "the", "listeners", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/property/JTableRowCountProperty.java#L131-L137
train
opencb/java-common-libs
commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java
MongoDBQueryUtils.queryParamsOperatorAlwaysMatchesOperator
private static boolean queryParamsOperatorAlwaysMatchesOperator(QueryParam.Type type, List<String> queryParamList, ComparisonOperator operator) { for (String queryItem : queryParamList) { Matcher matcher = getPattern(type).matcher(q...
java
private static boolean queryParamsOperatorAlwaysMatchesOperator(QueryParam.Type type, List<String> queryParamList, ComparisonOperator operator) { for (String queryItem : queryParamList) { Matcher matcher = getPattern(type).matcher(q...
[ "private", "static", "boolean", "queryParamsOperatorAlwaysMatchesOperator", "(", "QueryParam", ".", "Type", "type", ",", "List", "<", "String", ">", "queryParamList", ",", "ComparisonOperator", "operator", ")", "{", "for", "(", "String", "queryItem", ":", "queryPara...
Auxiliary method to check if the operator of each of the values in the queryParamList matches the operator passed. @param type QueryParam type. @param queryParamList List of values. @param operator Operator to be checked. @return boolean indicating whether the list of values have always the same operator or not.
[ "Auxiliary", "method", "to", "check", "if", "the", "operator", "of", "each", "of", "the", "values", "in", "the", "queryParamList", "matches", "the", "operator", "passed", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java#L233-L247
train
opencb/java-common-libs
commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java
MongoDBQueryUtils.removeOperatorsFromQueryParamList
private static List<Object> removeOperatorsFromQueryParamList(QueryParam.Type type, List<String> queryParamList) { List<Object> newQueryParamList = new ArrayList<>(); for (String queryItem : queryParamList) { Matcher matcher = getPattern(type).matcher(queryItem); String queryVal...
java
private static List<Object> removeOperatorsFromQueryParamList(QueryParam.Type type, List<String> queryParamList) { List<Object> newQueryParamList = new ArrayList<>(); for (String queryItem : queryParamList) { Matcher matcher = getPattern(type).matcher(queryItem); String queryVal...
[ "private", "static", "List", "<", "Object", ">", "removeOperatorsFromQueryParamList", "(", "QueryParam", ".", "Type", "type", ",", "List", "<", "String", ">", "queryParamList", ")", "{", "List", "<", "Object", ">", "newQueryParamList", "=", "new", "ArrayList", ...
Removes any operators present in the queryParamList and gets a list of the values parsed to the corresponding data type. @param type QueryParam type. @param queryParamList List of values. @return a list of the values parsed to the corresponding data type.
[ "Removes", "any", "operators", "present", "in", "the", "queryParamList", "and", "gets", "a", "list", "of", "the", "values", "parsed", "to", "the", "corresponding", "data", "type", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java#L256-L292
train
opencb/java-common-libs
commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java
MongoDBQueryUtils.createDateFilter
private static Bson createDateFilter(String mongoDbField, List<String> dateValues, ComparisonOperator comparator, QueryParam.Type type) { Bson filter = null; Object date = null; if (QueryParam.Type.DATE.equals(type)) { date = convertStringToD...
java
private static Bson createDateFilter(String mongoDbField, List<String> dateValues, ComparisonOperator comparator, QueryParam.Type type) { Bson filter = null; Object date = null; if (QueryParam.Type.DATE.equals(type)) { date = convertStringToD...
[ "private", "static", "Bson", "createDateFilter", "(", "String", "mongoDbField", ",", "List", "<", "String", ">", "dateValues", ",", "ComparisonOperator", "comparator", ",", "QueryParam", ".", "Type", "type", ")", "{", "Bson", "filter", "=", "null", ";", "Objec...
Generates a date filter. @param mongoDbField Mongo field. @param dateValues List of 1 or 2 strings (dates). Only one will be expected when something like the following is passed: =20171210, 20171210, >=20171210, >20171210, <20171210, <=20171210 When 2 strings are passed, we will expect it to be a range such as: 201712...
[ "Generates", "a", "date", "filter", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java#L426-L475
train
opencb/java-common-libs
commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java
MongoDBQueryUtils.checkOperator
public static LogicalOperator checkOperator(String value) throws IllegalArgumentException { boolean containsOr = value.contains(OR); boolean containsAnd = value.contains(AND); if (containsAnd && containsOr) { throw new IllegalArgumentException("Cannot merge AND and OR operators in th...
java
public static LogicalOperator checkOperator(String value) throws IllegalArgumentException { boolean containsOr = value.contains(OR); boolean containsAnd = value.contains(AND); if (containsAnd && containsOr) { throw new IllegalArgumentException("Cannot merge AND and OR operators in th...
[ "public", "static", "LogicalOperator", "checkOperator", "(", "String", "value", ")", "throws", "IllegalArgumentException", "{", "boolean", "containsOr", "=", "value", ".", "contains", "(", "OR", ")", ";", "boolean", "containsAnd", "=", "value", ".", "contains", ...
Checks that the filter value list contains only one type of operations. @param value List of values to check @return The used operator. Null if no operator is used. @throws IllegalArgumentException if the list contains different operators.
[ "Checks", "that", "the", "filter", "value", "list", "contains", "only", "one", "type", "of", "operations", "." ]
5c97682530d0be55828e1e4e374ff01fceb5f198
https://github.com/opencb/java-common-libs/blob/5c97682530d0be55828e1e4e374ff01fceb5f198/commons-datastore/commons-datastore-mongodb/src/main/java/org/opencb/commons/datastore/mongodb/MongoDBQueryUtils.java#L484-L496
train
riccardove/easyjasub
easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/dictionary/EasyJaSubDictionary.java
EasyJaSubDictionary.getEntry
public EasyJaSubDictionaryEntry getEntry(String word) { if (word == null || word.length() == 0) { throw new RuntimeException("Invalid word"); } EasyJaSubTrie.Value<EasyJaSubDictionaryEntry> value = trie .get(new CharacterIterator(word)); if (value == null) { return null; } return value.getValue();...
java
public EasyJaSubDictionaryEntry getEntry(String word) { if (word == null || word.length() == 0) { throw new RuntimeException("Invalid word"); } EasyJaSubTrie.Value<EasyJaSubDictionaryEntry> value = trie .get(new CharacterIterator(word)); if (value == null) { return null; } return value.getValue();...
[ "public", "EasyJaSubDictionaryEntry", "getEntry", "(", "String", "word", ")", "{", "if", "(", "word", "==", "null", "||", "word", ".", "length", "(", ")", "==", "0", ")", "{", "throw", "new", "RuntimeException", "(", "\"Invalid word\"", ")", ";", "}", "E...
Returns an entry corresponding to specified word, or to a prefix of it @param word @return
[ "Returns", "an", "entry", "corresponding", "to", "specified", "word", "or", "to", "a", "prefix", "of", "it" ]
58d6af66b1b1c738326c74d9ad5e4ad514120e27
https://github.com/riccardove/easyjasub/blob/58d6af66b1b1c738326c74d9ad5e4ad514120e27/easyjasub-lib/src/main/java/com/github/riccardove/easyjasub/dictionary/EasyJaSubDictionary.java#L68-L78
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java
BuildUtil.getExtraPropertyValue
@SuppressWarnings("unchecked") public <T> T getExtraPropertyValue(@Nonnull final ExtProp pExtraPropName) { ExtraPropertiesExtension extraProps = project.getExtensions().getByType(ExtraPropertiesExtension.class); if (extraProps.has(pExtraPropName.getPropertyName())) { return (T) extra...
java
@SuppressWarnings("unchecked") public <T> T getExtraPropertyValue(@Nonnull final ExtProp pExtraPropName) { ExtraPropertiesExtension extraProps = project.getExtensions().getByType(ExtraPropertiesExtension.class); if (extraProps.has(pExtraPropName.getPropertyName())) { return (T) extra...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", ">", "T", "getExtraPropertyValue", "(", "@", "Nonnull", "final", "ExtProp", "pExtraPropName", ")", "{", "ExtraPropertiesExtension", "extraProps", "=", "project", ".", "getExtensions", "(", ")"...
Read the value of an extra property of the project. @param pExtraPropName the reference to the extra property name @param <T> type of the property value @return the property's value
[ "Read", "the", "value", "of", "an", "extra", "property", "of", "the", "project", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java#L124-L133
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java
BuildUtil.getTask
@Nonnull public Task getTask(@Nonnull final TaskNames pTaskName, @Nonnull final DependencyConfig pDepConfig) { return project.getTasks().getByName(pTaskName.getName(pDepConfig)); }
java
@Nonnull public Task getTask(@Nonnull final TaskNames pTaskName, @Nonnull final DependencyConfig pDepConfig) { return project.getTasks().getByName(pTaskName.getName(pDepConfig)); }
[ "@", "Nonnull", "public", "Task", "getTask", "(", "@", "Nonnull", "final", "TaskNames", "pTaskName", ",", "@", "Nonnull", "final", "DependencyConfig", "pDepConfig", ")", "{", "return", "project", ".", "getTasks", "(", ")", ".", "getByName", "(", "pTaskName", ...
Convenience method for getting a specific task directly. @param pTaskName the task to get @param pDepConfig the dependency configuration for which the task is intended @return a task object
[ "Convenience", "method", "for", "getting", "a", "specific", "task", "directly", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java#L144-L148
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java
BuildUtil.addBuildTimestampDeferred
public void addBuildTimestampDeferred(@Nonnull final Task pTask, @Nonnull final Attributes pAttributes) { pTask.doFirst(new Closure<Void>(pTask) { @Override @SuppressWarnings("MethodDoesntCallSuperMethod") public Void call() { addBuildT...
java
public void addBuildTimestampDeferred(@Nonnull final Task pTask, @Nonnull final Attributes pAttributes) { pTask.doFirst(new Closure<Void>(pTask) { @Override @SuppressWarnings("MethodDoesntCallSuperMethod") public Void call() { addBuildT...
[ "public", "void", "addBuildTimestampDeferred", "(", "@", "Nonnull", "final", "Task", "pTask", ",", "@", "Nonnull", "final", "Attributes", "pAttributes", ")", "{", "pTask", ".", "doFirst", "(", "new", "Closure", "<", "Void", ">", "(", "pTask", ")", "{", "@"...
Add build timestamp to some manifest attributes in the execution phase, so that it does not count for the up-to-date check. @param pTask the executing task @param pAttributes the attributes map to add to
[ "Add", "build", "timestamp", "to", "some", "manifest", "attributes", "in", "the", "execution", "phase", "so", "that", "it", "does", "not", "count", "for", "the", "up", "-", "to", "-", "date", "check", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java#L180-L192
train
checkstyle-addons/checkstyle-addons
buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java
BuildUtil.inheritManifest
public void inheritManifest(@Nonnull final Jar pTask, @Nonnull final DependencyConfig pDepConfig) { pTask.doFirst(new Closure<Void>(pTask) { @Override @SuppressWarnings("MethodDoesntCallSuperMethod") public Void call() { final Jar jarTa...
java
public void inheritManifest(@Nonnull final Jar pTask, @Nonnull final DependencyConfig pDepConfig) { pTask.doFirst(new Closure<Void>(pTask) { @Override @SuppressWarnings("MethodDoesntCallSuperMethod") public Void call() { final Jar jarTa...
[ "public", "void", "inheritManifest", "(", "@", "Nonnull", "final", "Jar", "pTask", ",", "@", "Nonnull", "final", "DependencyConfig", "pDepConfig", ")", "{", "pTask", ".", "doFirst", "(", "new", "Closure", "<", "Void", ">", "(", "pTask", ")", "{", "@", "O...
Make the given Jar task inherit its manifest from the "main" "thin" Jar task. Also set the build timestamp. @param pTask the executing task @param pDepConfig the dependency configuration for which the Jar task is intended
[ "Make", "the", "given", "Jar", "task", "inherit", "its", "manifest", "from", "the", "main", "thin", "Jar", "task", ".", "Also", "set", "the", "build", "timestamp", "." ]
fae1b4d341639c8e32c3e59ec5abdc0ffc11b865
https://github.com/checkstyle-addons/checkstyle-addons/blob/fae1b4d341639c8e32c3e59ec5abdc0ffc11b865/buildSrc/src/main/java/com/thomasjensen/checkstyle/addons/build/BuildUtil.java#L202-L216
train
padrig64/ValidationFramework
validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/anchor/Anchor.java
Anchor.getAnchorPoint
public Point getAnchorPoint(int width, int height) { return new Point((int) (relativeX * width + offsetX), (int) (relativeY * height + offsetY)); }
java
public Point getAnchorPoint(int width, int height) { return new Point((int) (relativeX * width + offsetX), (int) (relativeY * height + offsetY)); }
[ "public", "Point", "getAnchorPoint", "(", "int", "width", ",", "int", "height", ")", "{", "return", "new", "Point", "(", "(", "int", ")", "(", "relativeX", "*", "width", "+", "offsetX", ")", ",", "(", "int", ")", "(", "relativeY", "*", "height", "+",...
Retrieves a point on an object of the specified size. @param width Width of the object to get the anchor point for. @param height Height of the object to get the anchor point for. @return Anchor point. @see #getAnchorPoint(Dimension)
[ "Retrieves", "a", "point", "on", "an", "object", "of", "the", "specified", "size", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-swing/src/main/java/com/google/code/validationframework/swing/decoration/anchor/Anchor.java#L203-L205
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java
AbstractReadableProperty.setInhibited
public void setInhibited(boolean inhibited) { boolean wasInhibited = this.inhibited; this.inhibited = inhibited; if (wasInhibited && !inhibited) { if (inhibitCount > 0) { maybeNotifyListeners(lastNonInhibitedValue, lastInhibitedValue); } inhib...
java
public void setInhibited(boolean inhibited) { boolean wasInhibited = this.inhibited; this.inhibited = inhibited; if (wasInhibited && !inhibited) { if (inhibitCount > 0) { maybeNotifyListeners(lastNonInhibitedValue, lastInhibitedValue); } inhib...
[ "public", "void", "setInhibited", "(", "boolean", "inhibited", ")", "{", "boolean", "wasInhibited", "=", "this", ".", "inhibited", ";", "this", ".", "inhibited", "=", "inhibited", ";", "if", "(", "wasInhibited", "&&", "!", "inhibited", ")", "{", "if", "(",...
States whether this property should be inhibited. @param inhibited True if this property should be inhibited, false otherwise.
[ "States", "whether", "this", "property", "should", "be", "inhibited", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java#L136-L146
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java
AbstractReadableProperty.notifyListenersIfUninhibited
private void notifyListenersIfUninhibited(R oldValue, R newValue) { if (inhibited) { inhibitCount++; lastInhibitedValue = newValue; } else { lastInhibitedValue = newValue; // Just in case, even though not really necessary lastNonInhibitedValue = newValue; ...
java
private void notifyListenersIfUninhibited(R oldValue, R newValue) { if (inhibited) { inhibitCount++; lastInhibitedValue = newValue; } else { lastInhibitedValue = newValue; // Just in case, even though not really necessary lastNonInhibitedValue = newValue; ...
[ "private", "void", "notifyListenersIfUninhibited", "(", "R", "oldValue", ",", "R", "newValue", ")", "{", "if", "(", "inhibited", ")", "{", "inhibitCount", "++", ";", "lastInhibitedValue", "=", "newValue", ";", "}", "else", "{", "lastInhibitedValue", "=", "newV...
Notifies the listeners that the property value has changed, if the property is not inhibited. @param oldValue Previous value. @param newValue New value. @see #maybeNotifyListeners(Object, Object) @see #doNotifyListeners(Object, Object)
[ "Notifies", "the", "listeners", "that", "the", "property", "value", "has", "changed", "if", "the", "property", "is", "not", "inhibited", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java#L177-L186
train
padrig64/ValidationFramework
validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java
AbstractReadableProperty.doNotifyListeners
private void doNotifyListeners(R oldValue, R newValue) { List<ValueChangeListener<R>> listenersCopy = new ArrayList<ValueChangeListener<R>>(listeners); notifyingListeners = true; for (ValueChangeListener<R> listener : listenersCopy) { listener.valueChanged(this, oldValue, newValue); ...
java
private void doNotifyListeners(R oldValue, R newValue) { List<ValueChangeListener<R>> listenersCopy = new ArrayList<ValueChangeListener<R>>(listeners); notifyingListeners = true; for (ValueChangeListener<R> listener : listenersCopy) { listener.valueChanged(this, oldValue, newValue); ...
[ "private", "void", "doNotifyListeners", "(", "R", "oldValue", ",", "R", "newValue", ")", "{", "List", "<", "ValueChangeListener", "<", "R", ">>", "listenersCopy", "=", "new", "ArrayList", "<", "ValueChangeListener", "<", "R", ">", ">", "(", "listeners", ")",...
Notifies the listeners that the property value has changed, unconditionally. @param oldValue Previous value. @param newValue New value.
[ "Notifies", "the", "listeners", "that", "the", "property", "value", "has", "changed", "unconditionally", "." ]
2dd3c7b3403993db366d24a927645f467ccd1dda
https://github.com/padrig64/ValidationFramework/blob/2dd3c7b3403993db366d24a927645f467ccd1dda/validationframework-core/src/main/java/com/google/code/validationframework/base/property/AbstractReadableProperty.java#L203-L210
train