commit_sha
stringlengths 40
40
| new_methods
list | old_methods
list |
---|---|---|
03eb9995e6cb89691e2185fefd0accc56e397b63 | [
{
"arguments": [
"final Entity productionTracking"
],
"filename": "mes-plugins/mes-plugins-production-counting/src/main/java/com/qcadoo/mes/productionCounting/states/ProductionTrackingStatesHelper.java",
"implementation": "stateExecutorService.changeState(ProductionTrackingStateServiceMarker.class, productionTracking, ProductionTrackingState.ACCEPTED.getStringValue());",
"signature": "void resumeStateChange(final Entity productionTracking)"
},
{
"arguments": [
"final Entity productionTracking"
],
"filename": "mes-plugins/mes-plugins-production-counting/src/main/java/com/qcadoo/mes/productionCounting/states/ProductionTrackingStatesHelper.java",
"implementation": "stateExecutorService.changeState(ProductionTrackingStateServiceMarker.class, productionTracking, ProductionTrackingState.DRAFT.getStringValue());",
"signature": "void cancelStateChange(final Entity productionTracking)"
},
{
"arguments": [
"final StateEnum targetState"
],
"filename": "mes-plugins/mes-plugins-production-counting/src/main/java/com/qcadoo/mes/productionCounting/states/constants/ProductionTrackingState.java",
"implementation": "return ACCEPTED.equals(targetState) || DRAFT.equals(targetState);",
"signature": "boolean canChangeTo(final StateEnum targetState)"
},
{
"arguments": [
"final Entity entity"
],
"filename": "mes-plugins/mes-plugins-states/src/main/java/com/qcadoo/mes/newstates/StateExecutorService.java",
"implementation": "if (entity == null) {\n return null;",
"signature": "Entity saveAndValidate(final Entity entity)"
},
{
"arguments": [
"String msg",
" ComponentState.MessageType messageType"
],
"filename": "mes-plugins/mes-plugins-states/src/main/java/com/qcadoo/mes/newstates/StateExecutorService.java",
"implementation": "if (componentMessagesHolder != null) {\n componentMessagesHolder.addMessage(msg, messageType);",
"signature": "void message(String msg, ComponentState.MessageType messageType)"
}
] | [
{
"arguments": [
"final StateChangeContext context"
],
"filename": "mes-plugins/mes-plugins-production-counting/src/main/java/com/qcadoo/mes/productionCounting/states/ProductionTrackingStatesHelper.java",
"implementation": "// context.setStatus(StateChangeStatus.IN_PROGRESS);\n//\n// productionTrackingStateChangeAspect.changeState(context);\n//",
"signature": "void resumeStateChange(final StateChangeContext context)"
},
{
"arguments": [
"final StateChangeContext context"
],
"filename": "mes-plugins/mes-plugins-production-counting/src/main/java/com/qcadoo/mes/productionCounting/states/ProductionTrackingStatesHelper.java",
"implementation": "// context.setStatus(StateChangeStatus.FAILURE);\n//\n// productionTrackingStateChangeAspect.changeState(context);\n//",
"signature": "void cancelStateChange(final StateChangeContext context)"
},
{
"arguments": [
"final Entity productionTracking"
],
"filename": "mes-plugins/mes-plugins-production-counting/src/main/java/com/qcadoo/mes/productionCounting/states/ProductionTrackingStatesHelper.java",
"implementation": "Entity stateChangeEntity = findPausedStateChangeEntity(productionTracking);\n private Entity findPausedStateChangeEntity(final Entity productionTracking) {\n scb.add(SearchRestrictions.eq(ProductionTrackingStateChangeFields.STATUS, StateChangeStatus.PAUSED.getStringValue()));\n// public StateChangeStatus tryAccept(final Entity productionRecord) {\n// return tryAccept(productionRecord, false);\n//",
"signature": "StateChangeContext findPausedStateTransition(final Entity productionTracking)"
}
] |
0492aafe3780886c3936544ffed92c1bcc587431 | [
{
"arguments": [
"EObject semanticObject",
" RuleCall ruleCall",
" INode node"
],
"filename": "org.eclipse.iee.translator.Jmole/org.eclipse.iee.translator.jmole.math/src-gen/org/eclipse/iee/translator/jmole/math/serializer/AbstractMathSyntacticSequencer.java",
"implementation": "if (transition.getAmbiguousSyntaxes().isEmpty()) return;\n\t\tList<INode> transitionNodes = collectNodes(fromNode, toNode);\n\t\tfor (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {\n\t\t\tList<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);\n\t\t\tif(match_Function_CommaKeyword_2_2_q.equals(syntax))\n\t\t\t\temit_Function_CommaKeyword_2_2_q(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_MatrixRow_CommaKeyword_1_2_q.equals(syntax))\n\t\t\t\temit_MatrixRow_CommaKeyword_1_2_q(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_Matrix_CommaKeyword_1_2_q.equals(syntax))\n\t\t\t\temit_Matrix_CommaKeyword_1_2_q(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_PrimaryMatrix_LeftParenthesisKeyword_3_0_a.equals(syntax))\n\t\t\t\temit_PrimaryMatrix_LeftParenthesisKeyword_3_0_a(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_PrimaryMatrix_LeftParenthesisKeyword_3_0_p.equals(syntax))\n\t\t\t\temit_PrimaryMatrix_LeftParenthesisKeyword_3_0_p(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_Primary_LeftParenthesisKeyword_4_0_a.equals(syntax))\n\t\t\t\temit_Primary_LeftParenthesisKeyword_4_0_a(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_Primary_LeftParenthesisKeyword_4_0_p.equals(syntax))\n\t\t\t\temit_Primary_LeftParenthesisKeyword_4_0_p(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse acceptNodes(getLastNavigableState(), syntaxNodes);",
"signature": "String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node)"
},
{
"arguments": [],
"filename": "org.eclipse.iee.translator.Jmole/org.eclipse.iee.translator.jmole.math/src-gen/org/eclipse/iee/translator/jmole/math/services/MathGrammarAccess.java",
"implementation": "return cRowFloatParserRuleCall_2_3_0;",
"signature": "RuleCall getRowFloatParserRuleCall_2_3_0()"
},
{
"arguments": [],
"filename": "org.eclipse.iee.translator.Jmole/org.eclipse.iee.translator.jmole.math/src-gen/org/eclipse/iee/translator/jmole/math/services/MathGrammarAccess.java",
"implementation": "return cColumnFloatParserRuleCall_2_6_0;",
"signature": "RuleCall getColumnFloatParserRuleCall_2_6_0()"
},
{
"arguments": [
"EObject semanticObject",
" RuleCall ruleCall",
" INode node"
],
"filename": "org.eclipse.iee.translator.TeXmole/org.eclipse.iee.translator.molex.mex/src-gen/org/eclipse/iee/translator/molex/mex/serializer/AbstractMexSyntacticSequencer.java",
"implementation": "if (transition.getAmbiguousSyntaxes().isEmpty()) return;\n\t\tList<INode> transitionNodes = collectNodes(fromNode, toNode);\n\t\tfor (AbstractElementAlias syntax : transition.getAmbiguousSyntaxes()) {\n\t\t\tList<INode> syntaxNodes = getNodesFor(transitionNodes, syntax);\n\t\t\tif(match_Function_CommaKeyword_2_2_q.equals(syntax))\n\t\t\t\temit_Function_CommaKeyword_2_2_q(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_MatrixRow_CommaKeyword_1_2_q.equals(syntax))\n\t\t\t\temit_MatrixRow_CommaKeyword_1_2_q(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_Matrix_CommaKeyword_1_2_q.equals(syntax))\n\t\t\t\temit_Matrix_CommaKeyword_1_2_q(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_PrimaryMatrix_LeftParenthesisKeyword_3_0_a.equals(syntax))\n\t\t\t\temit_PrimaryMatrix_LeftParenthesisKeyword_3_0_a(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse if(match_PrimaryMatrix_LeftParenthesisKeyword_3_0_p.equals(syntax))\n\t\t\t\temit_PrimaryMatrix_LeftParenthesisKeyword_3_0_p(semanticObject, getLastNavigableState(), syntaxNodes);\n\t\t\telse acceptNodes(getLastNavigableState(), syntaxNodes);",
"signature": "String getUnassignedRuleCallToken(EObject semanticObject, RuleCall ruleCall, INode node)"
},
{
"arguments": [],
"filename": "org.eclipse.iee.translator.TeXmole/org.eclipse.iee.translator.molex.mex/src-gen/org/eclipse/iee/translator/molex/mex/services/MexGrammarAccess.java",
"implementation": "return cRowFloatParserRuleCall_3_3_0;",
"signature": "RuleCall getRowFloatParserRuleCall_3_3_0()"
},
{
"arguments": [],
"filename": "org.eclipse.iee.translator.TeXmole/org.eclipse.iee.translator.molex.mex/src-gen/org/eclipse/iee/translator/molex/mex/services/MexGrammarAccess.java",
"implementation": "return cColumnFloatParserRuleCall_3_6_0;",
"signature": "RuleCall getColumnFloatParserRuleCall_3_6_0()"
},
{
"arguments": [
"final TransposeMatrix n"
],
"filename": "org.eclipse.iee.translator.TeXmole/org.eclipse.iee.translator.molex.mex/xtend-gen/org/eclipse/iee/translator/molex/mex/generator/MexGenerator.java",
"implementation": "StringConcatenation _builder = new StringConcatenation();\n {\n boolean _operator_or = false;\n boolean _operator_or_1 = false;\n boolean _operator_or_2 = false;\n boolean _operator_or_3 = false;\n boolean _operator_or_4 = false;\n boolean _operator_or_5 = false;\n boolean _operator_or_6 = false;\n boolean _operator_or_7 = false;\n boolean _operator_or_8 = false;\n boolean _operator_or_9 = false;\n boolean _operator_or_10 = false;\n boolean _operator_or_11 = false;\n boolean _operator_or_12 = false;\n boolean _operator_or_13 = false;\n boolean _operator_or_14 = false;\n boolean _operator_or_15 = false;\n boolean _operator_or_16 = false;\n boolean _operator_or_17 = false;\n boolean _operator_or_18 = false;\n boolean _operator_or_19 = false;\n boolean _operator_or_20 = false;\n boolean _operator_or_21 = false;\n boolean _operator_or_22 = false;\n boolean _operator_or_23 = false;\n boolean _operator_or_24 = false;\n boolean _operator_or_25 = false;\n boolean _operator_or_26 = false;\n boolean _operator_or_27 = false;\n boolean _operator_or_28 = false;\n boolean _operator_or_29 = false;\n boolean _operator_or_30 = false;\n boolean _operator_or_31 = false;\n boolean _operator_or_32 = false;\n boolean _operator_or_33 = false;\n boolean _operator_or_34 = false;\n boolean _operator_or_35 = false;\n boolean _operator_or_36 = false;\n boolean _operator_or_37 = false;\n boolean _operator_or_38 = false;\n String _name = n.getName();\n boolean _operator_equals = ObjectExtensions.operator_equals(_name, \"alpha\");\n if (_operator_equals) {\n _operator_or_38 = true;",
"signature": "StringConcatenation _compileMatrixExpression(final TransposeMatrix n)"
}
] | [
{
"arguments": [],
"filename": "org.eclipse.iee.translator.Jmole/org.eclipse.iee.translator.jmole.math/src-gen/org/eclipse/iee/translator/jmole/math/services/MathGrammarAccess.java",
"implementation": "return cRowINTTerminalRuleCall_2_3_0;",
"signature": "RuleCall getRowINTTerminalRuleCall_2_3_0()"
},
{
"arguments": [],
"filename": "org.eclipse.iee.translator.Jmole/org.eclipse.iee.translator.jmole.math/src-gen/org/eclipse/iee/translator/jmole/math/services/MathGrammarAccess.java",
"implementation": "return cColumnINTTerminalRuleCall_2_6_0;",
"signature": "RuleCall getColumnINTTerminalRuleCall_2_6_0()"
},
{
"arguments": [],
"filename": "org.eclipse.iee.translator.TeXmole/org.eclipse.iee.translator.molex.mex/src-gen/org/eclipse/iee/translator/molex/mex/services/MexGrammarAccess.java",
"implementation": "return cRowINTTerminalRuleCall_3_3_0;",
"signature": "RuleCall getRowINTTerminalRuleCall_3_3_0()"
},
{
"arguments": [],
"filename": "org.eclipse.iee.translator.TeXmole/org.eclipse.iee.translator.molex.mex/src-gen/org/eclipse/iee/translator/molex/mex/services/MexGrammarAccess.java",
"implementation": "return cColumnINTTerminalRuleCall_3_6_0;",
"signature": "RuleCall getColumnINTTerminalRuleCall_3_6_0()"
}
] |
0dbda4c38162fd7be9f2ed0deebfef9485cff651 | [
{
"arguments": [
"RUN"
],
"filename": "common-src/org/epochx/stats/AbstractStat.java",
"implementation": "",
"signature": "new AbstractStat(RUN)"
},
{
"arguments": [],
"filename": "examples-src/org/epochx/gp/model/example/Even3Parity.java",
"implementation": "@Override\r\n\t\t\tpublic void onGenerationEnd() {\r\n\t\t\t\tStats.get().printStats(RUN_NUMBER, GEN_NUMBER, GEN_FITNESS_MIN, GEN_FITNESS_AVE);",
"signature": "new GenerationAdapter()"
}
] | [
{
"arguments": [],
"filename": "common-src/org/epochx/core/CrossoverManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/core/ElitismManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/core/GenerationManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/core/InitialisationManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/core/MutationManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/core/PoolSelectionManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/core/ReproductionManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/core/RunManager.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/op/selection/FitnessProportionateSelector.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/op/selection/LinearRankSelector.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "common-src/org/epochx/op/selection/RandomSelector.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "examples-src/org/epochx/gp/model/example/Even3Parity.java",
"implementation": "* m.getStatsManager().printGenerationStats(GPStatField.GEN_NUMBER,\r\n\t\t * GPStatField.GEN_FITNESS_MIN, GPStatField.GEN_FITTEST_PROGRAM);\r\n\t\t *",
"signature": "void onGenerationEnd()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/codon/StandardGenerator.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/mapper/DepthFirstMapper.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/crossover/FixedPointCrossover.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/crossover/OnePointCrossover.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/init/FixedLengthInitialiser.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/init/FullInitialiser.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/init/GrowInitialiser.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/init/RampedHalfAndHalfInitialiser.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/mutation/PointMutation.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xge-src/org/epochx/ge/op/mutation/SinglePointMutation.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgp-src/org/epochx/gp/op/crossover/KozaCrossover.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgp-src/org/epochx/gp/op/crossover/UniformPointCrossover.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgp-src/org/epochx/gp/op/init/FullInitialiser.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgp-src/org/epochx/gp/op/init/GrowInitialiser.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgp-src/org/epochx/gp/op/init/RampedHalfAndHalfInitialiser.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgp-src/org/epochx/gp/op/mutation/PointMutation.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgp-src/org/epochx/gp/op/mutation/SubtreeMutation.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgr-src/org/epochx/gr/op/crossover/WhighamCrossover.java",
"implementation": "@Override\r\n\t\t\tpublic void onConfigure() {\r\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgr-src/org/epochx/gr/op/init/FullInitialiser.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgr-src/org/epochx/gr/op/init/GrowInitialiser.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgr-src/org/epochx/gr/op/init/RampedHalfAndHalfInitialiser.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
},
{
"arguments": [],
"filename": "xgr-src/org/epochx/gr/op/mutation/WhighamMutation.java",
"implementation": "@Override\n\t\t\tpublic void onConfigure() {\n\t\t\t\tconfigure();",
"signature": "new ConfigAdapter()"
}
] |
19896eed804f71e9922437f5494a70782a8ba2e7 | [
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/aceeditor/AceEditorRenderer.java",
"implementation": "return AceEditor.DELEGATE_COMPONENT_FAMILY;",
"signature": "String getDelegateComponentFamily()"
},
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/aceeditor/AceEditorRenderer.java",
"implementation": "return AceEditor.DELEGATE_RENDERER_TYPE;",
"signature": "String getDelegateRendererType()"
},
{
"arguments": [
"FacesContext facesContext",
" UIComponent uiComponent"
],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/aceeditor/AceEditorRenderer.java",
"implementation": "ResponseWriter responseWriter = facesContext.getResponseWriter();\n\t\tString hiddenInputClientId = getHiddenInputClientId(facesContext, uiComponent);\n\n\t\treturn new HiddenTextResponseWriter(responseWriter, hiddenInputClientId);",
"signature": "DelegationResponseWriter getDelegationResponseWriter(FacesContext facesContext, UIComponent uiComponent)"
},
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/button/ButtonRenderer.java",
"implementation": "return Button.DELEGATE_COMPONENT_FAMILY;",
"signature": "String getDelegateComponentFamily()"
},
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/starrating/StarRatingRenderer.java",
"implementation": "return StarRating.DELEGATE_COMPONENT_FAMILY;",
"signature": "String getDelegateComponentFamily()"
},
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/starrating/StarRatingRenderer.java",
"implementation": "return StarRating.DELEGATE_RENDERER_TYPE;",
"signature": "String getDelegateRendererType()"
}
] | [
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/aceeditor/AceEditorBase.java",
"implementation": "return (Boolean) getStateHelper().eval(DISABLED, null);",
"signature": "Boolean isDisabled()"
},
{
"arguments": [
"Boolean disabled"
],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/aceeditor/AceEditorBase.java",
"implementation": "getStateHelper().put(DISABLED, disabled);",
"signature": "void setDisabled(Boolean disabled)"
},
{
"arguments": [
"FacesContext facesContext",
" UIComponent uiComponent"
],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/aceeditor/AceEditorRenderer.java",
"implementation": "ExternalContext externalContext = facesContext.getExternalContext();\n\t\tMap<String, String> requestParameterMap = externalContext.getRequestParameterMap();\n\t\tString clientId = uiComponent.getClientId();\n\t\tchar separatorChar = UINamingContainer.getSeparatorChar(facesContext);\n\t\tString hiddenInputClientId = clientId + separatorChar + StringPool.HIDDEN;\n\t\tString submittedValue = requestParameterMap.get(hiddenInputClientId);\n\n\t\tif (submittedValue != null) {\n\t\t\tUIInput uiInput = (UIInput) uiComponent;\n\t\t\tuiInput.setSubmittedValue(submittedValue);",
"signature": "void decode(FacesContext facesContext, UIComponent uiComponent)"
},
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/button/ButtonResponseWriter.java",
"implementation": "return wrappedResponseWriter;",
"signature": "ResponseWriter getWrapped()"
},
{
"arguments": [
"FacesContext facesContext",
" UIComponent uiComponent"
],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/starrating/StarRatingRenderer.java",
"implementation": "RenderKit renderKit = facesContext.getRenderKit();\n\t\tRenderer radioRenderer = renderKit.getRenderer(HtmlSelectOneRadio.COMPONENT_FAMILY, RADIO_RENDERER_TYPE);\n\t\tradioRenderer.decode(facesContext, uiComponent);\n\tprotected void encodeHTMLBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException {\n\t\t// Start the opening tag of the component.\n\t\tencodeClassAttribute(responseWriter, (Styleable) uiComponent);\n\t\t// Use our own ResponseWriter to filter out stuff that the jsf-api wants to write to the DOM, and also use our\n\t\t// ResponseWriter to save interesting things along the way and later ask our ResponseWriter for them, such as an\n\t\t// onclick event that our jsf-impl will need.\n\t\tfacesContext.setResponseWriter(starRatingResponseWriter);\n\n\t\t// Delegate rendering of the component to the JSF runtime.\n\t\tRenderKit renderKit = facesContext.getRenderKit();\n\t\tRenderer radioRenderer = renderKit.getRenderer(HtmlSelectOneRadio.COMPONENT_FAMILY, RADIO_RENDERER_TYPE);\n\t\tradioRenderer.encodeBegin(facesContext, uiComponent);\n\t\tradioRenderer.encodeChildren(facesContext, uiComponent);\n\t\tradioRenderer.encodeEnd(facesContext, uiComponent);\n\n\t\t// Restore the original ResponseWwriter.\n\t\tfacesContext.setResponseWriter(responseWriter);",
"signature": "void decode(FacesContext facesContext, UIComponent uiComponent)"
},
{
"arguments": [],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/component/starrating/StarRatingResponseWriter.java",
"implementation": "return wrappedResponseWriter;",
"signature": "ResponseWriter getWrapped()"
},
{
"arguments": [
"ResponseWriter responseWriter",
" String attributeName",
" Object attributeValue",
"\n\n\t\tif "
],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/renderkit/AlloyRendererBase.java",
"implementation": "responseWriter.write(StringPool.COMMA);",
"signature": "void encodeEvent(ResponseWriter responseWriter, String attributeName, Object attributeValue,\n\n\t\tif (!first)"
},
{
"arguments": [
"ResponseWriter responseWriter",
" String attributeName",
" Object attributeValue",
"\n\n\t\tif "
],
"filename": "alloy/src/main/java/com/liferay/faces/alloy/renderkit/AlloyRendererBase.java",
"implementation": "responseWriter.write(StringPool.COMMA);",
"signature": "void encodeObject(ResponseWriter responseWriter, String attributeName, Object attributeValue,\n\n\t\tif (!first)"
}
] |
26132fb65137f90d5223bf5bddc0c7a296577aec | [
{
"arguments": [],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "return id;\n\tpublic void setId(Long id) {\n\t\n\tpublic Date getStartDate() {\n\t\treturn startDate;\n\tpublic void setStartDate(Date startDate) {\n\t\tthis.startDate = startDate;\n\tpublic Date getEndDate() {\n\t\treturn endDate;\n\tpublic void setEndDate(Date endDate) {\n\t\tthis.endDate = endDate;\n\tpublic String getDescription() {\n\t\treturn this.description;",
"signature": "Long getId()"
},
{
"arguments": [
"String description"
],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "this.description = description;",
"signature": "void setDescription(String description)"
},
{
"arguments": [
"Short code",
" String title",
" Date startTime",
" Date endTime",
" String description",
" EventSessionLeader leader"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventSession.java",
"implementation": "this(code, title, startTime, endTime, description, Collections.singleton(leader));\n\t\t\n\tpublic EventSession(Short code, String title, Date startTime, Date endTime, String description, Set<EventSessionLeader> leaders) {\n\t\tthis.code = code;\n\t\tthis.description = description;\n\n\tpublic Short getCode() {\n\t\treturn code;\n\tpublic String getTitle() {\n\t\treturn title;\n\tpublic String getDescription() {\n\t\treturn description;\n\tpublic Set<EventSessionLeader> getLeaders() {\n\t\treturn leaders;",
"signature": "public EventSession(Short code, String title, Date startTime, Date endTime, String description, EventSessionLeader leader)"
},
{
"arguments": [
"EventRepository eventRepository",
" TwitterOperations twitter"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventsController.java",
"implementation": "this.eventRepository = eventRepository;\n\t// for web service (JSON) clients\n\t@RequestMapping(method=RequestMethod.GET, headers=\"Accept=application/json\") \n\tpublic @ResponseBody List<Event> upcomingEvents() {\n\t\treturn eventRepository.findUpcomingEvents();\n\t@RequestMapping(value=\"/{id",
"signature": "public EventsController(EventRepository eventRepository, TwitterOperations twitter)"
},
{
"arguments": [
"Model model"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventsController.java",
"implementation": "model.addAttribute(eventRepository.findUpcomingEvents());\n\t\treturn \"events/list\";",
"signature": "String upcomingEventsView(Model model)"
},
{
"arguments": [
"String query",
" int page",
" int resultsPerPage"
],
"filename": "src/main/java/org/springframework/social/twitter/TwitterService.java",
"implementation": "return search(null, query, page, resultsPerPage, 0, 0);",
"signature": "SearchResults search(String query, int page, int resultsPerPage)"
}
] | [
{
"arguments": [],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "return this.id;\n\tpublic void setId(long id) {\n\n\tpublic String getDescription() {\n\t\treturn this.description;",
"signature": "long getId()"
},
{
"arguments": [
"String description"
],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "this.description = description;",
"signature": "void setDescription(String description)"
},
{
"arguments": [],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "return this.startTime;",
"signature": "Date getStartTime()"
},
{
"arguments": [
"Date startTime"
],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "this.startTime = startTime;",
"signature": "void setStartTime(Date startTime)"
},
{
"arguments": [],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "return this.endTime;\n\tpublic void setEndTime(Date endTime) {\n\t\tthis.endTime = endTime;\n\tpublic String getHashtag() {\n\t\treturn this.hashtag;\n\tpublic void setHashtag(String hashtag) {\n\t\tthis.hashtag = hashtag;\n\tpublic void setFriendlyId(String friendlyId) {\n\t this.friendlyId = friendlyId;",
"signature": "Date getEndTime()"
},
{
"arguments": [],
"filename": "src/main/java/com/springsource/greenhouse/events/Event.java",
"implementation": "return friendlyId;",
"signature": "String getFriendlyId()"
},
{
"arguments": [
"String title",
" String summary",
" Date startTime",
"\n\t\t\tDate endTime",
" SessionLeader leader",
" String hashtag"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventSession.java",
"implementation": "super();\n\t\tthis.title = title;\n\t\tthis.summary = summary;\n\t\tthis.startTime = startTime;\n\t\tthis.endTime = endTime;\n\t\t\n\t\tthis.leaders = new ArrayList<SessionLeader>();\n\t\tthis.leaders.add(leader);\n\t\tthis.hashtag = hashtag;\n\n\tpublic EventSession(String title, String summary, Date startTime,\n\t\t\tDate endTime, List<SessionLeader> leaders, String hashtag) {\n\t\tsuper();\n\t\tthis.summary = summary;\n\t\tthis.hashtag = hashtag;\n\t\n\tpublic String getTitle() {\n\t\treturn title;\n\tpublic String getSummary() {\n\t\treturn summary;\n\tpublic List<SessionLeader> getLeaders() {\n\t\treturn leaders;\n\tpublic String getHashtag() {\n\t\treturn hashtag;",
"signature": "public EventSession(String title, String summary, Date startTime,\n\t\t\tDate endTime, SessionLeader leader, String hashtag)"
},
{
"arguments": [
"EventsService eventsService",
" TwitterOperations twitter"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventsController.java",
"implementation": "this.eventsService = eventsService;\n\t@RequestMapping(method=RequestMethod.GET, headers=\"Accept=application/json\") \n\tpublic @ResponseBody List<Event> eventsData() {\n\t\treturn eventsService.findEventsAfter(new Date());",
"signature": "public EventsController(EventsService eventsService, TwitterOperations twitter)"
},
{
"arguments": [
"Model model"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventsController.java",
"implementation": "model.addAttribute(eventsService.findEventsAfter(new Date()));\n\t\treturn \"events/list\";\n\t@RequestMapping(value=\"/{eventId",
"signature": "String listEvents(Model model)"
},
{
"arguments": [
"@PathVariable long eventId"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventsController.java",
"implementation": "return eventsService.findEventById(eventId);\n\t@RequestMapping(value=\"/{eventName",
"signature": "Event eventData(@PathVariable long eventId)"
},
{
"arguments": [
"OAuthConsumerToken accessToken",
" @PathVariable String eventName",
" Model model"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventsController.java",
"implementation": "Event event = eventsService.findEventByPublicId(eventName);\n\t\tmodel.addAttribute(event);\n\t\tmodel.addAttribute(twitter.search(accessToken, event.getHashtag(), 1, 10));\n\t\treturn \"events/view\";\n\t\n\t@RequestMapping(value=\"/{eventId",
"signature": "String viewEvent(OAuthConsumerToken accessToken, @PathVariable String eventName, Model model)"
},
{
"arguments": [
"OAuthConsumerToken accessToken",
" @RequestParam String status"
],
"filename": "src/main/java/com/springsource/greenhouse/events/EventsController.java",
"implementation": "logger.info(\"twitter update: \" + status);\n\t\t\n\t\treturn \"hello\";",
"signature": "String postTweet(OAuthConsumerToken accessToken, @RequestParam String status)"
}
] |
507381bfe0e0cc3ebd54f15a9a0974ddfdafe848 | [
{
"arguments": [],
"filename": "org.dawb.passerelle.actors/src/org/dawb/passerelle/editors/UserModifyComposite.java",
"implementation": "",
"signature": "public UserModifyComposite()"
},
{
"arguments": [
"final Object container",
" Closeable closeable"
],
"filename": "org.dawb.passerelle.actors/src/org/dawb/passerelle/editors/UserModifyComposite.java",
"implementation": "final Composite contents = new Composite((Composite)container, SWT.NONE);\n\t\tcontents.setLayout(new GridLayout(1, false));\n\t\tcontents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n\t\tthis.customLabel = new Label(contents, SWT.WRAP);\n this.tableViewer = new AppliableTableViewer(contents, SWT.FULL_SELECTION | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);\n\t@Override\n\tpublic void initializeMenu(Object obars) {\n\tpublic void setQueue(Queue<Object> queue) {\n\t@Override\n\t@Override\n\tpublic void setUserObject(Object userObject) {\n\t\tthrow new RuntimeException(\"Cannot call setUserObject(...) on \"+getClass().getName());",
"signature": "void createRemotePart(final Object container, Closeable closeable)"
},
{
"arguments": [],
"filename": "org.dawb.passerelle.actors/src/org/dawb/passerelle/editors/UserModifyComposite.java",
"implementation": "this.stop.run();",
"signature": "void stop()"
},
{
"arguments": [],
"filename": "org.dawb.passerelle.actors/src/org/dawb/passerelle/editors/UserModifyComposite.java",
"implementation": "this.confirm.run();",
"signature": "void confirm()"
},
{
"arguments": [],
"filename": "org.dawb.passerelle.actors/src/org/dawb/passerelle/editors/UserModifyComposite.java",
"implementation": "setFocus();",
"signature": "void setRemoteFocus()"
},
{
"arguments": [],
"filename": "org.dawb.passerelle.common/src/org/dawb/passerelle/common/remote/RemoteWorkbenchImpl.java",
"implementation": "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tfinal IUserInputService service = (IUserInputService)ServiceManager.getService(IUserInputService.class);\n\t\t\t\t\tfinal IRemoteWorkbenchPart part = service.openUserPlotPart(bean.getPartName(), bean.isDialog());\n\t\t\t\t\t\n\t\t\t\t\tif (bean.getPartName()!=null) part.setPartName(bean.getPartName());\n\t\t\t\t\tpart.setQueue(queue);\n\t\t\t\t\tpart.setUserObject(bean);\n\t\t\t\t\t\n\t\t\t\t\tif (part instanceof Dialog) {\n\t\t\t\t\t\tDialog dialog = (Dialog)part;\n\t\t\t\t\t\tdialog.open();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (dialog.getReturnCode()!=Dialog.OK) {\n\t\t\t\t\t\t\tqueue.add(Collections.EMPTY_MAP);",
"signature": "new Runnable()"
}
] | [
{
"arguments": [],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "return actorName;",
"signature": "String getActorName()"
},
{
"arguments": [
"String actorName"
],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "this.actorName = actorName;",
"signature": "void setActorName(String actorName)"
},
{
"arguments": [],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "return partName;",
"signature": "String getPartName()"
},
{
"arguments": [
"String parentName"
],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "this.partName = parentName;",
"signature": "void setPartName(String parentName)"
},
{
"arguments": [],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "return isDialog;",
"signature": "boolean isDialog()"
},
{
"arguments": [
"boolean isDialog"
],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "this.isDialog = isDialog;",
"signature": "void setDialog(boolean isDialog)"
},
{
"arguments": [],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "return silent;",
"signature": "boolean isSilent()"
},
{
"arguments": [
"boolean silent"
],
"filename": "org.dawb.workbench.jmx/src/org/dawb/workbench/jmx/UserInputBean.java",
"implementation": "this.silent = silent;",
"signature": "void setSilent(boolean silent)"
}
] |
53cf570c3fe1f6f539752e25ff1f7deaff81b9ff | [
{
"arguments": [
"UserAgentCallback uac"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "setMedia(\"screen\");\n this.uac = uac;\n setCss(new StyleReference(uac));\n XRLog.render(\"Using CSS implementation from: \" + getCss().getClass().getName());\n setTextRenderer(new Java2DTextRenderer());\n try {\n setDPI(Toolkit.getDefaultToolkit().getScreenResolution());",
"signature": "public SharedContext(UserAgentCallback uac)"
},
{
"arguments": [
"Rectangle extents"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "LayoutContext c = new LayoutContext(this, extents);\n c.initializeStyles(new EmptyStyle());\n return c;",
"signature": "LayoutContext newLayoutContextInstance(Rectangle extents)"
},
{
"arguments": [
"Rectangle extents"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "RenderingContext c = new RenderingContext(this, extents);\n return media;\n return text_renderer;\n\n //Uu.p(\"upping max height to : \" + max_height);\n\n private Map id_map;\n\n public void addIDBox(String id, Box box) {\n if (id_map == null) {\n id_map = new HashMap();",
"signature": "RenderingContext newRenderingContextInstance(Rectangle extents)"
},
{
"arguments": [
"String id"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "if (id_map == null) {\n id_map = new HashMap();",
"signature": "Box getIDBox(String id)"
},
{
"arguments": [
"TextRenderer text_renderer"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "this.text_renderer = text_renderer;",
"signature": "void setTextRenderer(TextRenderer text_renderer)"
},
{
"arguments": [
"String media"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "this.media = media;",
"signature": "void setMedia(String media)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return uac;",
"signature": "UserAgentCallback getUac()"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return this.dpi;",
"signature": "float getDPI()"
},
{
"arguments": [
"float dpi"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "this.dpi = dpi;\n this.mm_per_px = (CM__PER__IN * MM__PER__CM) / dpi;",
"signature": "void setDPI(float dpi)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return this.mm_per_px;",
"signature": "float getMmPerPx()"
},
{
"arguments": [
"FontSpecification parent",
" FontSpecification desired",
" float xHeight",
" Graphics2D g2"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "float bestGuess = getFontSize2D(parent);\n float bestHeight = getXHeight(parent, g2);\n float nextGuess = bestGuess * xHeight / bestHeight;\n while (true) {\n desired.size = nextGuess;\n float nextHeight = getXHeight(desired, g2);\n //this check is needed in cases where the iteration can hop back and forth between two values\n if (Math.abs(nextHeight - xHeight) < Math.abs(bestHeight - xHeight)) {\n bestGuess = nextGuess;\n bestHeight = nextHeight;\n nextGuess = bestGuess * xHeight / nextHeight;",
"signature": "float getFontSizeForXHeight(FontSpecification parent, FontSpecification desired, float xHeight, Graphics2D g2)"
},
{
"arguments": [
"FontSpecification fs",
" Graphics2D g2"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "Font f = getFontResolver().resolveFont(this, fs.families, fs.size, fs.fontWeight, fs.fontStyle, fs.variant);\n float sto = getTextRenderer().getLineMetrics(g2, f, \" \").getStrikethroughOffset();\n return 2 * Math.abs(sto);",
"signature": "float getXHeight(FontSpecification fs, Graphics2D g2)"
},
{
"arguments": [
"FontSpecification font"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return getFontResolver().resolveFont(this, font).getSize2D();",
"signature": "float getFontSize2D(FontSpecification font)"
},
{
"arguments": [
"FontSpecification font"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return getFontResolver().resolveFont(this, font);",
"signature": "Font getFont(FontSpecification font)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return uac.getBaseURL();",
"signature": "String getBaseURL()"
},
{
"arguments": [
"String url"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "uac.setBaseURL(url);",
"signature": "void setBaseURL(String url)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "if (media.equals(\"print\")) {\n return true;",
"signature": "boolean isPaged()"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return interactive;",
"signature": "boolean isInteractive()"
},
{
"arguments": [
"boolean interactive"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "this.interactive = interactive;",
"signature": "void setInteractive(boolean interactive)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return print;",
"signature": "boolean isPrint()"
},
{
"arguments": [
"boolean print"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "this.print = print;",
"signature": "void setPrint(boolean print)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return pageSize;",
"signature": "PageInfo getPageInfo()"
},
{
"arguments": [
"String name",
" Font font"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "getFontResolver().setFontMapping(name, font);",
"signature": "void setFontMapping(String name, Font font)"
},
{
"arguments": [
"RenderingContext c",
" CalculatedStyle activeStyle",
" boolean rendering"
],
"filename": "src/java/org/xhtmlrenderer/layout/block/Relative.java",
"implementation": "topLeft = extractLeftTopRelative(c, c.getBlockFormattingContext(), activeStyle);\n public static void translateRelative(LayoutContext c, CalculatedStyle activeStyle, boolean rendering) {\n topLeft = extractLeftTopRelative(c, c.getBlockFormattingContext(), activeStyle);\n if (topLeft != null) {\n top = topLeft[0];\n left = topLeft[1];\n c.translate(left, top);\n if (rendering) {\n c.getGraphics().translate(left, top);",
"signature": "void translateRelative(RenderingContext c, CalculatedStyle activeStyle, boolean rendering)"
},
{
"arguments": [
"RenderingContext c",
" CalculatedStyle activeStyle",
" boolean rendering"
],
"filename": "src/java/org/xhtmlrenderer/layout/block/Relative.java",
"implementation": "int top = 0;\n int left = 0;\n int topLeft[] = null;\n topLeft = extractLeftTopRelative(c, c.getBlockFormattingContext(), activeStyle);\n if (topLeft != null) {\n top = topLeft[0];\n left = topLeft[1];\n c.translate(-left, -top);\n if (rendering) {\n c.getGraphics().translate(-left, -top);",
"signature": "void untranslateRelative(RenderingContext c, CalculatedStyle activeStyle, boolean rendering)"
},
{
"arguments": [
"Box box"
],
"filename": "src/java/org/xhtmlrenderer/swing/HoverListener.java",
"implementation": "if (box == null) {\n return null;",
"signature": "Box getDeepestHover(Box box)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/swing/RootPanel.java",
"implementation": "return sharedContext;\n protected SharedContext sharedContext;\n //TODO: layout_context should not be stored!\n protected volatile LayoutContext layout_context;\n getSharedContext().setBaseURL(url);\n getSharedContext().setNamespaceHandler(nsh);\n getSharedContext().setMedia(pageInfo == null ? \"screen\" : \"print\");\n getSharedContext().getCss().setDocumentContext(getSharedContext(), getSharedContext().getNamespaceHandler(), doc, this);\n\n\n\n protected RenderingContext newRenderingContext(PageInfo pageInfo, Graphics2D g) {\n getSharedContext().setCanvas(this);\n getSharedContext().setMaxWidth(0);\n //getSharedContext().setMaxHeight(0);\n RenderingContext result = getSharedContext().newRenderingContextInstance(extents);\n result.setGraphics(g);\n result.setPrint(pageInfo != null);\n result.setInteractive(pageInfo == null);\n\n return result;",
"signature": "SharedContext getSharedContext()"
},
{
"arguments": [
"PageInfo pageInfo",
" Graphics2D g"
],
"filename": "src/java/org/xhtmlrenderer/swing/RootPanel.java",
"implementation": "XRLog.layout(Level.FINEST, \"new context begin\");\n\n getSharedContext().setCanvas(this);\n\n Rectangle extents;\n\n if (pageInfo != null) {\n extents = new Rectangle(0, 0,\n (int) pageInfo.getContentWidth(), (int) pageInfo.getContentHeight());",
"signature": "LayoutContext newLayoutContext(PageInfo pageInfo, Graphics2D g)"
},
{
"arguments": [
"enclosingScrollPane != null"
],
"filename": "src/java/org/xhtmlrenderer/swing/RootPanel.java",
"implementation": "Rectangle bnds = enclosingScrollPane.getViewportBorderBounds();\n extents = new Rectangle(0, 0, bnds.width, bnds.height);\n //Uu.p(\"bnds = \" + bnds);",
"signature": "else if (enclosingScrollPane != null)"
}
] | [
{
"arguments": [
"RenderingContext ctx",
" String[] families",
" float size",
" IdentValue weight",
" IdentValue style",
" IdentValue variant"
],
"filename": "src/java/org/xhtmlrenderer/context/FontResolver.java",
"implementation": "try {\n Font fnt = createFont(ctx, (Font) available_fonts_hash.get(family), size, weight, style, variant);\n instance_hash.put(getFontInstanceHashName(family, size, weight, style, variant), fnt);\n //Uu.p(\"subbing in base sans : \" + fnt);\n return fnt;",
"signature": "Font resolveFont(RenderingContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "public Context newContextInstance(Rectangle extents) {\n Context c = new ContextImpl(this, extents);\n /**\n * Description of the Field\n */\n protected Graphics2D graphics;\n\n /**\n * Gets the graphics attribute of the Context object\n *\n * @return The graphics value\n */\n public Graphics2D getGraphics() {\n return graphics;",
"signature": "public SharedContext()"
},
{
"arguments": [
"Graphics2D graphics"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "this.graphics = graphics;",
"signature": "void setGraphics(Graphics2D graphics)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return getCtx();",
"signature": "RenderingContext getRenderingContext()"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "return ctx;",
"signature": "RenderingContext getCtx()"
},
{
"arguments": [
"RenderingContext ctx"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "this.ctx = ctx;",
"signature": "void setCtx(RenderingContext ctx)"
},
{
"arguments": [
"String id",
" Box box"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "if(id_map == null) {\n\t\t\tid_map = new HashMap();",
"signature": "void addIDBox(String id, Box box)"
},
{
"arguments": [
"String id"
],
"filename": "src/java/org/xhtmlrenderer/layout/SharedContext.java",
"implementation": "if(id_map == null) {\n\t\t\tid_map = new HashMap();",
"signature": "Box getIDBox(String id)"
},
{
"arguments": [
"Context c"
],
"filename": "src/java/org/xhtmlrenderer/render/Box.java",
"implementation": "double absTop = getAbsY(c);\n protected double getAbsY(Context c) {\n return c.getOriginOffset().y;",
"signature": "boolean crossesPageBreak(Context c)"
},
{
"arguments": [
"Context c",
" InlineBox ib"
],
"filename": "src/java/org/xhtmlrenderer/render/LineBox.java",
"implementation": "public void moveToNextPage(Context c, Rectangle bounds) {\n protected double getAbsY(Context c) {\n return c.getOriginOffset().y + y;",
"signature": "void addInlineChild(Context c, InlineBox ib)"
},
{
"arguments": [
"Context c",
" Box root"
],
"filename": "src/java/org/xhtmlrenderer/swing/BasicPanel.java",
"implementation": "return getPageCount(layout_context);\n private int getPageCount(Context c) {\n private void renderPagedView(Context c, Box box) {\n int pageCount = getPageCount(c);\n setPreferredSize(new Dimension(c.getMaxWidth(),\n public void setRenderingContext(RenderingContext ctx) {\n this.ctx = ctx;\n String url = getRenderingContext().getUac().resolveURI(filename);\n Box bxx = getContext().getIDBox(id);\n getRenderingContext().getStyleReference().flushStyleSheets();\n setDocument(this.doc, getRenderingContext().getBaseURL(), getContext().getNamespaceHandler());\n base = new URL(getRenderingContext().getUac().getBaseURL());\n return getContext().getNamespaceHandler().getDocumentTitle(doc);\n return ctx.getUac().getXMLResource(uri).getDocument();\n /**\n * Gets the renderingContext attribute of the BasicPanel object\n *\n * @return The renderingContext value\n */\n public RenderingContext getRenderingContext() {\n return ctx;",
"signature": "void executeRenderThread(Context c, Box root)"
},
{
"arguments": [
"Box box"
],
"filename": "src/java/org/xhtmlrenderer/swing/HoverListener.java",
"implementation": "if(box == null) {\n\t\t\treturn null;",
"signature": "Box getDeepestHover(Box box)"
},
{
"arguments": [],
"filename": "src/java/org/xhtmlrenderer/swing/RootPanel.java",
"implementation": "return getRenderingContext().getContext();\n protected RenderingContext ctx;\n /**\n * Gets the renderingContext attribute of the BasicPanel object\n *\n * @return The renderingContext value\n */\n public RenderingContext getRenderingContext() {\n return ctx;",
"signature": "SharedContext getContext()"
}
] |
57c83e7e85803434057d66d9dcd0d3ef12a4e6e2 | [
{
"arguments": [
"IEditorInput input"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/editor/OPEditor.java",
"implementation": "super.setInput(input);\r\n\t @Override\r\n\t public void commandStackChanged(EventObject event) {\r\n\t firePropertyChange(PROP_DIRTY);\r\n\t super.commandStackChanged(event);",
"signature": "void setInput(IEditorInput input)"
},
{
"arguments": [
"int value",
" String name",
" String literal"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/OPProceduralLinkKind.java",
"implementation": "this.value = value;\r\n\t\tthis.name = name;\r\n\t\tthis.literal = literal;",
"signature": "private OPProceduralLinkKind(int value, String name, String literal)"
},
{
"arguments": [],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/OPProceduralLinkKind.java",
"implementation": "return value;",
"signature": "int getValue()"
},
{
"arguments": [],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/OPProceduralLinkKind.java",
"implementation": "return name;",
"signature": "String getName()"
},
{
"arguments": [],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/OPProceduralLinkKind.java",
"implementation": "return literal;",
"signature": "String getLiteral()"
},
{
"arguments": [
"String name"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/OPProceduralLinkKind.java",
"implementation": "for(OPProceduralLinkKind kind:values) {\r\n\t\t\tif(kind.name.equals(name))\r\n\t\t\t\treturn kind;",
"signature": "OPProceduralLinkKind getByName(String name)"
},
{
"arguments": [
"OPLink link"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/impl/OPSystemImpl.java",
"implementation": "links.add(link);",
"signature": "void addLink(OPLink link)"
},
{
"arguments": [
"OPLink link"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/impl/OPSystemImpl.java",
"implementation": "links.remove(link);",
"signature": "void removeLink(OPLink link)"
},
{
"arguments": [
"JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "//\t\tOPSystem system = OPModelFactory.createOPSystem();\r\n//\t\tsystem.setName(json.get(\"name\").asString());\r\n//\t\tsystem.setNextId(json.get(\"nexId\").asInt());\r\n//\t\tsystem.setSD(readOPObjectProcessDiagram(json.get(\"SD\").asObject()));\r\n//\t\treturn system;\r\n//",
"signature": "OPSystem readOPSystem(JsonObject json)"
},
{
"arguments": [
"JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "//\t\tOPObjectProcessDiagram opd = OPModelFactory.createObjectProcessDiagram();\r\n//\t\treadOPModelBase(opd, json);\r\n//\t\treadOPElementViewContainer(opd, json);\r\n//\r\n//\t\tMap<Integer, OPLinkView> idToLink = Maps.newHashMap();\r\n//\t\tMap<OPLinkView, Integer> linkToSource = Maps.newHashMap();\r\n//\t\tMap<OPLinkView, Integer> linkToTarget = Maps.newHashMap();\r\n//\t\t\r\n//\t\tfor(JsonValue link : json.get(\"links\").asArray()) {\r\n//\t\t\topd.addLinkView(readOPLinkView(link.asObject(), idToLink, linkToSource, linkToTarget));\r\n//",
"signature": "OPObjectProcessDiagram readOPObjectProcessDiagram(JsonObject json)"
},
{
"arguments": [
"JsonObject json",
" Map<Integer",
" OPLinkView> idToLink",
" Map<OPLinkView",
" Integer> linkToSource",
" Map<OPLinkView",
" Integer> linkToTarget"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "//\t\tOPLinkView link = OPModelFactory.createLinkView();\r\n//\t\treadOPModelBase(link, json);\r\n//\t\tidToLink.put(link.getId(), link);\r\n//\t\tlinkToSource.put(link, json.get(\"source\").asInt());\r\n//\t\tlinkToTarget.put(link, json.get(\"target\").asInt());\r\n//\t\treturn link;\r\n//",
"signature": "OPLinkView readOPLinkView(JsonObject json, Map<Integer, OPLinkView> idToLink, Map<OPLinkView, Integer> linkToSource, Map<OPLinkView, Integer> linkToTarget)"
},
{
"arguments": [
"OPElementViewContainer container",
" JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "//\t\tJsonArray nodes = json.get(\"nodes\").asArray();\r\n//\t\tfor (JsonValue node : nodes) {\r\n////\t\t\tcontainer.addNode(readOPNodeView(node.asObject()));\r\n//",
"signature": "void readOPElementViewContainer(OPElementViewContainer container, JsonObject json)"
},
{
"arguments": [
"OPElement base",
" JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "//\t\tbase.setId(json.get(\"id\").asInt());\r\n//",
"signature": "void readOPModelBase(OPElement base, JsonObject json)"
}
] | [
{
"arguments": [
"OPLinkView link"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/impl/OPObjectProcessDiagramImpl.java",
"implementation": "links.add(link);\r\n\t\tnotifyObservers();",
"signature": "void addLinkView(OPLinkView link)"
},
{
"arguments": [
"OPLinkView link"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/impl/OPObjectProcessDiagramImpl.java",
"implementation": "links.remove(link);\r\n\t\tnotifyObservers();",
"signature": "void removeLinkView(OPLinkView link)"
},
{
"arguments": [
"JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "OPSystem system = OPModelFactory.createOPSystem();\r\n\t\tsystem.setName(json.get(\"name\").asString());\r\n\t\tsystem.setNextId(json.get(\"nexId\").asInt());\r\n\t\tsystem.setSD(readOPObjectProcessDiagram(json.get(\"SD\").asObject()));\r\n\t\treturn system;",
"signature": "OPSystem readOPSystem(JsonObject json)"
},
{
"arguments": [
"JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "OPObjectProcessDiagram opd = OPModelFactory.createObjectProcessDiagram();\r\n\t\treadOPModelBase(opd, json);\r\n\t\treadOPElementViewContainer(opd, json);\r\n\r\n\t\tMap<Integer, OPLinkView> idToLink = Maps.newHashMap();\r\n\t\tMap<OPLinkView, Integer> linkToSource = Maps.newHashMap();\r\n\t\tMap<OPLinkView, Integer> linkToTarget = Maps.newHashMap();\r\n\t\t\r\n\t\tfor(JsonValue link : json.get(\"links\").asArray()) {\r\n\t\t\topd.addLinkView(readOPLinkView(link.asObject(), idToLink, linkToSource, linkToTarget));",
"signature": "OPObjectProcessDiagram readOPObjectProcessDiagram(JsonObject json)"
},
{
"arguments": [
"JsonObject json",
" Map<Integer",
" OPLinkView> idToLink",
" Map<OPLinkView",
" Integer> linkToSource",
" Map<OPLinkView",
" Integer> linkToTarget"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "OPLinkView link = OPModelFactory.createLinkView();\r\n\t\treadOPModelBase(link, json);\r\n\t\tidToLink.put(link.getId(), link);\r\n\t\tlinkToSource.put(link, json.get(\"source\").asInt());\r\n\t\tlinkToTarget.put(link, json.get(\"target\").asInt());\r\n\t\treturn link;",
"signature": "OPLinkView readOPLinkView(JsonObject json, Map<Integer, OPLinkView> idToLink, Map<OPLinkView, Integer> linkToSource, Map<OPLinkView, Integer> linkToTarget)"
},
{
"arguments": [
"OPElementViewContainer container",
" JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "JsonArray nodes = json.get(\"nodes\").asArray();\r\n\t\tfor (JsonValue node : nodes) {\r\n//\t\t\tcontainer.addNode(readOPNodeView(node.asObject()));",
"signature": "void readOPElementViewContainer(OPElementViewContainer container, JsonObject json)"
},
{
"arguments": [
"OPElement base",
" JsonObject json"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/io/OPJSONReader.java",
"implementation": "base.setId(json.get(\"id\").asInt());",
"signature": "void readOPModelBase(OPElement base, JsonObject json)"
},
{
"arguments": [],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/view/impl/OPLinkViewImpl.java",
"implementation": "return opd;",
"signature": "OPObjectProcessDiagram getObjectProcessDiagram()"
},
{
"arguments": [
"OPObjectProcessDiagram opd"
],
"filename": "com.vainolo.opm.editor/src/com/vainolo/opm/model/view/impl/OPLinkViewImpl.java",
"implementation": "this.opd = opd;\r\n\t\topd.addLinkView(this);\r\n\t\tnotifyObservers();",
"signature": "void setObjectProcessDiagram(OPObjectProcessDiagram opd)"
}
] |
5e015b37c1f051bc98013ea7924b1fdd6bb6c7dd | [
{
"arguments": [
"String idToFind"
],
"filename": "fluentlenium-assertj/src/main/java/org/fluentlenium/assertj/custom/FluentWebElementAssert.java",
"implementation": "if (!actual.id().equals(idToFind)) {\n failWithMessage(\"The element does not have the id: \" + idToFind + \" . Actual id found : \" + actual.id());\n * @param classToFind class to find\n * @return {@code this",
"signature": "FluentWebElementAssert hasId(String idToFind)"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/configuration/ConfigurationFactoryProvider.java",
"implementation": "// Utility class",
"signature": "private ConfigurationFactoryProvider()"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/AbstractFluentListConditions.java",
"implementation": "return negation;",
"signature": "boolean isNegation()"
},
{
"arguments": [
"boolean negation"
],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/AbstractFluentListConditions.java",
"implementation": "this.negation = negation;",
"signature": "void setNegation(boolean negation)"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/message/MessageProxy.java",
"implementation": "// Utility class",
"signature": "private MessageProxy()"
},
{
"arguments": [
"invocationHandler == null"
],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/message/MessageProxy.java",
"implementation": "",
"signature": "proxy\n if (invocationHandler == null)"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/wait/WaitConditionProxy.java",
"implementation": "//Utility class",
"signature": "private WaitConditionProxy()"
},
{
"arguments": [
"FluentConditions.class",
" wait",
" context",
"\n new Supplier<FluentConditions>"
],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/wait/WaitConditionProxy.java",
"implementation": "@Override\n public FluentConditions get() {\n return new WebElementConditions(elementSupplier.get());",
"signature": "new WaitConditionInvocationHandler(FluentConditions.class, wait, context,\n new Supplier<FluentConditions>()"
},
{
"arguments": [
"this == o"
],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/proxy/AbstractLocatorHandler.java",
"implementation": "",
"signature": "IllegalThrows\n if (this == o)"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/proxy/LocatorProxies.java",
"implementation": "// Utility class",
"signature": "private LocatorProxies()"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/utils/ReflectionUtils.java",
"implementation": "// Utility class",
"signature": "private ReflectionUtils()"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/test/java/org/fluentlenium/core/search/SearchTest.java",
"implementation": "assertThat(fluentWebElement).isInstanceOf(FluentWebElement.class);\n Filter[] filters = new Filter[] {filter1, filter2",
"signature": "void canLoopIntoFluentWebElementAfterASearch()"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/test/java/org/fluentlenium/integration/PageInPageTest.java",
"implementation": "private IncludedPage pageWithCreatePage;\n public IncludedPage getPageWithCreatePage() {\n return pageWithCreatePage;",
"signature": "void pagesShouldBeInjected()"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/test/java/org/fluentlenium/utils/ResourceUtils.java",
"implementation": "// Utility class",
"signature": "private ResourceUtils()"
}
] | [
{
"arguments": [
"FluentConditions.class",
" wait",
" context",
"\n new Supplier<FluentConditions>"
],
"filename": "fluentlenium-core/src/main/java/org/fluentlenium/core/conditions/wait/WaitConditionProxy.java",
"implementation": "@Override\n public FluentConditions get() {\n return new WebElementConditions(elementSupplier.get());",
"signature": "new WaitConditionInvocationHandler(FluentConditions.class, wait, context,\n new Supplier<FluentConditions>()"
},
{
"arguments": [],
"filename": "fluentlenium-core/src/test/java/org/fluentlenium/core/search/SearchTest.java",
"implementation": "Filter[] filters = new Filter[] { filter1, filter2",
"signature": "void can_loop_into_fluentWebElement_after_a_search()"
},
{
"arguments": [],
"filename": "fluentlenium-testng/src/test/java/org/fluentlenium/adapter/testng/integration/DontRunTestsWhenInitFailTest.java",
"implementation": "testNG.setTestClasses(new Class[] { TestClass.class",
"signature": "public TestClass()"
}
] |
5ee14c8d3218c2cfbb7afc6d1b6c9bf452258b51 | [
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "putObject(CoreConstants.EVALUATOR_MAP, new HashMap<String, EventEvaluator<?>>());",
"signature": "public LogbackValve()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return started;",
"signature": "boolean isStarted()"
},
{
"arguments": [
"File configFile"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "try {\n return configFile.toURI().toURL();",
"signature": "URL fileToUrl(File configFile)"
},
{
"arguments": [
"String filename"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "URL result = Loader.getResource(filename, getClass().getClassLoader());\n if (result != null)\n addInfo(\"Found [\" + filename + \"] as a resource.\");\n else\n addInfo(\"Could NOT find [\" + filename + \"] as a resource.\");\n return result;",
"signature": "URL searchAsResource(String filename)"
},
{
"arguments": [
"String filename",
" String propertyKey"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "String propertyValue = OptionHelper.getSystemProperty(propertyKey);\n String candidatePath = propertyValue + File.separatorChar + filename;\n if (propertyValue == null) {\n addInfo(\"System property \\\"\" + propertyKey + \"\\\" is not set. Skipping configuration file search with ${\" + propertyKey + \"",
"signature": "File searchForConfigFileTomcatProperty(String filename, String propertyKey)"
},
{
"arguments": [
"Status status"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "StatusManager sm = getStatusManager();\n if (sm != null) {\n sm.add(status);",
"signature": "void addStatus(Status status)"
},
{
"arguments": [
"String msg"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "addStatus(new InfoStatus(msg, this));",
"signature": "void addInfo(String msg)"
},
{
"arguments": [
"String msg"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "addStatus(new WarnStatus(msg, this));",
"signature": "void addWarn(String msg)"
},
{
"arguments": [
"String msg",
" Throwable t"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "addStatus(new ErrorStatus(msg, this, t));",
"signature": "void addError(String msg, Throwable t)"
},
{
"arguments": [
"URL resourceURL"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "JoranConfigurator jc = new JoranConfigurator();\n jc.setContext(this);\n jc.doConfigure(resourceURL);\n addInfo(\"Done configuring\");\n addError(\"Failed to configure LogbackValve\", e);",
"signature": "void configureAsResource(URL resourceURL)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return filenameOption;",
"signature": "String getFilename()"
},
{
"arguments": [
"String filename"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "this.filenameOption = filename;",
"signature": "void setFilename(String filename)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return quiet;",
"signature": "boolean isQuiet()"
},
{
"arguments": [
"boolean quiet"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "this.quiet = quiet;",
"signature": "void setQuiet(boolean quiet)"
},
{
"arguments": [
"Appender<IAccessEvent> newAppender"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "aai.addAppender(newAppender);",
"signature": "void addAppender(Appender<IAccessEvent> newAppender)"
},
{
"arguments": [
"Appender<IAccessEvent> appender"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return aai.isAttached(appender);",
"signature": "boolean isAttached(Appender<IAccessEvent> appender)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "aai.detachAndStopAllAppenders();",
"signature": "void detachAndStopAllAppenders()"
},
{
"arguments": [
"Appender<IAccessEvent> appender"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return aai.detachAppender(appender);",
"signature": "boolean detachAppender(Appender<IAccessEvent> appender)"
},
{
"arguments": [
"String name"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return aai.detachAppender(name);",
"signature": "boolean detachAppender(String name)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return \"Logback's implementation of ValveBase\";",
"signature": "String getInfo()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return sm;",
"signature": "StatusManager getStatusManager()"
},
{
"arguments": [
"String key",
" String val"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "this.propertyMap.put(key, val);",
"signature": "void putProperty(String key, String val)"
},
{
"arguments": [
"String key"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return (String) this.propertyMap.get(key);",
"signature": "String getProperty(String key)"
},
{
"arguments": [
"String key"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return objectMap.get(key);",
"signature": "Object getObject(String key)"
},
{
"arguments": [
"String key",
" Object value"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "objectMap.put(key, value);",
"signature": "void putObject(String key, Object value)"
},
{
"arguments": [
"Filter<IAccessEvent> newFilter"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "fai.addFilter(newFilter);",
"signature": "void addFilter(Filter<IAccessEvent> newFilter)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "fai.clearAllFilters();",
"signature": "void clearAllFilters()"
},
{
"arguments": [
"IAccessEvent event"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return fai.getFilterChainDecision(event);",
"signature": "FilterReply getFilterChainDecision(IAccessEvent event)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return executorService;",
"signature": "ExecutorService getExecutorService()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return name;",
"signature": "String getName()"
},
{
"arguments": [
"String name"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "if (this.name != null) {\n throw new IllegalStateException(\"LogbackValve has been already given a name\");\n this.name = name;",
"signature": "void setName(String name)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return birthTime;",
"signature": "long getBirthTime()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return configurationLock;",
"signature": "Object getConfigurationLock()"
},
{
"arguments": [
"LifeCycle component"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "lifeCycleManager.register(component);",
"signature": "void register(LifeCycle component)"
},
{
"arguments": [
"LifecycleListener arg0"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "// dummy NOP implementation",
"signature": "void addLifecycleListener(LifecycleListener arg0)"
},
{
"arguments": [
"LifecycleListener arg0"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "// dummy NOP implementation",
"signature": "void removeLifecycleListener(LifecycleListener arg0)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "StringBuilder sb = new StringBuilder(this.getClass().getName());\n sb.append('[');\n sb.append(getName());\n sb.append(']');\n return sb.toString();",
"signature": "String toString()"
},
{
"arguments": [
"String resourceName",
" ClassLoader classLoader"
],
"filename": "logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java",
"implementation": "Set<URL> urlSet = null;\n StatusManager sm = loggerContext.getStatusManager();\n try {\n urlSet = Loader.getResources(resourceName, classLoader);",
"signature": "void multiplicityWarning(String resourceName, ClassLoader classLoader)"
}
] | [
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "putObject(CoreConstants.EVALUATOR_MAP, new HashMap<String, EventEvaluator<?>>());",
"signature": "public LogbackValve()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return started;",
"signature": "boolean isStarted()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return filename;",
"signature": "String getFilename()"
},
{
"arguments": [
"String filename"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "this.filename = filename;",
"signature": "void setFilename(String filename)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return quiet;",
"signature": "boolean isQuiet()"
},
{
"arguments": [
"boolean quiet"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "this.quiet = quiet;",
"signature": "void setQuiet(boolean quiet)"
},
{
"arguments": [
"Appender<IAccessEvent> newAppender"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "aai.addAppender(newAppender);",
"signature": "void addAppender(Appender<IAccessEvent> newAppender)"
},
{
"arguments": [
"Appender<IAccessEvent> appender"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return aai.isAttached(appender);",
"signature": "boolean isAttached(Appender<IAccessEvent> appender)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "aai.detachAndStopAllAppenders();",
"signature": "void detachAndStopAllAppenders()"
},
{
"arguments": [
"Appender<IAccessEvent> appender"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return aai.detachAppender(appender);",
"signature": "boolean detachAppender(Appender<IAccessEvent> appender)"
},
{
"arguments": [
"String name"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return aai.detachAppender(name);",
"signature": "boolean detachAppender(String name)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return \"Logback's implementation of ValveBase\";",
"signature": "String getInfo()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return sm;",
"signature": "StatusManager getStatusManager()"
},
{
"arguments": [
"String key",
" String val"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "this.propertyMap.put(key, val);",
"signature": "void putProperty(String key, String val)"
},
{
"arguments": [
"String key"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return (String) this.propertyMap.get(key);",
"signature": "String getProperty(String key)"
},
{
"arguments": [
"String key"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return objectMap.get(key);",
"signature": "Object getObject(String key)"
},
{
"arguments": [
"String key",
" Object value"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "objectMap.put(key, value);",
"signature": "void putObject(String key, Object value)"
},
{
"arguments": [
"Filter<IAccessEvent> newFilter"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "fai.addFilter(newFilter);",
"signature": "void addFilter(Filter<IAccessEvent> newFilter)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "fai.clearAllFilters();",
"signature": "void clearAllFilters()"
},
{
"arguments": [
"IAccessEvent event"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return fai.getFilterChainDecision(event);",
"signature": "FilterReply getFilterChainDecision(IAccessEvent event)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return executorService;",
"signature": "ExecutorService getExecutorService()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return name;",
"signature": "String getName()"
},
{
"arguments": [
"String name"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "if (this.name != null) {\n throw new IllegalStateException(\n \"LogbackValve has been already given a name\");",
"signature": "void setName(String name)"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return birthTime;",
"signature": "long getBirthTime()"
},
{
"arguments": [],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "return configurationLock;",
"signature": "Object getConfigurationLock()"
},
{
"arguments": [
"LifeCycle component"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "lifeCycleManager.register(component);",
"signature": "void register(LifeCycle component)"
},
{
"arguments": [
"LifecycleListener arg0"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "// dummy NOP implementation",
"signature": "void addLifecycleListener(LifecycleListener arg0)"
},
{
"arguments": [
"LifecycleListener arg0"
],
"filename": "logback-access/src/main/java/ch/qos/logback/access/tomcat/LogbackValve.java",
"implementation": "// dummy NOP implementation",
"signature": "void removeLifecycleListener(LifecycleListener arg0)"
},
{
"arguments": [
"String resourceName",
" ClassLoader classLoader"
],
"filename": "logback-classic/src/main/java/ch/qos/logback/classic/util/ContextInitializer.java",
"implementation": "Set<URL> urlSet = null;\n StatusManager sm = loggerContext.getStatusManager();\n try {\n urlSet = Loader.getResourceOccurrenceCount(resourceName, classLoader);",
"signature": "void multiplicityWarning(String resourceName, ClassLoader classLoader)"
}
] |
6124dc3a1efda7bf9d6054e9f3e7b441afc17064 | [
{
"arguments": [],
"filename": "src/main/java/org/hibernate/jpamodelgen/util/Constants.java",
"implementation": "",
"signature": "private Constants()"
}
] | [
{
"arguments": [],
"filename": "src/main/java/org/hibernate/jpamodelgen/util/Constants.java",
"implementation": "",
"signature": "private Constants()"
}
] |
648ae12ea5a9125b26073b7871cd25c583014eeb | [
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core.tests/src/net/sf/sveditor/core/tests/TestNullIndexCacheFactory.java",
"implementation": "fCacheList = new ArrayList<TestNullIndexCache>();",
"signature": "public TestNullIndexCacheFactory()"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core.tests/src/net/sf/sveditor/core/tests/content_assist/ContentAssistIndex.java",
"implementation": "return \"ContentAssistIndex\";",
"signature": "String getLogName()"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core.tests/src/net/sf/sveditor/core/tests/content_assist/TestContentAssistClass.java",
"implementation": "String testname = \"testContentAssistSuperSuperClass\";\n\t\tLogHandle log = LogFactory.getLogHandle(testname);\n\t\tString doc1 =\n\t\t\t\"class base;\\n\" +\n\t\t\t\"\tint\t\tAAAA;\\n\" +\n\t\t\t\"\tint\t\tAABB;\\n\" +\n\t\t\t\"endclass\\n\" +\n\t\t\t\"\\n\" +\n\t\t\t\"class super_1 extends base;\\n\" +\n\t\t\t\"\tint\t\tBBBB;\\n\" +\n\t\t\t\"\tint\t\tBBCC;\\n\" +\n\t\t\t\"endclass\\n\" +\n\t\t\t\"\\n\" +\n\t\t\t\"class super_2 extends super_1;\\n\" +\n\t\t\t\"\tint\t\tCCCC;\\n\" +\n\t\t\t\"\tint\t\tCCDD;\\n\" +\n\t\t\t\"endclass\\n\" +\n\t\t\t\"\\n\" +\n\t\t\t\"class my_class extends super_2;\\n\" +\n\t\t\t\"\\n\" +\n\t\t\t\"\tfunction void build();\\n\" +\n\t\t\t\"\t\tsuper.<<MARK>>\\n\" +\n\t\t\t\"\tendfunction\" +\n\t\t\t\"endclass\\n\" +\n\t\t\t\"\\n\"\n\t\t\t;\n\t\tSVCorePlugin.getDefault().enableDebug(false);\n\t\t\t\t\n\t\tTextTagPosUtils tt_utils = new TextTagPosUtils(new StringInputStream(doc1));\n\t\tISVDBFileFactory factory = SVCorePlugin.createFileFactory(null);\n\t\t\n\t\tList<SVDBMarker> markers = new ArrayList<SVDBMarker>();\n\t\tSVDBFile file = factory.parse(tt_utils.openStream(), testname, markers);\n\t\tStringBIDITextScanner scanner = new StringBIDITextScanner(tt_utils.getStrippedData());\n\t\t\n\t\t/*\n\t\tfor (ISVDBItemBase it : file.getChildren()) {\n\t\t\tlog.debug(\" it: \" + it.getType() + \" \" + SVDBItem.getName(it));",
"signature": "void testContentAssistSuperSuperClass()"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core.tests/src/net/sf/sveditor/core/tests/index/cache/TestIndexCache.java",
"implementation": "String testname = \"testFileCacheBasicsUVM\";\n\t\tBundleUtils utils = new BundleUtils(SVCoreTestsPlugin.getDefault().getBundle());\n\t\tFile tmp_dir = TestUtils.createTempDir();\n\t\tfinal File db_dir = new File(tmp_dir, \"db\");\n\t\tFile test_dir = new File(tmp_dir, \"test\");\n\t\tSVCorePlugin.getDefault().enableDebug(false);\n\t\tCoreReleaseTests.clearErrors();\n\t\tLogHandle log = LogFactory.getLogHandle(testname);\n\t\t\n\t\tassertTrue(db_dir.mkdirs());\n\t\tassertTrue(test_dir.mkdirs());\n\t\t\n\t\tutils.unpackBundleZipToFS(\"/uvm.zip\", test_dir);\t\t\n\t\tFile uvm = new File(test_dir, \"uvm\");\n\t\t\n\t\tIProject project_dir = TestUtils.createProject(\"uvm\", uvm);\n\n\t\tSVDBIndexRegistry rgy = new SVDBIndexRegistry();\n\t\tSVCorePlugin.getDefault().setSVDBIndexRegistry(rgy);\n\t\tISVDBIndexCacheFactory f = new ISVDBIndexCacheFactory() {\n\t\t\tpublic ISVDBIndexCache createIndexCache(String project_name,\n\t\t\t\t\tString base_location) {\n\t\t\t\tSVDBDirFS fs = new SVDBDirFS(db_dir);\n\t\t\t\tISVDBIndexCache cache = new SVDBFileIndexCache(fs);\n\t\t\t\treturn cache;",
"signature": "void testFileCacheBasicsUVM()"
},
{
"arguments": [
"List<ISVDBIndexCache> cache_list"
],
"filename": "plugins/net.sf.sveditor.core.tests/src/net/sf/sveditor/core/tests/index/cache/TestIndexCache.java",
"implementation": "",
"signature": "void compactCache(List<ISVDBIndexCache> cache_list)"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core.tests/src/net/sf/sveditor/core/tests/parser/TestParseClassBodyItems.java",
"implementation": "String testname = \"testRandomizeLocalVarRef\";\n\t\tString content =\n\t\t\t\"class myclass;\\n\" +\n\t\t\t\"\ttypedef enum bit {\\n\" +\n\t\t\t\"\t\tON,\\n\" +\n\t\t\t\"\t\tOFF\\n\" +\n\t\t\t\"",
"signature": "void testRandomizeLocalVarRef()"
},
{
"arguments": [
"it instanceof ISVDBNamedItem"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/content_assist/AbstractCompletionProcessor.java",
"implementation": "if (matcher.match((ISVDBNamedItem)it, ctxt.fLeaf)) {\n\t\t\t\t\t\t\taddProposal(it, ctxt.fLeaf, ctxt.fStart, ctxt.fLeaf.length());",
"signature": "else if (it instanceof ISVDBNamedItem)"
},
{
"arguments": [
"SVDBItemType type",
" String id"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/expr/SVDBIdentifierExpr.java",
"implementation": "super(type);\n\t\t\n\t\tfId = id;",
"signature": "public SVDBIdentifierExpr(SVDBItemType type, String id)"
},
{
"arguments": [
"ILogHandle handle"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/AbstractSVDBIndex.java",
"implementation": "fDebugEn = handle.isEnabled();",
"signature": "void logLevelChanged(ILogHandle handle)"
},
{
"arguments": [
"\n\t\t\tSVDBFileTree \t\t\t\t\tfile",
"\n\t\t\tMap<String",
" SVDBFileTree>\t\tworking_set"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/AbstractSVDBIndex.java",
"implementation": "fCache, working_set);\n\t\t\t\tif (fDebugEn) {\n\t\t\t\t\tfLog.debug(\"Searching for \\\"\" + leaf + \"\\\" in global (ret=\"\n\t\t\t\t\t\t\t+ ret + \")\");",
"signature": "IPreProcMacroProvider createPreProcMacroProvider(\n\t\t\tSVDBFileTree \t\t\t\t\tfile,\n\t\t\tMap<String, SVDBFileTree>\t\tworking_set)"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBIndexCollectionMgr.java",
"implementation": "for (ISVDBIndex i : getIndexList()) {\n\t\t\ti.dispose();",
"signature": "void dispose()"
},
{
"arguments": [
"String ref"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBIndexCollectionMgr.java",
"implementation": "if (!fProjectRefs.contains(ref)) {\n\t\t\tfProjectRefs.add(ref);",
"signature": "void addProjectRef(String ref)"
},
{
"arguments": [
"ISVDBProjectRefProvider p"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBIndexCollectionMgr.java",
"implementation": "fProjectRefProvider = p;",
"signature": "void setProjectRefProvider(ISVDBProjectRefProvider p)"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBIndexCollectionMgr.java",
"implementation": "return fProjectRefProvider;",
"signature": "ISVDBProjectRefProvider getProjectRefProvider()"
},
{
"arguments": [
"\n\t\t\tList<SVDBDeclCacheItem>\t\t\tret",
"\n\t\t\tString\t\t\t\t\t\t\tname",
"\n\t\t\tISVDBFindNameMatcher\t\t\tmatcher",
"\n\t\t\tSet<SVDBIndexCollectionMgr>\t\talready_searched",
"\n\t\t\tboolean\t\t\t\t\t\t\tsearch_local"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBIndexCollectionMgr.java",
"implementation": "if (!already_searched.contains(this)) {\n\t\t\talready_searched.add(this);",
"signature": "void findGlobalScopeDeclProjRef(\n\t\t\tList<SVDBDeclCacheItem>\t\t\tret,\n\t\t\tString\t\t\t\t\t\t\tname,\n\t\t\tISVDBFindNameMatcher\t\t\tmatcher,\n\t\t\tSet<SVDBIndexCollectionMgr>\t\talready_searched,\n\t\t\tboolean\t\t\t\t\t\t\tsearch_local)"
},
{
"arguments": [
"List<ISVDBIndex> index_l : fFileSearchOrder"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBIndexCollectionMgr.java",
"implementation": "for (ISVDBIndex index : index_l) {\n\t\t\t\t\tList<SVDBDeclCacheItem> tmp = index.findGlobalScopeDecl(\n\t\t\t\t\t\t\tnew NullProgressMonitor(), name, matcher);\n\t\t\t\t\tret.addAll(tmp);",
"signature": "indexes\n\t\t\tfor (List<ISVDBIndex> index_l : fFileSearchOrder)"
},
{
"arguments": [
"Set<String> file_list",
" ISVDBIndex index"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBIndexItemIterator.java",
"implementation": "Set<String> set_t = new HashSet<String>(file_list);\n\t\tfFilePathIterator = set_t.iterator();\n\t\t\t\tif (file == null) {\n\t\t\t\t\tcontinue;",
"signature": "public SVDBIndexItemIterator(Set<String> file_list, ISVDBIndex index)"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBLibIndex.java",
"implementation": "return \"SVDBLibIndex\";",
"signature": "String getLogName()"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/SVDBSourceCollectionIndex.java",
"implementation": "return \"SourceCollectionIndex\";",
"signature": "String getLogName()"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fSVDBPreProcFile = new SoftReference<SVDBFile>(null);\n\t\t\tfSVDBFileTree = new SoftReference<SVDBFileTree>(null);\n\t\t\tfSVDBFile = new SoftReference<SVDBFile>(null);\n\t\t\tfMarkers = new SoftReference<List<SVDBMarker>>(null);\n\t\t\tfLastModified = -1;",
"signature": "public CacheFileInfo()"
},
{
"arguments": [
"String target_dir",
" String file_path",
" SVDBFile file"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fTargetDir = target_dir;\n\t\t\tfFilePath = file_path;\n\t\t\tfFile = file;\n\t\t\tfType = SVDB_FILE;",
"signature": "public WriteBackInfo(String target_dir, String file_path, SVDBFile file)"
},
{
"arguments": [
"String target_dir",
" String file_path",
" SVDBFileTree file"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fTargetDir = target_dir;\n\t\t\tfFilePath = file_path;\n\t\t\tfFileTree = file;\n\t\t\tfType = SVDB_FILE_TREE;",
"signature": "public WriteBackInfo(String target_dir, String file_path, SVDBFileTree file)"
},
{
"arguments": [
"String target_dir",
" String file_path",
" List<SVDBMarker> markers"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fTargetDir = target_dir;\n\t\t\tfFilePath = file_path;\n\t\t\tfMarkers = markers;\n\t\t\tfType = MARKERS;",
"signature": "public WriteBackInfo(String target_dir, String file_path, List<SVDBMarker> markers)"
},
{
"arguments": [
"ISVDBFS fs"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fFileCache = new HashMap<String, SVDBFileIndexCache.CacheFileInfo>();\n\t\tfDebugEn = fLog.isEnabled();\n\t\tfLog.addLogLevelListener(this);\n\t\tfPersistenceRdrSet = new ArrayList<IDBReader>(); \n\t\tfPersistenceWriterSet = new ArrayList<IDBWriter>();\n\t\tfWriteBackQueue = new ArrayList<SVDBFileIndexCache.WriteBackInfo>();\n\t\tif (fNumWriteBackThreads > 0) {\n\t\t\tfWriteBackThread = new Thread[fNumWriteBackThreads];\n\t\t\tfor (int i=0; i<fWriteBackThread.length; i++) {\n\t\t\t\tfWriteBackThread[i] = new Thread(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\twriteBackWorker();",
"signature": "public SVDBFileIndexCache(ISVDBFS fs)"
},
{
"arguments": [
"ILogHandle handle"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fDebugEn = handle.isEnabled();",
"signature": "void logLevelChanged(ILogHandle handle)"
},
{
"arguments": [
"String path",
" boolean create"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "synchronized (fFileCache) {\n\t\t\tif (!fFileCache.containsKey(path)) {\n\t\t\t\tif (create) {\n\t\t\t\t\tCacheFileInfo file = new CacheFileInfo();\n\t\t\t\t\tfFileCache.put(path, file);\n\t\t\t\t\treturn file;",
"signature": "CacheFileInfo getCacheFileInfo(String path, boolean create)"
},
{
"arguments": [
"true"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "synchronized (fWriteBackQueue) {\n\t\t\t\tif (fWriteBackQueue.size() == 0) {\n\t\t\t\t\tbreak;",
"signature": "complete\n\t\twhile (true)"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "IDBReader reader = null;\n\t\t\treader = new SVDBPersistenceRW();\n\tprivate void freeReader(IDBReader reader) {\n\tprivate IDBWriter allocWriter() {\n\t\tIDBWriter writer = null;\n\t\t\twriter = new SVDBPersistenceRW();\n\tprivate void freeWriter(IDBWriter writer) {\n\tprivate void writeBackPreProcFile(String path, SVDBFile file) {\n\t\t\n\t\tString target_dir = computePathDir(path);\n\t\tString file_path = target_dir + \"/preProcFile\";\n\t\n\t\tif (fNumWriteBackThreads > 0) {\n\t\t\tWriteBackInfo info = new WriteBackInfo(target_dir, file_path, file);\n\t\t\tsynchronized (fWriteBackQueue) {\n\t\t\t\t// First, go through and look for any duplicates\n\t\t\t\tfor (int i=0; i<fWriteBackQueue.size(); i++) {\n\t\t\t\t\tif (fWriteBackQueue.get(i).fType == WriteBackInfo.SVDB_FILE &&\n\t\t\t\t\t\t\tfWriteBackQueue.get(i).fTargetDir.equals(target_dir) &&\n\t\t\t\t\t\t\tfWriteBackQueue.get(i).fFilePath.equals(file_path)) {\n\t\t\t\t\t\tfWriteBackQueue.remove(i);\n\t\t\t\t\t\ti--;",
"signature": "IDBReader allocReader()"
},
{
"arguments": [
"String path",
" SVDBFile file"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "String target_dir = computePathDir(path);\n\t\tString file_path = target_dir + \"/file\";\n\t\t\n\t\tif (fNumWriteBackThreads > 0) {\n\t\t\tWriteBackInfo info = new WriteBackInfo(target_dir, file_path, file);\n\t\t\tsynchronized (fWriteBackQueue) {\n\t\t\t\tfWriteBackQueue.add(info);\n\t\t\t\tfWriteBackQueue.notify();",
"signature": "void writeBackFile(String path, SVDBFile file)"
},
{
"arguments": [
"String path",
" SVDBFileTree file_tree"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "String target_dir = computePathDir(path);\n\t\tString file_path = target_dir + \"/fileTreeMap\";\n\n\t\tif (fNumWriteBackThreads > 0) {\n\t\t\tWriteBackInfo info = new WriteBackInfo(target_dir, file_path, file_tree);\n\t\t\tsynchronized (fWriteBackQueue) {\n\t\t\t\t// First, go through and look for any duplicates\n\t\t\t\tfor (int i=0; i<fWriteBackQueue.size(); i++) {\n\t\t\t\t\tif (fWriteBackQueue.get(i).fType == WriteBackInfo.SVDB_FILE_TREE &&\n\t\t\t\t\t\t\tfWriteBackQueue.get(i).fTargetDir.equals(target_dir) &&\n\t\t\t\t\t\t\tfWriteBackQueue.get(i).fFilePath.equals(file_path)) {\n\t\t\t\t\t\tfWriteBackQueue.remove(i);\n\t\t\t\t\t\ti--;",
"signature": "void writeBackFileTree(String path, SVDBFileTree file_tree)"
},
{
"arguments": [
"String path",
" List<SVDBMarker> markers"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "String target_dir = computePathDir(path);\n\t\tString file_path = target_dir + \"/markers\";\n\n\t\tif (fNumWriteBackThreads > 0) {\n\t\t\tWriteBackInfo info = new WriteBackInfo(target_dir, file_path, markers);\n\t\t\tsynchronized (fWriteBackQueue) {\n\t\t\t\tfWriteBackQueue.add(info);\n\t\t\t\tfWriteBackQueue.notify();",
"signature": "void writeBackMarkerList(String path, List<SVDBMarker> markers)"
},
{
"arguments": [],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "while (true) {\n\t\t\tWriteBackInfo info = null;\n\t\t\t\n\t\t\tsynchronized (fWriteBackQueue) {\n\t\t\t\twhile (fWriteBackQueue.size() == 0) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfWriteBackQueue.wait();",
"signature": "void writeBackWorker()"
},
{
"arguments": [
"String target_dir",
" String file_path",
" SVDBFile file"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "IDBWriter writer = allocWriter();\n\t\t\n\t\tfSVDBFS.mkdirs(target_dir);\n\t\ttry {\n\t\t\tRandomAccessFile out = fSVDBFS.openChannelWrite(file_path);\n\t\t\t\n\t\t\twriter.init(out);\n\t\t\twriter.writeObject(file.getClass(), file);\n\t\t\twriter.close();\n\t\t\tfSVDBFS.closeChannel(out);",
"signature": "void writeBackFileWorker(String target_dir, String file_path, SVDBFile file)"
},
{
"arguments": [
"String target_dir",
" String file_path",
" SVDBFileTree file_tree"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fSVDBFS.mkdirs(target_dir);\n\t\t\n\t\tIDBWriter writer = allocWriter();\n\t\t\n\t\ttry {\n\t\t\tRandomAccessFile out = fSVDBFS.openChannelWrite(file_path);\n\t\t\twriter.init(out);\n\t\t\tsynchronized (file_tree) {\n\t\t\t\twriter.writeObject(file_tree.getClass(), file_tree);",
"signature": "void writeBackFileTreeWorker(String target_dir, String file_path, SVDBFileTree file_tree)"
},
{
"arguments": [
"String target_dir",
" String file_path",
" List<SVDBMarker> markers"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fSVDBFS.mkdirs(target_dir);\n\n\t\tIDBWriter writer = allocWriter();\n\t\ttry {\n\t\t\tRandomAccessFile out = fSVDBFS.openChannelWrite(file_path);\n\t\t\twriter.init(out);\n\t\t\twriter.writeItemList(markers);\n\t\t\twriter.close();\n\t\t\tfSVDBFS.closeChannel(out);",
"signature": "void writeBackMarkerListWorker(String target_dir, String file_path, List<SVDBMarker> markers)"
},
{
"arguments": [
"String path"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/project/SVDBProjectData.java",
"implementation": "IWorkspace ws = ResourcesPlugin.getWorkspace();\n\t\tIWorkspaceRoot root = ws.getRoot();\n\t\tSVDBIndexCollectionMgr mgr = null;\n\t\tSVDBProjectManager p_mgr = SVCorePlugin.getDefault().getProjMgr(); \n\t\t\n\t\tIProject p = root.getProject(path);\n\t\tif (p != null) {\n\t\t\tSVDBProjectData p_data = p_mgr.getProjectData(p);\n\t\t\tif (p_data != null) {\n\t\t\t\tmgr = p_data.getProjectIndexMgr();",
"signature": "SVDBIndexCollectionMgr resolveProjectRef(String path)"
},
{
"arguments": [
"fProject != null"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/project/SVDBProjectData.java",
"implementation": "IProject refs[] = null;\n\t\t\ttry {\n\t\t\t\trefs = fProject.getReferencedProjects();",
"signature": "project\n\t\tif (fProject != null)"
},
{
"arguments": [
"String ref"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/project/SVProjectFileWrapper.java",
"implementation": "SVDBPath p = new SVDBPath(ref);\n\t\tfProjectReferences.add(p);\n\t\tfArgFilePaths.clear();\n\t\tfProjectReferences.clear();",
"signature": "void addProjectRef(String ref)"
},
{
"arguments": [
"\n\t\t\tISVDBIndexCache \t\t\t\tcache",
"\n\t\t\tMap<String",
" SVDBFileTree>\t\tworking_set"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/scanner/FileContextSearchMacroProvider.java",
"implementation": "fWorkingSet = working_set;\n\t\t\t\t\tSVDBFileTree ib; \n\t\t\t\t\tif (fWorkingSet.containsKey(ib_s)) {\n\t\t\t\t\t\tib = fWorkingSet.get(ib_s);",
"signature": "public FileContextSearchMacroProvider(\n\t\t\tISVDBIndexCache \t\t\t\tcache,\n\t\t\tMap<String, SVDBFileTree>\t\tworking_set)"
}
] | [
{
"arguments": [
"it instanceof ISVDBNamedItem"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/content_assist/AbstractCompletionProcessor.java",
"implementation": "if (matcher.match((ISVDBNamedItem)it, ctxt.fLeaf)) {\n\t\t\t\t\t\taddProposal(it, ctxt.fLeaf, ctxt.fStart, ctxt.fLeaf.length());",
"signature": "else if (it instanceof ISVDBNamedItem)"
},
{
"arguments": [
"SVDBFileTree file"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/AbstractSVDBIndex.java",
"implementation": "fCache);\n\t\t\t\tfLog.debug(\"Searching for \\\"\" + leaf + \"\\\" in global (ret=\"\n\t\t\t\t\t\t+ ret + \")\");\n\t\t\t\tfLog.debug(\"IncludeFileProvider not set\");\n\t\tfLog.debug(\"Processed pre-proc file\");\n\t\t\t\n\t\t\tif (ft_root == null) {",
"signature": "IPreProcMacroProvider createPreProcMacroProvider(SVDBFileTree file)"
},
{
"arguments": [
"ISVDBFS fs"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "fSVDBFS = fs;\n\t\tfFileList = new ArrayList<String>();\n\t\tfLastModifiedMap = new HashMap<String, Long>(fCacheSize);\n\t\tfPreProcFileMap = new WeakHashMap<String, SVDBFile>(fCacheSize);\n\t\tfFileTreeMap = new WeakHashMap<String, SVDBFileTree>(fCacheSize);\n\t\tfFileMap = new WeakHashMap<String, SVDBFile>(fCacheSize);\n\t\tfMarkerMap = new WeakHashMap<String, List<SVDBMarker>>(fCacheSize);\n\t\tfLog = LogFactory.getLogHandle(\"SVDBFileIndexCache\");\n\t\tfPersistenceRdrSet = new ArrayList<SVDBPersistenceReader>(); \n\t\tfPersistenceWriterSet = new ArrayList<SVDBPersistenceWriter>();\n\n\tpublic SVDBFileIndexCache(ISVDBFS fs, int cache_sz) {\n\t\tfFileList = new ArrayList<String>();\n\t\tfLastModifiedMap = new HashMap<String, Long>();\n\t\tfPreProcFileMap = new WeakHashMap<String, SVDBFile>(cache_sz);\n\t\tfFileTreeMap = new WeakHashMap<String, SVDBFileTree>(cache_sz);\n\t\tfFileMap = new WeakHashMap<String, SVDBFile>(cache_sz);\n\t\tfMarkerMap = new WeakHashMap<String, List<SVDBMarker>>(cache_sz);\n\t\tdebug(\"Create Cache: \" + fs.getRoot());\n\t\tfLog.debug(\"clear\");\n\t\tfFileList.clear();\n\t\tfLastModifiedMap.clear();\n\t\tfPreProcFileMap.clear();\n\t\tfFileTreeMap.clear();\n\t\tfFileMap.clear();\n\t\tfMarkerMap.clear();\n\t\tsynchronized (fFileList) {\n\t\t\tif (!fFileList.contains(path)) {\n\t\t\t\tfFileList.add(path);\n\t\tif (fMarkerMap.containsKey(path)) {\n\t\t\tfMarkerMap.remove(path);",
"signature": "public SVDBFileIndexCache(ISVDBFS fs)"
},
{
"arguments": [
"String path",
" List<SVDBMarker> marker_list"
],
"filename": "plugins/net.sf.sveditor.core/src/net/sf/sveditor/core/db/index/cache/SVDBFileIndexCache.java",
"implementation": "SVDBPersistenceWriter writer = allocWriter();\n\t\ttry {\n\t\t\tRandomAccessFile out = fSVDBFS.openChannelWrite(path);\n\t\t\twriter.init(out);\n\t\t\twriter.writeItemList(marker_list);\n\t\t\twriter.close();\n\t\t\tfSVDBFS.closeChannel(out);",
"signature": "void writeMarkerList(String path, List<SVDBMarker> marker_list)"
}
] |
697248db7da07100b8ef8e8caaf77905144e5ba2 | [
{
"arguments": [
"String colorName"
],
"filename": "src/net/nodebox/graphics/Color.java",
"implementation": "// TODO: Implement",
"signature": "public Color(String colorName)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Expression.java",
"implementation": "Object value = evaluate();\n Object value = evaluate();\n Object value = evaluate();\n public Color asColor() {\n Object value = evaluate();\n if (value instanceof Color) {\n return (Color) value;",
"signature": "int asInt()"
},
{
"arguments": [
"Parameter.Type outputType"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "public Network(Parameter.Type outputType, String name) {\n super(outputType, name);",
"signature": "public Network(Parameter.Type outputType)"
},
{
"arguments": [
"ProcessingContext ctx"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "addError(\"No node to render\");\n return false;\n assert (contains(renderedNode));\n // TODO: place output of rendered node into network output.\n return true;",
"signature": "boolean process(ProcessingContext ctx)"
},
{
"arguments": [
"NetworkListener l"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "listenerList.add(NetworkListener.class, l);",
"signature": "void addNetworkListener(NetworkListener l)"
},
{
"arguments": [
"NetworkListener l"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "listenerList.remove(NetworkListener.class, l);",
"signature": "void removeNetworkListener(NetworkListener l)"
},
{
"arguments": [
"Node node"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n NetworkEvent e = new NetworkEvent(this, node);\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == NetworkListener.class) {\n ((NetworkListener) listeners[i + 1]).nodeAdded(e);",
"signature": "void fireNodeAdded(Node node)"
},
{
"arguments": [
"Node node"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n NetworkEvent e = new NetworkEvent(this, node);\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == NetworkListener.class) {\n ((NetworkListener) listeners[i + 1]).nodeRemoved(e);",
"signature": "void fireNodeRemoved(Node node)"
},
{
"arguments": [
"Parameter input",
" Parameter output"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n NetworkEvent e = new NetworkEvent(this, input, output);\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == NetworkListener.class) {\n ((NetworkListener) listeners[i + 1]).connectionAdded(e);",
"signature": "void fireConnectionAdded(Parameter input, Parameter output)"
},
{
"arguments": [
"Parameter input",
" Parameter output"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n NetworkEvent e = new NetworkEvent(this, input, output);\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == NetworkListener.class) {\n ((NetworkListener) listeners[i + 1]).connectionRemoved(e);",
"signature": "void fireConnectionRemoved(Parameter input, Parameter output)"
},
{
"arguments": [
"Node node",
" String oldName",
" String newName"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n NetworkEvent e = new NetworkEvent(this, node, oldName, newName);\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == NetworkListener.class) {\n ((NetworkListener) listeners[i + 1]).nodeRenamed(e);",
"signature": "void fireNodeRenamed(Node node, String oldName, String newName)"
},
{
"arguments": [
"Node oldNode",
" Node newNode"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n NetworkEvent e = new NetworkEvent(this, oldNode, newNode);\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == NetworkListener.class) {\n ((NetworkListener) listeners[i + 1]).renderedNodeChanged(e);",
"signature": "void fireRenderedNodeChanged(Node oldNode, Node newNode)"
},
{
"arguments": [
"ProcessingListener l"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "listenerList.add(ProcessingListener.class, l);",
"signature": "void addProcessingListener(ProcessingListener l)"
},
{
"arguments": [
"ProcessingListener l"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "listenerList.remove(ProcessingListener.class, l);",
"signature": "void removeProcessingListener(ProcessingListener l)"
},
{
"arguments": [
"Network network"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == ProcessingListener.class) {\n ((ProcessingListener) listeners[i + 1]).startProcessing(network);",
"signature": "void fireStartProcessing(Network network)"
},
{
"arguments": [
"Network network"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == ProcessingListener.class) {\n ((ProcessingListener) listeners[i + 1]).endProcessing(network);",
"signature": "void fireEndProcessing(Network network)"
},
{
"arguments": [
"DirtyListener l"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "listenerList.add(DirtyListener.class, l);",
"signature": "void addDirtyListener(DirtyListener l)"
},
{
"arguments": [
"DirtyListener l"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "listenerList.remove(DirtyListener.class, l);",
"signature": "void removeDirtyListener(DirtyListener l)"
},
{
"arguments": [
"Network network"
],
"filename": "src/net/nodebox/node/Network.java",
"implementation": "Object[] listeners = listenerList.getListenerList();\n // Process the listeners last to first, notifying\n // those that are interested in this event\n for (int i = listeners.length - 2; i >= 0; i -= 2) {\n if (listeners[i] == DirtyListener.class) {\n ((DirtyListener) listeners[i + 1]).networkDirty(network);",
"signature": "void fireNetworkDirty(Network network)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return level;",
"signature": "MessageLevel getLevel()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return message;",
"signature": "String getMessage()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return level == MessageLevel.DEBUG;",
"signature": "boolean isDebug()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return level == MessageLevel.INFO;",
"signature": "boolean isInfo()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return level == MessageLevel.WARNING;",
"signature": "boolean isWarning()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return level == MessageLevel.ERROR;",
"signature": "boolean isError()"
},
{
"arguments": [
"Network network",
" String nodeName"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "this.network = network;\n this.nodeName = nodeName;",
"signature": "public NotFound(Network network, String nodeName)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return network;",
"signature": "Network getNetwork()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return nodeName;",
"signature": "String getNodeName()"
},
{
"arguments": [
"Node node",
" String name"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "this(node, name, \"Invalid name \\\"\" + name + \"\\\" for node \\\"\" + node.getName() + \"\\\"\");",
"signature": "public InvalidName(Node node, String name)"
},
{
"arguments": [
"Node node",
" String name",
" String message"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "super(message);\n this.node = node;\n this.name = name;",
"signature": "public InvalidName(Node node, String name, String message)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return node;",
"signature": "Node getNode()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return name;",
"signature": "String getName()"
},
{
"arguments": [
"Parameter.Type outputType"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "this(outputType, null);",
"signature": "public Node(Parameter.Type outputType)"
},
{
"arguments": [
"Parameter.Type outputType",
" String name"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "outputParameter = new Parameter(this, \"output\", outputType);\n public void validateName(String name) {\n throw new InvalidName(this, name, \"Name does contain other characters than a-z0-9 or underscore, or is longer than 29 characters.\");\n throw new InvalidName(this, name, \"Names starting with double underscore are reserved for internal use.\");\n public void setName(String name) throws InvalidName {\n protected void _setName(String name) {\n this.name = name;\n setChanged();\n public Collection<Parameter> getParameters() {\n return parameters.values();\n return parameters.get(name);\n return parameters.containsKey(name);\n public Parameter addParameter(String name, Parameter.Type type) {\n parameters.put(name, p);\n public void renameParameter(Parameter parameter, String name) {\n String oldName = parameter.getName();\n if (oldName.equals(name)) return;\n if (hasParameter(oldName)) {\n parameters.remove(oldName);\n parameter._setName(name);\n parameters.put(name, parameter);\n setChanged();",
"signature": "public Node(Parameter.Type outputType, String name)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return outputParameter;\n protected void _setNetwork(Network network) {\n public void setNetwork(Network network) throws InvalidName {\n public Color asColor(String name) {\n return getParameter(name).asColor();\n public Object getValue(String name) {\n return getParameter(name).getValue();\n public void set(String name, String value) {\n getParameter(name).set(value);\n public void set(String name, Color value) {\n public void setValue(String name, Object value) {\n getParameter(name).setValue(value);\n //// Output value shortcuts ////\n\n public Object getOutputValue() {\n return outputParameter.getValue();\n protected void setOutputValue(Object value) throws ValueError {\n outputParameter.setValue(value);\n public boolean connectTo(Node inputNode, String parameterName) {\n Parameter p = inputNode.getParameter(parameterName);\n Connection c = new Connection(this, inputNode, p);\n downstreams.add(c);\n inputNode.upstreams.put(p, c);\n return true;",
"signature": "Parameter getOutputParameter()"
},
{
"arguments": [
"String parameterName"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "Parameter p = getParameter(parameterName);\n return isInputConnected(p);",
"signature": "boolean isInputConnected(String parameterName)"
},
{
"arguments": [
"Parameter p"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return getInputConnection(p) != null;\n * @param parameterName the name of the parameter\n * @see #isInputConnected(String)\n public Connection getInputConnection(String parameterName) {\n return getInputConnection(getParameter(parameterName));",
"signature": "boolean isInputConnected(Parameter p)"
},
{
"arguments": [
"Parameter parameter"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return upstreams.get(parameter);\n return new ArrayList<Connection>(upstreams.values());\n * @param parameterName the name of the parameter you want to disconnect\n public boolean disconnectInput(String parameterName) {\n return disconnectInput(getParameter(parameterName));",
"signature": "Connection getInputConnection(Parameter parameter)"
},
{
"arguments": [
"Parameter parameter"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "Connection c = getInputConnection(parameter);\n upstreams.remove(parameter);\n for (Connection c : upstreams.values()) {\n removedSomething = disconnectInput(c.getInputParameter()) | removedSomething;\n removedSomething = c.getInputNode().disconnectInput(c.getInputParameter()) | removedSomething;\n // TODO: Implement finer-grained change notification\n //// Error handling ////\n\n public void addDebug(String msg) {\n messages.add(new Message(MessageLevel.DEBUG, msg));",
"signature": "boolean disconnectInput(Parameter parameter)"
},
{
"arguments": [
"String msg"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "messages.add(new Message(MessageLevel.DEBUG, msg));",
"signature": "void addInfo(String msg)"
},
{
"arguments": [
"String msg"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "messages.add(new Message(MessageLevel.DEBUG, msg));",
"signature": "void addWarning(String msg)"
},
{
"arguments": [
"String msg"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "messages.add(new Message(MessageLevel.DEBUG, msg));",
"signature": "void addError(String msg)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "for (Message msg : messages) {\n if (msg.isError())\n return true;",
"signature": "boolean hasError()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "for (Message msg : messages) {\n if (msg.isWarning())\n return true;",
"signature": "boolean hasWarning()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return update(new ProcessingContext());",
"signature": "boolean update()"
},
{
"arguments": [
"ProcessingContext ctx"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "if (!dirty) return true;\n for (Parameter p : parameters.values()) {\n p.update();",
"signature": "boolean update(ProcessingContext ctx)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "StringBuffer name = new StringBuffer(\"/\");\n Network parent = getNetwork();\n while (parent != null) {\n name.insert(1, parent.getName() + \"/\");\n parent = parent.getNetwork();",
"signature": "String getAbsolutePath()"
},
{
"arguments": [
"String key",
" String label"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "this.key = key;\n this.label = label;",
"signature": "public MenuEntry(String key, String label)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "return key;",
"signature": "String getKey()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "return label;",
"signature": "String getLabel()"
},
{
"arguments": [
"Node node",
" String name",
" Type type"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "setType(type); // this sets the core type, default values, and value.\n if (node.hasParameter(name) && node.getParameter(name) != this) return false;\n node.renameParameter(this, name);\n public void _setName(String name) {\n this.name = name;",
"signature": "public Parameter(Node node, String name, Type type)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "public void setType(Type type) {\n if (this.type == type) return;\n this.type = type;\n assert(TYPE_REGISTRY.containsKey(type));\n this.coreType = TYPE_REGISTRY.get(type);\n this.defaultValue = CORE_TYPE_DEFAULTS.get(this.coreType);\n // TODO: Change the value to something reasonable.\n this.value = this.defaultValue;\n node.setChanged();\n markDirty();",
"signature": "Type getType()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "public void setBoundingMethod(BoundingMethod boundingMethod) {\n this.boundingMethod = boundingMethod;\n if (boundingMethod == BoundingMethod.HARD) {\n node.setChanged();\n if (boundingMethod == BoundingMethod.HARD) {\n node.setChanged();\n if (boundingMethod == BoundingMethod.HARD) {\n node.setChanged();\n if (boundingMethod != BoundingMethod.HARD) {\n if (coreType == CoreType.INT) {\n int v = (Integer) value;\n if (v < minimum) {\n set((int) minimum);",
"signature": "CoreType getCoreType()"
},
{
"arguments": [
"v > maximum"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "set((int) maximum);",
"signature": "else if (v > maximum)"
},
{
"arguments": [
"coreType == CoreType.FLOAT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "double v = (Double) value;\n if (v < minimum) {\n set(minimum);",
"signature": "else if (coreType == CoreType.FLOAT)"
},
{
"arguments": [
"v > maximum"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "set(maximum);\n\n public void setDisplayLevel(DisplayLevel displayLevel) {\n node.setChanged();\n\n public void addMenuItem(String key, String label) {\n menuItems.add(new MenuEntry(key, label));\n node.setChanged();\n\n node.setChanged();\n node.setChanged();\n public int asInt() {\n if (coreType == CoreType.INT) {\n return (Integer) value;",
"signature": "else if (v > maximum)"
},
{
"arguments": [
"coreType == CoreType.FLOAT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "double v = (Double) value;\n if (coreType == CoreType.FLOAT) {\n return (Double) value;",
"signature": "else if (coreType == CoreType.FLOAT)"
},
{
"arguments": [
"coreType == CoreType.INT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "int v = (Integer) value;\n if (coreType == CoreType.STRING) {\n return (String) value;\n return value.toString();\n public Color asColor() {\n if (coreType == CoreType.COLOR) {\n return (Color) value;",
"signature": "else if (coreType == CoreType.INT)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "return value;\n if (coreType != CoreType.INT) {\n if (asInt() == value) return;\n this.value = value;\n markDirty();\n if (coreType != CoreType.FLOAT) {\n if (asFloat() == value) return;\n this.value = value;\n markDirty();\n if (value == null) return;\n if (coreType != CoreType.STRING) {\n if (asString().equals(value)) return;\n this.value = value;\n markDirty();\n public void set(Color value) {\n if (value == null) return;\n if (coreType != CoreType.COLOR) {\n throw new ValueError(\"Tried setting color value on parameter with type \" + type);",
"signature": "Object getValue()"
},
{
"arguments": [
"coreType == CoreType.FLOAT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (value instanceof Float) {\n set((Float)value);",
"signature": "else if (coreType == CoreType.FLOAT)"
},
{
"arguments": [
"value instanceof Double"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "set((Double)value);",
"signature": "else if (value instanceof Double)"
},
{
"arguments": [
"coreType == CoreType.STRING"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (value instanceof String) {\n set((String)value);",
"signature": "else if (coreType == CoreType.STRING)"
},
{
"arguments": [
"coreType == CoreType.COLOR"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (value instanceof Color) {\n set((Color)value);",
"signature": "else if (coreType == CoreType.COLOR)"
},
{
"arguments": [
"String value"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "switch (coreType) {\n case INT:\n return Integer.parseInt(value);\n case FLOAT:\n return Float.parseFloat(value);\n case STRING:\n return value;\n case COLOR:\n return new Color(value);\n default:\n return value;\n return hasExpression() ? expression.getExpression() : \"\";\n if (hasExpression() && expression.equals(getExpression())) {\n return;\n if (expression == null || expression.trim().length() == 0) {\n this.expression = null;\n setExpressionEnabled(false);",
"signature": "Object parseValue(String value)"
},
{
"arguments": [],
"filename": "test/net/nodebox/node/ConnectTest.java",
"implementation": "",
"signature": "void testValuePropagation()"
},
{
"arguments": [],
"filename": "test/net/nodebox/node/ConnectTest.java",
"implementation": "",
"signature": "void testDisconnect()"
},
{
"arguments": [
"Node inputNode",
" String inputParameter",
" Node outputNode",
" String message"
],
"filename": "test/net/nodebox/node/ConnectTest.java",
"implementation": "",
"signature": "void assertConnectionError(Node inputNode, String inputParameter, Node outputNode, String message)"
},
{
"arguments": [],
"filename": "test/net/nodebox/node/ParameterTest.java",
"implementation": "Node n = new TestNode();\r\n Parameter angle = n.addParameter(\"angle\", Parameter.Type.ANGLE);\r\n assertEquals(Parameter.CoreType.FLOAT, angle.getCoreType());",
"signature": "void testType()"
}
] | [
{
"arguments": [],
"filename": "src/net/nodebox/node/Expression.java",
"implementation": "return asInt(0);",
"signature": "int asInt()"
},
{
"arguments": [
"int channel"
],
"filename": "src/net/nodebox/node/Expression.java",
"implementation": "Object value = evaluateForChannel(channel);\n return asFloat(0);",
"signature": "int asInt(int channel)"
},
{
"arguments": [
"int channel"
],
"filename": "src/net/nodebox/node/Expression.java",
"implementation": "Object value = evaluateForChannel(channel);\n return asString(0);",
"signature": "double asFloat(int channel)"
},
{
"arguments": [
"int channel"
],
"filename": "src/net/nodebox/node/Expression.java",
"implementation": "Object value = evaluateForChannel(channel);\n public Object asData() {\n return asData(0);\n public Object asData(int channel) {\n return evaluateForChannel(channel);",
"signature": "String asString(int channel)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Expression.java",
"implementation": "return MVEL.executeExpression(compiledExpression);",
"signature": "Object evaluate()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "this(null);\n public Node(String name) {\n notifyObservers();\n notifyObservers();\n public static void validateName(String name) {\n throw new ValueError(\"Name does contain other characters than a-z0-9 or underscore, or is longer than 29 characters.\");\n throw new ValueError(\"Names starting with double underscore are reserved for internal use.\");\n public void setName(String name) {\n notifyObservers();\n //// Ports ////\n\n public int getMinimumInputs() {\n return minimumInputs;",
"signature": "public Node()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return maximumInputs;",
"signature": "int getMaximumInputs()"
},
{
"arguments": [
"int minimumInputs"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "this.minimumInputs = minimumInputs;\n // TODO: Check the amount of connections, and disconnect if necessary.",
"signature": "void setMinimumInputs(int minimumInputs)"
},
{
"arguments": [
"int maximumInputs"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "this.maximumInputs = maximumInputs;\n // TODO: Check the amount of connections, and disconnect if necessary.\n public List<Parameter> getParameters() {\n return parameters;\n return parameterMap.get(name);\n return parameterMap.containsKey(name);\n public Parameter addParameter(String name, String type) {\n parameterMap.put(name, p);\n parameters.add(p);\n public Parameter addParameter(String name, String type, ParameterGroup g) {\n Parameter p = new Parameter(this, name, type);\n parameterMap.put(name, p);\n g.addParameter(p);\n return p;\n public void _setNetwork(Network network) {\n public void setNetwork(Network network) {\n public int asInt(String name, int channel) {\n return getParameter(name).asInt(channel);",
"signature": "void setMaximumInputs(int maximumInputs)"
},
{
"arguments": [
"String name",
" int channel"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return getParameter(name).asFloat(channel);",
"signature": "double asFloat(String name, int channel)"
},
{
"arguments": [
"String name",
" int channel"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return getParameter(name).asString(channel);\n public Object asData(String name) {\n return getParameter(name).asData();",
"signature": "String asString(String name, int channel)"
},
{
"arguments": [
"String name",
" int channel"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "return getParameter(name).asData(channel);\n public void set(String name, int value, int channel) {\n getParameter(name).set(value, channel);",
"signature": "Object asData(String name, int channel)"
},
{
"arguments": [
"String name",
" double value",
" int channel"
],
"filename": "src/net/nodebox/node/Node.java",
"implementation": "getParameter(name).set(value, channel);\n public void set(String name, String value) {\n public void set(String name, String value, int channel) {\n getParameter(name).set(value, channel);\n public void set(String name, Object value) {\n getParameter(name).set(value);\n public void set(String name, Object value, int channel) {\n getParameter(name).set(value, channel);\n * @param port the port index\n public boolean isInputConnected(int port) {\n return getInputConnection(port) != null;\n * @param port the port index for this connection\n * @see #isInputConnected(int)\n public Connection getInputConnection(int port) {\n if (port < 0 | port > maximumInputs) return null;\n for (Connection c : upstreams) {\n if (c.getInputPort() == port)\n return c;",
"signature": "void set(String name, double value, int channel)"
},
{
"arguments": [
"Node node",
" String name",
" String type"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "this.type = type;\n\n if (type.equals(TYPE_ANGLE)) {\n coreType = CORE_TYPE_FLOAT;\n channelCount = 1;",
"signature": "public Parameter(Node node, String name, String type)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "return channelCount;",
"signature": "int getChannelCount()"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "int getCoreType() {\n public void setBoundingType(int boundingType) {\n this.boundingType = boundingType;\n if (boundingType == BOUNDING_HARD) {\n if (boundingType == BOUNDING_HARD) {\n if (boundingType == BOUNDING_HARD) {\n if (boundingType != BOUNDING_HARD) {\n if (coreType == CORE_TYPE_INT) {\n for (int i = 0; i < channelCount; i++) {\n int v = (Integer) channels[i];\n if (v < minimum) {\n set((int) minimum, i);",
"signature": "String getType()"
},
{
"arguments": [
"v > maximum"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "set((int) maximum, i);",
"signature": "else if (v > maximum)"
},
{
"arguments": [
"coreType == CORE_TYPE_FLOAT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "for (int i = 0; i < channelCount; i++) {\n double v = (Double) channels[i];\n if (v < minimum) {\n set(minimum, i);",
"signature": "else if (coreType == CORE_TYPE_FLOAT)"
},
{
"arguments": [
"v > maximum"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "set(maximum, i);",
"signature": "else if (v > maximum)"
},
{
"arguments": [
"int displayLevel"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "// TODO: notify\n public void addMenuItem(int key, String label) {\n // TODO: implement\n public int asInt() {\n return asInt(0);",
"signature": "void setDisplayLevel(int displayLevel)"
},
{
"arguments": [
"int channel"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (coreType == CORE_TYPE_INT) {\n return (Integer) channels[channel];",
"signature": "int asInt(int channel)"
},
{
"arguments": [
"coreType == CORE_TYPE_FLOAT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "double v = (Double) channels[channel];\n return asFloat(0);",
"signature": "else if (coreType == CORE_TYPE_FLOAT)"
},
{
"arguments": [
"int channel"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (coreType == CORE_TYPE_FLOAT) {\n return (Double) channels[channel];",
"signature": "double asFloat(int channel)"
},
{
"arguments": [
"coreType == CORE_TYPE_INT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "int v = (Integer) channels[channel];\n return asString(0);",
"signature": "else if (coreType == CORE_TYPE_INT)"
},
{
"arguments": [
"int channel"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (coreType == CORE_TYPE_STRING) {\n return (String) channels[channel];\n return \"\";\n public Object asData() {\n return asData(0);\n public Object asData(int channel) {\n return channels[channel];\n set(value, 0);",
"signature": "String asString(int channel)"
},
{
"arguments": [
"int value",
" int channel"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (channel < 0 || channel > channelCount) {\n throw new ValueError(\"Invalid channel \" + channel);",
"signature": "void set(int value, int channel)"
},
{
"arguments": [
"double value",
" int channel"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (channel < 0 || channel >= channelCount) {\n throw new ValueError(\"Invalid channel \" + channel);",
"signature": "void set(double value, int channel)"
},
{
"arguments": [
"String value",
" int channel"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (channel < 0 || channel > channelCount) {\n throw new ValueError(\"Invalid channel \" + channel);",
"signature": "void set(String value, int channel)"
},
{
"arguments": [
"Object value"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "set(value, 0);\n public void set(Object value, int channel) {\n if (channel < 0 || channel > channelCount) {\n throw new ValueError(\"Invalid channel \" + channel);\n if (coreType != CORE_TYPE_DATA) {\n throw new ValueError(\"Tried setting object value on parameter with type \" + type);\n // TODO: lazy setting\n preSet();\n channels[channel] = value;\n postSet();\n return hasExpression() ? expression.getExpression() : null;\n if (coreType == CORE_TYPE_DATA) {\n throw new ValueError(\"Cannot set expression on data type\");\n if (hasExpression()) {\n if (expression.equals(getExpression())) {\n return;",
"signature": "void set(Object value)"
},
{
"arguments": [],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "if (expressionEnabled) {",
"signature": "void evaluate()"
},
{
"arguments": [
"coreType == CORE_TYPE_FLOAT"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "channels[i] = new Double(0);",
"signature": "else if (coreType == CORE_TYPE_FLOAT)"
},
{
"arguments": [
"coreType == CORE_TYPE_STRING"
],
"filename": "src/net/nodebox/node/Parameter.java",
"implementation": "channels[i] = new String();",
"signature": "else if (coreType == CORE_TYPE_STRING)"
},
{
"arguments": [],
"filename": "test/net/nodebox/node/ConnectTest.java",
"implementation": "",
"signature": "void testValuePropagation()"
},
{
"arguments": [],
"filename": "test/net/nodebox/node/ConnectTest.java",
"implementation": "",
"signature": "void testDisconnect()"
},
{
"arguments": [
"Node inputNode",
" String inputParameter",
" Node outputNode",
" String message"
],
"filename": "test/net/nodebox/node/ConnectTest.java",
"implementation": "",
"signature": "void assertConnectionError(Node inputNode, String inputParameter, Node outputNode, String message)"
},
{
"arguments": [],
"filename": "test/net/nodebox/node/ParameterTest.java",
"implementation": "Node n = new Node(Parameter.TYPE_INT);\r\n Parameter color = n.addParameter(\"color\", Parameter.TYPE_COLOR);\r\n assertEquals(4, color.channelCount());\r\n checkValidSet(color, 0.2, 0);\r\n checkValidSet(color, 0.4, 1);\r\n checkValidSet(color, 0.7, 2);\r\n checkValidSet(color, 1.0, 3);\r\n\r\n checkInvalidSet(color, 0.5, 4);\r\n checkInvalidSet(color, 0.5, -1);",
"signature": "void testChannels()"
},
{
"arguments": [
"Parameter p",
" double value",
" int channel"
],
"filename": "test/net/nodebox/node/ParameterTest.java",
"implementation": "p.set(value, channel);\r\n fail(\"Value \" + value + \" on channel \" + channel + \" should have been accepted.\");\r\n checkInvalidSet(p, value, 0);",
"signature": "void checkValidSet(Parameter p, double value, int channel)"
}
] |
69c68081622b9683f3e1f42d2dd3f5fcb60aab80 | [
{
"arguments": [],
"filename": "nuget-common/src/jetbrains/buildServer/nuget/common/FeedConstants.java",
"implementation": "public boolean accept(File pathname) {\r\n return pathname.isFile() && EXE_FILE_NAME_FILTER.accept(pathname.getName());",
"signature": "new FileFilter()"
},
{
"arguments": [],
"filename": "nuget-common/src/jetbrains/buildServer/nuget/common/FeedConstants.java",
"implementation": "public boolean accept(File pathname) {\r\n return pathname.isFile() && PACKAGE_FILE_NAME_FILTER.accept(pathname.getName()) || EXE_FILE_NAME_FILTER.accept(pathname.getName());",
"signature": "new FileFilter()"
},
{
"arguments": [
"@NotNull String data"
],
"filename": "nuget-common/src/jetbrains/buildServer/nuget/common/FeedConstants.java",
"implementation": "return data.toLowerCase().endsWith(FeedConstants.EXE_EXTENSION.toLowerCase());",
"signature": "boolean accept(@NotNull String data)"
},
{
"arguments": [
"String name"
],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "file(myPackagesHome, name + \".nupkg\");\r\n file(myAgentHome, name + \".nupkg.zip\");\r\n file(myToolsHome, name + \".nupkg/tools/nuget.exe\");\r\n return new InstalledTool() {\r\n @NotNull\r\n public File getAgentPluginFile() {\r\n return myAgentHome;",
"signature": "InstalledTool tool(String name)"
},
{
"arguments": [],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "",
"signature": "void install()"
},
{
"arguments": [],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "",
"signature": "void delete()"
},
{
"arguments": [],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "return null;",
"signature": "File getNuGetExePath()"
},
{
"arguments": [],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "return false;",
"signature": "boolean isDefaultTool()"
},
{
"arguments": [],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "return null;",
"signature": "String getId()"
},
{
"arguments": [],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "return null;",
"signature": "String getVersion()"
}
] | [
{
"arguments": [],
"filename": "nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/PluginNaming.java",
"implementation": "return FeedConstants.NUGET_COMMANDLINE;",
"signature": "String getNuGetCommandLinePackageName()"
},
{
"arguments": [
"@NotNull final File plugin"
],
"filename": "nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/PluginNaming.java",
"implementation": "String name = plugin.getName();\r\n\r\n if (name.toLowerCase().endsWith(FeedConstants.NUGET_EXTENSION.toLowerCase())) {\r\n name = name.substring(0, name.length() - FeedConstants.NUGET_EXTENSION.length());\r\n\r\n if (name.toLowerCase().startsWith(getNuGetCommandLinePackageName().toLowerCase() + \".\")) {\r\n name = name.substring(getNuGetCommandLinePackageName().length()+1);",
"signature": "String getVersion(@NotNull final File plugin)"
},
{
"arguments": [
"@NotNull final InstalledTool nupkg"
],
"filename": "nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/impl/ToolsWatcherImpl.java",
"implementation": "myExecutors.getNormalExecutorService().submit(ExceptionUtil.catchAll(\"update installed package\", new Runnable() {\n installPackage(nupkg);\n new InstalledToolImpl(myNaming, file).delete();\n installPackage(new InstalledToolImpl(myNaming, file));",
"signature": "void updatePackage(@NotNull final InstalledTool nupkg)"
},
{
"arguments": [
"@NotNull final InstalledTool file"
],
"filename": "nuget-server/src/jetbrains/buildServer/nuget/server/toolRegistry/impl/impl/ToolsWatcherImpl.java",
"implementation": "try {\n file.removeUnpackedFiles();\n\n FileUtil.createParentDirs(file.getAgentPluginFile());\n FileUtil.createDir(file.getUnpackFolder());\n myUnpacker.extractPackage(file.getPackageFile(), file.getUnpackFolder());\n myPacker.packTool(file.getAgentPluginFile(), file.getUnpackFolder());",
"signature": "void installPackage(@NotNull final InstalledTool file)"
},
{
"arguments": [
"String name"
],
"filename": "nuget-tests/src/jetbrains/buildServer/nuget/tests/server/tools/ToolsRegistryTest.java",
"implementation": "File pkg = file(myPackagesHome, name + \".nupkg\");\r\n file(myAgentHome, name + \".nupkg.zip\");\r\n file(myToolsHome, name + \".nupkg/tools/nuget.exe\");\r\n return new InstalledToolImpl(myNaming, pkg);",
"signature": "InstalledTool nupkg(String name)"
}
] |
6bd46e2fb28192ee2d52e95873239b5421b1a60c | [
{
"arguments": [
"File confDirectory"
],
"filename": "src/java/com/splunk/shuttl/server/mbeans/JMXSplunk.java",
"implementation": "super(confDirectory);\n\tprivate JMXSplunk(String confFilePath) {\n\t\tsuper(confFilePath);\n\t@Override\n\tprotected String getDefaultConfFileName() {\n\t\treturn \"splunk.xml\";\n\n\tpublic static JMXSplunk createWithConfDirectory(File confDirectory) {\n\t\treturn new JMXSplunk(confDirectory);",
"signature": "private JMXSplunk(File confDirectory)"
},
{
"arguments": [
"File confFile"
],
"filename": "src/java/com/splunk/shuttl/server/mbeans/JMXSplunk.java",
"implementation": "return new JMXSplunk(confFile.getAbsolutePath());",
"signature": "JMXSplunk createWithConfFile(File confFile)"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/MBeanBase.java",
"implementation": "this(getDefaultConfDirectory());",
"signature": "public MBeanBase()"
},
{
"arguments": [
"File confDirectory"
],
"filename": "src/java/com/splunk/shuttl/server/mbeans/MBeanBase.java",
"implementation": "this.confFile = new File(confDirectory, getDefaultConfFileName());\n\t\trefresh();",
"signature": "public MBeanBase(File confDirectory)"
},
{
"arguments": [
"String confFilePath"
],
"filename": "src/java/com/splunk/shuttl/server/mbeans/MBeanBase.java",
"implementation": "this.confFile = new File(confFilePath);\n\t\trefresh();",
"signature": "public MBeanBase(String confFilePath)"
},
{
"arguments": [
"File confDirectory"
],
"filename": "src/java/com/splunk/shuttl/server/mbeans/ShuttlArchiver.java",
"implementation": "super(confDirectory);\n\t/**\n\t * Used for testing and needs to be a String instead of a File, because the\n\t * File constructor is already taken.\n\t */\n\tprivate ShuttlArchiver(String confFilePath) {\n\t\tsuper(confFilePath);\n\t@Override\n\tprotected String getDefaultConfFileName() {\n\t\treturn \"archiver.xml\";\n\tpublic static ShuttlArchiver createWithConfDirectory(File confDirectory) {\n\t\treturn new ShuttlArchiver(confDirectory);",
"signature": "private ShuttlArchiver(File confDirectory)"
},
{
"arguments": [
"File confFile"
],
"filename": "src/java/com/splunk/shuttl/server/mbeans/ShuttlArchiver.java",
"implementation": "return new ShuttlArchiver(confFile.getAbsolutePath());",
"signature": "ShuttlArchiver createWithConfFile(File confFile)"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/ShuttlServer.java",
"implementation": "super();\n\tpublic ShuttlServer(File confDirectory) {\n\t\tsuper(confDirectory);",
"signature": "public ShuttlServer()"
},
{
"arguments": [
"\n\t\t\tString shuttlConfDirPath"
],
"filename": "test/java/com/splunk/shuttl/FileSystemCleaner.java",
"implementation": "cleanConfiguredLocalFileSystemPaths(new File(shuttlConfDirPath));\n\tpublic void cleanConfiguredLocalFileSystemPaths(File confsDir) {\n\t\tif (confsDir.exists()) {\n\t\t\tTUtilsMBean.runWithRegisteredMBeans(confsDir, new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tFileUtils.deleteQuietly(LocalFileSystemPaths.create()\n\t\t\t\t\t\t\t.getArchiverDirectory());",
"signature": "void cleanFileSystemFromCreatedFilesDuringTests(\n\t\t\tString shuttlConfDirPath)"
},
{
"arguments": [
"String shuttlConfsDirPath"
],
"filename": "test/java/com/splunk/shuttl/archiver/LocalFileSystemPathsWithRealConfTest.java",
"implementation": "File confsDir = new File(shuttlConfsDirPath);\n\t\tTUtilsMBean.runWithRegisteredMBeans(confsDir, new Runnable() {\n\t@Test(groups = { \"end-to-end\"",
"signature": "void setUp(String shuttlConfsDirPath)"
}
] | [
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/JMXSplunk.java",
"implementation": "return \"splunk.xml\";\n\t/**\n\t * @param confFile\n\t */\n\tpublic JMXSplunk(File confFile) {\n\t\tthis.confFile = confFile.getAbsolutePath();\n\t\tcallRefreshWithErrorHandling();\n\tprivate void callRefreshWithErrorHandling() {\n\t\ttry {\n\t\t\trefresh();",
"signature": "String getConfFileName()"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/JMXSplunk.java",
"implementation": "return confFile;",
"signature": "String getPathToXmlFile()"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/MBeanBase.java",
"implementation": "return System.getenv(\"SPLUNK_HOME\") + File.separator + CONFIGURATION_PATH\n\t\t\t\t+ getConfFileName();\n\tpublic void save() throws ShuttlMBeanException {\n\t\t\tJAXBUtils.save(getConfClass(), getConfObject(), getPathToXmlFile());\n\tpublic void refresh() throws ShuttlMBeanException {\n\t\t\tT conf = (T) JAXBUtils.refresh(getConfClass(), getPathToXmlFile());\n\tprotected abstract String getConfFileName();\n\n\t/**\n\t * Implement this method by looking at {@link ShuttlArchiver",
"signature": "String getPathToDefaultConfFile()"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/ShuttlArchiver.java",
"implementation": "return \"archiver.xml\";\n\t// used by tests\n\tpublic ShuttlArchiver(String confFilePath) throws ShuttlMBeanException {\n\t\tthis.xmlFilePath = confFilePath;\n\t\trefreshWithConf();\n\tprivate void refreshWithConf() {\n\t\ttry {\n\t\t\trefresh();",
"signature": "String getConfFileName()"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/ShuttlArchiver.java",
"implementation": "return this.xmlFilePath;",
"signature": "String getPathToXmlFile()"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/ShuttlServer.java",
"implementation": "return \"server.xml\";\n\t// this signature used by tests\n\tpublic ShuttlServer(String confFilePath) throws ShuttlMBeanException {\n\t\ttry {\n\t\t\tthis.xmlFilePath = confFilePath;\n\t\t\trefresh();",
"signature": "String getConfFileName()"
},
{
"arguments": [],
"filename": "src/java/com/splunk/shuttl/server/mbeans/ShuttlServer.java",
"implementation": "return xmlFilePath;",
"signature": "String getPathToXmlFile()"
},
{
"arguments": [],
"filename": "test/java/com/splunk/shuttl/FileSystemCleaner.java",
"implementation": "cleanConfiguredLocalFileSystemPaths();\n\tpublic void cleanConfiguredLocalFileSystemPaths() {\n\t\tTUtilsMBean.runWithRegisteredMBeans(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tFileUtils.deleteQuietly(LocalFileSystemPaths.create()\n\t\t\t\t\t\t.getArchiverDirectory());",
"signature": "void cleanFileSystemFromCreatedFilesDuringTests()"
},
{
"arguments": [],
"filename": "test/java/com/splunk/shuttl/archiver/LocalFileSystemPathsWithRealConfTest.java",
"implementation": "TUtilsMBean.runWithRegisteredMBeans(new Runnable() {\n\t@Test(groups = { \"slow-unit\"",
"signature": "void setUp()"
}
] |
8b63b065e0ec7465a976083466565744f750375e | [
{
"arguments": [
"File path"
],
"filename": "ztools-core/src/main/java/org/gitools/model/Workspace.java",
"implementation": "this.path = path;",
"signature": "public Workspace(File path)"
},
{
"arguments": [],
"filename": "ztools-core/src/main/java/org/gitools/model/Workspace.java",
"implementation": "return path;",
"signature": "File getPath()"
},
{
"arguments": [
"File file"
],
"filename": "ztools-core/src/main/java/org/gitools/persistence/PersistenceManager.java",
"implementation": "this.file = file;",
"signature": "public FileKey(File file)"
},
{
"arguments": [],
"filename": "ztools-core/src/main/java/org/gitools/persistence/PersistenceManager.java",
"implementation": "return (int) (37 * file.hashCode() + file.lastModified());",
"signature": "int hashCode()"
},
{
"arguments": [
"Object obj"
],
"filename": "ztools-core/src/main/java/org/gitools/persistence/PersistenceManager.java",
"implementation": "if (obj == null)\n\t\t\t\treturn false;\n\t\t\telse if (!(obj instanceof FileKey))\n\t\t\t\treturn false;\n\t\t\tFileKey f = (FileKey) obj;\n\t\t\treturn file.hashCode() == f.file.hashCode()\n\t\t\t\t&& file.lastModified() == f.file.lastModified();",
"signature": "boolean equals(Object obj)"
},
{
"arguments": [],
"filename": "ztools-core/src/main/java/org/gitools/persistence/PersistenceManager.java",
"implementation": "if (defaultManager == null)\n\t\t\tdefaultManager = new PersistenceManager();\n\t\treturn defaultManager;",
"signature": "PersistenceManager getDefault()"
},
{
"arguments": [],
"filename": "ztools-core/src/main/java/org/gitools/persistence/PersistenceManager.java",
"implementation": "persistenceMap.put(MimeTypes.PROJECT, ProjectXmlPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.ENRICHMENT_ANALYSIS, EnrichmentAnalysisXmlPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.CONTENT, ContainerXmlPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.MATRIX_FIGURE, MatrixFigureXmlPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.TABLE_FIGURE, TableFigureXmlPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.OBJECT_MATRIX, ObjectMatrixTextPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.DOUBLE_MATRIX, DoubleMatrixTextPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.ANNOTATION_MATRIX, AnnotationMatrixTextPersistence.class);\n\t\tpersistenceMap.put(MimeTypes.MODULE_MAP, ModuleMapTextIndicesPersistence.class);",
"signature": "public PersistenceManager()"
}
] | [
{
"arguments": [],
"filename": "ztools-core/src/main/java/org/gitools/model/Artifact.java",
"implementation": "return resource;",
"signature": "FileObject getResource()"
},
{
"arguments": [
"FileObject resource"
],
"filename": "ztools-core/src/main/java/org/gitools/model/Artifact.java",
"implementation": "this.resource = resource;",
"signature": "void setResource(FileObject resource)"
},
{
"arguments": [],
"filename": "ztools-core/src/main/java/org/gitools/model/Workspace.java",
"implementation": "FileObject resource;\n\t\ttry {\n\t\t\tresource = getResource().resolveFile(name);\n\t\t\tresource.createFolder();\n\t\t\tresource = resource.resolveFile(ResourceNameSuffixes.PROJECT);",
"signature": "public Workspace()"
}
] |
a236ab1292ee369c464ffdaa61f5059954c6fa71 | [
{
"arguments": [
"final EntityTree entityTree",
" final List<Entity> operationComponents"
],
"filename": "mes-plugins/mes-plugins-products/src/main/java/com/qcadoo/mes/products/print/ReportDataService.java",
"implementation": "addOperationsFromSubtechnologiesToList(\n public final Map<Entity, BigDecimal> prepareTechnologySeries(final Entity entity) {\n public final void countQuantityForProductsIn(final Map<Entity, BigDecimal> products, final Entity technology,\n public final void addSeries(final Document document, final Entity entity, final Locale locale, final String type)\n throws DocumentException {\n DecimalFormat decimalFormat = (DecimalFormat) DecimalFormat.getInstance(locale);\n decimalFormat.setMaximumFractionDigits(3);\n decimalFormat.setMinimumFractionDigits(3);\n boolean firstPage = true;\n for (Entry<Entity, Map<Pair<Entity, Entity>, Pair<Map<Entity, BigDecimal>, Map<Entity, BigDecimal>>>> entry : prepareOperationSeries(\n entity, type).entrySet()) {\n if (!firstPage) {\n document.newPage();",
"signature": "void addOperationsFromSubtechnologiesToList(final EntityTree entityTree, final List<Entity> operationComponents)"
},
{
"arguments": [
"\n final Map<Entity",
" Map<Pair<Entity",
" Entity>",
" Pair<Map<Entity",
" BigDecimal>",
" Map<Entity",
" BigDecimal>>>> operations",
"\n final Map<Entity",
" Map<Pair<Entity",
" Entity>",
" Pair<Map<Entity",
" BigDecimal>",
" Map<Entity",
" BigDecimal>>>> orderOperations"
],
"filename": "mes-plugins/mes-plugins-products/src/main/java/com/qcadoo/mes/products/print/ReportDataService.java",
"implementation": "if (operations.size() == 0) {\n operations.putAll(orderOperations);",
"signature": "void concatenateOperationsList(\n final Map<Entity, Map<Pair<Entity, Entity>, Pair<Map<Entity, BigDecimal>, Map<Entity, BigDecimal>>>> operations,\n final Map<Entity, Map<Pair<Entity, Entity>, Pair<Map<Entity, BigDecimal>, Map<Entity, BigDecimal>>>> orderOperations)"
},
{
"arguments": [
"final BigDecimal totalQuantity",
"\n final Entry<Entity",
" Map<Pair<Entity",
" Entity>",
" Pair<Map<Entity",
" BigDecimal>",
" Map<Entity",
" BigDecimal>>>> entry",
"\n final Locale locale",
" final String type"
],
"filename": "mes-plugins/mes-plugins-products/src/main/java/com/qcadoo/mes/products/print/ReportDataService.java",
"implementation": "Paragraph title = new Paragraph();\n if (type.equals(\"machine\")) {\n Entity machine = entry.getKey();\n title.add(new Phrase(translationService.translate(\"products.workPlan.report.paragrah3\", locale), PdfUtil\n .getArialBold11Light()));\n String name = \"\";\n if (machine != null) {\n name = machine.getField(\"name\").toString();\n title.add(new Phrase(\" \" + name, PdfUtil.getArialBold19Dark()));",
"signature": "Paragraph prepareTitle(final BigDecimal totalQuantity,\n final Entry<Entity, Map<Pair<Entity, Entity>, Pair<Map<Entity, BigDecimal>, Map<Entity, BigDecimal>>>> entry,\n final Locale locale, final String type)"
},
{
"arguments": [
"final List<Entity> orders",
"\n final Entry<Entity",
" Map<Pair<Entity",
" Entity>",
" Pair<Map<Entity",
" BigDecimal>",
" Map<Entity",
" BigDecimal>>>> entry"
],
"filename": "mes-plugins/mes-plugins-products/src/main/java/com/qcadoo/mes/products/print/ReportDataService.java",
"implementation": "BigDecimal totalQuantity = new BigDecimal(\"0\");\n for (Pair<Entity, Entity> pair : entry.getValue().keySet()) {\n if (!orders.contains(pair.getValue())) {\n totalQuantity = totalQuantity.add((BigDecimal) pair.getValue().getField(\"plannedQuantity\"));\n orders.add(pair.getValue());\n return totalQuantity;\n private List<String> prepareOrderHeader(final Document document, final Entity entity, final Locale locale)\n throws DocumentException {\n String documenTitle = translationService.translate(\"products.workPlan.report.title\", locale);\n String documentAuthor = translationService.translate(\"products.materialRequirement.report.author\", locale);\n UsersUser user = securityService.getCurrentUser();\n PdfUtil.addDocumentHeader(document, entity.getField(\"name\").toString(), documenTitle, documentAuthor,\n (Date) entity.getField(\"date\"), user);\n document.add(generateBarcode(entity.getField(\"name\").toString()));\n document.add(new Paragraph(translationService.translate(\"products.workPlan.report.paragrah\", locale), PdfUtil\n .getArialBold11Dark()));\n List<String> orderHeader = new ArrayList<String>();\n orderHeader.add(translationService.translate(\"products.order.number.label\", locale));\n orderHeader.add(translationService.translate(\"products.order.name.label\", locale));\n orderHeader.add(translationService.translate(\"products.order.product.label\", locale));\n orderHeader.add(translationService.translate(\"products.order.plannedQuantity.label\", locale));\n orderHeader.add(translationService.translate(\"products.product.unit.label\", locale));\n orderHeader.add(translationService.translate(\"products.order.dateTo.label\", locale));\n return orderHeader;",
"signature": "BigDecimal createUniqueOrdersList(final List<Entity> orders,\n final Entry<Entity, Map<Pair<Entity, Entity>, Pair<Map<Entity, BigDecimal>, Map<Entity, BigDecimal>>>> entry)"
}
] | [
{
"arguments": [
"final EntityTree entityTree",
" final List<Entity> operationComponents"
],
"filename": "mes-plugins/mes-plugins-products/src/main/java/com/qcadoo/mes/products/print/ReportDataService.java",
"implementation": "addOperationsFromSubtechnologies(\n public final Map<Entity, BigDecimal> getTechnologySeries(final Entity entity) {\n public void countQuantityForProductsIn(final Map<Entity, BigDecimal> products, final Entity technology,\n\n quantity = ((BigDecimal) operationProductComponent.getField(\"quantity\")).multiply(plannedQuantity)\n .add(quantity);\n products.put(product,\n ((BigDecimal) operationProductComponent.getField(\"quantity\")).multiply(plannedQuantity));\n Entity productOutComponent = checkOutProducts(node);\n if (productOutComponent == null) {\n return false;",
"signature": "void addOperationsFromSubtechnologies(final EntityTree entityTree, final List<Entity> operationComponents)"
}
] |
ace6d95ab88d82689674a3978c51b9faac7573e7 | [
{
"arguments": [],
"filename": "engine/src/main/java/org/archive/crawler/framework/CrawlController.java",
"implementation": "return state == State.FINISHED;",
"signature": "boolean isFinished()"
},
{
"arguments": [],
"filename": "engine/src/main/java/org/archive/crawler/framework/CrawlJob.java",
"implementation": "// wait up to 3 seconds for stop\r\n for(int i = 0; i < 10; i++) {\r\n try {\r\n Thread.sleep(300);",
"signature": "boolean teardown()"
},
{
"arguments": [],
"filename": "engine/src/main/java/org/archive/crawler/util/BdbUriUniqFilter.java",
"implementation": "try {\n long cacheMiss = this.alreadySeen.getEnvironment().\n // FIXME: get shouldn't define intervals (should be idempotent)\n this.lastCacheMissDiff = cacheMiss - this.lastCacheMiss;\n this.lastCacheMiss = cacheMiss;\n return this.lastCacheMiss;",
"signature": "long getCacheMisses()"
}
] | [
{
"arguments": [],
"filename": "engine/src/main/java/org/archive/crawler/framework/CrawlJob.java",
"implementation": "",
"signature": "void reset()"
}
] |
ae5ec41d8935cfafcdb2528935124b381261bbb1 | [
{
"arguments": [
"Collection<TypeDeclaration> typeDeclarations"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateAnnotationProcessor.java",
"implementation": "EnunciateConfiguration config = this.enunciate.getConfig();\n AntPatternMatcher matcher = new AntPatternMatcher();\n matcher.setPathSeparator(\".\");\n if (!config.getApiExcludePatterns().isEmpty()) {\n Iterator<TypeDeclaration> typeDeclarationIt = typeDeclarations.iterator();\n while (typeDeclarationIt.hasNext()) {\n TypeDeclaration typeDeclaration = typeDeclarationIt.next();\n boolean exclude = false;\n if (config.getApiExcludePatterns().contains(typeDeclaration.getQualifiedName())) {\n exclude = true;\n debug(\"%s was explicitly excluded.\", typeDeclaration.getQualifiedName());",
"signature": "void removeExcludedClasses(Collection<TypeDeclaration> typeDeclarations)"
},
{
"arguments": [
"Collection<TypeDeclaration> typeDeclarations"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateAnnotationProcessor.java",
"implementation": "EnunciateConfiguration config = this.enunciate.getConfig();\n AntPatternMatcher matcher = new AntPatternMatcher();\n matcher.setPathSeparator(\".\");\n if (!config.getApiIncludePatterns().isEmpty()) {\n Iterator<TypeDeclaration> typeDeclarationIt = typeDeclarations.iterator();\n while (typeDeclarationIt.hasNext()) {\n TypeDeclaration typeDeclaration = typeDeclarationIt.next();\n boolean include = false;\n if (config.getApiIncludePatterns().contains(typeDeclaration.getQualifiedName())) {\n include = true;\n debug(\"%s was explicitly included.\", typeDeclaration.getQualifiedName());",
"signature": "void trimNotIncludedClasses(Collection<TypeDeclaration> typeDeclarations)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "return this.enunciateConfig == null || this.enunciateConfig.isIncludeReferencedClasses();\n int position = Collections.binarySearch(this.typeDefinitions, typeDef, CLASS_COMPARATOR);\n if (position < 0 && !isKnownType(typeDef)) {\n this.typeDefinitions.add(-position - 1, typeDef);\n add(typeDef.getSchema());\n String namespace = typeDef.getNamespace();\n String prefix = addNamespace(namespace);\n SchemaInfo schemaInfo = namespacesToSchemas.get(namespace);\n if (schemaInfo == null) {\n schemaInfo = new SchemaInfo();\n schemaInfo.setId(prefix);\n schemaInfo.setNamespace(namespace);\n namespacesToSchemas.put(namespace, schemaInfo);",
"signature": "boolean includeReferencedClasses()"
},
{
"arguments": [
"TypeDefinition typeDef"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "return knownTypes.containsKey(typeDef.getQualifiedName())\n || JAXBElement.class.getName().equals(typeDef.getQualifiedName())\n || ((DecoratedTypeMirror)typeDef.getSuperclass()).isInstanceOf(JAXBElement.class.getName());",
"signature": "boolean isKnownType(TypeDefinition typeDef)"
},
{
"arguments": [
"Attribute attribute"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(attribute);\n addReferencedTypeDefinitions(attribute.isAdapted() ? attribute.getAdapterType() : attribute.getAccessorType());",
"signature": "void addReferencedTypeDefinitions(Attribute attribute)"
},
{
"arguments": [
"Value value"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(value);\n addReferencedTypeDefinitions(value.isAdapted() ? value.getAdapterType() : value.getAccessorType());",
"signature": "void addReferencedTypeDefinitions(Value value)"
},
{
"arguments": [
"Element element"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(element);\n for (Element chioce : element.getChoices()) {\n addReferencedTypeDefinitions(chioce.isAdapted() ? chioce.getAdapterType() : chioce.getAccessorType());\n\n\n if (includeReferencedClasses()) {\n addSeeAlsoTypeDefinitions(endpoint);\n addReferencedTypeDefinitions(restMethod);",
"signature": "void addReferencedTypeDefinitions(Element element)"
},
{
"arguments": [
"RESTMethod restMethod"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(restMethod);\n RESTParameter nounValue = restMethod.getNounValue();\n if (nounValue != null) {\n TypeMirror nounValueType = nounValue.getType();\n if (nounValueType instanceof ClassType) {\n ClassDeclaration classDeclaration = ((ClassType) nounValueType).getDeclaration();\n if (classDeclaration.getAnnotation(XmlRootElement.class) != null) {\n //only add referenced type definitions for root elements.\n add(new RootElementDeclaration(classDeclaration, createTypeDefinition(classDeclaration)));",
"signature": "void addReferencedTypeDefinitions(RESTMethod restMethod)"
},
{
"arguments": [
"ResourceMethod resourceMethod"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(resourceMethod);\n ParameterDeclaration ep = resourceMethod.getEntityParameter();\n if (ep != null) {\n TypeMirror type = ep.getType();\n if (type instanceof ClassType) {\n ClassDeclaration classDeclaration = ((ClassType) type).getDeclaration();\n if (classDeclaration.getAnnotation(XmlRootElement.class) != null) {\n //only add referenced type definitions for root elements.\n add(new RootElementDeclaration(classDeclaration, createTypeDefinition(classDeclaration)));",
"signature": "void addReferencedTypeDefinitions(ResourceMethod resourceMethod)"
},
{
"arguments": [
"RootElementDeclaration rootEl"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "TypeDefinition typeDefinition = rootEl.getTypeDefinition();\n if (typeDefinition != null) {\n add(typeDefinition);",
"signature": "void addReferencedTypeDefinitions(RootElementDeclaration rootEl)"
},
{
"arguments": [
"EndpointInterface ei"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(ei);\n for (WebMethod webMethod : ei.getWebMethods()) {\n addReferencedTypeDefinitions(webMethod);",
"signature": "void addReferencedTypeDefinitions(EndpointInterface ei)"
},
{
"arguments": [
"WebMethod webMethod"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(webMethod);\n WebResult result = webMethod.getWebResult();\n addReferencedTypeDefinitions(result.isAdapted() ? result.getAdapterType() : result.getType());\n for (WebParam webParam : webMethod.getWebParameters()) {\n addReferencedTypeDefinitions(webParam.isAdapted() ? webParam.getAdapterType() : webParam.getType());",
"signature": "void addReferencedTypeDefinitions(WebMethod webMethod)"
},
{
"arguments": [
"WebFault webFault"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "if (webFault.isImplicitSchemaElement()) {\n for (ImplicitChildElement childElement : webFault.getChildElements()) {\n WebFault.FaultBeanChildElement fbce = (WebFault.FaultBeanChildElement) childElement;\n addReferencedTypeDefinitions(fbce.isAdapted() ? fbce.getAdapterType() : fbce.getType());",
"signature": "void addReferencedTypeDefinitions(WebFault webFault)"
},
{
"arguments": [
"TypeMirror type"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "type.accept(new ReferencedTypeDefinitionVisitor());",
"signature": "void addReferencedTypeDefinitions(TypeMirror type)"
},
{
"arguments": [
"Declaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "XmlSeeAlso seeAlso = declaration.getAnnotation(XmlSeeAlso.class);\n if (seeAlso != null) {\n try {\n Class[] classes = seeAlso.value();\n AnnotationProcessorEnvironment ape = Context.getCurrentEnvironment();\n for (Class clazz : classes) {\n ClassType type = (ClassType) ape.getTypeUtils().getDeclaredType(ape.getTypeDeclaration(clazz.getName()));\n ClassDeclaration typeDeclaration = type.getDeclaration();\n if (typeDeclaration != null) {\n add(createTypeDefinition(typeDeclaration));",
"signature": "void addSeeAlsoTypeDefinitions(Declaration declaration)"
},
{
"arguments": [
"ClassDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "if (isEnumType(declaration)) {\n return new EnumTypeDefinition((EnumDeclaration) declaration);",
"signature": "TypeDefinition createTypeDefinition(ClassDeclaration declaration)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "return !(declaration instanceof InterfaceDeclaration) && !isEnumType(declaration) && !isSimpleType(declaration);",
"signature": "boolean isComplexType(TypeDeclaration declaration)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "return (declaration instanceof EnumDeclaration);",
"signature": "boolean isEnumType(TypeDeclaration declaration)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "if (declaration instanceof InterfaceDeclaration) {\n if (declaration.getAnnotation(javax.xml.bind.annotation.XmlType.class) != null) {\n throw new ValidationException(declaration.getPosition(), \"An interface must not be annotated with @XmlType.\");",
"signature": "boolean isSimpleType(TypeDeclaration declaration)"
},
{
"arguments": [
"GenericTypeDefinition typeDef"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "boolean none = (typeDef.getAttributes().isEmpty()) && (typeDef.getElements().isEmpty());\n ClassDeclaration superDeclaration = ((ClassDeclaration) typeDef.getDelegate()).getSuperclass().getDeclaration();\n if (!Object.class.getName().equals(superDeclaration.getQualifiedName())) {\n none &= hasNeitherAttributesNorElements(new GenericTypeDefinition(superDeclaration));\n return none;\n addReferencedTypeDefinitions(registry);\n /**\n * Add the referenced type definitions for a registry..\n *\n * @param registry The registry.\n */\n protected void addReferencedTypeDefinitions(Registry registry) {\n addSeeAlsoTypeDefinitions(registry);\n for (MethodDeclaration methodDeclaration : registry.getInstanceFactoryMethods()) {\n addReferencedTypeDefinitions(methodDeclaration.getReturnType());",
"signature": "boolean hasNeitherAttributesNorElements(GenericTypeDefinition typeDef)"
},
{
"arguments": [
"LocalElementDeclaration led"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "addSeeAlsoTypeDefinitions(led);\n TypeDeclaration scope = led.getElementScope();\n if (scope instanceof ClassDeclaration) {\n add(createTypeDefinition((ClassDeclaration) scope));",
"signature": "void addReferencedTypeDefinitions(LocalElementDeclaration led)"
},
{
"arguments": [
"TypeMirror typeMirror"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "//no-op",
"signature": "void visitTypeMirror(TypeMirror typeMirror)"
},
{
"arguments": [
"PrimitiveType primitiveType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "//no-op",
"signature": "void visitPrimitiveType(PrimitiveType primitiveType)"
},
{
"arguments": [
"VoidType voidType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "//no-op",
"signature": "void visitVoidType(VoidType voidType)"
},
{
"arguments": [
"ReferenceType referenceType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "//no-op",
"signature": "void visitReferenceType(ReferenceType referenceType)"
},
{
"arguments": [
"DeclaredType declaredType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "//no-op",
"signature": "void visitDeclaredType(DeclaredType declaredType)"
},
{
"arguments": [
"ClassType classType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "if (classType instanceof AdapterType) {\n ((AdapterType)classType).getAdaptingType().accept(this);",
"signature": "void visitClassType(ClassType classType)"
},
{
"arguments": [
"EnumType enumType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "EnumDeclaration enumDeclaration = enumType.getDeclaration();\n if (enumDeclaration != null) {\n add(createTypeDefinition(enumDeclaration));",
"signature": "void visitEnumType(EnumType enumType)"
},
{
"arguments": [
"InterfaceType interfaceType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "MapType mapType = MapTypeUtil.findMapType(interfaceType);\n if (mapType != null) {\n mapType.getKeyType().accept(this);\n mapType.getValueType().accept(this);",
"signature": "void visitInterfaceType(InterfaceType interfaceType)"
},
{
"arguments": [
"AnnotationType annotationType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "//no-op",
"signature": "void visitAnnotationType(AnnotationType annotationType)"
},
{
"arguments": [
"ArrayType arrayType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "arrayType.getComponentType().accept(this);",
"signature": "void visitArrayType(ArrayType arrayType)"
},
{
"arguments": [
"TypeVariable typeVariable"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "Iterator<ReferenceType> bounds = typeVariable.getDeclaration().getBounds().iterator();\n if (bounds.hasNext()) {\n bounds.next().accept(this);",
"signature": "void visitTypeVariable(TypeVariable typeVariable)"
},
{
"arguments": [
"WildcardType wildcardType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateFreemarkerModel.java",
"implementation": "Iterator<ReferenceType> upperBounds = wildcardType.getUpperBounds().iterator();\n if (upperBounds.hasNext()) {\n upperBounds.next().accept(this);",
"signature": "void visitWildcardType(WildcardType wildcardType)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/codehaus/enunciate/config/EnunciateConfiguration.java",
"implementation": "return includeReferencedClasses;",
"signature": "boolean isIncludeReferencedClasses()"
},
{
"arguments": [
"boolean includeReferencedClasses"
],
"filename": "core/src/main/java/org/codehaus/enunciate/config/EnunciateConfiguration.java",
"implementation": "this.includeReferencedClasses = includeReferencedClasses;",
"signature": "void setIncludeReferencedClasses(boolean includeReferencedClasses)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/codehaus/enunciate/config/EnunciateConfiguration.java",
"implementation": "return excludeUnreferencedClasses;",
"signature": "boolean isExcludeUnreferencedClasses()"
},
{
"arguments": [
"boolean excludeUnreferencedClasses"
],
"filename": "core/src/main/java/org/codehaus/enunciate/config/EnunciateConfiguration.java",
"implementation": "this.excludeUnreferencedClasses = excludeUnreferencedClasses;",
"signature": "void setExcludeUnreferencedClasses(boolean excludeUnreferencedClasses)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/codehaus/enunciate/main/Enunciate.java",
"implementation": "public void visit(File file) {\n String path = pathFile.toURI().relativize(file.toURI()).getPath();\n if (path.endsWith(\".class\")) {\n String classname = path.substring(0, path.length() - 6).replace('/', '.').replace('$', '.');\n debug(\"Noticed class %s at %s.\", classname, file);\n foundClasses2Sources.put(classname, foundClasses2Sources.get(classname));",
"signature": "new FileVisitor()"
},
{
"arguments": [
"Map<String",
" File> foundClasses2Sources",
" Map<String",
" File> classes2sources"
],
"filename": "core/src/main/java/org/codehaus/enunciate/main/Enunciate.java",
"implementation": "if (this.config != null && this.config.getAPIImports() != null\n && !this.config.getAPIImports().isEmpty() && !foundClasses2Sources.isEmpty()) {\n AntPatternMatcher matcher = new AntPatternMatcher();\n matcher.setPathSeparator(\".\");\n for (APIImport apiImport : this.config.getAPIImports()) {\n String pattern = apiImport.getPattern();\n if (pattern != null) {\n for (Map.Entry<String, File> foundEntry : foundClasses2Sources.entrySet()) {\n if (!classes2sources.containsKey(foundEntry.getKey())) {\n if (pattern.equals(foundEntry.getKey())) {\n debug(\"Class %s will be imported because it was explicitly listed.\", foundEntry.getKey());\n classes2sources.put(foundEntry.getKey(), apiImport.isSeekSource() ? foundEntry.getValue() : null);",
"signature": "void copyImportedClasses(Map<String, File> foundClasses2Sources, Map<String, File> classes2sources)"
},
{
"arguments": [
"File dir",
" FileFilter filter",
" final Collection<String> filenames"
],
"filename": "core/src/main/java/org/codehaus/enunciate/main/Enunciate.java",
"implementation": "visitFiles(dir, filter, new FileVisitor() {\n public void visit(File file) {\n filenames.add(file.getAbsolutePath());",
"signature": "void findFiles(File dir, FileFilter filter, final Collection<String> filenames)"
},
{
"arguments": [
"File dir",
" FileFilter filter",
" FileVisitor visitor"
],
"filename": "core/src/main/java/org/codehaus/enunciate/main/Enunciate.java",
"implementation": "visitor.visit(file);\n visitFiles(subdir, filter, visitor);\n /**\n * A scratch directory for Enunciate to use.\n *\n * @return A scratch directory for Enunciate to use.\n */\n public File getScratchDir() {\n return scratchDir;",
"signature": "void visitFiles(File dir, FileFilter filter, FileVisitor visitor)"
},
{
"arguments": [
"File scratchDir"
],
"filename": "core/src/main/java/org/codehaus/enunciate/main/Enunciate.java",
"implementation": "this.scratchDir = scratchDir;",
"signature": "void setScratchDir(File scratchDir)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/codehaus/enunciate/main/Enunciate.java",
"implementation": "public boolean accept(File file) {\n return file.getName().endsWith(\".java\");",
"signature": "new FileFilter()"
},
{
"arguments": [
"File scratchDir"
],
"filename": "core/src/main/java/org/codehaus/enunciate/main/EnunciateTask.java",
"implementation": "this.scratchDir = scratchDir;",
"signature": "void setScratchDir(File scratchDir)"
},
{
"arguments": [
"typeMirror instanceof MapType"
],
"filename": "core/src/main/java/org/codehaus/enunciate/util/MapTypeUtil.java",
"implementation": "return (MapType) typeMirror;",
"signature": "else if (typeMirror instanceof MapType)"
},
{
"arguments": [
"ClassDeclaration declaration",
" EnunciateFreemarkerModel model"
],
"filename": "core/src/test/java/org/codehaus/enunciate/apt/TestEnunciateAnnotationProcessor.java",
"implementation": "/**\n * Tests getting the root model.\n */\n public void testGetRootModelExcludingUnreferenced() throws Exception {\n EnunciateConfiguration config = new EnunciateConfiguration();\n config.putNamespace(\"urn:test\", \"test\");\n config.putNamespace(\"http://enunciate.codehaus.org/samples/contract\", \"tContract\");\n\n final boolean[] validated = new boolean[]{false",
"signature": "TypeDefinition createTypeDefinition(ClassDeclaration declaration, EnunciateFreemarkerModel model)"
},
{
"arguments": [
"enunciate"
],
"filename": "core/src/test/java/org/codehaus/enunciate/apt/TestEnunciateAnnotationProcessor.java",
"implementation": "@Override\n protected void validate(EnunciateFreemarkerModel model) {\n validated[0] = true;",
"signature": "new EnunciateAnnotationProcessor(enunciate)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/test/java/org/codehaus/enunciate/apt/TestEnunciateAnnotationProcessor.java",
"implementation": "return \"org.codehaus.enunciate.samples.services.NamespacedWebService\".equals(declaration.getQualifiedName());",
"signature": "boolean isEndpointInterface(TypeDeclaration declaration)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/test/java/org/codehaus/enunciate/apt/TestEnunciateAnnotationProcessor.java",
"implementation": "boolean potentialSchemaType = \"org.codehaus.enunciate.samples.schema\".equals(declaration.getPackage().getQualifiedName());\n String simpleName = declaration.getSimpleName();\n potentialSchemaType &= (simpleName.equals(\"BeanOne\") || simpleName.equals(\"BeanTwo\") || simpleName.equals(\"BeanThree\"));\n return potentialSchemaType;",
"signature": "boolean isPotentialSchemaType(TypeDeclaration declaration)"
},
{
"arguments": [
"ClassDeclaration declaration",
" EnunciateFreemarkerModel model"
],
"filename": "core/src/test/java/org/codehaus/enunciate/apt/TestEnunciateAnnotationProcessor.java",
"implementation": "if (\"org.codehaus.enunciate.samples.schema.BeanOne\".equals(declaration.getQualifiedName())) {\n return new ComplexTypeDefinition(declaration);",
"signature": "TypeDefinition createTypeDefinition(ClassDeclaration declaration, EnunciateFreemarkerModel model)"
},
{
"arguments": [
"ClassDeclaration declaration",
" TypeDefinition typeDefinition"
],
"filename": "core/src/test/java/org/codehaus/enunciate/apt/TestEnunciateAnnotationProcessor.java",
"implementation": "if (\"org.codehaus.enunciate.samples.schema.BeanThree\".equals(declaration.getQualifiedName())) {\n return new RootElementDeclaration(declaration, typeDefinition);",
"signature": "RootElementDeclaration createRootElementDeclaration(ClassDeclaration declaration, TypeDefinition typeDefinition)"
},
{
"arguments": [],
"filename": "core/src/test/java/org/codehaus/enunciate/apt/TestEnunciateFreemarkerModel.java",
"implementation": "@Override\n protected boolean includeReferencedClasses() {\n return false;",
"signature": "new EnunciateFreemarkerModel()"
}
] | [
{
"arguments": [
"ClassDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateAnnotationProcessor.java",
"implementation": "if (isEnumType(declaration)) {\n return new EnumTypeDefinition((EnumDeclaration) declaration);",
"signature": "TypeDefinition createTypeDefinition(ClassDeclaration declaration)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateAnnotationProcessor.java",
"implementation": "return !(declaration instanceof InterfaceDeclaration) && !isEnumType(declaration) && !isSimpleType(declaration);",
"signature": "boolean isComplexType(TypeDeclaration declaration)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateAnnotationProcessor.java",
"implementation": "return (declaration instanceof EnumDeclaration);",
"signature": "boolean isEnumType(TypeDeclaration declaration)"
},
{
"arguments": [
"TypeDeclaration declaration"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateAnnotationProcessor.java",
"implementation": "if (declaration instanceof InterfaceDeclaration) {\n if (declaration.getAnnotation(XmlType.class) != null) {\n throw new ValidationException(declaration.getPosition(), \"An interface must not be annotated with @XmlType.\");",
"signature": "boolean isSimpleType(TypeDeclaration declaration)"
},
{
"arguments": [
"GenericTypeDefinition typeDef"
],
"filename": "core/src/main/java/org/codehaus/enunciate/apt/EnunciateAnnotationProcessor.java",
"implementation": "boolean none = (typeDef.getAttributes().isEmpty()) && (typeDef.getElements().isEmpty());\n ClassDeclaration superDeclaration = ((ClassDeclaration) typeDef.getDelegate()).getSuperclass().getDeclaration();\n if (!Object.class.getName().equals(superDeclaration.getQualifiedName())) {\n none &= hasNeitherAttributesNorElements(new GenericTypeDefinition(superDeclaration));",
"signature": "boolean hasNeitherAttributesNorElements(GenericTypeDefinition typeDef)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/codehaus/enunciate/config/APIImport.java",
"implementation": "return clazz;",
"signature": "String getClassname()"
}
] |
b50308a6851b3f8ebb6327f80033319d10b7d1b9 | [
{
"arguments": [
"BlackBoard blackBoard"
],
"filename": "src/graphlab/extensions/algorithms/CholeskyFactorizationExtension.java",
"implementation": "super(blackBoard);",
"signature": "public CholeskyFactorizationExtension(BlackBoard blackBoard)"
},
{
"arguments": [
"BlackBoard b"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "blackboard = b;\n\n jta = new JEditorPane();\n jta.setEditable(false);\n jta.addHyperlinkListener(this);\n JViewport jvp = new JViewport();\n\n jta.setBackground(Color.white);\n jvp.add(jta);\n jta.setContentType(\"text/html\");\n\n this.setViewport(jvp);",
"signature": "public GHTMLPageComponent(BlackBoard b)"
},
{
"arguments": [
"URL page"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "try {\n jta.setPage(page);",
"signature": "void setPage(URL page)"
},
{
"arguments": [
"String html"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "jta.setText(html);",
"signature": "void setHTML(String html)"
},
{
"arguments": [],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "return jta;",
"signature": "JEditorPane getEditorPane()"
},
{
"arguments": [],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "jta.setEditable(true);\n DefaultCaret caret = (DefaultCaret) jta.getCaret();\n caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);",
"signature": "void makeEditable()"
},
{
"arguments": [
"String html"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "StringBuffer sb9 = new StringBuffer();\n String pointtext = jta.getText();\n\n sb9.append(\"<html><body>\");\n sb9.append(html);\n sb9.append(\"</body></html>\");\n\n\n try {\n Document doc = (Document) jta.getDocument();\n\n ((HTMLEditorKit) jta.getEditorKit()).read(\n new java.io.StringReader(sb9.toString())\n , jta.getDocument()\n , jta.getDocument().getLength());",
"signature": "void appendHTML(String html)"
},
{
"arguments": [
"String protocol",
" HyperlinkHandler h"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "handlers.put(protocol.toUpperCase(), h);",
"signature": "void registerHyperLinkHandler(String protocol, HyperlinkHandler h)"
},
{
"arguments": [
"HyperlinkEvent e"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\n String url = e.getDescription();\n if (!url.contains(\"=\"))\n normalHyperlinkUpdate(e);\n else {\n// String prefix = url.toUpperCase().substring(0, url.indexOf(\":\"));\n HyperlinkHandler han = null;\n String postfix;\n int pi = url.indexOf(\"handler\");\n if (pi != -1) {\n postfix = url.toUpperCase().substring(pi + 8);\n han = handlers.get(postfix);",
"signature": "void hyperlinkUpdate(HyperlinkEvent e)"
},
{
"arguments": [
"HyperlinkEvent e"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "JEditorPane pane = (JEditorPane) e.getSource();\n if (e instanceof HTMLFrameHyperlinkEvent) {\n HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent) e;\n HTMLDocument doc = (HTMLDocument) pane.getDocument();\n doc.processHTMLFrameHyperlinkEvent(evt);",
"signature": "void normalHyperlinkUpdate(HyperlinkEvent e)"
},
{
"arguments": [
"String message"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "setHTML(message);",
"signature": "void showNotificationMessage(String message)"
},
{
"arguments": [
"String message"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "setHTML(message);\n this.message = message;",
"signature": "void setMessage(String message)"
},
{
"arguments": [],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "setHTML(message);",
"signature": "void hideNotificationMessage()"
},
{
"arguments": [
"ActionListener listener",
" BlackBoard blackboard"
],
"filename": "src/graphlab/plugins/algorithmanimator/AnimatorGUI.java",
"implementation": "this.blackboard = blackboard;\n pauseButton.addActionListener(listener);\n playButton.addActionListener(listener);\n playOneStepButton.addActionListener(listener);",
"signature": "public AnimatorGUI(ActionListener listener, BlackBoard blackboard)"
},
{
"arguments": [],
"filename": "src/graphlab/plugins/algorithmanimator/AnimatorGUI.java",
"implementation": "String html = \"<html>\" +\n \"<head>\" +\n \"<style type='text/css'>\" +\n \"body{ font-family: monospace;",
"signature": "void createUIComponents()"
},
{
"arguments": [
"BlackBoard blackBoard"
],
"filename": "src/graphlab/plugins/algorithmanimator/core/GraphAlgorithm.java",
"implementation": "this.blackBoard = blackBoard;\n this.graphData = new GraphData(blackBoard);\n \n public String getMatrixHTML(GraphModel g){\n return graphData.saveLoad.Graph2MatrixHTML(g);",
"signature": "public GraphAlgorithm(BlackBoard blackBoard)"
},
{
"arguments": [
"GraphModel g"
],
"filename": "src/graphlab/plugins/main/saveload/SaveLoadPluginMethods.java",
"implementation": "public String Graph2MatrixHTML(GraphModel g){\n return (Matrix.Matrix2HTML(Matrix.graph2Matrix(g)));",
"signature": "String Graph2MatrixString(GraphModel g)"
},
{
"arguments": [
"int[][] mat",
" GraphModel g"
],
"filename": "src/graphlab/plugins/main/saveload/matrix/Matrix.java",
"implementation": "int n = mat.length;\n int nn = mat[1].length;\n if (n != nn) {\n JOptionPane.showMessageDialog(null, \"not a valid matrix graph\");\n return;",
"signature": "void Matrix2Graph(int[][] mat, GraphModel g)"
},
{
"arguments": [
"Object[][] mat"
],
"filename": "src/graphlab/plugins/main/saveload/matrix/Matrix.java",
"implementation": "int a = mat.length;\n if (a == 0)\n return \"\";\n int b = mat[0].length;\n String ret = \"<table>\";\n for (int i = 0; i < a; i++) {\n ret += \"<tr>\";\n for (int j = 0; j < b; j++) {\n if(mat[i][j]!=null)\n ret += \"<td>\" + ((Number)(mat[i][j])).intValue() + \"</td>\";\n else\n ret += \"<td>0</td>\";\n// ret += (mat[i][j] ? \"1\" : \"0\");\n// ret += \" \";",
"signature": "String Matrix2HTML(Object[][] mat)"
},
{
"arguments": [
"Object[][] mat"
],
"filename": "src/graphlab/plugins/main/saveload/matrix/Matrix.java",
"implementation": "int a = mat.length;\n if (a == 0)\n return \"\";\n int b = mat[0].length;\n String ret = \"\";\n for (int i = 0; i < a; i++) {\n for (int j = 0; j < b; j++) {\n \tif(mat[i][j]!=null)\n \t\tret += ((Number)(mat[i][j])).intValue() + \" \";\n \telse\n \t\tret += \"0 \";\n// ret += (mat[i][j] ? \"1\" : \"0\");\n// ret += \" \";",
"signature": "String Matrix2String(Object[][] mat)"
}
] | [
{
"arguments": [
"BlackBoard b"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "blackboard = b;\r\n\r\n jta = new JEditorPane();\r\n jta.setEditable(false);\r\n jta.addHyperlinkListener(this);\r\n JViewport jvp = new JViewport();\r\n\r\n jta.setBackground(Color.white);\r\n jvp.add(jta);\r\n jta.setContentType(\"text/html\");\r\n\r\n this.setViewport(jvp);",
"signature": "public GHTMLPageComponent(BlackBoard b)"
},
{
"arguments": [
"URL page"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "try {\r\n jta.setPage(page);",
"signature": "void setPage(URL page)"
},
{
"arguments": [
"String html"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "jta.setText(html);",
"signature": "void setHTML(String html)"
},
{
"arguments": [
"String protocol",
" HyperlinkHandler h"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "handlers.put(protocol.toUpperCase(), h);",
"signature": "void registerHyperLinkHandler(String protocol, HyperlinkHandler h)"
},
{
"arguments": [
"HyperlinkEvent e"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\r\n String url = e.getDescription();\r\n if (!url.contains(\"=\"))\r\n normalHyperlinkUpdate(e);\r\n else {\r\n// String prefix = url.toUpperCase().substring(0, url.indexOf(\":\"));\r\n HyperlinkHandler han = null;\r\n String postfix;\r\n int pi = url.indexOf(\"handler\");\r\n if (pi != -1) {\r\n postfix = url.toUpperCase().substring(pi + 8);\r\n han = handlers.get(postfix);",
"signature": "void hyperlinkUpdate(HyperlinkEvent e)"
},
{
"arguments": [
"HyperlinkEvent e"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "JEditorPane pane = (JEditorPane) e.getSource();\r\n if (e instanceof HTMLFrameHyperlinkEvent) {\r\n HTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent) e;\r\n HTMLDocument doc = (HTMLDocument) pane.getDocument();\r\n doc.processHTMLFrameHyperlinkEvent(evt);",
"signature": "void normalHyperlinkUpdate(HyperlinkEvent e)"
},
{
"arguments": [
"String message"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "setHTML(message);",
"signature": "void showNotificationMessage(String message)"
},
{
"arguments": [
"String message"
],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "setHTML(message);\r\n this.message = message;",
"signature": "void setMessage(String message)"
},
{
"arguments": [],
"filename": "src/graphlab/graph/ui/GHTMLPageComponent.java",
"implementation": "setHTML(message);",
"signature": "void hideNotificationMessage()"
},
{
"arguments": [
"ActionListener listener"
],
"filename": "src/graphlab/plugins/algorithmanimator/AnimatorGUI.java",
"implementation": "pauseButton.addActionListener(listener);\r\n playButton.addActionListener(listener);\r\n playOneStepButton.addActionListener(listener);",
"signature": "public AnimatorGUI(ActionListener listener)"
},
{
"arguments": [
"String lbl",
" Dimension d"
],
"filename": "src/graphlab/plugins/algorithmanimator/core/AlgorithmAnimator.java",
"implementation": "// JButton play = new JButton(lbl);\n// play.setSize(d);\n// play.addActionListener(this);\n// f.add(play);\n//",
"signature": "void addBtn(String lbl, Dimension d)"
},
{
"arguments": [
"int[][] mat",
" GraphModel g"
],
"filename": "src/graphlab/plugins/main/saveload/matrix/Matrix.java",
"implementation": "int n = mat.length;\r\n int nn = mat[1].length;\r\n if (n != nn) {\r\n JOptionPane.showMessageDialog(null, \"not a valid matrix graph\");\r\n return;",
"signature": "void Matrix2Graph(int[][] mat, GraphModel g)"
},
{
"arguments": [
"Object[][] mat"
],
"filename": "src/graphlab/plugins/main/saveload/matrix/Matrix.java",
"implementation": "int a = mat.length;\r\n if (a == 0)\r\n return \"\";\r\n int b = mat[0].length;\r\n String ret = \"\";\r\n for (int i = 0; i < a; i++) {\r\n for (int j = 0; j < b; j++) {\r\n \tif(mat[i][j]!=null)\r\n \t\tret += ((Number)(mat[i][j])).intValue() + \" \";\r\n \telse\r\n \t\tret += \"0 \";\r\n// ret += (mat[i][j] ? \"1\" : \"0\");\r\n// ret += \" \";",
"signature": "String Matrix2String(Object[][] mat)"
}
] |
b90d8ee6155bbaced127a6dba035c78728f2fb5e | [
{
"arguments": [],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java",
"implementation": "return useLightweightEdges;\n public void setUseLightweightEdges(boolean useDynamicEdges) {\n this.useLightweightEdges = useDynamicEdges;\n public boolean isKeepInMemoryReferences() {\n return keepInMemoryReferences;\n public void setKeepInMemoryReferences(boolean useReferences) {\n this.keepInMemoryReferences = useReferences;\n\n public boolean isUseVertexFieldsForEdgeLabels() {\n return useVertexFieldsForEdgeLabels;",
"signature": "boolean isUseLightweightEdges()"
},
{
"arguments": [
"boolean useVertexFieldsForEdgeLabels"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java",
"implementation": "this.useVertexFieldsForEdgeLabels = useVertexFieldsForEdgeLabels;",
"signature": "void setUseVertexFieldsForEdgeLabels(boolean useVertexFieldsForEdgeLabels)"
},
{
"arguments": [
"final String iClassName"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java",
"implementation": "return iClassName.replace(' ', '-');",
"signature": "String encodeClassName(final String iClassName)"
},
{
"arguments": [
"final String iClassName"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java",
"implementation": "return iClassName.replace('-', ' ');",
"signature": "String decodeClassName(final String iClassName)"
},
{
"arguments": [
"final Class<T> elementClass"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java",
"implementation": "String className = null;\n\n if (elementClass.isAssignableFrom(Vertex.class))\n className = OrientVertex.CLASS_NAME;\n else if (elementClass.isAssignableFrom(Edge.class))\n className = OrientEdge.CLASS_NAME;\n return className;",
"signature": "String getClassName(final Class<T> elementClass)"
},
{
"arguments": [
"final String[] iLabels"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java",
"implementation": "return isLabeled(getLabel(), iLabels);",
"signature": "boolean isLabeled(final String[] iLabels)"
},
{
"arguments": [
"final String iEdgeLabel",
" final String[] iLabels"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java",
"implementation": "if (iLabels != null && iLabels.length > 0) {\r\n // FILTER LABEL\r\n if (iEdgeLabel != null)\r\n for (String l : iLabels)\r\n if (l.equals(iEdgeLabel))\r\n // FOUND\r\n return true;\r\n\r\n // NOT FOUND\r\n return false;",
"signature": "boolean isLabeled(final String iEdgeLabel, final String[] iLabels)"
},
{
"arguments": [
"final OIdentifiable iEdge"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientEdge.java",
"implementation": "if (iEdge == null)\r\n return null;\r\n\r\n final ODocument edge = iEdge.getRecord();\r\n if (edge == null)\r\n return null;\r\n\r\n return edge.field(LABEL_FIELD_NAME);",
"signature": "String getRecordLabel(final OIdentifiable iEdge)"
},
{
"arguments": [],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientElement.java",
"implementation": "return graph;",
"signature": "OrientBaseGraph getGraph()"
},
{
"arguments": [
"String label",
" final Vertex inVertex",
" String iClassName",
" final Object... fields"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "label = OrientBaseGraph.encodeClassName(label);\r\n\r\n final boolean useVertexFieldsForEdgeLabels = graph.isUseVertexFieldsForEdgeLabels();\r\n final String outFieldName = getConnectionFieldName(Direction.OUT, label, useVertexFieldsForEdgeLabels);\r\n final String inFieldName = getConnectionFieldName(Direction.IN, label, useVertexFieldsForEdgeLabels);\r\n if (canCreateDynamicEdge(outDocument, inDocument, outFieldName, inFieldName, fields, label)) {\r\n iClassName = label;\r\n if (graph.isKeepInMemoryReferences())\r\n if (graph.isKeepInMemoryReferences()) {\r\n final String iInFieldName, final Object[] fields, final String label) {\r\n\r\n if (!graph.isUseVertexFieldsForEdgeLabels() && label != null)\r\n return false;\r\n\r\n if (graph.isUseLightweightEdges() && (fields == null || fields.length == 0)) {\r\n if (graph.isUseVertexFieldsForEdgeLabels() || iLabels == null || iLabels.length == 0) {\r\n // VERY FAST\r\n final ODocument doc = getRecord();\r\n for (String fieldName : doc.fieldNames()) {\r\n final OPair<Direction, String> connection = getConnection(iDirection, fieldName, iLabels);\r\n if (connection == null)\r\n // SKIP THIS FIELD\r\n continue;\r\n\r\n final Object fieldValue = doc.field(fieldName);\r\n if (fieldValue != null)\r\n if (fieldValue instanceof Collection<?>)\r\n counter += ((Collection<?>) fieldValue).size();\r\n else if (fieldValue instanceof Map<?, ?>)\r\n counter += ((Map<?, ?>) fieldValue).size();\r\n else\r\n counter++;",
"signature": "OrientEdge addEdge(String label, final Vertex inVertex, String iClassName, final Object... fields)"
},
{
"arguments": [
"String clsName : iClassNames"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "clsName = OrientBaseGraph.encodeClassName(clsName);\r\n\r\n if (iFieldName.equals(CONNECTION_OUT_PREFIX + clsName))\r\n return new OPair<Direction, String>(Direction.OUT, clsName);",
"signature": "NAMES\r\n for (String clsName : iClassNames)"
},
{
"arguments": [
"String clsName : iClassNames"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "if (iFieldName.equals(CONNECTION_IN_PREFIX + clsName))\r\n return new OPair<Direction, String>(Direction.IN, clsName);",
"signature": "NAMES\r\n for (String clsName : iClassNames)"
},
{
"arguments": [
"final Direction iDirection",
" final String iClassName",
"\r\n final boolean useVertexFieldsForEdgeLabels"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "if (useVertexFieldsForEdgeLabels) {\r\n // PREFIX \"out_\" or \"in_\" TO THE FIELD NAME\r\n final String prefix = iDirection == Direction.OUT ? CONNECTION_OUT_PREFIX : CONNECTION_IN_PREFIX;\r\n if (iClassName == null || iClassName.isEmpty() || iClassName.equals(OrientEdge.CLASS_NAME))\r\n return prefix;\r\n return prefix + iClassName;",
"signature": "String getConnectionFieldName(final Direction iDirection, final String iClassName,\r\n final boolean useVertexFieldsForEdgeLabels)"
},
{
"arguments": [
"final String iConnectionField",
" final boolean useVertexFieldsForEdgeLabels"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "if (useVertexFieldsForEdgeLabels) {\r\n if (iConnectionField.startsWith(CONNECTION_OUT_PREFIX))\r\n return Direction.OUT;\r\n else if (iConnectionField.startsWith(CONNECTION_IN_PREFIX))\r\n return Direction.IN;",
"signature": "Direction getConnectionDirection(final String iConnectionField, final boolean useVertexFieldsForEdgeLabels)"
},
{
"arguments": [
"final Direction iDirection",
" final String iFieldName"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "public static String getInverseConnectionFieldName(final String iFieldName, final boolean useVertexFieldsForEdgeLabels) {\r\n if (useVertexFieldsForEdgeLabels) {\r\n if (iFieldName.startsWith(CONNECTION_OUT_PREFIX)) {\r\n if (iFieldName.length() == CONNECTION_OUT_PREFIX.length())\r\n // \"OUT\" CASE\r\n return CONNECTION_IN_PREFIX;\r\n return CONNECTION_IN_PREFIX + iFieldName.substring(CONNECTION_OUT_PREFIX.length());",
"signature": "String getConnectionClass(final Direction iDirection, final String iFieldName)"
},
{
"arguments": [
"final ODocument doc",
" final OMultiCollectionIterator<Vertex> iterable",
" String fieldName",
"\r\n final OPair<Direction",
" String> connection",
" final Object fieldValue",
" final String[] iLabels"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "final OrientVertex toAdd;\r\n\r\n final ODocument fieldRecord = ((OIdentifiable) fieldValue).getRecord();\r\n if (fieldRecord.getSchemaClass().isSubClassOf(CLASS_NAME)) {\r\n // DIRECT VERTEX\r\n toAdd = new OrientVertex(graph, fieldRecord);",
"signature": "void addSingleVertex(final ODocument doc, final OMultiCollectionIterator<Vertex> iterable, String fieldName,\r\n final OPair<Direction, String> connection, final Object fieldValue, final String[] iLabels)"
}
] | [
{
"arguments": [
"final Class<T> elementClass"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientBaseGraph.java",
"implementation": "String className = null;\n\n if (elementClass.isAssignableFrom(Vertex.class))\n className = OrientVertex.CLASS_NAME;\n else if (elementClass.isAssignableFrom(Edge.class))\n className = OrientEdge.CLASS_NAME;\n return className;",
"signature": "String getClassName(final Class<T> elementClass)"
},
{
"arguments": [
"final Object iObject"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "// CREATE THE OBJECT LAZILY\r\n return iObject instanceof Vertex ? (Vertex) iObject : new OrientVertex(graph, (OIdentifiable) iObject);",
"signature": "Vertex createWrapper(final Object iObject)"
},
{
"arguments": [
"final String label",
" final Vertex inVertex",
" String iClassName",
" final Object... fields"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "final String outFieldName = getConnectionFieldName(Direction.OUT, label);\r\n final String inFieldName = getConnectionFieldName(Direction.IN, label);\r\n if (canCreateDynamicEdge(outDocument, inDocument, outFieldName, inFieldName, fields)) {\r\n iClassName = null;\r\n if (graph.isUseReferences())\r\n if (graph.isUseReferences()) {\r\n final String iInFieldName, final Object[] fields) {\r\n if (graph.isUseDynamicEdges() && (fields == null || fields.length == 0)) {\r\n final ODocument doc = getRecord();\r\n\r\n\r\n for (String fieldName : doc.fieldNames()) {\r\n final OPair<Direction, String> connection = getConnection(iDirection, fieldName, iLabels);\r\n if (connection == null)\r\n // SKIP THIS FIELD\r\n continue;\r\n\r\n final Object fieldValue = doc.field(fieldName);\r\n if (fieldValue != null)\r\n if (fieldValue instanceof Collection<?>)\r\n counter += ((Collection<?>) fieldValue).size();\r\n else if (fieldValue instanceof Map<?, ?>)\r\n counter += ((Map<?, ?>) fieldValue).size();\r\n else\r\n\r\n addSingleItem(doc, iterable, fieldName, connection, fieldValue);\r\n addSingleItem(doc, iterable, fieldName, connection, ((ORecordLazyMultiValue) coll).rawIterator().next());\r\n addSingleItem(doc, iterable, fieldName, connection, ((List<?>) coll).get(0));\r\n addSingleItem(doc, iterable, fieldName, connection, coll.iterator().next());\r\n\r\n iterable.add(new OLazyWrapperIterator<OrientEdge>(it, connection) {\r\n @Override\r\n public OrientEdge createWrapper(final Object iObject) {\r\n if (iObject instanceof OrientEdge)\r\n return (OrientEdge) iObject;\r\n\r\n final ODocument value = ((OIdentifiable) iObject).getRecord();\r\n if (value.getSchemaClass().isSubClassOf(CLASS_NAME)) {\r\n // DIRECT VERTEX, CREATE DUMMY EDGE\r\n final OPair<Direction, String> conn = (OPair<Direction, String>) additionalData;\r\n if (conn.getKey() == Direction.OUT)\r\n return new OrientEdge(graph, doc, value, conn.getValue());\r\n else\r\n return new OrientEdge(graph, value, doc, conn.getValue());",
"signature": "OrientEdge addEdge(final String label, final Vertex inVertex, String iClassName, final Object... fields)"
},
{
"arguments": [
"String clsName : iClassNames"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "if (iFieldName.equals(CONNECTION_OUT_PREFIX + clsName))\r\n return new OPair<Direction, String>(Direction.OUT, clsName);",
"signature": "NAMES\r\n for (String clsName : iClassNames)"
},
{
"arguments": [
"String clsName : iClassNames"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "if (iFieldName.equals(CONNECTION_IN_PREFIX + clsName))\r\n return new OPair<Direction, String>(Direction.IN, clsName);",
"signature": "NAMES\r\n for (String clsName : iClassNames)"
},
{
"arguments": [
"final Direction iDirection",
" final String iClassName"
],
"filename": "blueprints-orient-graph/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientVertex.java",
"implementation": "final String prefix = iDirection == Direction.OUT ? CONNECTION_OUT_PREFIX : CONNECTION_IN_PREFIX;\r\n if (iClassName == null || iClassName.isEmpty() || iClassName.equals(OrientEdge.CLASS_NAME))\r\n return prefix;\r\n return prefix + iClassName;\r\n public static Direction getConnectionDirection(final String iConnectionField) {\r\n if (iConnectionField.startsWith(CONNECTION_OUT_PREFIX))\r\n return Direction.OUT;\r\n else if (iConnectionField.startsWith(CONNECTION_IN_PREFIX))\r\n return Direction.IN;\r\n public static String getConnectionClass(final Direction iDirection, final String iFieldName) {\r\n public static String getInverseConnectionFieldName(final String iFieldName) {\r\n if (iFieldName.startsWith(CONNECTION_OUT_PREFIX)) {\r\n if (iFieldName.length() == CONNECTION_OUT_PREFIX.length())\r\n // \"OUT\" CASE\r\n return CONNECTION_IN_PREFIX;\r\n return CONNECTION_IN_PREFIX + iFieldName.substring(CONNECTION_OUT_PREFIX.length());",
"signature": "String getConnectionFieldName(final Direction iDirection, final String iClassName)"
},
{
"arguments": [
"final String graphDirectoryName"
],
"filename": "blueprints-orient-graph/src/test/java/com/tinkerpop/blueprints/impls/orient/OrientGraphTest.java",
"implementation": "String directory = getWorkingDirectory();\r\n this.currentGraph = new OrientGraph(\"local:\" + directory + \"/\" + graphDirectoryName);\r\n return this.currentGraph;",
"signature": "Graph generateGraph(final String graphDirectoryName)"
}
] |
bfded7cf4b2a843dcf577008ca4d2e8b4ac2f467 | [
{
"arguments": [],
"filename": "src/actors/TestPlayer.java",
"implementation": "Player a = new Player(\"Twil\");",
"signature": "void testSpriteFlipping()"
},
{
"arguments": [],
"filename": "src/groups/FormationTest.java",
"implementation": "Formation f = new Formation();\n\t\t\n\t\tf.add(\"Gel\");\n\t\tassertEquals(\"Gel\", f.get(0).getName());",
"signature": "void testAddEnemyByName()"
},
{
"arguments": [
"int lvl"
],
"filename": "src/jobs/JobTest.java",
"implementation": "return 2;",
"signature": "int getInt(int lvl)"
}
] | [
{
"arguments": [
"int lvl"
],
"filename": "src/jobs/JobTest.java",
"implementation": "return 2;",
"signature": "int getEvd(int lvl)"
},
{
"arguments": [
"int lvl"
],
"filename": "src/jobs/JobTest.java",
"implementation": "return 6;",
"signature": "int getRes(int lvl)"
}
] |
c8c3080c49e883f01a64afc8119c041a889f82d4 | [
{
"arguments": [
"InstanceKind type"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "this.kind = type;\r\n this.id = UUID.randomUUID();\r\n public String getId() {\r\n return id.toString();\r\n // Creation\r\n public static OPPObjectInstance createCompositeInstance() {\r\n return new OPPObjectInstance(InstanceKind.COMPOSITE);\r\n OPPObjectInstance instance = new OPPObjectInstance(InstanceKind.NUMERICAL);\r\n OPPObjectInstance instance = new OPPObjectInstance(InstanceKind.STRING);\r\n public static OPPObjectInstance createFromValue(Object object) {\r\n Preconditions.checkNotNull(object);\r\n OPPObjectInstance instance = new OPPObjectInstance(InstanceKind.JAVA_OBJECT);\r\n instance.setValue(object);\r\n return instance;",
"signature": "private OPPObjectInstance(InstanceKind type)"
},
{
"arguments": [
"OPPObjectInstance value"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkNotNull(value, \"Cannot append a null element to a collection.\");\r\n Integer firstKey = 0;\r\n if (compositeValues.size() > 0) {\r\n firstKey = compositeValues.firstKey();",
"signature": "void addFirstPart(OPPObjectInstance value)"
},
{
"arguments": [
"OPPObjectInstance value"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "if (compositeValues.size() > 0) {\r\n lastKey = compositeValues.lastKey();\r\n compositeValues.put(newKey, value);\r\n compositeKeyToIndexMapping.put(UUID.randomUUID().toString(), newKey);\r\n public void setPart(String name, OPPObjectInstance value) {\r\n checkTypeForCompositeOnlyOperations();\r\n if (compositeKeyToIndexMapping.containsKey(name)) {\r\n compositeValues.remove(compositeKeyToIndexMapping.get(name));\r\n compositeKeyToIndexMapping.remove(name);\r\n int lastKey = 0;\r\n if (compositeValues.size() > 0) {\r\n lastKey = compositeValues.lastKey();",
"signature": "void addLastPart(OPPObjectInstance value)"
},
{
"arguments": [
"String key"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkTypeForCompositeOnlyOperations();\r\n checkState((key != null) && (!\"\".equals(key)), \"Key cannot be null or empty.\");\r\n return compositeValues.get(compositeKeyToIndexMapping.get(key));",
"signature": "OPPObjectInstance getPart(String key)"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkTypeForCompositeOnlyOperations();\r\n return compositeValues.get(compositeValues.firstKey());\r\n public OPPObjectInstance getLastPart() {\r\n checkTypeForCompositeOnlyOperations();\r\n return compositeValues.get(compositeValues.lastKey());\r\n public Collection<OPPObjectInstance> getAllParts() {\r\n checkTypeForCompositeOnlyOperations();\r\n return Collections.unmodifiableCollection(compositeValues.values());\r\n public Set<String> getAllPartIndexes() {\r\n checkTypeForCompositeOnlyOperations();\r\n return Collections.unmodifiableSet(compositeKeyToIndexMapping.keySet());\r\n public void removePart(OPPObjectInstance key) {\r\n checkTypeForCompositeOnlyOperations();\r\n checkState(key != null, \"Key cannot be null.\");\r\n switch (key.kind) {\r\n case STRING:\r\n case NUMERICAL:\r\n removePart(key.getStringValue());\r\n break;\r\n case COMPOSITE:\r\n removePart(key.getId());\r\n break;\r\n case JAVA_OBJECT:\r\n throw new OPPRuntimeException(\"Java object keys are not supported.\");",
"signature": "OPPObjectInstance getFirstPart()"
},
{
"arguments": [
"String key"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkTypeForCompositeOnlyOperations();\r\n checkState((key != null) && (\"\".equals(key)), \"Key cannot be null or empty.\");\r\n Integer index = compositeKeyToIndexMapping.get(key);\r\n compositeValues.remove(index);\r\n compositeKeyToIndexMapping.remove(key);",
"signature": "void removePart(String key)"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkTypeForCompositeOnlyOperations();\r\n Integer firstIndex = compositeValues.firstKey();\r\n OPPObjectInstance firstInstance = compositeValues.remove(firstIndex);\r\n compositeKeyToIndexMapping.inverse().remove(firstIndex);\r\n return firstInstance;\r\n public OPPObjectInstance removeLastPart() {\r\n checkTypeForCompositeOnlyOperations();\r\n Integer lastIndex = compositeValues.lastKey();\r\n OPPObjectInstance lastInstance = compositeValues.remove(lastIndex);\r\n compositeKeyToIndexMapping.inverse().remove(lastIndex);\r\n return lastInstance;\r\n if (InstanceKind.STRING.equals(kind) || InstanceKind.NUMERICAL.equals(kind)) {",
"signature": "OPPObjectInstance removeFirstPart()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPRuntimeException.java",
"implementation": "super();",
"signature": "public OPPRuntimeException()"
},
{
"arguments": [
"String message"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPRuntimeException.java",
"implementation": "super(message);",
"signature": "public OPPRuntimeException(String message)"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPBinaryMathOpProcessInstance.java",
"implementation": "switch (this) {\r\n case ADD:\r\n return \"Add\";\r\n case SUBS:\r\n return \"Subtract\";\r\n case MULT:\r\n return \"Multiply\";\r\n case DIV:\r\n return \"Divide\";\r\n case POW:\r\n return \"Power\";",
"signature": "String getName()"
},
{
"arguments": [
"opmObject.kind == InstanceKind.NUMERICAL"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPWriteOPMObjectInstanceToJSON.java",
"implementation": "",
"signature": "else if (opmObject.kind == InstanceKind.NUMERICAL)"
},
{
"arguments": [
"OPPProcessInstance instance",
" Map<String",
" OPPArgument> namedArguments"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "private void loadAnonymousArguments(OPPProcessInstance instance, List<OPPArgument> arguments,\r\n for(OPPArgument argument : arguments) {\r\n Map<String, OPPArgument> namedResults = Maps.newHashMap();\r\n List<OPPArgument> anonymousResult = Lists.newArrayList();\r\n OPPArgument argument = new OPPArgument(analyzer.getObject(resultLink));\r\n throw new OPPRuntimeException(\"Argument modifiers are not supported.\");\r\n List<String> outgoingParametersNames = instance.getOutgoingParameters().stream().map(p -> p.getName())\r\n .collect(Collectors.toList());\r\n setValue(namedResults.get(namedResult), instance.getArgument(namedResult));\r\n // Then extract results where the variable in the instance matches the\r\n // result object\r\n Iterator<OPPArgument> anonymousResultsIterator = anonymousResult.iterator();\r\n OPPArgument argument = anonymousResultsIterator.next();\r\n if(instance.getOutgoingParameters().contains(argument.object.getName())) {\r\n setValue(argument, instance.getArgument(argument.object.getName()));\r\n // Finally, extract all remaining outgoing parameters to the remaining\r\n // anonymous result objects.\r\n for(int i = 0; i < anonymousResult.size(); i++) {\r\n setValue(anonymousResult.get(i), instance.getArgument(outgoingParametersNames.get(i)));\r\n private void setValue(OPPArgument argument, OPPObjectInstance objectInstance) {\r\n if(argument.hasModifier) {\r\n throw new OPPRuntimeException(\"Argument modifiers are not supported.\");\r\n heap.setVariable(argument.object, objectInstance);\r\n private OPPObjectInstance getValue(OPPArgument argument) {\r\n if(!argument.hasModifier) {\r\n throw new OPPRuntimeException(\"Argument modifiers are not supported.\");\r\n /**\r\n * Representation of an argument that is passed to a\r\n * {@link OPPProcessInstance",
"signature": "void loadNamedArguments(OPPProcessInstance instance, Map<String, OPPArgument> namedArguments)"
},
{
"arguments": [
"OPPProcessInstance input"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessExecutableInstance.java",
"implementation": "return instance2ProcessMap.get(input);",
"signature": "OPPProcess apply(OPPProcessInstance input)"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessExecutableInstance.java",
"implementation": "// Collection<OPPObject> parameters =\r\n // analyzer.findIncomingParameters(getOpd());\r\n // for (OPPObject object : parameters) {\r\n // if (getArgument(object.getName()) == null) {\r\n // return false;\r\n //",
"signature": "boolean isReady()"
}
] | [
{
"arguments": [
"String text"
],
"filename": "com.vainolo.phd.opp.editor/src/com/vainolo/phd/opp/editor/figure/OPPProcessFigure.java",
"implementation": "smartLabel.setText(text);",
"signature": "void setText(String text)"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter.tests/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessInstanceHeapTest.java",
"implementation": "createAggregationRelation(obj1, part1);\r\n\r\n heap.setVariable(obj1, inst1);",
"signature": "void assignSimpleInstanceToCompositeObject()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPJavaProcessExecutableInstance.java",
"implementation": "return true;",
"signature": "boolean isReady()"
},
{
"arguments": [
"InstanceType type"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "this.type = type;\r\n // Creation\r\n public static OPPObjectInstance createCompositeInstance() {\r\n return new OPPObjectInstance(InstanceType.COMPOSITE);\r\n public static OPPObjectInstance createCollectionInstace() {\r\n return new OPPObjectInstance(InstanceType.COLLECTION);\r\n OPPObjectInstance instance = new OPPObjectInstance(InstanceType.NUMERICAL);\r\n OPPObjectInstance instance = new OPPObjectInstance(InstanceType.STRING);\r\n switch(existingInstance.type) {\r\n for(Entry<String, OPPObjectInstance> part : existingInstance.getCompositeParts()) {\r\n newInstance.addCompositePart(part.getKey(), createFromExistingInstance(part.getValue()));\r\n case COLLECTION:\r\n newInstance = createCollectionInstace();\r\n for(Integer index : existingInstance.collectionValues.keySet()) {\r\n newInstance.collectionValues.put(index, existingInstance.collectionValues.get(index));\r\n newInstance.collectionNameToIndexMapping.inverse().put(index,\r\n existingInstance.collectionNameToIndexMapping.inverse().get(index));",
"signature": "private OPPObjectInstance(InstanceType type)"
},
{
"arguments": [
"String name",
" OPPObjectInstance part"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkTypeForCompositeOnlyOperations();\r\n checkNotNull(name);\r\n checkNotNull(part);\r\n parts.put(name, part);",
"signature": "void addCompositePart(String name, OPPObjectInstance part)"
},
{
"arguments": [
"String name"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkNotNull(name, \"Part name cannot be null\");\r\n checkArgument(!\"\".equals(name), \"Part name cannot be empty\");\r\n return parts.get(name);\r\n public Set<Entry<String, OPPObjectInstance>> getCompositeParts() {\r\n return Collections.unmodifiableSet(parts.entrySet());",
"signature": "OPPObjectInstance getCompositePart(String name)"
},
{
"arguments": [
"OPPObjectInstance value"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkTypeForCollectionOnlyOperations();\r\n if(collectionValues.size() > 0) {\r\n lastKey = collectionValues.lastKey();\r\n collectionValues.put(newKey, value);\r\n collectionNameToIndexMapping.put(UUID.randomUUID().toString(), newKey);\r\n return newKey;\r\n public void putCollectionElement(String name, OPPObjectInstance value) {\r\n checkTypeForCollectionOnlyOperations();\r\n if(collectionNameToIndexMapping.containsKey(name)) {\r\n collectionValues.remove(collectionNameToIndexMapping.get(name));\r\n collectionNameToIndexMapping.remove(name);\r\n int index = appendCollectionElement(value);\r\n collectionNameToIndexMapping.inverse().remove(index);\r\n collectionNameToIndexMapping.put(name, index);\r\n public void putCollectionElementAtIndex(int index, OPPObjectInstance value) {\r\n checkTypeForCollectionOnlyOperations();\r\n checkNotNull(value, \"Cannot insert a null element to a collection.\");\r\n if(collectionValues.containsKey(index)) {\r\n collectionValues.remove(index);\r\n collectionNameToIndexMapping.inverse().remove(index);",
"signature": "int appendCollectionElement(OPPObjectInstance value)"
},
{
"arguments": [
"String name"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPObjectInstance.java",
"implementation": "checkTypeForCollectionOnlyOperations();\r\n checkState((name != null) && !(\"\".equals(name)), \"Named location of element must not be null or empty.\");\r\n checkState(collectionNameToIndexMapping.containsKey(name), \"Collection does contain a value at index %s.\", name);\r\n return collectionValues.get(collectionNameToIndexMapping.get(name));\r\n public OPPObjectInstance getCollectionElementAtIndex(int index) {\r\n checkTypeForCollectionOnlyOperations();\r\n return collectionValues.get(index);\r\n public OPPObjectInstance getCollectionFirstElement() {\r\n checkTypeForCollectionOnlyOperations();\r\n return collectionValues.get(collectionValues.firstKey());\r\n public OPPObjectInstance getLastCollectionElement() {\r\n checkTypeForCollectionOnlyOperations();\r\n return collectionValues.get(collectionValues.lastKey());\r\n public Collection<OPPObjectInstance> getCollectionAllElements() {\r\n checkTypeForCollectionOnlyOperations();\r\n return Collections.unmodifiableCollection(collectionValues.values());\r\n public Set<String> getCollectionAllIndexes() {\r\n checkTypeForCollectionOnlyOperations();\r\n return Collections.unmodifiableSet(collectionNameToIndexMapping.keySet());\r\n if(InstanceType.STRING.equals(type) || InstanceType.NUMERICAL.equals(type))\r\n else if(InstanceType.COMPOSITE.equals(type)) {\r\n for(String partName : parts.keySet()) {\r\n ret.append(partName + \":\" + parts.get(partName) + \",\");",
"signature": "OPPObjectInstance getCollectionElement(String name)"
},
{
"arguments": [
"String name",
" boolean isCollection"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/OPPParameter.java",
"implementation": "this.isCollection = isCollection;\r\n\r\n public boolean isCollection() {\r\n return isCollection;",
"signature": "public OPPParameter(String name, boolean isCollection)"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPCompareProcessInstance.java",
"implementation": "return (getArgument(\"a\") != null) && (getArgument(\"b\") != null);\r\n public List<OPPParameter> getIncomingParameterNames() {\r\n return Lists.newArrayList(new OPPParameter(\"a\", false), new OPPParameter(\"b\", false));",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPConceptualProcess.java",
"implementation": "return true;",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPCreateObjectProcessInstance.java",
"implementation": "return true;",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPInputProcessInstance.java",
"implementation": "return true;",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPOutputProcessInstance.java",
"implementation": "return getArgument(\"text\") != null;",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPPrintHelloWorldProcessInstance.java",
"implementation": "return true;",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPReadJSONObjectProcessInstance.java",
"implementation": "return getArgument(\"json\") != null;\r\n public List<OPPParameter> getIncomingParameterNames() {\r\n return Lists.newArrayList(new OPPParameter(\"json\", false));",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPSleepProcessInstance.java",
"implementation": "return getArgument(\"time\") != null;",
"signature": "boolean isReady()"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPSubstractProcessInstance.java",
"implementation": "return (getArgument(\"a\") != null) && (getArgument(\"b\") != null);\r\n public List<OPPParameter> getIncomingParameterNames() {\r\n return Lists.newArrayList(new OPPParameter(\"a\", false), new OPPParameter(\"b\", false));",
"signature": "boolean isReady()"
},
{
"arguments": [
"opmObject.type == InstanceType.NUMERICAL"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPWriteOPMObjectInstanceToJSON.java",
"implementation": "",
"signature": "else if(opmObject.type == InstanceType.NUMERICAL)"
},
{
"arguments": [
"opmObject.type == InstanceType.COMPOSITE"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/builtin/OPPWriteOPMObjectInstanceToJSON.java",
"implementation": "public boolean isReady() {\r\n return getArgument(\"object\") != null;\r\n public List<OPPParameter> getIncomingParameterNames() {\r\n return Lists.newArrayList(new OPPParameter(\"object\", false));",
"signature": "else if(opmObject.type == InstanceType.COMPOSITE)"
},
{
"arguments": [
"OPPParameter input"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "return input.getName();",
"signature": "String apply(OPPParameter input)"
},
{
"arguments": [
"OPPProcessInstance instance",
" Map<String",
" OPMArgument> namedArguments"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "private void loadAnonymousArguments(OPPProcessInstance instance, List<OPMArgument> arguments,\r\n for(OPMArgument argument : arguments) {\r\n Map<String, OPMArgument> namedResults = Maps.newHashMap();\r\n List<OPMArgument> anonymousResult = Lists.newArrayList();\r\n OPMArgument argument = new OPMArgument(analyzer.getObject(resultLink));\r\n argument.isCollectionElement = true;\r\n String argName = resultLink.getCenterDecoration().split(\",\")[0];\r\n String collectionReference = resultLink.getCenterDecoration().split(\",\")[1];\r\n if(valueAnalyzer.isNumericalLiteral(collectionReference)) {\r\n argument.collectionElementIndex = valueAnalyzer.parseNumericalLiteral(collectionReference);",
"signature": "void loadNamedArguments(OPPProcessInstance instance, Map<String, OPMArgument> namedArguments)"
},
{
"arguments": [
"OPPParameter input"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "return input.getName();",
"signature": "String apply(OPPParameter input)"
},
{
"arguments": [
"OPMArgument argument",
" OPPObjectInstance value"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "OPPObjectInstance currentValue = heap.getVariable(argument.object);\r\n if(currentValue == null) {\r\n currentValue = OPPObjectInstance.createCollectionInstace();",
"signature": "void setCollectionElementValue(OPMArgument argument, OPPObjectInstance value)"
},
{
"arguments": [
"argument.collectionElementIndex != null"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "currentValue.putCollectionElementAtIndex(argument.collectionElementIndex.intValue(), value);",
"signature": "else if(argument.collectionElementIndex != null)"
},
{
"arguments": [
"OPMArgument argument"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "if(!argument.isCollectionElement) {\r\n OPPObjectInstance instance = heap.getVariable(argument.object);\r\n if(argument.collectionElementName != null) {\r\n return instance.getCollectionElement(argument.collectionElementName);",
"signature": "OPPObjectInstance getValue(OPMArgument argument)"
},
{
"arguments": [
"argument.collectionElementIndex != null"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessArgumentHandler.java",
"implementation": "return instance.getCollectionElementAtIndex(argument.collectionElementIndex.intValue());",
"signature": "else if(argument.collectionElementIndex != null)"
},
{
"arguments": [
"OPPProcessInstance input"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessExecutableInstance.java",
"implementation": "return mapping.get(input);",
"signature": "OPPProcess apply(OPPProcessInstance input)"
},
{
"arguments": [],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessExecutableInstance.java",
"implementation": "Collection<OPPObject> parameters = analyzer.findIncomingParameters(getOpd());\r\n for(OPPObject object : parameters) {\r\n if(getArgument(object.getName()) == null) {\r\n return false;",
"signature": "boolean isReady()"
},
{
"arguments": [
"OPPObject source",
" OPPObject target"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessInstanceHeap.java",
"implementation": "if((source.isCollection() && target.isCollection()) || (!source.isCollection() && !target.isCollection())) {\r\n setVariable(target, getVariable(source));",
"signature": "void transferDataWithNoReferences(OPPObject source, OPPObject target)"
},
{
"arguments": [
"OPPObject source",
" String reference"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessInstanceHeap.java",
"implementation": "OPPObjectInstance sourceValue = null;\r\n if(valueAnalyzer.isNumericalLiteral(reference)) {\r\n int sourceIndex = valueAnalyzer.parseNumericalLiteral(reference).intValue();\r\n sourceValue = getVariable(source).getCollectionElementAtIndex(sourceIndex);",
"signature": "OPPObjectInstance getCollectionValueUsingReference(OPPObject source, String reference)"
},
{
"arguments": [
"OPPObjectInstance value",
" String reference",
"\r\n OPPObject targetCollection"
],
"filename": "com.vainolo.phd.opp.interpreter/src/com/vainolo/phd/opp/interpreter/inzoomedprocessinstance/OPPInZoomedProcessInstanceHeap.java",
"implementation": "OPPObjectInstance targetValue = getVariable(targetCollection);\r\n if(targetValue == null) {\r\n targetValue = OPPObjectInstance.createCollectionInstace();",
"signature": "OPPObjectInstance putValueInCollectionUsingReference(OPPObjectInstance value, String reference,\r\n OPPObject targetCollection)"
},
{
"arguments": [
"String uri"
],
"filename": "com.vainolo.phd.opp.utilities/src/com/vainolo/phd/opp/utilities/OPPFileUtils.java",
"implementation": "// OPMObjectProcessDiagram opd;\r\n // final ResourceSet resourceSet = new ResourceSetImpl();\r\n // resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()\r\n // .put(Resource.Factory.Registry.DEFAULT_EXTENSION, new\r\n // XMIResourceFactoryImpl());\r\n // final Resource opdResource =\r\n // resourceSet.createResource(URI.createURI(uri));\r\n // try {\r\n // opdResource.load(null);\r\n // opd = (OPMObjectProcessDiagram) opdResource.getContents().get(0);\r\n //",
"signature": "OPMObjectProcessDiagram loadOPDFile(String uri)"
},
{
"arguments": [
"OPMObjectProcessDiagram opd"
],
"filename": "com.vainolo.phd.opp.utilities/src/com/vainolo/phd/opp/utilities/OPPFileUtils.java",
"implementation": "// OPMProcess process = OPMFactory.eINSTANCE.createOPMProcess();\r\n // process.setId(1);\r\n // process.setName(\"\");\r\n // process.setConstraints(new Rectangle(200, 100, 100, 100));\r\n // opd.getNodes().add(process);\r\n // opd.setLastKnownUsedId(1);\r\n //",
"signature": "void createInitialProcessNode(OPMObjectProcessDiagram opd)"
},
{
"arguments": [
"OPMObjectProcessDiagram opd",
"\r\n // String name"
],
"filename": "com.vainolo.phd.opp.utilities/src/com/vainolo/phd/opp/utilities/OPPFileUtils.java",
"implementation": "// OPMObject object = OPMFactory.eINSTANCE.createOPMObject();\r\n // object.setId(1);\r\n // object.setName(name);\r\n // object.setConstraints(new Rectangle(200, 100, 100, 100));\r\n // opd.getNodes().add(object);\r\n // opd.setLastKnownUsedId(1);\r\n //",
"signature": "void createInitialObjectNode(OPMObjectProcessDiagram opd,\r\n // String name)"
},
{
"arguments": [
"OPPObject object"
],
"filename": "com.vainolo.phd.opp.utilities/src/com/vainolo/phd/opp/utilities/analysis/OPPOPDAnalyzer.java",
"implementation": "Collection<OPPLink> outgoingStructuralLinks = findOutgoingStructuralLinks(object);\r\n for(OPPLink link : outgoingStructuralLinks) {\r\n OPPStructuralLinkAggregator target = OPPStructuralLinkAggregator.class.cast(link.getTarget());\r\n if(target.getKind().equals(OPPStructuralLinkAggregatorKind.AGGREGATION)) {\r\n return true;",
"signature": "boolean isObjectComposite(OPPObject object)"
},
{
"arguments": [
"OPPObject object"
],
"filename": "com.vainolo.phd.opp.utilities/src/com/vainolo/phd/opp/utilities/analysis/OPPOPDAnalyzer.java",
"implementation": "return object.isCollection();",
"signature": "boolean isObjectCollection(OPPObject object)"
}
] |
c95c809a55005b44b05f0c496e4a3fd75a26be91 | [
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/BundleActionBean.java",
"implementation": "return null;",
"signature": "JSONObject toJSONObject()"
},
{
"arguments": [
"String timeZoneId"
],
"filename": "core/src/main/java/org/apache/oozie/BundleActionBean.java",
"implementation": "return null;",
"signature": "JSONObject toJSONObject(String timeZoneId)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/command/bundle/BundleJobResumeXCommand.java",
"implementation": "for (BundleActionBean action : bundleActions) {\n if (action.getStatus() == Job.Status.SUSPENDED || action.getStatus() == Job.Status.SUSPENDEDWITHERROR || action.getStatus() == Job.Status.PREPSUSPENDED) {\n // queue a CoordResumeXCommand\n if (action.getCoordId() != null) {\n queue(new CoordResumeXCommand(action.getCoordId()));\n updateBundleAction(action);\n LOG.debug(\"Resume bundle action = [{0",
"signature": "void resumeChildren()"
},
{
"arguments": [
"BundleActionBean action"
],
"filename": "core/src/main/java/org/apache/oozie/command/bundle/BundleJobResumeXCommand.java",
"implementation": "updateList.add(action);\n public void updateJob() {\n updateList.add(bundleJob);",
"signature": "void updateBundleAction(BundleActionBean action)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/command/bundle/BundleJobSuspendXCommand.java",
"implementation": "updateList.add(bundleJob);\n for (BundleActionBean action : this.bundleActions) {\n if (action.getStatus() == Job.Status.RUNNING || action.getStatus() == Job.Status.RUNNINGWITHERROR\n || action.getStatus() == Job.Status.PREP || action.getStatus() == Job.Status.PAUSED\n || action.getStatus() == Job.Status.PAUSEDWITHERROR) {\n // queue a CoordSuspendXCommand\n if (action.getCoordId() != null) {\n queue(new CoordSuspendXCommand(action.getCoordId()));\n updateBundleAction(action);\n LOG.debug(\"Suspend bundle action = [{0",
"signature": "void updateJob()"
},
{
"arguments": [
"BundleActionBean action"
],
"filename": "core/src/main/java/org/apache/oozie/command/bundle/BundleKillXCommand.java",
"implementation": "updateList.add(action);\n public void updateJob() {\n updateList.add(bundleJob);",
"signature": "void updateBundleAction(BundleActionBean action)"
},
{
"arguments": [
"BundleActionBean action"
],
"filename": "core/src/main/java/org/apache/oozie/command/bundle/BundleRerunXCommand.java",
"implementation": "updateList.add(action);\n public void updateJob() {\n // rerun a paused bundle job will keep job status at paused and pending at previous pending\n if (getPrevStatus() != null) {\n Job.Status bundleJobStatus = getPrevStatus();\n if (bundleJobStatus.equals(Job.Status.PAUSED) || bundleJobStatus.equals(Job.Status.PAUSEDWITHERROR)) {\n bundleJob.setStatus(bundleJobStatus);\n if (prevPending) {\n bundleJob.setPending();",
"signature": "void updateBundleAction(BundleActionBean action)"
},
{
"arguments": [
"CoordinatorJobBean job",
" CoordinatorStore store"
],
"filename": "core/src/main/java/org/apache/oozie/command/coord/CoordActionMaterializeCommand.java",
"implementation": "updateList.add(job);\n JPAService jpaService = Services.get().get(JPAService.class);\n if (jpaService != null) {\n try {\n jpaService.execute(new BulkUpdateInsertJPAExecutor(updateList, insertList));",
"signature": "void updateJobTable(CoordinatorJobBean job, CoordinatorStore store)"
},
{
"arguments": [
"CoordinatorActionBean action",
" boolean makePending"
],
"filename": "core/src/main/java/org/apache/oozie/command/coord/CoordKillXCommand.java",
"implementation": "updateList.add(action);\n if (actionList != null) {\n for (CoordinatorActionBean action : actionList) {\n // queue a WorkflowKillXCommand to delete the workflow job and actions\n if (action.getExternalId() != null) {\n queue(new KillXCommand(action.getExternalId()));\n // As the kill command for children is queued, set pending flag for coord action to be true\n updateCoordAction(action, true);\n LOG.debug(\n \"Killed coord action = [{0",
"signature": "void updateCoordAction(CoordinatorActionBean action, boolean makePending)"
},
{
"arguments": [
"slaEvent != null"
],
"filename": "core/src/main/java/org/apache/oozie/command/coord/CoordMaterializeTransitionXCommand.java",
"implementation": "insertList.add(slaEvent);",
"signature": "coordJob\n if(slaEvent != null)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/command/coord/CoordRerunXCommand.java",
"implementation": "if (getPrevStatus()!= null){\n Job.Status coordJobStatus = getPrevStatus();\n if(coordJobStatus.equals(Job.Status.PAUSED) || coordJobStatus.equals(Job.Status.PAUSEDWITHERROR)) {\n coordJob.setStatus(coordJobStatus);\n if (prevPending) {\n coordJob.setPending();",
"signature": "void updateJob()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/command/coord/CoordResumeXCommand.java",
"implementation": "updateList.add(coordJob);\n updateList.add(coordJob);\n /* (non-Javadoc)\n * @see org.apache.oozie.command.ResumeTransitionXCommand#performWrites()\n */\n @Override\n public void performWrites() throws CommandException {\n jpaService.execute(new BulkUpdateInsertForCoordActionStatusJPAExecutor(updateList, null));\n private void updateCoordAction(CoordinatorActionBean action) {\n action.setStatus(CoordinatorActionBean.Status.RUNNING);\n action.incrementAndGetPending();\n action.setLastModifiedTime(new Date());\n updateList.add(action);",
"signature": "void updateJob()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/command/coord/CoordSuspendXCommand.java",
"implementation": "updateList.add(coordJob);",
"signature": "void updateJob()"
},
{
"arguments": [
"String name",
" String type",
" int priority",
" int logMask",
" boolean withStore"
],
"filename": "core/src/main/java/org/apache/oozie/command/coord/CoordinatorCommand.java",
"implementation": "super(name, type, priority, logMask, withStore);",
"signature": "public CoordinatorCommand(String name, String type, int priority, int logMask, boolean withStore)"
}
] | [
{
"arguments": [
"String bundleId"
],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/BundleActionsDeleteForPurgeJPAExecutor.java",
"implementation": "ParamChecker.notNull(bundleId, \"bundleId\");\n this.bundleId = bundleId;",
"signature": "public BundleActionsDeleteForPurgeJPAExecutor(String bundleId)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/BundleActionsDeleteForPurgeJPAExecutor.java",
"implementation": "return \"BundleActionsDeleteForPurgeJPAExecutor\";",
"signature": "String getName()"
},
{
"arguments": [
"String bundleJobId"
],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/BundleJobDeleteJPAExecutor.java",
"implementation": "ParamChecker.notEmpty(bundleJobId, \"bundleJobId\");\n this.bundleJobId = bundleJobId;",
"signature": "public BundleJobDeleteJPAExecutor(String bundleJobId)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/BundleJobDeleteJPAExecutor.java",
"implementation": "return \"BundleJobDeleteJPAExecutor\";",
"signature": "String getName()"
},
{
"arguments": [
"CoordinatorActionBean coordAction"
],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/CoordActionUpdateForStartJPAExecutor.java",
"implementation": "ParamChecker.notNull(coordAction, \"coordAction\");\n this.coordAction = coordAction;",
"signature": "public CoordActionUpdateForStartJPAExecutor(CoordinatorActionBean coordAction)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/CoordActionUpdateForStartJPAExecutor.java",
"implementation": "return \"CoordActionUpdateForStartJPAExecutor\";",
"signature": "String getName()"
},
{
"arguments": [
"String coordJobId"
],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/CoordActionsDeleteForPurgeJPAExecutor.java",
"implementation": "ParamChecker.notNull(coordJobId, \"coordJobId\");\n this.coordJobId = coordJobId;",
"signature": "public CoordActionsDeleteForPurgeJPAExecutor(String coordJobId)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/CoordActionsDeleteForPurgeJPAExecutor.java",
"implementation": "return \"CoordActionsDeleteForPurgeJPAExecutor\";",
"signature": "String getName()"
},
{
"arguments": [
"String wfId"
],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/WorkflowActionsDeleteForPurgeJPAExecutor.java",
"implementation": "ParamChecker.notNull(wfId, \"wfId\");\n this.wfId = wfId;",
"signature": "public WorkflowActionsDeleteForPurgeJPAExecutor(String wfId)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/oozie/executor/jpa/WorkflowActionsDeleteForPurgeJPAExecutor.java",
"implementation": "return \"WorkflowActionsDeleteForPurgeJPAExecutor\";",
"signature": "String getName()"
}
] |
cbf0cac3f03c8dffbc415eab1421234dfc3ead24 | [
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/BulkLoad.java",
"implementation": "try {\n\t\tPath input = new Path(args[0]);\n\t\tString outputPath = args[2];\n\t\tPath resourceIds = new Path(outputPath+TripleToResource.RESOURCE_IDS_DIR);\n\t\tPath convertedTripletsPath = new Path(outputPath+ResourceToTriple.TEMP_TRIPLETS_DIR);\n\t\t\n\t\tPath string2IdInput = new Path(outputPath+TripleToResource.ID2STRING_DIR);\n\t\tPath string2IdOutput = new Path(outputPath+StringIdAssoc.STRING2ID_DIR);\n\t\t\n\t\tHBaseConnection con = new HBaseConnection(HBaseConnection.JAVA_API);\n\t\tHBPrefixMatchSchema.createCounterTable(con.getAdmin());\n\t\t\n\t\tlong start = System.currentTimeMillis();\n\t\t\n\t\tJob j1 = createTripleToResourceJob(input, resourceIds, Integer.parseInt(args[1]));\n\t\tj1.getConfiguration().set(\"outputPath\", outputPath);\n\t\tj1.waitForCompletion(true);\n\t\t\n\t\tlong firstJob = System.currentTimeMillis()-start;\n\t\tSystem.out.println(\"First pass finished in \"+firstJob+\" ms\");\n\t\t\n\t\t//retrieve counter values and build a SortedMap\n\t\tretrieveCounters(j1);\n\t\tlong startPartition = HBPrefixMatchSchema.updateLastCounter(tripleToResourceReduceTasks, con.getConfiguration())+1;",
"signature": "void main(String[] args)"
},
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/BulkLoad.java",
"implementation": "try {\n\t\t\tif (args.length != 5){\n\t\t\t\tSystem.out.println(\"Usage: bulkLoad <inputPath> <inputSizeEstimate in MB> <outputPath> <schemaSuffix> <onlyTriples(true/false)>\");\n\t\t\t\treturn;",
"signature": "void main(String[] args)"
},
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/BulkLoad.java",
"implementation": "input = new Path(args[0]);\n\t\tinputEstimateSize = Integer.parseInt(args[1]);\n\t\toutputPath = args[2];\n\t\tschemaSuffix = args[3];\n\t\tonlyTriples = Boolean.parseBoolean(args[4]);",
"signature": "void initializeLocalVariables(String[] args)"
},
{
"arguments": [
"Context context",
" Value literal"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/TripleToResource.java",
"implementation": "byte []bytes = literal.stringValue().getBytes();\n\t\t\t\tcontext.getCounter(HISTOGRAM_GROUP, \n\t\t\t\t\t\tString.format(\"%02x\", (short)bytes[bytes.length-1] & 0xfe)).increment(1);",
"signature": "void updateHistogram(Context context, Value literal)"
},
{
"arguments": [
"DataPair dataPair : values"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/TripleToResource.java",
"implementation": "context.write(newId, dataPair);\n\t\t\t\tcatch(NumericalRangeException e){\n\t\t\t\t\tSystem.err.println(\"Numerical not in expected range: \"+e.getMessage());\n\t\t\t\t\tcontext.getCounter(EXCEPTION_GROUP, \"RangeExceptions\").increment(1);\n\t\t\t\t\treturn;",
"signature": "elements\n\t\t\t\t\tfor (DataPair dataPair : values)"
},
{
"arguments": [
"Context context",
" Value elem"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/TripleToResource.java",
"implementation": "increaseNonLiteralCounters(elem, context);\n\t\t\t\treturn new TypedId(partitionId, localRowCount);",
"signature": "TypedId handleNonLiteral(Context context, Value elem)"
},
{
"arguments": [
"Value elem",
" Context context"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/TripleToResource.java",
"implementation": "if (elem instanceof BNode){\n\t\t\t\t\tcontext.getCounter(ELEMENT_TYPE_GROUP, \"Blanks\").increment(1);",
"signature": "void increaseNonLiteralCounters(Value elem, Context context)"
},
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/TripleToResource.java",
"implementation": "Job j1;\n\t\ttry {\n\t\t\t//Path p = new Path(new Path(\"/test1\"), new Path(ID2STRING_DIR));\n\t\t\t//System.out.println(p);\n\t\t\n\t\t\tif (args.length != 3){\n\t\t\t\tSystem.out.println(\"Usage: TripleToResource <inputPath> <inputSizeEstimate in MB> <outputPath>\");\n\t\t\t\treturn;",
"signature": "void main(String[] args)"
},
{
"arguments": [
"int i = 0; i < numSplits.length; i++"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/schema/HBPrefixMatchSchema.java",
"implementation": "splits[i+nonNumSplits.length+1] = numSplits[i];",
"signature": "splits\n\t\t\tfor (int i = 0; i < numSplits.length; i++)"
},
{
"arguments": [
"byte [][]splits"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/schema/HBPrefixMatchSchema.java",
"implementation": "System.out.println(\"Number of splits: \"+splits.length);\n\t\tfor (int i = 0; i < splits.length; i++) {\n\t\t\tfor (int j = 0; j < splits[i].length; j++) {\n\t\t\t\tSystem.out.print(String.format(\"%02x \", splits[i][j]));",
"signature": "void printSplits(byte [][]splits)"
},
{
"arguments": [
"BigInteger range",
" BigInteger startAddress",
" long chunkCount",
" long totalCount "
],
"filename": "src/main/java/nl/vu/datalayer/hbase/schema/HBPrefixMatchSchema.java",
"implementation": "/*public static byte [] convertBigIntegerToAddress(BigInteger address, int length){",
"signature": "BigInteger getAddress(BigInteger range, BigInteger startAddress, long chunkCount, long totalCount )"
},
{
"arguments": [],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "throws IOException {//we expect the pattern in the order SPOC\t\n\t\t\tretrievalInit();\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\tbyte[] startKey = buildRangeScanKeyFromQuad(quad);\n\t\t\tlong keyBuildOverhead = System.currentTimeMillis()-start;\n\t\t\tlong startSearch = System.currentTimeMillis();\n\t\t\tArrayList<Get> batchIdGets = doRangeScan(startKey);\n\t\t\tstart = System.currentTimeMillis();\n\t\t\tResult[] id2StringResults = doBatchId2String(batchIdGets);\n\t\t\tSystem.out.println(\"Search time: \"+searchTime+\"; Id2StringOverhead: \"+id2StringOverhead+\"; String2IdOverhead: \"\n\t\t\t\t\t\t\t\t\t+string2IdOverhead+\"; KeyBuildOverhead: \"+keyBuildOverhead);\n\t\t\tupdateId2ValueMap(id2StringResults);\t\t\t\n\t\t\treturn buildSPOCOrderResults();\n\t\t\n\t\t\tSystem.err.println(\"Bound variable numerical not in expected range: \"+e.getMessage());\n\t\t\treturn null;",
"signature": "void buildPattern2TableHashMap()"
},
{
"arguments": [
"ArrayList<Value> newQuadResult"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "for (int i = 0, j = 0; i<newQuadResult.size() && j<boundElements.size(); i++) {\n\t\t\tif (newQuadResult.get(i) == null){\n\t\t\t\tnewQuadResult.set(i, boundElements.get(j++));",
"signature": "void fillInBoundElements(ArrayList<Value> newQuadResult)"
},
{
"arguments": [
"int queryElemNo",
" ArrayList<ByteArray> quadList",
" ArrayList<Value> newQuadResult"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "for (int i = 0; i < quadList.size(); i++) {\n\t\t\tif ((i+queryElemNo) == HBPrefixMatchSchema.ORDER[currentTableIndex][2] && \n\t\t\t\t\tTypedId.getType(quadList.get(i).getBytes()[0]) == TypedId.NUMERICAL){\n\t\t\t\t//handle numericals\n\t\t\t\tTypedId id = new TypedId(quadList.get(i).getBytes());\n\t\t\t\tnewQuadResult.set(2, id.toLiteral());",
"signature": "void fillInUnboundElements(int queryElemNo, ArrayList<ByteArray> quadList, ArrayList<Value> newQuadResult)"
},
{
"arguments": [],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "id2ValueMap.clear();\n\t\tquadResults.clear();\n\t\tboundElements.clear();\n\t\tid2StringOverhead = 0;\n\t\tstring2IdOverhead = 0;",
"signature": "void retrievalInit()"
},
{
"arguments": [
"String val"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "",
"signature": "Value convertStringToValue(String val)"
}
] | [
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/BulkLoad.java",
"implementation": "try {\n\t\tPath input = new Path(args[0]);\n\t\tString outputPath = args[2];\n\t\tPath resourceIds = new Path(outputPath+TripleToResource.RESOURCE_IDS_DIR);\n\t\tPath convertedTripletsPath = new Path(outputPath+ResourceToTriple.TEMP_TRIPLETS_DIR);\n\t\t\n\t\tPath string2IdInput = new Path(outputPath+TripleToResource.ID2STRING_DIR);\n\t\tPath string2IdOutput = new Path(outputPath+StringIdAssoc.STRING2ID_DIR);\n\t\t\n\t\tHBaseConnection con = new HBaseConnection(HBaseConnection.JAVA_API);\n\t\tHBPrefixMatchSchema.createCounterTable(con.getAdmin());\n\t\t\n\t\tlong start = System.currentTimeMillis();\n\t\t\n\t\tJob j1 = createTripleToResourceJob(input, resourceIds, Integer.parseInt(args[1]));\n\t\tj1.getConfiguration().set(\"outputPath\", outputPath);\n\t\tj1.waitForCompletion(true);\n\t\tlong firstJob = System.currentTimeMillis()-start;\n\t\tSystem.out.println(\"First pass finished in \"+firstJob+\" ms\");\n\t\t\n\t\t//retrieve counter values and build a SortedMap\n\t\tretrieveCounters(j1);\n\t\tlong startPartition = HBPrefixMatchSchema.updateLastCounter(tripleToResourceReduceTasks, con.getConfiguration())+1;",
"signature": "void main(String[] args)"
},
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/BulkLoad.java",
"implementation": "try {\n\t\t\tif (args.length != 5){\n\t\t\t\tSystem.out.println(\"Usage: bulkLoad <inputPath> <inputSizeEstimate in MB> <outputPath> <schemaSuffix> <onlyTriples(true/false)>\");\n\t\t\t\treturn;\n\t\t\t\n\t\t\tPath input = new Path(args[0]);\n\t\t\tString outputPath = args[2];\n\t\t\tschemaSuffix = args[3];\n\t\t\tboolean onlyTriples = Boolean.parseBoolean(args[4]); \n\t\t\t\n\t\t\tPath resourceIds = new Path(outputPath+TripleToResource.RESOURCE_IDS_DIR);\n\t\t\tPath convertedTripletsPath = new Path(outputPath+ResourceToTriple.TEMP_TRIPLETS_DIR);\n\t\t\t\n\t\t\tPath string2IdInput = new Path(outputPath+TripleToResource.ID2STRING_DIR);\n\t\t\tPath string2IdOutput = new Path(outputPath+StringIdAssoc.STRING2ID_DIR);\n\t\t\t\n\t\t\tNativeJavaConnection con = (NativeJavaConnection)HBaseConnection.create(HBaseConnection.NATIVE_JAVA);\n\t\t\tHBPrefixMatchSchema prefMatchSchema = new HBPrefixMatchSchema(con, schemaSuffix);\n\t\t\tprefMatchSchema.createCounterTable(con.getAdmin());\n\t\t\t\n\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\n\t\t\tJob j1 = createTripleToResourceJob(input, resourceIds, Integer.parseInt(args[1]));//TODO\n\t\t\tj1.getConfiguration().set(\"outputPath\", outputPath);\n\t\t\tj1.getConfiguration().set(\"schemaSuffix\", schemaSuffix);\n\t\t\tj1.waitForCompletion(true);\n\t\t\t\n\t\t\tlong firstJob = System.currentTimeMillis()-start;\n\t\t\tSystem.out.println(\"First pass finished in \"+firstJob+\" ms\");\n\t\t\t\n\t\t\t//retrieve counter values and build a SortedMap\n\t\t\tretrieveCounters(j1);//TODO\n\t\t\tlong startPartition = HBPrefixMatchSchema.updateLastCounter(tripleToResourceReduceTasks, con.getConfiguration(), schemaSuffix)+1;//TODO\n\t\t\t//long startPartition = HBPrefixMatchSchema.getLastCounter(con.getConfiguration())+1;\n\t\t\t\n\t\t\t\n\t\t\t//SECOND PASS-----------------------------------------------\t\n\t\t\t\n\t\t\tJob j2 = createResourceToTripleJob(resourceIds, convertedTripletsPath);\t\n\t\t\tj2.waitForCompletion(true);\n\t\t\t\n\t\t\tSystem.out.println(\"Second pass finished\");\n\t\t\t\n\t\t\t//read counters from file\n\t\t\t//buildCountersFromFile();\n\t\t\t//create all tables containing PrefixMatch schema ----------------------\n\t\t\tSystem.out.println(totalStringCount+\" : \"+numericalCount);\n\t\t\t\t\t\n\t\t\tprefMatchSchema.setTableSplitInfo(totalStringCount, numericalCount, \n\t\t\t\t\ttripleToResourceReduceTasks, startPartition, sufixCounters, \n\t\t\t\t\tonlyTriples);\n\t\t\tprefMatchSchema.create();\n\t\t\t\n\t\t\tLoadIncrementalHFiles bulkLoad = new LoadIncrementalHFiles(con.getConfiguration());\n\t\t\t\n\t\t\t//String2Id PASS----------------------------------------------\n\t\t\t\t\t\n\t\t\tJob j3 = createString2IdJob(con, string2IdInput, string2IdOutput);\n\t\t\tj3.waitForCompletion(true);\n\t\t\t\n\t\t\t//string2Id = con.getTable(HBPrefixMatchSchema.STRING2ID);\n\t\t\tdoBulkLoad(bulkLoad, string2IdOutput, string2Id);\n\t\t\t\n\t\t\tSystem.out.println(\"Finished bulk load for String2Id table\");//=====================//=============\n\t\t\t\n\t\t\tPath id2StringOutput = new Path(outputPath+StringIdAssoc.ID2STRING_DIR);\n\t\t\tJob j4 = createId2StringJob(con, string2IdInput, id2StringOutput);\n\t\t\tj4.waitForCompletion(true);\n\t\t\t\n\t\t\tdoBulkLoad(bulkLoad, id2StringOutput, id2String);\n\t\t\t\n\t\t\tSystem.out.println(\"Finished bulk load for Id2String table\");//=====================//==================================\n\t\t\t\n\t\t\tPath spocPath = new Path(outputPath+\"/\"+HBPrefixMatchSchema.TABLE_NAMES[HBPrefixMatchSchema.SPOC]);\n\t\t\tPath pocsPath = new Path(outputPath+\"/\"+HBPrefixMatchSchema.TABLE_NAMES[HBPrefixMatchSchema.POCS]);\n\t\t\tPath ospcPath = new Path(outputPath+\"/\"+HBPrefixMatchSchema.TABLE_NAMES[HBPrefixMatchSchema.OSPC]);\n\t\t\t\n\t\t\t//SPOC--------------------\n\t\t\tJob j5 = createPrefixMatchJob(con, convertedTripletsPath, spocPath, HBPrefixMatchSchema.SPOC, PrefixMatch.PrefixMatchSPOCMapper.class);\n\t\t\tj5.waitForCompletion(true);\n\t\t\t\n\t\t\tdoBulkLoad(bulkLoad, spocPath, currentTable);\n\t\t\tif (onlyTriples == false){//the table with prefix context\n\t\t\t\tPath cspoPath = new Path(outputPath+\"/\"+HBPrefixMatchSchema.TABLE_NAMES[HBPrefixMatchSchema.CSPO]);\n\t\t\t\tPath cpsoPath = new Path(outputPath+\"/\"+HBPrefixMatchSchema.TABLE_NAMES[HBPrefixMatchSchema.CPSO]);\n\t\t\t\tPath ocspPath = new Path(outputPath+\"/\"+HBPrefixMatchSchema.TABLE_NAMES[HBPrefixMatchSchema.OCSP]);\n\t\t\t\t\n\t\t\t\t//CSPO----------------------\n\t\t\t\tJob j7 = createPrefixMatchJob(con, convertedTripletsPath, cspoPath, HBPrefixMatchSchema.CSPO, PrefixMatch.PrefixMatchCSPOMapper.class);\n\t\t\t\tj7.waitForCompletion(true);\n\t\t\t\t\n\t\t\t\tdoBulkLoad(bulkLoad, cspoPath, currentTable);\n\t\t\t\t\n\t\t\t\t//CPSO-------------------------\n\t\t\t\tJob j8 = createPrefixMatchJob(con, convertedTripletsPath, cpsoPath, HBPrefixMatchSchema.CPSO, PrefixMatch.PrefixMatchCPSOMapper.class);\n\t\t\t\tj8.waitForCompletion(true);\n\t\t\t\t\n\t\t\t\tdoBulkLoad(bulkLoad, cpsoPath, currentTable);\n\t\t\t\t\n\t\t\t\t//OCSP--------------------------\t\t\t\n\t\t\t\tJob j9 = createPrefixMatchJob(con, convertedTripletsPath, ocspPath, HBPrefixMatchSchema.OCSP, PrefixMatch.PrefixMatchOCSPMapper.class);\n\t\t\t\tj9.waitForCompletion(true);\n\t\t\t\t\n\t\t\t\tdoBulkLoad(bulkLoad, ocspPath, currentTable);",
"signature": "void main(String[] args)"
},
{
"arguments": [
"Context context",
" String literal"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/TripleToResource.java",
"implementation": "if (literal.endsWith(\"\\\"\")){\n\t\t\t\t\tcontext.getCounter(HISTOGRAM_GROUP, String.format(\"%02x\", (short)literal.getBytes()[literal.getBytes().length-2] & 0xfe)).increment(1);",
"signature": "void updateHistogram(Context context, String literal)"
},
{
"arguments": [
"DataPair dataPair : values"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/bulkload/TripleToResource.java",
"implementation": "context.write(newId, dataPair);",
"signature": "elements\n\t\t\t\tfor (DataPair dataPair : values)"
},
{
"arguments": [
"BigInteger range",
" BigInteger startAddress",
" long chunkCount",
" long totalCount "
],
"filename": "src/main/java/nl/vu/datalayer/hbase/schema/HBPrefixMatchSchema.java",
"implementation": "public static byte [] convertBigIntegerToAddress(BigInteger address, int length){",
"signature": "BigInteger getAddress(BigInteger range, BigInteger startAddress, long chunkCount, long totalCount )"
},
{
"arguments": [
"byte [][]splits"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/schema/HBPrefixMatchSchema.java",
"implementation": "System.out.println(\"Number of splits: \"+splits.length);\n\t\tfor (int i = 0; i < splits.length; i++) {\n\t\t\tfor (int j = 0; j < splits[i].length; j++) {\n\t\t\t\tSystem.out.print(String.format(\"%02x \", splits[i][j]));",
"signature": "void printSplits(byte [][]splits)"
},
{
"arguments": [],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "throws IOException {//we expect the pattern in the order SPOC\n\t\t\n\t\t\tid2ValueMap.clear();\n\t\t\tquadResults.clear();\n\t\t\tboundElements.clear();\n\t\t\tid2StringOverhead = 0;\n\t\t\tbyte[] startKey = buildKey(quad);\n\t\t\tif (startKey == null) {\n\t\t\t\treturn new ArrayList<ArrayList<Value>>();",
"signature": "void buildHashMap()"
},
{
"arguments": [
"Result result : id2StringResults"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "byte []rowVal = result.getValue(HBPrefixMatchSchema.COLUMN_FAMILY, HBPrefixMatchSchema.COLUMN_NAME);\n\t\t\t\tbyte []rowKey = result.getRow();\n\t\t\t\tif (rowVal == null || rowKey == null){\n\t\t\t\t\tSystem.err.println(\"Id not found: \"+(rowKey == null ? null : hexaString(rowKey)));",
"signature": "strings\n\t\t\tfor (Result result : id2StringResults)"
},
{
"arguments": [
"String val"
],
"filename": "src/main/java/nl/vu/datalayer/hbase/util/HBPrefixMatchUtil.java",
"implementation": "",
"signature": "Value convertStringToValue(String val)"
}
] |
cddfa1a013f7c6f02e6e496b211ac6da552641e7 | [
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/model/runtime/impl/RuntimeMetadataFactoryImpl.java",
"implementation": "TimeTriggerImpl timeTrigger = new TimeTriggerImpl();\n\t\treturn timeTrigger;",
"signature": "TimeTrigger createTimeTrigger()"
},
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/model/runtime/impl/RuntimeMetadataPackageImpl.java",
"implementation": "return timeTriggerEClass;",
"signature": "EClass getTimeTrigger()"
},
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/model/runtime/impl/RuntimeMetadataPackageImpl.java",
"implementation": "return (EAttribute)timeTriggerEClass.getEStructuralFeatures().get(0);",
"signature": "EAttribute getTimeTrigger_Period()"
},
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/model/runtime/impl/RuntimeMetadataPackageImpl.java",
"implementation": "return (EAttribute)timeTriggerEClass.getEStructuralFeatures().get(1);",
"signature": "EAttribute getTimeTrigger_Offset()"
},
{
"arguments": [
"long period",
" long seed"
],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/PublisherTask.java",
"implementation": "setOffset(0);\n\t\t\trandom = new Random(seed);",
"signature": "public PublisherTrigger(long period, long seed)"
},
{
"arguments": [
"Scheduler scheduler",
" KnowledgeDataPublisher publisher",
" String host"
],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/PublisherTask.java",
"implementation": "this(scheduler, publisher, Integer.getInteger(DeecoProperties.PUBLISHING_PERIOD, DEFAULT_PUBLISHING_PERIOD), host);",
"signature": "public PublisherTask(Scheduler scheduler, KnowledgeDataPublisher publisher, String host)"
},
{
"arguments": [
"event.periodic"
],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/scheduler/SingleThreadedScheduler.java",
"implementation": "periodicEvents.put(task, event);",
"signature": "immediately\n\t\t\t\t\tif (event.periodic)"
},
{
"arguments": [
"SchedulerEvent event",
" long delay"
],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/scheduler/SingleThreadedScheduler.java",
"implementation": "event.nextExecutionTime = System.currentTimeMillis() + delay;\t\t\t\n//\t\n//\t/**\n//\t * Note that this method has to be explicitly protected by queue's monitor!\n//\t */\n//\tvoid scheduleNow(SchedulerEvent event, long period) {\t\t\t\n//\t\t\tevent.nextExecutionTime = System.currentTimeMillis(); // start immediately\n//\t\t\tevent.period = period;\n//\t\t\tevent.state = SchedulerEvent.SCHEDULED;\n//\n//\t\t\tqueue.add(event);\n//\t\t\tif (queue.getMin() == event)\n//\t\t\t\tqueue.notify();\t\t\n//",
"signature": "void scheduleAfter(SchedulerEvent event, long delay)"
},
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/scheduler/SingleThreadedScheduler.java",
"implementation": "super(null);\n\t\ttrigger = new TimeTriggerExt();\n\t\ttrigger.setPeriod(0);\n\t\ttrigger.setOffset(0);",
"signature": "public InvokeAndWaitTask()"
}
] | [
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/model/runtime/impl/RuntimeMetadataFactoryImpl.java",
"implementation": "PeriodicTriggerImpl periodicTrigger = new PeriodicTriggerImpl();\n\t\treturn periodicTrigger;",
"signature": "PeriodicTrigger createPeriodicTrigger()"
},
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/model/runtime/impl/RuntimeMetadataPackageImpl.java",
"implementation": "return periodicTriggerEClass;",
"signature": "EClass getPeriodicTrigger()"
},
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/model/runtime/impl/RuntimeMetadataPackageImpl.java",
"implementation": "return (EAttribute)periodicTriggerEClass.getEStructuralFeatures().get(0);",
"signature": "EAttribute getPeriodicTrigger_Period()"
},
{
"arguments": [
"long period",
" long seed"
],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/PublisherTask.java",
"implementation": "random = new Random(period);",
"signature": "public PublisherPeriod(long period, long seed)"
},
{
"arguments": [
"SchedulerEvent event",
" long period"
],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/scheduler/SingleThreadedScheduler.java",
"implementation": "event.nextExecutionTime = System.currentTimeMillis(); // start immediately\n\t\t\tevent.period = period;\n if (event.period == 0) { // Non-repeating, remove\n queue.removeMin();",
"signature": "void scheduleNow(SchedulerEvent event, long period)"
}
] |
d616bcf9586282568a8932d6ae382c252e9072f7 | [
{
"arguments": [
"final TestDeliverySettingsTemplate template",
" final TestDeliverySettings target"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/AssessmentManagementService.java",
"implementation": "target.setAuthorMode(template.isAuthorMode());\n target.setTitle(template.getTitle().trim());",
"signature": "void mergeTestDeliverySettings(final TestDeliverySettingsTemplate template, final TestDeliverySettings target)"
},
{
"arguments": [
"final TestDeliverySettings template",
" final TestDeliverySettingsTemplate target"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/AssessmentManagementService.java",
"implementation": "target.setAuthorMode(template.isAuthorMode());\n target.setTitle(template.getTitle());\n // CRUD for Delivery\n public Delivery lookupDelivery(final long did)\n final Delivery delivery = deliveryDao.requireFindById(did);\n ensureCallerMayAccess(delivery.getAssessment());\n return delivery;\n public Delivery lookupOwnDelivery(final long did)\n final Delivery delivery = deliveryDao.requireFindById(did);\n ensureCallerOwns(delivery.getAssessment());\n return delivery;\n /** Creates a new {@link Delivery",
"signature": "void mergeTestDeliverySettings(final TestDeliverySettings template, final TestDeliverySettingsTemplate target)"
},
{
"arguments": [
"final Assessment assessment",
"\n final DeliverySettings deliverySettings",
" final DeliveryTemplate template"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/AssessmentManagementService.java",
"implementation": "final Delivery delivery = new Delivery();\n delivery.setDeliverySettings(deliverySettings);\n deliveryDao.persist(delivery);\n public Delivery updateDelivery(final long did, final DeliveryTemplate template)\n validateDeliveryTemplate(template);\n final Delivery delivery = lookupOwnDelivery(did);\n final Assessment assessment = delivery.getAssessment();\n ensureCallerMayChange(assessment);\n final DeliverySettings deliverySettings = lookupAndMatchDeliverySettings(dsid, assessment);\n delivery.setDeliverySettings(deliverySettings);\n deliveryDao.update(delivery);\n private void validateDeliveryTemplate(final DeliveryTemplate template)\n public Delivery createDemoDelivery(final Assessment assessment)\n DeliverySettings deliverySettings = assessment.getDefaultDeliverySettings();\n deliverySettings = requireFirstDeliverySettings(caller, assessment.getAssessmentType());\n public Delivery createDemoDelivery(final Assessment assessment, final DeliverySettings deliverySettings)\n Assert.notNull(deliverySettings, \"deliverySettings\");\n ensureCompatible(deliverySettings, assessment);\n final Delivery delivery = new Delivery();\n delivery.setDeliverySettings(deliverySettings);\n deliveryDao.persist(delivery);\n public DeliverySettings requireFirstDeliverySettings(final User owner, final AssessmentObjectType assessmentType) {\n /* See if there are already suitable settings created */\n final DeliverySettings firstDeliverySettings = deliverySettingsDao.getFirstForOwner(owner, assessmentType);\n if (firstDeliverySettings!=null) {\n return firstDeliverySettings;",
"signature": "Delivery createDelivery(final Assessment assessment,\n final DeliverySettings deliverySettings, final DeliveryTemplate template)"
},
{
"arguments": [],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/AssessmentManagementService.java",
"implementation": "final TestDeliverySettingsTemplate template = new TestDeliverySettingsTemplate();\n template.setAuthorMode(true);\n template.setTitle(\"Item Delivery Settings\");\n return template;",
"signature": "TestDeliverySettingsTemplate createTestDeliverySettingsTemplate()"
},
{
"arguments": [
"=most recent"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/EntityGraphService.java",
"implementation": "@link AssessmentPackage",
"signature": "the current (=most recent)"
},
{
"arguments": [
"final CandidateSession candidateItemSession"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/candidate/CandidateItemDeliveryService.java",
"implementation": "final CandidateSession candidateItemSession = candidateItemEvent.getCandidateSession();\n final Delivery itemDelivery = candidateItemSession.getDelivery();\n final DeliverySettings itemDeliverySettings = itemDelivery.getDeliverySettings();\n final CandidateSession candidateItemSession = candidateItemEvent.getCandidateSession();\n final Delivery itemDelivery = candidateItemSession.getDelivery();\n final DeliverySettings itemDeliverySettings = itemDelivery.getDeliverySettings();\n final CandidateSession candidateSession = lookupCandidateItemSession(xid, sessionToken);\n public CandidateItemAttempt handleAttempt(final CandidateSession candidateItemSession,\n final Delivery itemDelivery = candidateItemSession.getDelivery();\n final boolean attemptAllowed = itemSessionController.isAttemptAllowed(itemDelivery.getDeliverySettings().getMaxAttempts());\n * Closes the {@link CandidateSession",
"signature": "double computeItemSessionDuration(final CandidateSession candidateItemSession)"
},
{
"arguments": [
"final InstructorUser systemDefaultUser"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/tools/services/BootstrapServices.java",
"implementation": "deliverySettingsDao.persist(fullSettings);\n deliverySettingsDao.persist(summativeSettings);",
"signature": "void importDefaultItemDeliverySettings(final InstructorUser systemDefaultUser)"
}
] | [
{
"arguments": [],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "return id;",
"signature": "Long getId()"
},
{
"arguments": [
"final Long id"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "this.id = id;",
"signature": "void setId(final Long id)"
},
{
"arguments": [],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "return owner;",
"signature": "User getOwner()"
},
{
"arguments": [
"final User owner"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "this.owner = owner;",
"signature": "void setOwner(final User owner)"
},
{
"arguments": [],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "return ObjectUtilities.safeClone(creationTime);",
"signature": "Date getCreationTime()"
},
{
"arguments": [
"final Date creationTime"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "this.creationTime = ObjectUtilities.safeClone(creationTime);",
"signature": "void setCreationTime(final Date creationTime)"
},
{
"arguments": [],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "return title;",
"signature": "String getTitle()"
},
{
"arguments": [
"final String title"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "this.title = title;",
"signature": "void setTitle(final String title)"
},
{
"arguments": [],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "return isPublic;",
"signature": "boolean isPublic()"
},
{
"arguments": [
"final boolean isPublic"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "this.isPublic = isPublic;\n public boolean isAuthorMode() {\n return authorMode;",
"signature": "void setPublic(final boolean isPublic)"
},
{
"arguments": [
"final boolean authorMode"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/domain/entities/ItemDeliverySettings.java",
"implementation": "this.authorMode = authorMode;",
"signature": "void setAuthorMode(final boolean authorMode)"
},
{
"arguments": [
"=most recent"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/EntityGraphService.java",
"implementation": "@link AssessmentPackage",
"signature": "the current (=most recent)"
},
{
"arguments": [
"final CandidateItemSession candidateItemSession"
],
"filename": "qtiworks-engine/src/main/java/uk/ac/ed/ph/qtiworks/services/candidate/CandidateItemDeliveryService.java",
"implementation": "final CandidateItemSession candidateItemSession = candidateItemEvent.getCandidateItemSession();\n final ItemDelivery itemDelivery = candidateItemSession.getItemDelivery();\n final ItemDeliverySettings itemDeliverySettings = itemDelivery.getItemDeliverySettings();\n final CandidateItemSession candidateItemSession = candidateItemEvent.getCandidateItemSession();\n final ItemDelivery itemDelivery = candidateItemSession.getItemDelivery();\n final ItemDeliverySettings itemDeliverySettings = itemDelivery.getItemDeliverySettings();\n final CandidateItemSession candidateSession = lookupCandidateItemSession(xid, sessionToken);\n public CandidateItemAttempt handleAttempt(final CandidateItemSession candidateItemSession,\n final ItemDelivery itemDelivery = candidateItemSession.getItemDelivery();\n final boolean attemptAllowed = itemSessionController.isAttemptAllowed(itemDelivery.getItemDeliverySettings().getMaxAttempts());\n * Closes the {@link CandidateItemSession",
"signature": "double computeItemSessionDuration(final CandidateItemSession candidateItemSession)"
}
] |
db9f61c2df8cb2755b3230d82e287dae26891bc1 | [
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/FitRow.java",
"implementation": "if (row != null) {\n return row.size();",
"signature": "int size()"
},
{
"arguments": [
"String hostName",
" String pictureData"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "this.pictureData = pictureData;\n this.initialised = false;\n public RestFixtureWithSeq(String hostName, String configName, String pictureData) {\n this.pictureData = pictureData;\n this.initialised = false;\n public RestFixtureWithSeq(PartsFactory partsFactory, String hostName, String configName, String pictureData) {\n this.pictureData = pictureData;\n this.initialised = false;",
"signature": "public RestFixtureWithSeq(String hostName, String pictureData)"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "cell = row.getCell(1);\n byte[] content = PictureGenerator.generate(model.toString(), parseAttributes(cell.body()), \"template.svg\", format);\n cell.body(\"<img src=\\\"data:image/\" + format + \";base64,\" + new String(Base64.encode(content)) + \"\\\" />\");",
"signature": "void embed()"
},
{
"arguments": [
"Model model"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "this.model = model;\n initializeFields();\n createSequenceModel();\n initialised = true;\n if (!graphFileDir.exists()) {\n if (!graphFileDir.mkdirs()) {\n myFixtureListener = new MyFixtureListener(new File(graphFileDir, this.getPictureName()).getAbsolutePath(), model, attributes);\n setFixtureListener(myFixtureListener);\n protected String getPictureDataFromArgs() {\n return getBaseUrl() != null && pictureData != null;\n throw new FitFailureException(\"Both baseUrl and picture data (containing the picture name) need to be passed to the fixture\");\n protected void createSequenceModel() {\n if (!initialised) {\n LOG.info(\"Initialising sequence model\");\n this.model = new SequenceModel();",
"signature": "void setModel(Model model)"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "super.setBody();",
"signature": "void setBody()"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "super.comment();\n @SuppressWarnings(\"rawtypes\")\n CellWrapper messageCell = row.getCell(1);\n String body = messageCell.body();\n String plainBody = Tools.fromHtml(body).trim();\n model.comment(plainBody);\n String res = getResource();\n String args = getLastRequest().getQuery();\n String ret = \"status=\" + getLastResponse().getStatusCode().toString();\n model.get(res, args, ret);\n String res = getResource();\n String id = getIdFromLocationHeader();\n // could ever be that the POST to /abc returns a location of /qwe/1 ??\n String result = String.format(\"id=%s, status=%s\", id, getLastResponse().getStatusCode().toString());\n String args = getLastRequest().getQuery();\n model.post(res, args, result);\n String res = getResource();\n String args = getLastRequest().getQuery();\n String ret = \"status=\" + getLastResponse().getStatusCode().toString();\n model.put(res, args, ret);\n void setFixtureListener(FixtureListener l) {\n super.listener = l;\n private static String getPictureFormat(String pictureName) {\n int pos = pictureName.indexOf(\".\");\n if (pos >= 0) {\n return pictureName.substring(pos + 1).toLowerCase();",
"signature": "void comment()"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "if (!initialised) {\n String data = pictureData;\n LOG.info(\"Picture data = \" + pictureData);\n int[] pos = getPositionOfNextOfTokenOptionallyInDoubleQuotes(data);\n this.pictureName = data.substring(pos[0], pos[1]);\n LOG.info(\"Found picture name: \" + pictureName);\n if (pos[1] < data.length()) {\n data = data.substring(pos[1] + 1);\n this.attributes = parseAttributes(data);",
"signature": "void initializeFields()"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "List<Header> list = getLastResponse().getHeader(\"Location\");\n String location = \"\";\n if (list != null && !list.isEmpty()) {\n location = list.get(0).getValue();\n String[] parts = guessParts(location);\n return parts[1];",
"signature": "String getIdFromLocationHeader()"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "String res = getLastRequest().getResource();\n if (res.endsWith(\"/\")) {\n res = res.substring(0, res.length() - 1);\n return res;",
"signature": "String getResource()"
},
{
"arguments": [
"String text"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "root.add(new Node(new Note(Tools.fromHtml(text))));",
"signature": "void comment(String text)"
},
{
"arguments": [
"String resource",
" String query",
" String result"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "message(Message.SYNC, resource, \"GET\", query, result);",
"signature": "void get(String resource, String query, String result)"
},
{
"arguments": [
"String resource",
" String query",
" String result"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "message(Message.SYNC, resource, \"POST\", query, result);",
"signature": "void post(String resource, String query, String result)"
},
{
"arguments": [
"String resource",
" String query",
" String result"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "message(Message.SYNC, resource, \"PUT\", query, result);",
"signature": "void put(String resource, String query, String result)"
},
{
"arguments": [
"String resource",
" String query",
" String result"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "message(Message.DESTROY, resource, \"DELETE\", query, result);",
"signature": "void delete(String resource, String query, String result)"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "return layout.layout(root);",
"signature": "String toString()"
},
{
"arguments": [
"int type",
" String resourceTo",
" String method",
" String args",
" String result"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "Agent agentTo = agentFor(resourceTo);\n String methodSignature = args == null ? method : method + \"(\" + args + \")\";\n String resultString = result == null ? \"\" : result;\n Message message = new Message(type, agentTo, methodSignature, resultString);\n root.add(new Node(message));",
"signature": "void message(int type, String resourceTo, String method, String args, String result)"
},
{
"arguments": [
"String resource"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "Resource a = resourceToAgentMap.get(resource);\n if (a == null) {\n boolean isActivable = true;\n a = new Resource(resource, isActivable);\n resourceToAgentMap.put(resource, a);\n return a;",
"signature": "Resource agentFor(String resource)"
},
{
"arguments": [
"String type",
" boolean isActivable"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "super(type, \"\", isActivable);",
"signature": "public Resource(String type, boolean isActivable)"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "return isEllipsis() ? \"...\" : (new StringBuilder()).append(getType()).toString();\n private final Model model;\n private final String picFileName;\n private final Map<String, String> attributes;\n * diagram is not known until the fixture has been created @\n public MyFixtureListener(String outFileName, Model m, Map<String, String> attr) {\n model = m;\n attributes = attr != null ? attr : new HashMap<String, String>();\n picFileName = outFileName;\n int pos = picFileName.lastIndexOf(\".\");\n String format = \"svg\";\n if (pos > 0) {\n format = picFileName.substring(pos + 1).toLowerCase();",
"signature": "String toString()"
},
{
"arguments": [],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/SlimRow.java",
"implementation": "if (row != null) {\n return row.size();",
"signature": "int size()"
},
{
"arguments": [],
"filename": "src/test/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeqFitTest.java",
"implementation": "RowWrapper<?> row = helper.createTestRow(\"embed\", \"\");\n fixture.processRow(row);\n verify(row.getCell(1)).body();\n verify(row.getCell(1)).body(\n \"<img src=\\\"data:image/svg;base64,PHN2ZyAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2ZXJzaW9uPSIxLjE\"\n + \"iPg0KICA8ZGVmcz4NCiAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KICAgICAgPCFbQ0RBVEFbDQogICAgICAgIHJlY3QuY2xhc\"\n + \"3Nib3h7DQogICAgICAgICAgc3Ryb2tlICAgICAgIDogYmxhY2s7DQogICAgICAgICAgc3Ryb2tlLXdpZHRoIDogMTsNCiAgICAgICA\"\n + \"gICBmaWxsCQkgICA6IHdoaXRlOw0KICAgICAgICB9DQogICAgICAgIGVsbGlwc2UucGF0dGVybnsNCiAgICAgICAgICBzdHJva2UgI\"\n + \"CAgICAgOiBibGFjazsNCiAgICAgICAgICBzdHJva2Utd2lkdGggOiAxOw0KICAgICAgICAgIGZpbGwJCSAgIDogd2hpdGU7DQogICA\"\n + \"gICAgICAgc3Ryb2tlLWRhc2hhcnJheTogOSw1Ow0KICAgICAgICB9DQogICAgICAgIGxpbmUuY2xhc3Nib3h7DQogICAgICAgICAgc\"\n + \"3Ryb2tlICAgICAgIDogYmxhY2s7DQogICAgICAgICAgc3Ryb2tlLXdpZHRoIDogMTsNCiAgICAgICAgfQ0KICAgICAgICBwb2x5Z29\"\n + \"uLmNsYXNzYm94ew0KICAgICAgICAgIGZpbGwJCSAgIDogd2hpdGU7DQogICAgICAgICAgc3Ryb2tlICAgICAgIDogd2hpdGU7DQogI\"\n + \"CAgICAgICAgc3Ryb2tlLXdpZHRoIDogMDsNCiAgICAgICAgfQ0KICAgICAgICBwb2x5Z29uLm5vdGV7DQogICAgICAgICAgZmlsbAk\"\n + \"JICAgOiB3aGl0ZTsNCiAgICAgICAgICBzdHJva2UgICAgICAgOiBibGFjazsNCiAgICAgICAgICBzdHJva2Utd2lkdGggOiAxOw0KI\"\n + \"CAgICAgICB9DQogICAgICAgIGxpbmUubGlmZWxpbmV7DQogICAgICAgICAgc3Ryb2tlICAgICAgIDogYmxhY2s7DQogICAgICAgICA\"\n + \"gc3Ryb2tlLXdpZHRoIDogMTsNCiAgICAgICAgICBzdHJva2UtZGFzaGFycmF5OiA5LDU7DQogICAgICAgIH0NCiAgICAgICAgcGF0a\"\n + \"C5hcnJvd3sNCiAgICAgICAgICBmaWxsCQkgICA6IG5vbmU7DQogICAgICAgICAgc3Ryb2tlICAgICAgIDogYmxhY2s7DQogICAgICA\"\n + \"gICAgc3Ryb2tlLXdpZHRoIDogMTsNCiAgICAgICAgfQ0KICAgICAgICBwYXRoLmRhc2hhcnJvd3sNCiAgICAgICAgICBmaWxsCQkgI\"\n + \"CA6IG5vbmU7DQogICAgICAgICAgc3Ryb2tlICAgICAgIDogYmxhY2s7DQogICAgICAgICAgc3Ryb2tlLXdpZHRoIDogMTsNCiAgICA\"\n + \"gICAgICBzdHJva2UtZGFzaGFycmF5OiAxMCw3Ow0KICAgICAgICB9DQogICAgICAgIHRleHR7DQogICAgICAgICAgZmlsbCAgICAgI\"\n + \"CAgIDogYmxhY2s7DQogICAgICAgICAgc3Ryb2tlLXdpZHRoIDogMDsNCiAgICAgICAgICBmb250LWZhbWlseSAgOiBzYW5zLXNlcml\"\n + \"mOw0KICAgICAgICB9DQogICAgICAgIHRleHQubmFtZXsNCiAgICAgICAgICBmb250LXNpemUgICAgOiAxMnB4Ow0KICAgICAgICAgI\"\n + \"GZvbnQtd2VpZ2h0ICA6IGJvbGQ7DQogICAgICAgICAgdGV4dC1hbmNob3IgIDogbWlkZGxlOw0KICAgICAgICB9DQogICAgICAgIHR\"\n + \"leHQuaXRlbXsNCiAgICAgICAgICBmb250LXNpemUgICAgOiAxMnB4Ow0KICAgICAgICB9DQogICAgICAgIHRleHQudmlzaWJpbGl0e\"\n + \"XsNCiAgICAgICAgICBmb250LXNpemUgICAgOiAxMnB4Ow0KICAgICAgICAgIGZvbnQtZmFtaWx5ICA6IG1vbm9zcGFjZTsNCiAgICA\"\n + \"gICAgICBmb250LXdlaWdodCAgOiBib2xkOw0KICAgICAgICAgIHRleHQtYW5jaG9yICA6IG1pZGRsZTsNCiAgICAgICAgfQ0KICAgI\"\n + \"CAgICB0ZXh0LmFic3RyYWN0ew0KICAgICAgICAgIGZvbnQtc3R5bGUgICA6IGl0YWxpYzsNCiAgICAgICAgfQ0KICAgICAgICB0ZXh\"\n + \"0Lm1lc3NhZ2V7DQogICAgICAgICAgZm9udC1zaXplICAgIDogMTJweDsNCiAgICAgICAgICB0ZXh0LWFuY2hvciAgOiBzdGFydDsNC\"\n + \"iAgICAgICAgfQ0KICAgICAgICB0ZXh0LmJhY2ttZXNzYWdlew0KICAgICAgICAgIGZvbnQtc2l6ZSAgICA6IDEycHg7DQogICAgICA\"\n + \"gICAgdGV4dC1hbmNob3IgIDogZW5kOw0KICAgICAgICB9DQogICAgICBdXT4NCiAgICA8L3N0eWxlPg0KICANCiAgDQogICAgPG1hc\"\n + \"mtlciBpZD0ibm9IZWFkIiByZWZYPSIwIiByZWZZPSIwIiA+PC9tYXJrZXI+DQogIA0KICAgIDwhLS0gVU1MIFNlcXVlbmNlIFN5bmM\"\n + \"gTWVzc2FnZSBIZWFkIC0tPg0KICAgIDxtYXJrZXIgaWQ9ImNsb3NlZEhlYWQiDQogICAgICB2aWV3Qm94PSIwIDAgMzAgMzAiIHJlZ\"\n + \"lg9IjMwIiByZWZZPSIxNSIgDQogICAgICBtYXJrZXJVbml0cz0ic3Ryb2tlV2lkdGgiDQogICAgICBtYXJrZXJXaWR0aD0iMTAiIG1\"\n + \"hcmtlckhlaWdodD0iMTAiDQogICAgICBvcmllbnQ9ImF1dG8iPg0KICAgICAgPHBhdGggZD0iTSAwIDAgTCAzMCAxNSBMIDAgMzAge\"\n + \"iIgLz4NCiAgICA8L21hcmtlcj4NCiAgICANCiAgICA8IS0tIFVNTCBTZXF1ZW5jZSBBc3luYyBNZXNzYWdlIEhlYWQgLS0+DQogICA\"\n + \"gPG1hcmtlciBpZD0iaGFsZkNsb3NlZEhlYWQiDQogICAgICB2aWV3Qm94PSIwIDAgMzAgMzAiIHJlZlg9IjMwIiByZWZZPSIxNSIgD\"\n + \"QogICAgICBtYXJrZXJVbml0cz0ic3Ryb2tlV2lkdGgiDQogICAgICBtYXJrZXJXaWR0aD0iMTUiIG1hcmtlckhlaWdodD0iMTUiDQo\"\n + \"gICAgICBvcmllbnQ9ImF1dG8iPg0KICAgICAgPHBhdGggZD0iTSAwIDE1IDMwIDE1IEwgMCAzMCB6IiAvPg0KICAgIDwvbWFya2VyP\"\n + \"g0KICAgIA0KICAgIDwhLS0gVU1MIEluaGVyaXRhbmNlIEhlYWQgLS0+DQogICAgPG1hcmtlciBpZD0iZW1wdHlIZWFkIg0KICAgICA\"\n + \"gdmlld0JveD0iMCAwIDMwIDMwIiByZWZYPSIzMCIgcmVmWT0iMTUiIA0KICAgICAgbWFya2VyVW5pdHM9InN0cm9rZVdpZHRoIg0KI\"\n + \"CAgICAgbWFya2VyV2lkdGg9IjE1IiBtYXJrZXJIZWlnaHQ9IjE1Ig0KICAgICAgb3JpZW50PSJhdXRvIj4NCiAgICAgIDxwYXRoIGQ9\"\n + \"Ik0gMCAwIEwgMzAgMTUgTCAwIDMwIHoiIGZpbGw9IndoaXRlIiBzdHJva2U9ImJsYWNrIiAvPg0KICAgIDwvbWFya2VyPg0KICAgI\"\n + \"A0KICAgIDwhLS0gVU1MIEFzc29jaWF0aW9uIEhlYWQgLS0+DQogICAgPG1hcmtlciBpZD0ib3BlbkhlYWQiDQogICAgICB2aWV3Qm94P\"\n + \"SIwIDAgMzAgMzAiIHJlZlg9IjMwIiByZWZZPSIxNSIgDQogICAgICBtYXJrZXJVbml0cz0ic3Ryb2tlV2lkdGgiDQogICAgICBtYX\"\n + \"JrZXJXaWR0aD0iMTAiIG1hcmtlckhlaWdodD0iMTAiDQogICAgICBvcmllbnQ9ImF1dG8iPg0KICAgICAgPHBhdGggZD0iTSAwIDA\"\n + \"gTCAzMCAxNSBMIDAgMzAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIC8+DQogICAgPC9tYXJrZXI+DQogICAgDQogICAgPCEt\"\n + \"LSBIZWFkIC0tPg0KICAgIDxtYXJrZXIgaWQ9ImhhbGZPcGVuSGVhZCINCiAgICAgIHZpZXdCb3g9IjAgMCAzMCAzMCIgcmVmWD0iMz\"\n + \"AiIHJlZlk9IjE1IiANCiAgICAgIG1hcmtlclVuaXRzPSJzdHJva2VXaWR0aCINCiAgICAgIG1hcmtlcldpZHRoPSIxNSIgbWFya2Vy\"\n + \"SGVpZ2h0PSIxNSINCiAgICAgIG9yaWVudD0iYXV0byI+DQogICAgICA8cGF0aCBkPSJNIDAgMTUgTCAzMCAxNSBMIDAgMzAiIGZpbG\"\n + \"w9Im5vbmUiIHN0cm9rZT0iYmxhY2siIC8+DQogICAgPC9tYXJrZXI+DQogICAgDQogICAgPCEtLSBVTUwgQWdncmVnYXRpb24gVGFp\"\n + \"bCAtLT4NCiAgICA8bWFya2VyIGlkPSJvcGVuRGlhbW9uZCINCiAgICAgIHZpZXdCb3g9IjAgMCAzMCAzMCIgcmVmWD0iMCIgcmVmWT\"\n + \"0iMTUiIA0KICAgICAgbWFya2VyVW5pdHM9InN0cm9rZVdpZHRoIg0KICAgICAgbWFya2VyV2lkdGg9IjE1IiBtYXJrZXJIZWlnaHQ9\"\n + \"IjE1Ig0KICAgICAgb3JpZW50PSJhdXRvIj4NCiAgICAgIDxwYXRoIGQ9Ik0gMCAxNSBMIDE1IDMgTCAzMCAxNSBMIDE1IDI3IHoiIG\"\n + \"ZpbGw9IndoaXRlIiBzdHJva2U9ImJsYWNrIiAvPg0KICAgIDwvbWFya2VyPg0KICAgIA0KICAgIDwhLS0gVU1MIENvbXBvc2l0aW9u\"\n + \"IFRhaWwgLS0+DQogICAgPG1hcmtlciBpZD0iY2xvc2VkRGlhbW9uZCINCiAgICAgIHZpZXdCb3g9IjAgMCAzMCAzMCIgcmVmWD0iMC\"\n + \"IgcmVmWT0iMTUiIA0KICAgICAgbWFya2VyVW5pdHM9InN0cm9rZVdpZHRoIg0KICAgICAgbWFya2VyV2lkdGg9IjE1IiBtYXJrZXJI\"\n + \"ZWlnaHQ9IjE1Ig0KICAgICAgb3JpZW50PSJhdXRvIj4NCiAgICAgIDxwYXRoIGQ9Ik0gMCAxNSBMIDE1IDMgTCAzMCAxNSBMIDE1ID\"\n + \"I3IHoiIC8+DQogICAgPC9tYXJrZXI+DQogICAgDQogICAgPCEtLSBVTUwgQ29tcG9uZW50IEludGVyZmFjZSBQcm92aWRlZCBIZWFk\"\n + \"IC0tPg0KICAgIDxtYXJrZXIgaWQ9ImVtcHR5Q2lyY2xlIg0KICAgICAgdmlld0JveD0iMCAwIDMwIDMwIiByZWZYPSIxNSIgcmVmWT\"\n + \"0iMTUiIA0KICAgICAgbWFya2VyVW5pdHM9InN0cm9rZVdpZHRoIg0KICAgICAgbWFya2VyV2lkdGg9IjE1IiBtYXJrZXJIZWlnaHQ9\"\n + \"IjE1IiA+DQogICAgIDxjaXJjbGUgY3g9IjE1IiBjeT0iMTUiIHI9IjEwIiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2\"\n + \"tlLXdpZHRoPSIxIiAvPg0KICAgIDwvbWFya2VyPg0KICAgIA0KICAgIDwhLS0gVU1MIENvbXBvbmVudCBJbnRlcmZhY2UgUmVxdWly\"\n + \"ZWQgVGFpbCAtLT4NCiAgICA8bWFya2VyIGlkPSJoYWxmQXJjIg0KICAgICAgdmlld0JveD0iMCAwIDMwIDMwIiByZWZYPSIxNSIgcm\"\n + \"VmWT0iMTUiIA0KICAgICAgbWFya2VyVW5pdHM9InN0cm9rZVdpZHRoIg0KICAgICAgbWFya2VyV2lkdGg9IjE1IiBtYXJrZXJIZWln\"\n + \"aHQ9IjE1Ig0KICAgICAgb3JpZW50PSJhdXRvIj4NCiAgICAgPHBhdGggZD0iTSAxNSwwIGExMiwxMiAwIDAsMCAxNSwzMCIgZmlsbD\"\n + \"0ibm9uZSIgc3Ryb2tlPSJibGFjayIgc3Ryb2tlLXdpZHRoPSIxIiAvPg0KICAgIDwvbWFya2VyPg0KICAgIA0KICAgIDxkZXNjPkNv\"\n + \"bXBvbmVudCBTeW1ib2w8L2Rlc2M+DQogICAgPHN5bWJvbCBpZD0iQ29tcG9uZW50IiB2aWV3Qm94PSIwIDAgMTYgMjUiID4NCiAgIC\"\n + \"AgIDxyZWN0IHg9IjQiIHk9IjAiIHdpZHRoPSIxMiIgaGVpZ2h0PSIyMCIgZmlsbD0id2hpdGUiIHN0cm9rZT0iYmxhY2siIC8+DQog\"\n + \"ICAgICA8cmVjdCB4PSIwIiB5PSI0IiB3aWR0aD0iOCIgaGVpZ2h0PSI1IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIgLz4NCi\"\n + \"AgICAgIDxyZWN0IHg9IjAiIHk9IjEyIiB3aWR0aD0iOCIgaGVpZ2h0PSI1IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIvPg0K\"\n + \"ICAgIDwvc3ltYm9sPg0KICAgIA0KICAgIDxkZXNjPkhpZXJhcmNoeSBTeW1ib2w8L2Rlc2M+DQogICAgPHN5bWJvbCBpZD0iSGllcm\"\n + \"FyY2h5IiB2aWV3Qm94PSIwIDAgMTYgMjUiID4NCiAgICAgIDxyZWN0IHg9IjUiIHk9IjAiIHdpZHRoPSI2IiBoZWlnaHQ9IjYiIGZp\"\n + \"bGw9IndoaXRlIiBzdHJva2U9ImJsYWNrIiAvPg0KICAgICAgPHJlY3QgeD0iMCIgeT0iMTIiIHdpZHRoPSI2IiBoZWlnaHQ9IjYiIG\"\n + \"ZpbGw9IndoaXRlIiBzdHJva2U9ImJsYWNrIi8+DQogICAgICA8cmVjdCB4PSIxMCIgeT0iMTIiIHdpZHRoPSI2IiBoZWlnaHQ9IjYi\"\n + \"IGZpbGw9IndoaXRlIiBzdHJva2U9ImJsYWNrIi8+DQogICAgICA8cGF0aCBkPSJNIDMsMTEgTCAzLDkgTCAxMyw5IEwgMTMsMTEiIG\"\n + \"ZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMSIgLz4NCiAgICAgIDxsaW5lIHgxPSI4IiB4Mj0iOCIgeTE9\"\n + \"IjkiIHkyPSI3IiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Utd2lkdGg9IjEiIC8+DQogICAgPC9zeW1ib2w+DQogIC\"\n + \"AgDQogICAgPGRlc2M+RGVsZWdhdGlvbiBTeW1ib2w8L2Rlc2M+DQogICAgPHN5bWJvbCBpZD0iRGVsZWdhdGlvbiIgdmlld0JveD0i\"\n + \"MCAwIDE2IDI1IiA+DQogICAgICA8cmVjdCB4PSIwIiB5PSI1IiB3aWR0aD0iNiIgaGVpZ2h0PSI2IiBmaWxsPSJ3aGl0ZSIgc3Ryb2\"\n + \"tlPSJibGFjayIvPg0KICAgICAgPHJlY3QgeD0iMTAiIHk9IjUiIHdpZHRoPSI2IiBoZWlnaHQ9IjYiIGZpbGw9IndoaXRlIiBzdHJv\"\n + \"a2U9ImJsYWNrIi8+DQogICAgICA8bGluZSB4MT0iNiIgeDI9IjEwIiB5MT0iOCIgeTI9IjgiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYm\"\n + \"xhY2siIHN0cm9rZS13aWR0aD0iMSIgLz4NCiAgICA8L3N5bWJvbD4NCiAgICANCiAgICA8ZGVzYz5SYWRpYWwgU3ltYm9sPC9kZXNj\"\n + \"Pg0KICAgIDxzeW1ib2wgaWQ9IlJhZGlhbCIgdmlld0JveD0iMCAwIDE2IDI1IiA+DQogICAgICA8cmVjdCB4PSI2IiB5PSIwIiB3aW\"\n + \"R0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIvPg0KICAgICAgPHJlY3QgeD0iMCIgeT0iNiIgd2lk\"\n + \"dGg9IjUiIGhlaWdodD0iNSIgZmlsbD0id2hpdGUiIHN0cm9rZT0iYmxhY2siLz4NCiAgICAgIDxyZWN0IHg9IjEyIiB5PSI2IiB3aW\"\n + \"R0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIvPg0KICAgICAgPHJlY3QgeD0iNiIgeT0iMTQiIHdp\"\n + \"ZHRoPSI1IiBoZWlnaHQ9IjUiIGZpbGw9IndoaXRlIiBzdHJva2U9ImJsYWNrIi8+DQogICAgICA8bGluZSB4MT0iOCIgeTE9IjE0Ii\"\n + \"B4Mj0iOCIgeTI9IjUiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMSIgLz4NCiAgICAgIDxsaW5lIHgx\"\n + \"PSI4IiB5MT0iMTQiIHgyPSIzIiB5Mj0iMTEiIGZpbGw9Im5vbmUiIHN0cm9rZT0iYmxhY2siIHN0cm9rZS13aWR0aD0iMSIgLz4NCi\"\n + \"AgICAgIDxsaW5lIHgxPSI4IiB5MT0iMTQiIHgyPSIxMiIgeTI9IjExIiBmaWxsPSJub25lIiBzdHJva2U9ImJsYWNrIiBzdHJva2Ut\"\n + \"d2lkdGg9IjEiIC8+DQogICAgPC9zeW1ib2w+DQogICAgDQogICAgPGRlc2M+RmxvdyBTeW1ib2w8L2Rlc2M+DQogICAgPHN5bWJvbC\"\n + \"BpZD0iRmxvdyIgdmlld0JveD0iMCAwIDE2IDI1IiA+DQogICAgICA8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iNSIgaGVpZ2h0PSI1\"\n + \"IiBmaWxsPSJ3aGl0ZSIgc3Ryb2tlPSJibGFjayIvPg0KICAgICAgPHJlY3QgeD0iOSIgeT0iMCIgd2lkdGg9IjUiIGhlaWdodD0iNS\"\n + \"IgZmlsbD0id2hpdGUiIHN0cm9rZT0iYmxhY2siLz4NCiAgICAgIDxyZWN0IHg9IjAiIHk9IjgiIHdpZHRoPSI1IiBoZWlnaHQ9IjUi\"\n + \"IGZpbGw9IndoaXRlIiBzdHJva2U9ImJsYWNrIi8+DQogICAgPC9zeW1ib2w+DQogICAgDQogIDwvZGVmcz4NCiAgDQoKPGRlc2M+QW\"\n + \"dlbnRzIGFuZCBsaWZlbGluZXMgb2YgdGhlIHNlcXVlbmNlIGRpYWdyYW08L2Rlc2M+Cgo8ZGVzYz5NZXNzYWdlczwvZGVzYz4NCiAgDQo8L3N2Zz4NCg==\\\" />\");\n verifyNoMoreInteractions(row.getCell(1));\n verifyNoMoreInteractions(mockModel);",
"signature": "void shouldEmbedAPictureWithAnImgTagAndAnEncodedInlineImg()"
},
{
"arguments": [],
"filename": "src/test/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeqFitTest.java",
"implementation": "lastResponse.addHeader(\"Location\", \"/resources/999\");\n RowWrapper<?> row = helper.createTestRow(\"POST\", \"/uri\", \"\", \"\", \"\");\n fixture.setModel(mockModel);\n verify(mockModel).post(\"/uri\", null, \"id=999, status=200\");\n verifyNoMoreInteractions(mockModel);\n public void mustDelegateToModelAComment() {\n RowWrapper<?> row = helper.createTestRow(\"comment\", \"some text\");\n fixture.setModel(mockModel);\n verify(mockModel).comment(\"some text\");\n verifyNoMoreInteractions(mockModel);\n public void mustDelegateToModelAGet() {\n RowWrapper<?> row = helper.createTestRow(\"GET\", \"/uri/123\", \"\", \"\", \"\");\n fixture.setModel(mockModel);\n verify(mockModel).get(\"/uri/123\", null, \"status=200\");\n verifyNoMoreInteractions(mockModel);\n public void mustDelegateToModelAPut() {\n RowWrapper<?> row = helper.createTestRow(\"PUT\", \"/uri/123\", \"\", \"\", \"\");\n fixture.setModel(mockModel);\n verify(mockModel).put(\"/uri/123\", null, \"status=200\");\n verifyNoMoreInteractions(mockModel);",
"signature": "void mustDelegateToModelAPost()"
}
] | [
{
"arguments": [
"String hostName",
" String pictureName"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "this.pictureName = pictureName;\n public RestFixtureWithSeq(String hostName, String configName, String pictureName) {\n this.pictureName = pictureName;\n public RestFixtureWithSeq(PartsFactory partsFactory, String hostName, String configName, String pictureName) {\n this.pictureName = pictureName;\n create(new PicDiagram(), new Model());\n if(!graphFileDir.exists()) {\n if(!graphFileDir.mkdirs()) {\n String supportDirName = getConfig().get(\"restfixture.graphs.support.files.dir\", DEFAULT_SUPPORT_FILES_DIR_NAME);\n File supportDir = validateSupportDirContent(supportDirName);\n\n setFixtureListener(new MyFixtureListener(this, builder, supportDir, graphFileDir));\n protected String getPictureNameFromArgs() {\n return getBaseUrl() != null && getPictureName() != null;\n throw new FitFailureException(\"Both baseUrl and picture name need to be passed to the fixture\");\n void create(PicDiagram d, Model m) {\n diagram = d;\n model = m;\n builder = new Builder(model, diagram);\n // return super.doTable(rows);\n throw new RuntimeException(\"This fixture is not supported on SLIM runner. Please use it with FIT\");\n this.pictureName = getPictureNameFromArgs();\n model.addEvent(new Message(FIXTURE, getLastRequest().getResource(), \"DELETE\"));\n model.addEvent(new Return(getLastRequest().getResource(), FIXTURE, getLastResponse().getStatusCode().toString()));\n model.addEvent(new Message(FIXTURE, getLastRequest().getResource(), \"GET\", getLastRequest().getQuery()));\n model.addEvent(new Return(getLastRequest().getResource(), FIXTURE, getLastResponse().getStatusCode().toString()));\n String res = getLastRequest().getResource();\n Event event = new Message(FIXTURE, res, \"POST\");\n model.addEvent(event);\n List<Header> list = getLastResponse().getHeader(\"Location\");\n String location = \"\";\n if (list != null && !list.isEmpty()) {\n location = list.get(0).getValue();",
"signature": "public RestFixtureWithSeq(String hostName, String pictureName)"
},
{
"arguments": [
"Model m"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "this.model = m;\n Model getModel() {\n return this.model;\n void setFixtureListener(FixtureListener l) {\n super.listener = l;\n private File validateSupportDirContent(String supportDirName) {\n File supportDir = new File(supportDirName);\n if (!supportDir.exists()) {\n throw new FitFailureException(\"Support files directory is missing '\" + supportDir.getAbsolutePath() + \"'\");\n File sequence_pic = new File(supportDir, \"sequence.pic\");\n if (!sequence_pic.exists()) {\n throw new FitFailureException(\"Missing support file '\" + sequence_pic.getAbsolutePath() + \"'\");\n File myPs2Img_sh = new File(supportDir, \"myps2img.sh\");\n if (!myPs2Img_sh.exists()) {\n throw new FitFailureException(\"Missing support file '\" + myPs2Img_sh.getAbsolutePath() + \"'\");\n return supportDir;\n private final Builder sequenceBuilder;\n private final RestFixtureWithSeq thisFixture;\n private final GraphGenerator graphGenerator;\n private final File graphDirectory;\n * diagram is not known until the fixture has been created\n * @param b\n * the sequence diagram builder\n public MyFixtureListener(RestFixtureWithSeq f, Builder b, File supportFilesDir, File graphDir) {\n sequenceBuilder = b;\n thisFixture = f;\n graphDirectory = graphDir;\n graphGenerator = new GraphGenerator(supportFilesDir.getAbsolutePath());\n sequenceBuilder.build();\n String diag = sequenceBuilder.getDiagram().toString();\n File graphFile = new File(graphDirectory, thisFixture.getPictureName());\n init(graphFile);\n System.out.println(\"Generating sequence diagram in \" + graphFile.getAbsolutePath());\n graphGenerator.generateGif(diag, graphFile);",
"signature": "void setModel(Model m)"
},
{
"arguments": [
"File graphFile"
],
"filename": "src/main/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeq.java",
"implementation": "if (!graphDirectory.exists()) {\n try {\n graphDirectory.mkdirs();",
"signature": "void init(File graphFile)"
},
{
"arguments": [],
"filename": "src/test/java/smartrics/rest/fitnesse/fixture/RestFixtureWithSeqFitTest.java",
"implementation": "RowWrapper<?> row = helper.createTestRow(\"PUT\", \"/uri\", \"\", \"\", \"\");\n assertOnMethods(\"PUT\");\n public void mustGenerateTwoEventsForGet() {\n RowWrapper<?> row = helper.createTestRow(\"GET\", \"/uri\", \"\", \"\", \"\");\n assertOnMethods(\"GET\");\n public void mustGenerateTwoEventsForDelete() {\n RowWrapper<?> row = helper.createTestRow(\"DELETE\", \"/uri\", \"\", \"\", \"\");\n assertOnMethods(\"DELETE\");\n public void mustGenerateThreeEventsForPost() {\n lastResponse.addHeader(\"Location\", \"/resources/999\");\n RowWrapper<?> row = helper.createTestRow(\"POST\", \"/uri\", \"\", \"\", \"\");\n assertEquals(3, fixture.getModel().getEvents().size());\n Event event = fixture.getModel().getEvents().get(0);\n assertTrue(event instanceof Message);\n assertEquals(\"POST\", event.getName());\n assertTrue(fixture.getModel().getEvents().get(1) instanceof Create);\n assertTrue(fixture.getModel().getEvents().get(2) instanceof Return);\n private void assertOnMethods(String name) {\n assertEquals(2, fixture.getModel().getEvents().size());\n Event event = fixture.getModel().getEvents().get(0);\n assertTrue(event instanceof Message);\n assertTrue(fixture.getModel().getEvents().get(1) instanceof Return);\n assertEquals(name, event.getName());",
"signature": "void mustGenerateTwoEventsForPut()"
}
] |
e8949857917389cb594a4fcbd8ede077af7f24e7 | [
{
"arguments": [
"obj instanceof AvailableField"
],
"filename": "src/org/pentaho/agilebi/modeler/CategoryTreeHelper.java",
"implementation": "AvailableField availableField = (AvailableField)obj;\r\n addAvailableField(availableField);\r\n\r\n private void addAvailableField(AvailableField availableField) {\r\n AbstractMetaDataModelNode theNode = null;\r\n Object selectedTreeItem = getSelectedTreeItem();\r\n // depending on the parent\r\n if (selectedTreeItem == null) {\r\n // null - cannot add fields at this level",
"signature": "else if (obj instanceof AvailableField)"
},
{
"arguments": [
"selectedTreeItem instanceof CategoryMetaData"
],
"filename": "src/org/pentaho/agilebi/modeler/CategoryTreeHelper.java",
"implementation": "// category - add as a field\r\n theNode = workspace.createFieldForParentWithNode((CategoryMetaData) selectedTreeItem, availableField);\r\n CategoryMetaData theCategory = (CategoryMetaData) selectedTreeItem;\r\n theCategory.add((FieldMetaData) theNode);",
"signature": "else if (selectedTreeItem instanceof CategoryMetaData)"
},
{
"arguments": [
"Object selected"
],
"filename": "src/org/pentaho/agilebi/modeler/ModelerController.java",
"implementation": "if (selected != null && selected instanceof IAvailableItem) {\n selectedFields = new IAvailableItem[]{(IAvailableItem)selected",
"signature": "void setSelectedFieldsChanged(Object selected)"
},
{
"arguments": [
"aFields[i] instanceof AvailableTable"
],
"filename": "src/org/pentaho/agilebi/modeler/ModelerController.java",
"implementation": "f[i] = (AvailableTable)aFields[i];",
"signature": "else if (aFields[i] instanceof AvailableTable)"
},
{
"arguments": [],
"filename": "src/org/pentaho/agilebi/modeler/ModelerWorkspace.java",
"implementation": "return availableTables;\n private void fireTablesChanged() {\n firePropertyChange(\"availableTables\", null, this.availableTables); //$NON-NLS-1$\n // Add in new physical tables/columns\n // see if the table is in the availableTables list\n AvailableTable aTable = availableTables.findAvailableTable(table.getName(LocalizedString.DEFAULT_LOCALE));\n if (aTable == null) {\n // new table, make sure we add it\n availableTables.add(new AvailableTable(table));",
"signature": "AvailableItemCollection getAvailableTables()"
},
{
"arguments": [],
"filename": "test-src/org/pentaho/agilebi/modeler/util/TableModelerSourceTest.java",
"implementation": "// come back to this",
"signature": "void test()"
}
] | [
{
"arguments": [
"LogicalColumn lc"
],
"filename": "src/org/pentaho/agilebi/modeler/BaseModelerWorkspaceHelper.java",
"implementation": "String tableId = lc.getLogicalTable().getId().replaceAll(\"BT\", \"LC\");\n String olapColId = tableId + OLAP_SUFFIX + \"_\" + lc.getPhysicalColumn().getId();\n return olapColId;",
"signature": "String getCorrespondingOlapColumnId(LogicalColumn lc)"
},
{
"arguments": [
"selectedTreeItem == null"
],
"filename": "src/org/pentaho/agilebi/modeler/CategoryTreeHelper.java",
"implementation": "// null - cannot add fields at this level",
"signature": "parent\r\n if (selectedTreeItem == null)"
},
{
"arguments": [
"selectedTreeItem instanceof CategoryMetaData"
],
"filename": "src/org/pentaho/agilebi/modeler/CategoryTreeHelper.java",
"implementation": "// category - add as a field\r\n theNode = workspace.createFieldForParentWithNode((CategoryMetaData) selectedTreeItem, availableField);\r\n CategoryMetaData theCategory = (CategoryMetaData) selectedTreeItem;\r\n theCategory.add((FieldMetaData) theNode);",
"signature": "else if (selectedTreeItem instanceof CategoryMetaData)"
},
{
"arguments": [],
"filename": "src/org/pentaho/agilebi/modeler/ModelerWorkspace.java",
"implementation": "return availableFields;\n\n private void fireFieldsChanged() {\n firePropertyChange(\"availableFields\", null, this.availableFields); //$NON-NLS-1$\n // Add in new physical columns\n for(IPhysicalColumn column : table.getPhysicalColumns()) {\n boolean exists = false;\n inner:\n for(AvailableField field : this.availableFields) {\n if (field.isSameUnderlyingPhysicalColumn(column)) {\n exists = true;\n break inner;",
"signature": "AvailableFieldCollection getAvailableFields()"
},
{
"arguments": [
"AvailableFieldCollection fields"
],
"filename": "src/org/pentaho/agilebi/modeler/ModelerWorkspace.java",
"implementation": "this.availableFields = fields;\n firePropertyChange(\"availableFields\", null, getAvailableFields()); //$NON-NLS-1$\n\n this.availableFields.clear();\n for (IPhysicalColumn column : table.getPhysicalColumns()) {\n AvailableField field = new AvailableField(column);\n availableFields.add(field);",
"signature": "void setAvailableFields(AvailableFieldCollection fields)"
},
{
"arguments": [],
"filename": "src/org/pentaho/agilebi/modeler/nodes/AvailableField.java",
"implementation": "return name;",
"signature": "String getName()"
},
{
"arguments": [
"String name"
],
"filename": "src/org/pentaho/agilebi/modeler/nodes/AvailableField.java",
"implementation": "this.name = name;\n @Bindable\n public String getDisplayName() {\n return displayName;",
"signature": "void setName(String name)"
},
{
"arguments": [
"String displayName"
],
"filename": "src/org/pentaho/agilebi/modeler/nodes/AvailableField.java",
"implementation": "this.displayName = displayName;",
"signature": "void setDisplayName(String displayName)"
},
{
"arguments": [],
"filename": "test-src/org/pentaho/agilebi/modeler/BaseModelerWorkspaceHelperTest.java",
"implementation": "String origTableId = \"BT_CUSTOMERS_CUSTOMERS\";\n String origColumnId = \"LC_CUSTOMERS_CUSTOMERNUMBER\";\n String olapColumnId = \"LC_CUSTOMERS_CUSTOMERS_OLAP_CUSTOMERNUMBER\";\n\n LogicalTable ltOrig = new LogicalTable();\n ltOrig.setId(origTableId);\n\n LogicalColumn lcOrig = new LogicalColumn();\n lcOrig.setId(origColumnId);\n lcOrig.setLogicalTable(ltOrig);\n IPhysicalColumn pc = new SqlPhysicalColumn();\n pc.setId(\"CUSTOMERNUMBER\");\n lcOrig.setPhysicalColumn(pc);\n\n assertEquals(olapColumnId, BaseModelerWorkspaceHelper.getCorrespondingOlapColumnId(lcOrig));",
"signature": "void testGetCorrespondingOlapColumnId()"
}
] |
eeb6d406828d87381fc1b5daa85920211b47d04b | [
{
"arguments": [
"Object o"
],
"filename": "whp-adherence/src/main/java/org/motechproject/whp/adherence/domain/TreatmentWeek.java",
"implementation": "if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n\n TreatmentWeek that = (TreatmentWeek) o;\n\n return !(startDate() != null ? !startDate().equals(that.startDate()) : that.startDate() != null);",
"signature": "boolean equals(Object o)"
},
{
"arguments": [],
"filename": "whp-adherence/src/test/java/org/motechproject/whp/adherence/domain/TreatmentWeekTest.java",
"implementation": "LocalDate monday = new LocalDate(2012, 4, 30);\n LocalDate sunday = new LocalDate(2012, 5, 6);\n LocalDate nextMonday = new LocalDate(2012, 5, 7);\n assertEquals(new TreatmentWeek(monday), new TreatmentWeek(sunday));\n assertNotSame(new TreatmentWeek(null), new TreatmentWeek(sunday));\n assertNotSame(new TreatmentWeek(monday), new TreatmentWeek(null));\n assertNotSame(new TreatmentWeek(monday), new TreatmentWeek(nextMonday));",
"signature": "void shouldCompareTwoWeeksToSeeIfTheyAreTheSameWeek()"
},
{
"arguments": [],
"filename": "whp-adherence/src/test/java/org/motechproject/whp/adherence/service/WHPAdherenceServiceTest.java",
"implementation": "WeeklyAdherence adherence = adherenceIsRecordedForTheFirstTime(); //capturing adherence for last week -> this is the first ever adherence captured week\n mockCurrentDate(today.plusDays(3)); //moving to the sunday -> capturing adherence for this week -> subsequent to first ever adherence captured week\n @Test\n public void shouldResetDoseStartDateWhenNoAdherenceIsPostedForSameWeek() {\n adherenceIsRecordedForTheFirstTime();\n mockCurrentDate(today.plusDays(1));\n adherenceService.recordAdherence(PATIENT_ID, new WeeklyAdherence(), user, source);\n assertNull(allPatients.findByPatientId(PATIENT_ID).getCurrentProvidedTreatment().getTreatment().getDoseStartDate());",
"signature": "void shouldNotStartPatientOnTreatmentWhenRecordingAdherenceForAnyWeekSubsequentToFirstEverAdherenceCapturedWeek()"
}
] | [
{
"arguments": [],
"filename": "whp-adherence/src/main/java/org/motechproject/whp/adherence/domain/WeeklyAdherence.java",
"implementation": "for (Adherence adherence : adherenceList) {\n if (PillStatus.Taken == adherence.getPillStatus())\n return true;",
"signature": "boolean isAnyDoseTaken()"
},
{
"arguments": [
"Patient patient",
" WeeklyAdherence adherence"
],
"filename": "whp-adherence/src/main/java/org/motechproject/whp/patient/domain/TreatmentStartCriteria.java",
"implementation": "return (isNewPatient(patient)\n && isAnyDoseTaken(adherence))\n && isFirstEverDoseBeingTaken(patient, adherence);\n private static boolean isFirstEverDoseBeingTaken(Patient patient, WeeklyAdherence adherence) {\n return isNotOnTreatment(patient.getCurrentProvidedTreatment()) ||isAdherenceBeingCapturedForEarlierDate(patient, adherence);\n private static boolean isAdherenceBeingCapturedForEarlierDate(Patient patient, WeeklyAdherence adherence) {\n return patient.getCurrentProvidedTreatment().getTreatment().getDoseStartDate().isAfter(adherence.firstDoseTakenOn());\n private static boolean isNewPatient(Patient patient) {\n return patient.getPatientType().equals(PatientType.New);",
"signature": "boolean shouldStartTreatment(Patient patient, WeeklyAdherence adherence)"
}
] |
f0c4be4d6e9b0eacafd6ece453d8f8d18097a10f | [
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXEqualConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXHyperlinkKeyValueSetter.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXListContainsItemConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXListDisplay.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXMandatoryFieldMarker.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXNonNullConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXNonZeroConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXUnreadMarker.java",
"implementation": "return false;",
"signature": "boolean synchronizesVariablesWithBindings()"
}
] | [
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXEqualConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXHyperlinkKeyValueSetter.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXListContainsItemConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXListDisplay.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXMandatoryFieldMarker.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXNonNullConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXNonZeroConditional.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERExtensions/Sources/er/extensions/ERXUnreadMarker.java",
"implementation": "return false;",
"signature": "boolean synchronizesBindingsWithVariables()"
}
] |
f5a1def5b88437aaf4761a4e61c7d8857fb5798b | [
{
"arguments": [
"FieldScopeImpl impl",
" Context context"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "@Nullable Boolean match = matchesFieldPath.get(impl);\n if (match == null) {\n match = impl.doMatchesFieldPath(context, this);\n matchesFieldPath.put(impl, match);",
"signature": "boolean matchesFieldPath(FieldScopeImpl impl, Context context)"
},
{
"arguments": [
"FieldScopeImpl impl",
" Context context"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "@Nullable Boolean matchAppliesForAll = matchStateAppliesForAllSubPaths.get(impl);\n if (matchAppliesForAll == null) {\n matchAppliesForAll = impl.doMatchStateAppliesForAllSubPaths(context, this);\n matchStateAppliesForAllSubPaths.put(impl, matchAppliesForAll);",
"signature": "boolean matchStateAppliesForAllSubPaths(FieldScopeImpl impl, Context context)"
},
{
"arguments": [],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "matchesFieldPath.clear();\n matchStateAppliesForAllSubPaths.clear();",
"signature": "void clearMethodCaches()"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "return cache.matchesFieldPath(this, context);",
"signature": "boolean matchesFieldPath(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "return cache.matchStateAppliesForAllSubPaths(this, context);",
"signature": "boolean matchStateAppliesForAllSubPaths(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "return true;\n // Make subclasses provide a decent toString()\n @Override\n public abstract String toString();\n\n boolean doMatchesFieldPath(Context context, Cache cache) {\n\n @Override\n public String toString() {\n return \"FieldScopes.all()\";",
"signature": "boolean doMatchStateAppliesForAllSubPaths(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "@Override\n public String toString() {\n return \"FieldScopes.none()\";",
"signature": "boolean doMatchesFieldPath(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "@Override\n public String toString() {\n return String.format(\"FieldScopes.fromSetFields(%s)\", message);",
"signature": "boolean doMatchesFieldPath(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "final boolean doMatchStateAppliesForAllSubPaths(Context context, Cache cache) {\n // Match is fixed if we match currently, or no sub paths can match.\n if (!matchesFieldPath(context, cache)) {\n for (Message message : context.messageFields()) {\n if (messageHasMatchingField(context, cache, message)) {\n return false;",
"signature": "boolean doMatchesFieldPath(Context context, Cache cache)"
},
{
"arguments": [],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "return String.format(\"FieldScopes.allowingFields(%s)\", Joiner.on(\", \").join(fieldNumbers));",
"signature": "String toString()"
},
{
"arguments": [],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "return String.format(\n \"FieldScopes.allowingFieldDescriptors(%s)\", Joiner.on(\", \").join(fieldDescriptors));",
"signature": "String toString()"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "if (matchesFieldPath(context, cache)) {\n // We are fixed as true only if both operands are fixed.\n return elements.get(0).matchStateAppliesForAllSubPaths(context, cache)\n && elements.get(1).matchStateAppliesForAllSubPaths(context, cache);",
"signature": "boolean doMatchStateAppliesForAllSubPaths(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "@Override\n public String toString() {\n return String.format(\"(%s && %s)\", elements.get(0), elements.get(1));",
"signature": "boolean doMatchesFieldPath(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "if (matchesFieldPath(context, cache)) {\n // We are fixed as true only if either field is fixed true.\n boolean firstFixedTrue =\n elements.get(0).matchesFieldPath(context, cache)\n && elements.get(0).matchStateAppliesForAllSubPaths(context, cache);\n boolean secondFixedTrue =\n elements.get(1).matchesFieldPath(context, cache)\n && elements.get(1).matchStateAppliesForAllSubPaths(context, cache);\n return firstFixedTrue || secondFixedTrue;",
"signature": "boolean doMatchStateAppliesForAllSubPaths(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "@Override\n public String toString() {\n return String.format(\"(%s || %s)\", elements.get(0), elements.get(1));",
"signature": "boolean doMatchesFieldPath(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "// We are fixed only if the operand is fixed.\n return elements.get(0).matchStateAppliesForAllSubPaths(context, cache);",
"signature": "boolean doMatchStateAppliesForAllSubPaths(Context context, Cache cache)"
},
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "@Override\n public String toString() {\n return String.format(\"!(%s)\", elements.get(0));",
"signature": "boolean doMatchesFieldPath(Context context, Cache cache)"
},
{
"arguments": [],
"filename": "extensions/proto/src/test/java/com/google/common/truth/extensions/proto/FieldScopesTest.java",
"implementation": "// Ignore all 'o_int' fields, in different ways.\n Message message =\n parse(\n \"o_int: 1 r_string: \\\"foo\\\" o_sub_test_message: { o_int: 2 \"\n + \"o_sub_sub_test_message: { o_int: 3 r_string: \\\"bar\\\"",
"signature": "void testIgnoreFieldsAtDifferentLevels()"
}
] | [
{
"arguments": [
"Context context",
" Cache cache"
],
"filename": "extensions/proto/src/main/java/com/google/common/truth/extensions/proto/FieldScopeImpl.java",
"implementation": "return false;\n boolean matchesFieldPath(Context context, Cache cache) {\n boolean matchesFieldPath(Context context, Cache cache) {\n boolean matchesFieldPath(Context context, Cache cache) {\n boolean matchesFieldPath(Context context, Cache cache) {\n boolean matchesContentOfSubMessages(Context context, Cache cache) {\n for (Message message : context.messageFields()) {\n if (messageHasMatchingField(context, cache, message)) {\n return true;\n return false;\n @Override\n final boolean matchesContentOfSubMessages(Context context, Cache cache) {\n // We ignore compound logic for checking sub-messages, since we want to ensure we inspect\n // any sub-message which could match a FieldScopeImpl at a deeper path.\n for (FieldScopeImpl impl : elements) {\n if (impl.matchesContentOfSubMessages(context, cache)) {\n return true;",
"signature": "boolean matchesContentOfSubMessages(Context context, Cache cache)"
}
] |
f89655fbb32c1372837f17bb6f7ed81f7a32c654 | [
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/dao/base/SqlBaseDao.java",
"implementation": "return schema() + \".\" + tableName;\n /**\n * Outputs the ORDER BY clause for multiple column name and sort order pairs.\n * @param columnNames List<String>\n * @param sortOrders List<SortOrder>>\n * @return String\n */\n protected String orderBy(List<String> columnNames, List<SortOrder> sortOrders) {\n if (columnNames.size() != sortOrders.size()) {\n throw new IllegalArgumentException(\"For order by clause, number of column names must match sort orders!\");",
"signature": "String schema()"
},
{
"arguments": [
"Bill bill",
" SOBIFragment sobiFragment"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "// Update the bill record\n MapSqlParameterSource billParams = getBillParams(bill, sobiFragment);\n if (jdbcNamed.update(SqlBillQuery.UPDATE_BILL_SQL.getSql(schema()), billParams) == 0) {\n jdbcNamed.update(SqlBillQuery.INSERT_BILL_SQL.getSql(schema()), billParams);",
"signature": "void updateBill(Bill bill, SOBIFragment sobiFragment)"
},
{
"arguments": [
"BillAction action : existingBillActions"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "MapSqlParameterSource actionParams = getBillActionParams(action, sobiFragment);\n jdbcNamed.update(SqlBillQuery.DELETE_BILL_ACTION_SQL.getSql(schema()), actionParams);",
"signature": "list\n for (BillAction action : existingBillActions)"
},
{
"arguments": [
"BillAction action : newBillActions"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "MapSqlParameterSource actionParams = getBillActionParams(action, sobiFragment);\n jdbcNamed.update(SqlBillQuery.INSERT_BILL_ACTION_SQL.getSql(schema()), actionParams);",
"signature": "actions\n for (BillAction action : newBillActions)"
},
{
"arguments": [
"Bill bill"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "",
"signature": "void deleteBill(Bill bill)"
},
{
"arguments": [
"Bill bill"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "",
"signature": "void publishBill(Bill bill)"
},
{
"arguments": [
"Bill bill"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "",
"signature": "void unPublishBill(Bill bill)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "",
"signature": "void deleteAllBills()"
},
{
"arguments": [
"Bill bill",
" SOBIFragment fragment"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "MapSqlParameterSource params = new MapSqlParameterSource();\n params.addValue(\"printNo\", bill.getPrintNo());\n params.addValue(\"sessionYear\", bill.getSession());\n params.addValue(\"title\", bill.getTitle());\n params.addValue(\"lawSection\", bill.getLawSection());\n params.addValue(\"lawCode\", bill.getLaw());\n params.addValue(\"summary\", bill.getSummary());\n params.addValue(\"activeVersion\", bill.getActiveVersion());\n params.addValue(\"sponsorId\", null /**TODO */);\n params.addValue(\"activeYear\", bill.getYear());\n params.addValue(\"modifiedDateTime\", toTimestamp(bill.getModifiedDate()));\n params.addValue(\"publishedDateTime\", toTimestamp(bill.getPublishDate()));\n addSOBIFragmentParams(fragment, params);\n return params;",
"signature": "MapSqlParameterSource getBillParams(Bill bill, SOBIFragment fragment)"
},
{
"arguments": [
"BillAmendment amendment",
" SOBIFragment fragment"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "MapSqlParameterSource params = new MapSqlParameterSource();\n params.addValue(\"printNo\", amendment.getBaseBillPrintNo());\n params.addValue(\"sessionYear\", amendment.getSession());\n params.addValue(\"version\", amendment.getVersion());\n params.addValue(\"sponsorMemo\", amendment.getMemo());\n params.addValue(\"actClause\", amendment.getActClause());\n params.addValue(\"fullText\", amendment.getFulltext());\n params.addValue(\"stricken\", amendment.isStricken());\n params.addValue(\"currentCommitteeId\", null);\n params.addValue(\"uniBill\", amendment.isUniBill());\n params.addValue(\"modifiedDateTime\", toTimestamp(amendment.getModifiedDate()));\n params.addValue(\"publishedDateTime\", toTimestamp(amendment.getPublishDate()));\n addSOBIFragmentParams(fragment, params);\n return params;",
"signature": "MapSqlParameterSource getBillAmendmentParams(BillAmendment amendment, SOBIFragment fragment)"
},
{
"arguments": [
"BillAction billAction",
" SOBIFragment fragment"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "MapSqlParameterSource params = new MapSqlParameterSource();\n params.addValue(\"printNo\", billAction.getBaseBillPrintNo());\n params.addValue(\"sessionYear\", billAction.getSession());\n params.addValue(\"version\", billAction.getAmendmentVersion());\n params.addValue(\"effectDate\", billAction.getDate());\n params.addValue(\"text\", billAction.getText());\n params.addValue(\"modifiedDateTime\", toTimestamp(billAction.getModifiedDate()));\n params.addValue(\"publishedDateTime\", toTimestamp(billAction.getPublishDate()));\n addSOBIFragmentParams(fragment, params);\n return params;",
"signature": "MapSqlParameterSource getBillActionParams(BillAction billAction, SOBIFragment fragment)"
},
{
"arguments": [
"BillAmendment billAmendment",
" BillId sameAs",
" SOBIFragment fragment"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "MapSqlParameterSource params = new MapSqlParameterSource();\n params.addValue(\"printNo\", billAmendment.getBaseBillPrintNo());\n params.addValue(\"sessionYear\", billAmendment.getSession());\n params.addValue(\"version\", billAmendment.getVersion());\n params.addValue(\"sameAsPrintNo\", sameAs.getBasePrintNo());\n params.addValue(\"sameAsSessionYear\", sameAs.getSession());\n params.addValue(\"sameAsVersion\", sameAs.getVersion());\n addSOBIFragmentParams(fragment, params);\n return params;",
"signature": "MapSqlParameterSource getBillSameAsParams(BillAmendment billAmendment, BillId sameAs, SOBIFragment fragment)"
},
{
"arguments": [
"SOBIFragment fragment",
" MapSqlParameterSource params"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "params.addValue(\"lastFragmentFileName\", fragment.getFileName());\n params.addValue(\"lastFragmentType\", fragment.getType().name());",
"signature": "void addSOBIFragmentParams(SOBIFragment fragment, MapSqlParameterSource params)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFileDao.java",
"implementation": "",
"signature": "public SOBIFileRowMapper()"
},
{
"arguments": [
"String pfx"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFileDao.java",
"implementation": "this.pfx = pfx;\n @Override\n public SOBIFile mapRow(ResultSet rs, int rowNum) throws SQLException {\n String fileName = rs.getString(pfx + \"file_name\");\n Date publishedDateTime = rs.getDate(pfx + \"published_date_time\");\n boolean pendingProcessing = rs.getBoolean(pfx + \"pending_processing\");\n File file = getSOBIFileFromFileSystem(fileName, publishedDateTime, pendingProcessing);\n try {\n SOBIFile sobiFile = new SOBIFile(file);\n sobiFile.setPendingProcessing(pendingProcessing);\n sobiFile.setProcessedDateTime(rs.getDate(pfx + \"processed_date_time\"));\n sobiFile.setProcessedCount(rs.getInt(pfx + \"processed_count\"));\n return sobiFile;\n catch (FileNotFoundException ex) {\n logger.error(\"SOBI file \" + rs.getString(\"file_name\") + \" was not found in the expected location! \\n\" +\n \"This could be a result of modifications to the sobi file directory that were not synced with \" +\n \"the database. \", ex);",
"signature": "public SOBIFileRowMapper(String pfx)"
},
{
"arguments": [
"String fileName",
" Date publishedDateTime",
" boolean pendingProcessing"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFileDao.java",
"implementation": "return (pendingProcessing) ? getFileInWorkingDirectory(fileName) : getFileInArchiveDirectory(fileName, publishedDateTime);\n * Moves the file into the working SOBI file directory.\n * @param file File\n private void moveFileToWorking(File file) throws IOException {\n File workingFile = getFileInWorkingDirectory(file.getName());\n if (workingFile.exists()) {\n FileUtils.deleteQuietly(workingFile);\n FileUtils.moveFile(file, workingFile);",
"signature": "File getSOBIFileFromFileSystem(String fileName, Date publishedDateTime, boolean pendingProcessing)"
},
{
"arguments": [
"String fileName",
" Date publishedDateTime"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFileDao.java",
"implementation": "FileUtils.deleteQuietly(getFileInWorkingDirectory(fileName));\n FileUtils.deleteQuietly(getFileInArchiveDirectory(fileName, publishedDateTime));\n * @param publishedDateTime Date\n private File getFileInArchiveDirectory(String fileName, Date publishedDateTime) {\n String year = Integer.toString(new LocalDate(publishedDateTime).getYear());\n * Returns a MapSqlParameterSource with columns mapped to SOBIFile values for use in update/insert queries.\n params.addValue(\"stagedDateTime\", toTimestamp(sobiFile.getStagedDateTime()));",
"signature": "void deleteSOBIFileFromFileSystem(String fileName, Date publishedDateTime)"
},
{
"arguments": [
"SOBIFragmentType fragmentType",
" String fragmentFileName"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFragmentDao.java",
"implementation": "MapSqlParameterSource params = new MapSqlParameterSource();\n params.addValue(\"sobiFragmentType\", fragmentType.name());\n params.addValue(\"fileName\", fragmentFileName);\n return jdbcNamed.queryForObject(GET_SOBI_FRAGMENT_BY_FILE_NAME_SQL, params, new SOBIFragmentRowMapper());\n /** {@inheritDoc",
"signature": "SOBIFragment getSOBIFragment(SOBIFragmentType fragmentType, String fragmentFileName)"
},
{
"arguments": [
"List<SOBIFragment> fragments"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFragmentDao.java",
"implementation": "for (SOBIFragment fragment : fragments) {\n // Set a unique file name for this fragment\n fragment.setFileName(createFileNameForFragment(fragment));\n // Persist the meta data of the fragment in the database\n MapSqlParameterSource params = new MapSqlParameterSource();\n params.addValue(\"sobiFileName\", fragment.getParentSOBIFile().getFileName());\n params.addValue(\"fragmentFileName\", fragment.getFileName());\n params.addValue(\"publishedDateTime\", toTimestamp(fragment.getPublishedDateTime()));\n params.addValue(\"sobiFragmentType\", fragment.getType().name());\n params.addValue(\"fileCounter\", fragment.getCounter());\n params.addValue(\"text\", fragment.getText().replace('\\0', ' '));\n if (jdbcNamed.update(UPDATE_SOBI_FRAGMENT_SQL, params) == 0) {\n jdbcNamed.update(INSERT_SOBI_FRAGMENT_SQL, params);",
"signature": "void saveSOBIFragments(List<SOBIFragment> fragments)"
},
{
"arguments": [
"SOBIFile sobiFile"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFragmentDao.java",
"implementation": "MapSqlParameterSource params = new MapSqlParameterSource(\"sobiFileName\", sobiFile.getFileName());\n jdbcNamed.update(DELETE_SOBI_FRAGMENTS_SQL, params);",
"signature": "void deleteSOBIFragments(SOBIFile sobiFile)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFragmentDao.java",
"implementation": "this(\"\", Collections.<SOBIFile>emptyList());",
"signature": "public SOBIFragmentRowMapper()"
},
{
"arguments": [
"SOBIFile sobiFile"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFragmentDao.java",
"implementation": "this(\"\", Arrays.asList(sobiFile));",
"signature": "public SOBIFragmentRowMapper(SOBIFile sobiFile)"
},
{
"arguments": [
"String pfx",
" List<SOBIFile> sobiFiles"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFragmentDao.java",
"implementation": "this.pfx = pfx;\n for (SOBIFile sobiFile : sobiFiles) {\n this.sobiFileMap.put(sobiFile.getFileName(), sobiFile);",
"signature": "public SOBIFragmentRowMapper(String pfx, List<SOBIFile> sobiFiles)"
},
{
"arguments": [
"String source"
],
"filename": "src/main/java/gov/nysenate/openleg/model/BaseObject.java",
"implementation": "dataSources.add(source);",
"signature": "void addDataSource(String source)"
},
{
"arguments": [
"String printNo",
" int sessionYear"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.printNo = printNo;\n this.session = sessionYear;\n this.year = sessionYear;\n /** --- Functional Getters/Setter --- */\n\n * Indicates if this bill is currently set to the base version.\n public static boolean isBaseVersion(String version) {\n * Creates a unique id for the bill by using printNo and session year, e.g S1234-2013\n public String getBillId() {\n return this.printNo + \"-\" + this.session;\n * Indicate if this bill is a resolution by checking that it's not a senate/assembly bill.\n * @return - True if this bill is a resolution of some sort.\n public boolean isResolution() {\n return this.printNo.charAt(0) != 'A' && this.printNo.charAt(0) != 'S';\n * Creates a unique id for the bill with padding to resemble LBDC's representation.\n public String getPaddedBillId() {\n return this.getPaddedPrintNumber() + \"-\" + this.getSession();\n * Returns the print number padded with 5 zeros, e.g S01234. This is how LBDC represents\n * print numbers in their SOBI files.\n public String getPaddedPrintNumber() {\n Matcher billIdMatcher = printNumberPattern.matcher(this.getPrintNo());\n return String.format(\"%s%05d%s\", billIdMatcher.group(1), Integer.parseInt(billIdMatcher.group(2)),\n billIdMatcher.group(3));\n return \"\";\n * Retrieves an amendment stored in this bill using the version as the key.\n * @return BillAmendment if found, null otherwise\n public BillAmendment getAmendment(String version) {\n * Retrieves a list of all amendments stored in this bill.\n * @return - List<BillAmendment>\n public List<BillAmendment> getAmendmentList() {\n * @param billAmendment - Amendment to add to this bill.\n public void addAmendment(BillAmendment billAmendment) {\n /**\n * Associate a list of amendments with this bill.\n * @param billAmendments - List<Amendment> - Amendments to add to this bill\n */\n public void addAmendments(List<BillAmendment> billAmendments) {\n for (BillAmendment billAmendment : billAmendments) {\n this.addAmendment(billAmendment);",
"signature": "public Bill(String printNo, int sessionYear)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "this.setBaseBillPrintNo(bill.getPrintNo());\n this.setAmendmentVersion(billAmendment);\n /** --- Functional Getters/Setters --- */\n public int getYear() {\n return new LocalDate(date).getYear();\n /** --- Overrides --- */\n @Override\n public boolean equals(Object o) {\n if (this == o) return true;\n if (o == null || getClass() != o.getClass()) return false;\n BillAction that = (BillAction) o;\n if (baseBillPrintNo != null ? !baseBillPrintNo.equals(that.baseBillPrintNo) : that.baseBillPrintNo != null)\n return false;\n if (amendmentVersion != null ? !amendmentVersion.equals(that.amendmentVersion) : that.amendmentVersion != null) return false;\n if (date != null ? !date.equals(that.date) : that.date != null) return false;\n if (text != null ? !text.equals(that.text) : that.text != null) return false;\n return true;\n @Override\n public int hashCode() {\n int result = baseBillPrintNo != null ? baseBillPrintNo.hashCode() : 0;\n result = 31 * result + (amendmentVersion != null ? amendmentVersion.hashCode() : 0);\n result = 31 * result + (date != null ? date.hashCode() : 0);\n result = 31 * result + (text != null ? text.hashCode() : 0);\n return result;\n public String toString() {\n return date.toString() + \" \" + text;\n /** --- Helper classes --- */\n /** --- Basic Getters/Setters --- */\n\n public String getBaseBillPrintNo() {\n return baseBillPrintNo;",
"signature": "public BillAction()"
},
{
"arguments": [
"String baseBillPrintNo"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "this.baseBillPrintNo = baseBillPrintNo;",
"signature": "void setBaseBillPrintNo(String baseBillPrintNo)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "return date;",
"signature": "Date getDate()"
},
{
"arguments": [
"Date date"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "this.date = date;",
"signature": "void setDate(Date date)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "return text;",
"signature": "String getText()"
},
{
"arguments": [
"Bill baseBill",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "this.baseBillPrintNo = baseBill.getPrintNo();\n /** --- Functional Getters/Setters --- */\n\n public String getBillId() {\n return this.baseBillPrintNo + this.version + \"-\" + this.session;\n public void setVersion(String version) {\n this.version = version.trim().toUpperCase();\n public void updateVote(Vote vote) {\n this.getVotes().remove(vote);\n this.getVotes().add(vote);",
"signature": "public BillAmendment(Bill baseBill, String version)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "public Set<BillId> getSameAs() {\n public void setSameAs(Set<BillId> sameAs) {\n public String getMemo() {\n public void setMemo(String memo) {\n public String getActClause() {\n public void setActClause(String actClause) {\n public String getFulltext() {\n public void setFulltext(String fulltext) {\n public String getCurrentCommittee() {\n public void setCurrentCommittee(String currentCommittee) {\n public List<Person> getCoSponsors() {\n public void setCoSponsors(List<Person> coSponsors) {\n public List<Person> getMultiSponsors() {\n public void setMultiSponsors(List<Person> multiSponsors) {\n public Boolean isStricken() {\n public void setStricken(Boolean stricken) {\n public Boolean isUniBill() {\n public void setUniBill(Boolean uniBill) {",
"signature": "String getVersion()"
},
{
"arguments": [
"String fragmentFileName",
" SOBIFragmentType type",
" int startLineNo",
" String line"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.fragmentFileName = fragmentFileName;\n this.fragmentType = type;\n return (this.fragmentFileName + \":\" + this.getStartLineNo() + \"-\" + this.getEndLineNo());\n * Returns the session year of the bill.\n */\n public int getYear() {\n return (this.billId != null) ? this.billId.getSession() : -1;",
"signature": "public SOBIBlock(String fragmentFileName, SOBIFragmentType type, int startLineNo, String line)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "return (this.billId != null) ? this.billId.getBasePrintNo() : null;",
"signature": "String getBasePrintNo()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "return (this.billId != null) ? this.billId.getVersion() : null;",
"signature": "String getAmendment()"
},
{
"arguments": [
"String printNo",
" String version",
" int session"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.billId = new BillId(printNo.substring(0,1) + Integer.parseInt(printNo.substring(1)),\n session, version.trim());\n public String getFragmentFileName() {\n return fragmentFileName;",
"signature": "void setBillId(String printNo, String version, int session)"
},
{
"arguments": [
"String fragmentFileName"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.fragmentFileName = fragmentFileName;",
"signature": "void setFragmentFileName(String fragmentFileName)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "return fragmentType;",
"signature": "SOBIFragmentType getFragmentType()"
},
{
"arguments": [
"SOBIFragmentType fragmentType"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.fragmentType = fragmentType;",
"signature": "void setFragmentType(SOBIFragmentType fragmentType)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFile.java",
"implementation": "this.processedCount++;\n public Date getStagedDateTime() {\n return stagedDateTime;",
"signature": "void incrementProcessedCount()"
},
{
"arguments": [
"Date stagedDateTime"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFile.java",
"implementation": "this.stagedDateTime = stagedDateTime;",
"signature": "void setStagedDateTime(Date stagedDateTime)"
},
{
"arguments": [
"SOBIFile parentSOBIFile",
" SOBIFragmentType type",
" String text",
" int counter"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragment.java",
"implementation": "this.type = type;\n this.text = text;\n this.counter = counter;\n return type.equals(SOBIFragmentType.BILL);\n public List<SOBIBlock> getSOBIBlocks() {\n List<String> lines = new ArrayList<>(Arrays.asList(this.text.split(\"\\\\r?\\\\n\")));\n block = new SOBIBlock(fileName, type, lineNo, line);\n SOBIBlock newBlock = new SOBIBlock(fileName, type, lineNo, line);\n blocks.add(new SOBIBlock(fileName, type, lineNo,\n block.getBillHeader() + SOBILineType.LAW.getTypeCode()));\n @Override\n public String toString() {\n return \"SOBIFragment{\" + \"fragmentType=\" + type + \", fileName='\" + fileName + '\\'' +\n \", parentSOBIFile=\" + parentSOBIFile + '",
"signature": "public SOBIFragment(SOBIFile parentSOBIFile, SOBIFragmentType type, String text, int counter)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragment.java",
"implementation": "return parentSOBIFile.getPublishedDateTime();",
"signature": "Date getPublishedDateTime()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragment.java",
"implementation": "return parentSOBIFile.getProcessedDateTime();",
"signature": "Date getProcessedDateTime()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragmentType.java",
"implementation": "return isXml;",
"signature": "boolean isXml()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragmentType.java",
"implementation": "return startPattern;",
"signature": "String getStartPattern()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragmentType.java",
"implementation": "return endPattern;",
"signature": "String getEndPattern()"
},
{
"arguments": [
"Environment environment"
],
"filename": "src/main/java/gov/nysenate/openleg/processors/DataProcessor.java",
"implementation": "this.environment = environment;\n\n SqlSOBIFragmentDao fragmentDao = new SqlSOBIFragmentDao(environment);\n this.sobiFileDao = fragmentDao;\n this.sobiFragmentDao = fragmentDao;\n\n this.processorMap = new HashMap<>();\n this.processorMap.put(SOBIFragmentType.BILL, new BillProcessor(environment));\n this.processorMap.put(SOBIFragmentType.AGENDA, new AgendaProcessor());\n this.processorMap.put(SOBIFragmentType.AGENDA_VOTE, new AgendaVoteProcessor());\n this.processorMap.put(SOBIFragmentType.CALENDAR, new CalendarProcessor());\n this.processorMap.put(SOBIFragmentType.CALENDAR_ACTIVE, new CalendarActiveListProcessor());\n this.processorMap.put(SOBIFragmentType.COMMITTEE, new CommitteeProcessor());\n /** --- Processing methods --- */\n\n * @throws ParseException\n public void stage(File sourceDir, File workDir) throws IOException, ParseException {\n // Prepares incoming SOBI files for processing\n sobiFileDao.stageSOBIFiles(true);\n // TODO: Stage all hearings to the work directory.\n // TODO: Stage all transcripts\n *\n * @throws IOException, ParseException\n public void collate(File workDir) throws IOException, ParseException {\n for (SOBIFile sobiFile : sobiFileDao.getPendingSOBIFiles(SortOrder.ASC)) {\n StringBuilder billBuffer = new StringBuilder();\n int fragmentCounter = 1;\n List<SOBIFragment> sobiFragments = new ArrayList<>();\n List<String> lines = Arrays.asList(sobiFile.getText().split(\"\\\\r?\\\\n\"));\n Iterator<String> lineIterator = lines.iterator();\n // Construct fragments from SOBI text\n while (lineIterator.hasNext()) {\n String line = lineIterator.next();\n SOBIFragmentType fragmentType = getFragmentTypeFromLine(line);\n if (fragmentType != null) {\n // Bill portions are appended into a single buffer\n if (fragmentType.equals(SOBIFragmentType.BILL)) {\n if (line.charAt(11) == 'M') {\n // Memos are latin1 encoding\n line = new String(line.getBytes(encoding), \"latin1\");",
"signature": "public DataProcessor(Environment environment)"
},
{
"arguments": [
"Storage storage",
" List<Entry<String",
" Change>> changes",
" List<ServiceBase> services"
],
"filename": "src/main/java/gov/nysenate/openleg/processors/DataProcessor.java",
"implementation": "public void archive(File workingDir, File archiveDir) throws IOException {\n /** --- Internal Methods --- */\n\n /**\n * Check the given SOBI line to determine if it matches the start of a SOBI Fragment type.\n * @param line String\n * @return SOBIFragmentType or null if no match\n */\n protected SOBIFragmentType getFragmentTypeFromLine(String line) {\n for (SOBIFragmentType fragmentType : SOBIFragmentType.values()) {\n if (line.matches(fragmentType.getStartPattern())) {\n return fragmentType;",
"signature": "void push(Storage storage, List<Entry<String, Change>> changes, List<ServiceBase> services)"
},
{
"arguments": [
"cls == Calendar.class"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "// value = this.converter.readCalendar(storageFile);\n//",
"signature": "else if (cls == Calendar.class)"
},
{
"arguments": [
"cls == Transcript.class"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "// value = this.converter.readTranscript(storageFile);\n//",
"signature": "else if (cls == Transcript.class)"
},
{
"arguments": [
"value instanceof Calendar"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "// this.converter.write((Calendar)value, storageFile);\n//",
"signature": "else if (value instanceof Calendar)"
},
{
"arguments": [
"value instanceof Transcript"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "// this.converter.write((Transcript)value, storageFile);\n//",
"signature": "else if (value instanceof Transcript)"
}
] | [
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "super(null);",
"signature": "public SqlBillDao()"
},
{
"arguments": [
"Bill bill",
" SOBIFragment sobiFragment"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/bill/SqlBillDao.java",
"implementation": "if (bill != null) {\n /* try {\n runner.update(UPDATE_BILL_SQL, bill.getTitle(), bill.getLawSection(), bill.getSummary(), bill.getActiveVersion(),\n bill.getSponsor().getId(), bill.getYear(), new Timestamp(bill.getModifiedDate().getTime()),\n new Timestamp(bill.getPublishDate().getTime()), bill.getPrintNumber(), bill.getSession());\n runner.update(INSERT_BILL_SQL,\n bill.getPrintNumber(), bill.getSession(), bill.getTitle(), bill.getLawSection(),\n bill.getSummary(), bill.getActiveVersion(), bill.getSponsor().getId(), bill.getYear(),\n new Timestamp(bill.getModifiedDate().getTime()), new Timestamp(bill.getPublishDate().getTime()), bill.getPrintNumber(), bill.getSession());",
"signature": "void saveBill(Bill bill, SOBIFragment sobiFragment)"
},
{
"arguments": [
"SOBIFile sobiFile"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFileDao.java",
"implementation": "sobiFile.setProcessedDateTime(this.processedDateTime);\n sobiFile.setPendingProcessing(this.pendingProcessing);\n sobiFile.setProcessedCount(this.processedCount);\n /** Row Mapper implementation */\n static class Mapper implements RowMapper<SOBIMetadata> {\n @Override\n public SOBIMetadata mapRow(ResultSet rs, int rowNum) throws SQLException {\n SOBIMetadata metadata = new SOBIMetadata();\n metadata.fileName = rs.getString(\"file_name\");\n metadata.publishedDateTime = rs.getDate(\"published_date_time\");\n metadata.processedDateTime = rs.getDate(\"processed_date_time\");\n metadata.pendingProcessing = rs.getBoolean(\"pending_processing\");\n metadata.processedCount = rs.getInt(\"processed_count\");\n return metadata;\n if (sobiFile != null) {\n jdbcNamed.update(INSERT_SOBI_FILE, getSOBIInsertUpdateParams(sobiFile));",
"signature": "void applyToSOBIFile(SOBIFile sobiFile)"
},
{
"arguments": [
"String fileName",
" Date publishedDate",
" boolean pendingProcessing"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFileDao.java",
"implementation": "return (pendingProcessing) ? getFileInWorkingDirectory(fileName) : getFileInArchiveDirectory(fileName, publishedDate);",
"signature": "File getSOBIFileFromFileSystem(String fileName, Date publishedDate, boolean pendingProcessing)"
},
{
"arguments": [
"SOBIMetadata metaData"
],
"filename": "src/main/java/gov/nysenate/openleg/dao/sobi/SqlSOBIFileDao.java",
"implementation": "return getSOBIFileFromFileSystem(metaData.fileName, metaData.publishedDateTime, metaData.pendingProcessing);\n * Deletes the actual SOBI file from the file system and writes the contents of SOBIFile to the appropriate directory.\n * @param sobiFile SOBIFile\n * @return File - Newly written file.\n * @throws IOException\n private File updateSOBIFileInFileSystem(SOBIFile sobiFile) throws IOException {\n File workFile = getFileInWorkingDirectory(sobiFile.getFileName());\n File archiveFile = getFileInArchiveDirectory(sobiFile.getFileName(), sobiFile.getPublishedDateTime());\n\n // Delete the file from any possible directory so we don't have to keep track of where it is.\n FileUtils.deleteQuietly(workFile);\n FileUtils.deleteQuietly(archiveFile);\n\n if (sobiFile.isPendingProcessing()) {\n // Write to the working directory.\n FileUtils.write(workFile, sobiFile.getText());\n return workFile;\n else {\n // Create any sub directories just to be safe and write to archive directory.\n archiveFile.getParentFile().mkdirs();\n FileUtils.write(archiveFile, sobiFile.getText());\n return archiveFile;\n * @param publishedDate Date\n private File getFileInArchiveDirectory(String fileName, Date publishedDate) {\n LocalDate localDate = new LocalDate(publishedDate);\n String year = Integer.toString(localDate.getYear());\n * Convenience method to convert a list of SOBIMetaData objects into SOBIFile objects.\n * @param metaDataList List<SOBIMetaData>\n * @return List<SOBIFile>\n */\n private List<SOBIFile> getSobiFileListFromMetaDataList(List<SOBIMetadata> metaDataList) {\n List<SOBIFile> sobiFiles = new ArrayList<>();\n try {\n for (SOBIMetadata metaData : metaDataList) {\n SOBIFile sobiFile = new SOBIFile(getSOBIFileFromFileSystem(metaData));\n metaData.applyToSOBIFile(sobiFile);\n sobiFiles.add(sobiFile);",
"signature": "File getSOBIFileFromFileSystem(SOBIMetadata metaData)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/BaseObject.java",
"implementation": "/**\n * Set the last publish date.\n *\n * @param publishDate - The new publish date.\n */\n public void setPublishDate(Date publishDate)\n {\n /**\n * @return - true if the object has been published\n */\n public boolean isPublished()\n {\n /**\n * Gets the last modified time in milliseconds since epoch.\n */\n /**\n * Sets the last modified timestamp in milliseconds since epoch.\n */\n /**\n * @return - The session this object was created in.\n */\n /**\n * @param session - The new session this object was created in.\n */\n /**\n * @return - The calendar year this object was active in.\n */\n /**\n * @param year - The new calendar year for this object.\n */\n /**\n * Get the set of SOBI files that contain modifications for this object.\n */\n /**\n * @param dataSources - The new set of data sources that contain modifications for this object.\n */\n\n /**\n * Add a new source to the set of data sources. This is preferred to\n * getting a reference to the list and directly adding filenames\n *\n * @param source - The new source to add to the data sources.\n */\n public void addDataSource(String source)\n {\n dataSources.add(source);",
"signature": "Date getPublishDate()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/agenda/AgendaInfoAddendum.java",
"implementation": "return this.getOtype()+\"-\"+this.getYear()+\"-\"+this.getAgendaNumber()+this.getId();",
"signature": "String getOid()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/agenda/AgendaInfoAddendum.java",
"implementation": "return \"agenda-info\";",
"signature": "String getOtype()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/agenda/AgendaVoteAddendum.java",
"implementation": "// TODO Auto-generated method stub\n return null;",
"signature": "String getOid()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/agenda/AgendaVoteAddendum.java",
"implementation": "return \"agendavote\";",
"signature": "String getOtype()"
},
{
"arguments": [
"String billId",
" int session"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this();\n this.setBillId(billId);\n this.setSession(session);\n this.setYear(session);\n @JsonIgnore\n public static boolean isBaseVersion(String version)\n {\n * @return - True if this bill is a resolution of some sort.\n */\n @JsonIgnore\n public boolean isResolution()\n {\n return billId.charAt(0)!='A' && billId.charAt(0)!='S';",
"signature": "public Bill(String billId, int session)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (this.getSession()==2009) {\n String disqusId = this.getBillId().split(\"-\")[0];\n return \"http://open.nysenate.gov/legislation/api/html/bill/\" + disqusId;",
"signature": "String getDisqusUrl()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return billId;\n * @param billId - The new bill id.\n */\n public void setBillId(String billId)\n {\n this.billId = billId;",
"signature": "String getBillId()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return \"bill\";",
"signature": "String getOtype()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return this.getBillId();\n @JsonIgnore\n public String getPaddedBillId()\n {\n return this.getPaddedPrintNumber()+\"-\"+this.getSession();\n @JsonIgnore\n public String getPaddedPrintNumber()\n {\n Matcher billIdMatcher = billIdPattern.matcher(this.getBillId());\n if (billIdMatcher.find()) {\n return String.format(\"%s%05d%s\", billIdMatcher.group(2), Integer.parseInt(billIdMatcher.group(3)), billIdMatcher.group(4));",
"signature": "String getOid()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "Matcher billIdMatcher = billIdPattern.matcher(this.getBillId());\n return billIdMatcher.group(1);",
"signature": "String getPrintNumber()"
},
{
"arguments": [
"String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "* @return - A list of all Amendments associated with this Bill.\n @JsonIgnore\n public List<BillAmendment> getAmendmentList()\n {\n * @param billAmendment - Amendment to associate.\n public void addAmendment(BillAmendment billAmendment)\n {\n * @return Mapping of Amendment versions to Amendment objects for keyed retrieval.\n public Map<String, BillAmendment> getAmendmentMap()\n {\n return amendmentMap;",
"signature": "BillAmendment getAmendment(String version)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "/**\n * @return The active amendment version.\n */\n public String getActiveVersion()\n {\n return activeVersion;",
"signature": "BillAmendment getActiveAmendment()"
},
{
"arguments": [
"String activeVersion"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.activeVersion = activeVersion;",
"signature": "void setActiveVersion(String activeVersion)"
},
{
"arguments": [
"LinkedList<String> activeHistory"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.activeHistory = activeHistory;",
"signature": "void setActiveHistory(LinkedList<String> activeHistory)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return title;",
"signature": "String getTitle()"
},
{
"arguments": [
"String title"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.title = title;",
"signature": "void setTitle(String title)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return lawSection;",
"signature": "String getLawSection()"
},
{
"arguments": [
"String lawSection"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.lawSection = lawSection;",
"signature": "void setLawSection(String lawSection)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return this.getActiveAmendment().getSameAs();",
"signature": "String getSameAs()"
},
{
"arguments": [
"String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n return getAmendment(version).getSameAs();",
"signature": "String getSameAs(String version)"
},
{
"arguments": [
"String sameAs",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setSameAs(sameAs);",
"signature": "void setSameAs(String sameAs, String version)"
},
{
"arguments": [
"List<String> previousVersions"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.previousVersions = previousVersions;",
"signature": "void setPreviousVersions(List<String> previousVersions)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return sponsor;",
"signature": "Person getSponsor()"
},
{
"arguments": [
"Person sponsor"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.sponsor = sponsor;",
"signature": "void setSponsor(Person sponsor)"
},
{
"arguments": [
"List<Person> otherSponsors"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.otherSponsors = otherSponsors;",
"signature": "void setOtherSponsors(List<Person> otherSponsors)"
},
{
"arguments": [
"List<Person> coSponsors",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setCoSponsors(coSponsors);",
"signature": "void setCoSponsors(List<Person> coSponsors, String version)"
},
{
"arguments": [
"List<Person> multiSponsors",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setMultiSponsors(multiSponsors);",
"signature": "void setMultiSponsors(List<Person> multiSponsors, String version)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return summary;",
"signature": "String getSummary()"
},
{
"arguments": [
"String summary"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.summary = summary;",
"signature": "void setSummary(String summary)"
},
{
"arguments": [
"List<BillAction> actions"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.actions = actions;",
"signature": "void setActions(List<BillAction> actions)"
},
{
"arguments": [
"BillAction action"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "actions.add(action);",
"signature": "void addAction(BillAction action)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "public String getFulltext(String version)\n {\n if (hasAmendment(version)) {\n return getAmendment(version).getFulltext();",
"signature": "String getFulltext()"
},
{
"arguments": [
"String fulltext",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setFulltext(fulltext);",
"signature": "void setFulltext(String fulltext, String version)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return this.getActiveAmendment().getMemo();\n public String getMemo(String version)\n {\n if (hasAmendment(version)) {\n getAmendment(version).getMemo();",
"signature": "String getMemo()"
},
{
"arguments": [
"String memo",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setMemo(memo);",
"signature": "void setMemo(String memo, String version)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return this.getActiveAmendment().getLaw();\n public String getLaw(String version)\n {\n if (hasAmendment(version)) {\n return getAmendment(version).getLaw();",
"signature": "String getLaw()"
},
{
"arguments": [
"String law",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setLaw(law);",
"signature": "void setLaw(String law, String version)"
},
{
"arguments": [
"String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n return getAmendment(version).getActClause();",
"signature": "String getActClause(String version)"
},
{
"arguments": [
"String actClause",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setActClause(actClause);",
"signature": "void setActClause(String actClause, String version)"
},
{
"arguments": [
"String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n return getAmendment(version).isStricken();",
"signature": "Boolean isStricken(String version)"
},
{
"arguments": [
"Boolean stricken",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setStricken(stricken);",
"signature": "void setStricken(Boolean stricken, String version)"
},
{
"arguments": [
"String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n return this.getAmendment(version).isUniBill();",
"signature": "boolean isUniBill(String version)"
},
{
"arguments": [
"boolean uniBill",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n this.getAmendment(version).setUniBill(uniBill);",
"signature": "void setUniBill(boolean uniBill, String version)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "return this.getActiveAmendment().getCurrentCommittee();\n public String getCurrentCommittee(String version)\n {\n if (hasAmendment(version)) {\n return getAmendment(version).getCurrentCommittee();",
"signature": "String getCurrentCommittee()"
},
{
"arguments": [
"String currentCommittee",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setCurrentCommittee(currentCommittee);",
"signature": "void setCurrentCommittee(String currentCommittee, String version)"
},
{
"arguments": [
"List<String> pastCommittees"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "this.pastCommittees = new ArrayList<String>(pastCommittees);\n public void addPastCommittee(String committee)\n {\n if(!pastCommittees.contains(committee)) {\n pastCommittees.add(committee);",
"signature": "void setPastCommittees(List<String> pastCommittees)"
},
{
"arguments": [
"List<Vote> votes",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).setVotes(votes);",
"signature": "void setVotes(List<Vote> votes, String version)"
},
{
"arguments": [
"Vote vote",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "if (hasAmendment(version)) {\n getAmendment(version).getVotes().remove(vote);\n getAmendment(version).getVotes().add(vote);",
"signature": "void updateVote(Vote vote, String version)"
},
{
"arguments": [
"Date publishDate"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/Bill.java",
"implementation": "public Date getModifiedDate()\n {\n /**\n * @param vote - The vote to remove from the list of votes on this bill.\n */\n public void removeVote(Vote vote, String version)\n {\n if (hasAmendment(version)) {\n getAmendment(version).getVotes().remove(vote);",
"signature": "void setPublishDate(Date publishDate)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "this.bill = bill;\n this.setBillAmendment(billAmendment);\n this.oid = this.bill.getBillId() + \"-\" + this.date.getTime() + \"-\" + this.text;\n java.util.Calendar calendar = java.util.Calendar.getInstance();\n calendar.setTime(date);\n this.setYear(calendar.get(java.util.Calendar.YEAR));\n /**\n * @return - The object's otype\n */\n public String getOtype()\n {\n return \"action\";",
"signature": "public BillAction()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "return this.oid;",
"signature": "String getOid()"
},
{
"arguments": [
"String oid"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "this.oid = oid;\n /**\n * @return - The date of the action.\n */\n public Date getDate() {\n return date;",
"signature": "void setOid(String oid)"
},
{
"arguments": [
"Date date"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "this.date = date;",
"signature": "void setDate(Date date)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "return text;",
"signature": "String getText()"
},
{
"arguments": [
"String text"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "this.text = text;",
"signature": "void setText(String text)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "return bill;\n /**\n * @param bill - The new bill to this action targets.\n */\n public void setBill(Bill bill) {\n this.bill = bill;\n public boolean equals(Object obj) {\n if (obj != null && obj instanceof BillAction) {\n BillAction other = (BillAction)obj;\n return this.getOid().equals(other.getOid());",
"signature": "Bill getBill()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAction.java",
"implementation": "java.util.Calendar cal = java.util.Calendar.getInstance();\n cal.setTime(date);\n return cal.get(java.util.Calendar.YEAR);",
"signature": "int getYear()"
},
{
"arguments": [
"Bill baseBill",
" String version"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "this.baseBillPrintNo = baseBill.getPrintNumber();\n this.baseBillId = baseBill.getBillId();\n public String getBaseBillId()\n {\n return baseBillId;\n public void setBaseBillId(String baseBillId)\n {\n this.baseBillId = baseBillId;\n public String getBillId()\n {\n return this.baseBillPrintNo + this.version + \"-\" + this.session;",
"signature": "public BillAmendment(Bill baseBill, String version)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "public void setVersion(String version)\n {\n this.version = version.trim().toUpperCase();",
"signature": "String getVersion()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "public void setSameAs(String sameAs)\n {\n public String getMemo()\n {\n public void setMemo(String memo)\n {\n public String getLaw()\n {\n return law;",
"signature": "String getSameAs()"
},
{
"arguments": [
"String law"
],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "this.law = law;",
"signature": "void setLaw(String law)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "public void setActClause(String actClause)\n {\n public String getFulltext()\n {\n public void setFulltext(String fulltext)\n {\n public String getCurrentCommittee()\n {\n public void setCurrentCommittee(String currentCommittee)\n {\n public List<Person> getCoSponsors()\n {\n public void setCoSponsors(List<Person> coSponsors)\n {\n public List<Person> getMultiSponsors()\n {\n public void setMultiSponsors(List<Person> multiSponsors)\n {\n public Boolean isStricken()\n {\n public void setStricken(Boolean stricken)\n {\n @Override\n public String getOid()\n {\n return this.getBillId();",
"signature": "String getActClause()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "return \"billamendment\";",
"signature": "String getOtype()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/bill/BillAmendment.java",
"implementation": "public void setUniBill(Boolean uniBill)\n {",
"signature": "Boolean isUniBill()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/calendar/Calendar.java",
"implementation": "return \"calendar-\"+this.getYear()+\"-\"+this.getNumber();",
"signature": "String getOid()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/calendar/Calendar.java",
"implementation": "return \"calendar\";",
"signature": "String getOtype()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/calendar/CalendarActiveList.java",
"implementation": "return this.getOtype()+\"-\"+DateHelper.LRS_DATE_ONLY_FORMAT.format(this.getCalDate())+\"-\"+this.getId();",
"signature": "String getOid()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/calendar/CalendarActiveList.java",
"implementation": "return \"calendar-active\";",
"signature": "String getOtype()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/calendar/CalendarSupplemental.java",
"implementation": "return this.getOtype()+\"-\"+DateHelper.LRS_DATE_ONLY_FORMAT.format(this.getCalDate())+\"-\"+this.getId();",
"signature": "String getOid()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/calendar/CalendarSupplemental.java",
"implementation": "return \"calendar-supplemental\";",
"signature": "String getOtype()"
},
{
"arguments": [
"File file",
" int startLineNo",
" String line"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.setFile(file);\n return (this.getFile() == null ? \"null\" : this.getFile().getName())+\":\"+this.getStartLineNo();\n * Strips all leading zeros from the numerical part of the print number:\n * <p>\n * A00370 -> A370\n *\n * @param printNo\n public void setPrintNo(String printNo) {\n this.printNo = printNo.substring(0,1)+Integer.parseInt(printNo.substring(1));\n public File getFile() {\n return file;",
"signature": "public SOBIBlock(File file, int startLineNo, String line)"
},
{
"arguments": [
"File file"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.file = file;",
"signature": "void setFile(File file)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "return year;",
"signature": "int getYear()"
},
{
"arguments": [
"int year"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.year = year;",
"signature": "void setYear(int year)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "return printNo;",
"signature": "String getPrintNo()"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "return amendment;",
"signature": "String getAmendment()"
},
{
"arguments": [
"String amendment"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIBlock.java",
"implementation": "this.amendment = amendment;",
"signature": "void setAmendment(String amendment)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragment.java",
"implementation": "return fragmentType;\n public String getText() {\n return text;",
"signature": "SOBIFragmentType getFragmentType()"
},
{
"arguments": [
"String text"
],
"filename": "src/main/java/gov/nysenate/openleg/model/sobi/SOBIFragment.java",
"implementation": "this.text = text;",
"signature": "void setText(String text)"
},
{
"arguments": [
"Storage storage",
" List<Entry<String",
" Change>> changes",
" List<ServiceBase> services"
],
"filename": "src/main/java/gov/nysenate/openleg/processors/DataProcessor.java",
"implementation": "public void archive(File workingDir, File archiveDir) throws IOException\n {\n public void moveFileToDirectory(File file, File directory, boolean createDirectory) throws IOException\n {\n File newFile = new File(directory, file.getName());\n if (newFile.exists()) {\n newFile.delete();\n FileUtils.moveFileToDirectory(file, directory, true);\n protected void archiveFiles(File sourceDir, File destDir, String subFolder) throws IOException\n {\n * Returns a collection of files sorted by file name (not file path!)\n *\n * @param directory - The directory to get files from.\n * @param recursive - true to retrieve files from sub-directories.\n * @return\n * @throws IOException\n */\n protected Collection<File> getSortedFiles(File directory, boolean recursive, String[] excludeDirs) throws IOException {\n Collection<File> files = safeListFiles(directory, recursive, excludeDirs);\n Collections.sort((List<File>)files, new Comparator<File>(){\n public int compare(File a, File b) {\n return a.getName().compareTo(b.getName());",
"signature": "void push(Storage storage, List<Entry<String, Change>> changes, List<ServiceBase> services)"
},
{
"arguments": [],
"filename": "src/main/java/gov/nysenate/openleg/util/Application.java",
"implementation": "return appInstance.lucene;",
"signature": "Lucene getLucene()"
},
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "List<String> test = new ArrayList<String>();\n System.out.println(test.getClass().cast(test));",
"signature": "void main(String[] args)"
},
{
"arguments": [
"cls == Calendar.class"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "value = this.converter.readCalendar(storageFile);",
"signature": "else if (cls == Calendar.class)"
},
{
"arguments": [
"cls == Transcript.class"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "value = this.converter.readTranscript(storageFile);",
"signature": "else if (cls == Transcript.class)"
},
{
"arguments": [
"value instanceof Calendar"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "this.converter.write((Calendar)value, storageFile);",
"signature": "else if (value instanceof Calendar)"
},
{
"arguments": [
"value instanceof Transcript"
],
"filename": "src/main/java/gov/nysenate/openleg/util/Storage.java",
"implementation": "this.converter.write((Transcript)value, storageFile);",
"signature": "else if (value instanceof Transcript)"
}
] |
ffa4756bad33c0eb3ef0ee9f2bb6eda0069079de | [
{
"arguments": [
"JobInProgress job"
],
"filename": "core/src/main/java/org/apache/hama/bsp/BSPMaster.java",
"implementation": "++totalSubmissions;\n for (JobInProgressListener listener : jobInProgressListeners) {\n try {\n listener.recoverTaskInJob(job);",
"signature": "void recoverTask(JobInProgress job)"
},
{
"arguments": [
"action instanceof KillTaskAction"
],
"filename": "core/src/main/java/org/apache/hama/bsp/GroomServer.java",
"implementation": "tasks.remove(killAction.getTaskID());\n runningTasks.remove(killAction.getTaskID());",
"signature": "else if (action instanceof KillTaskAction)"
},
{
"arguments": [
"action instanceof RecoverTaskAction"
],
"filename": "core/src/main/java/org/apache/hama/bsp/GroomServer.java",
"implementation": "LOG.info(\"Recovery action task.\");\n RecoverTaskAction recoverAction = (RecoverTaskAction) action;\n Task t = recoverAction.getTask();\n LOG.info(\"Recovery action task.\" + t.getTaskID());\n synchronized (assignedPeerNames) {\n prevPort = BSPNetUtils.getNextAvailable(prevPort);\n assignedPeerNames.put(t.getTaskID(), prevPort);",
"signature": "else if (action instanceof RecoverTaskAction)"
},
{
"arguments": [
"long superstepNumber"
],
"filename": "core/src/main/java/org/apache/hama/bsp/GroomServer.java",
"implementation": "if (this.taskStatus.getRunState() != TaskStatus.State.FAILED) {\n this.taskStatus.setRunState(TaskStatus.State.RECOVERING);\n this.taskStatus.setPhase(TaskStatus.Phase.RECOVERING);\n this.taskStatus.setStateString(\"recovering\");",
"signature": "void markAsRecoveryTask(long superstepNumber)"
},
{
"arguments": [
"TaskAttemptID taskid"
],
"filename": "core/src/main/java/org/apache/hama/bsp/GroomServer.java",
"implementation": "TaskInProgress tip = tasks.get(taskid);\n if (tip != null) {\n return tip.getStatus();",
"signature": "TaskStatus getTaskStatus(TaskAttemptID taskid)"
},
{
"arguments": [
"TaskAttemptID taskid"
],
"filename": "core/src/main/java/org/apache/hama/bsp/GroomServer.java",
"implementation": "TaskInProgress tip = tasks.get(taskid);\n if (tip != null) {\n return tip.startSuperstepCount;",
"signature": "long getStartSuperstep(TaskAttemptID taskid)"
},
{
"arguments": [
"BSPJobID jobId",
" Configuration conf"
],
"filename": "core/src/main/java/org/apache/hama/bsp/JobInProgress.java",
"implementation": "this.conf = conf;\n this.jobId = jobId;\n master = null;",
"signature": "public JobInProgress(BSPJobID jobId, Configuration conf)"
},
{
"arguments": [
"GroomServerStatus groomStatus",
" Task task"
],
"filename": "core/src/main/java/org/apache/hama/bsp/JobInProgress.java",
"implementation": "taskToGroomMap.put(task, groomStatus);\n int tasksInGroom = 0;\n\n if (taskCountInGroomMap.containsKey(groomStatus)) {\n tasksInGroom = taskCountInGroomMap.get(groomStatus);",
"signature": "void updateGroomTaskDetails(GroomServerStatus groomStatus, Task task)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/JobInProgress.java",
"implementation": "return maxTaskAttempts;",
"signature": "int getMaximumReAttempts()"
},
{
"arguments": [
"TaskInProgress tip"
],
"filename": "core/src/main/java/org/apache/hama/bsp/JobInProgress.java",
"implementation": "if (this.faultToleranceService == null\n || (!faultToleranceService.isRecoveryPossible(tip)))\n return false;\n\n if (!faultToleranceService.isAlreadyRecovered(tip)) {\n if(LOG.isDebugEnabled()){\n LOG.debug(\"Adding recovery task \" + tip.getCurrentTaskAttemptId());",
"signature": "boolean handleFailure(TaskInProgress tip)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/JobInProgress.java",
"implementation": "return recoveryTasks.size() != 0;",
"signature": "boolean isRecoveryPending()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/JobInProgress.java",
"implementation": "return this.faultToleranceService;",
"signature": "FaultTolerantMasterService getFaultToleranceService()"
},
{
"arguments": [
"BSPMessageBundle<? extends Writable> bundle"
],
"filename": "core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java",
"implementation": "for (Writable value : bundle.getMessages()) {\n loopBackMessage(value);",
"signature": "void loopBackMessages(BSPMessageBundle<? extends Writable> bundle)"
},
{
"arguments": [
"Writable message"
],
"filename": "core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java",
"implementation": "localIncomingMessages.add((M)message);\n peer.incrementCounter(BSPPeerImpl.PeerCounter.TOTAL_MESSAGES_RECEIVED,\n 1L);",
"signature": "void loopBackMessage(Writable message)"
},
{
"arguments": [
"String key",
" Writable writableVal"
],
"filename": "core/src/main/java/org/apache/hama/bsp/LocalBSPRunner.java",
"implementation": "return false;\n @Override\n public boolean remove(String key, SyncEventListener listener) {\n return false;",
"signature": "boolean getInformation(String key, Writable writableVal)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/SimpleTaskScheduler.java",
"implementation": "Map<GroomServerStatus, List<GroomServerAction>> actionMap = new HashMap<GroomServerStatus, List<GroomServerAction>>(\n LOG.error(\"Could not schedule all tasks!\");\n List<GroomServerAction> taskActions = actionMap.get(groomStatus);\n taskActions = new ArrayList<GroomServerAction>(\n sendDirectivesToGrooms(actionMap);\n\n return Boolean.TRUE;",
"signature": "Boolean scheduleNewTasks()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/SimpleTaskScheduler.java",
"implementation": "// Action to be sent for each task to the respective groom server.\n Map<GroomServerStatus, List<GroomServerAction>> actionMap = new HashMap<GroomServerStatus, List<GroomServerAction>>(\n 2 * this.groomStatuses.size());\n\n try {\n jip.recoverTasks(groomStatuses, actionMap);",
"signature": "Boolean scheduleRecoveryTasks()"
},
{
"arguments": [
"\n Map<GroomServerStatus",
" List<GroomServerAction>> actionMap"
],
"filename": "core/src/main/java/org/apache/hama/bsp/SimpleTaskScheduler.java",
"implementation": "while ((jip.getStatus().getRunState() == JobStatus.RUNNING || jip\n .getStatus().getRunState() == JobStatus.RECOVERING)\n List<GroomServerAction> actionList = actionMap.get(groomStatus);\n return Boolean.FALSE;\n && (jip.getStatus().getRunState() != JobStatus.RUNNING || jip\n .getStatus().getRunState() != JobStatus.RECOVERING)) {\n return Boolean.FALSE;\n\n public Boolean call() {\n if (jip.isRecoveryPending()) {\n return scheduleRecoveryTasks();",
"signature": "Boolean sendDirectivesToGrooms(\n Map<GroomServerStatus, List<GroomServerAction>> actionMap)"
},
{
"arguments": [
"TaskAttemptID taskid",
"\n Map<String",
" GroomServerStatus> grooms",
"\n Map<GroomServerStatus",
" Integer> tasksInGroomMap",
"\n String[] possibleLocations"
],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "for (int i = 0; i < possibleLocations.length; ++i) {\n String location = possibleLocations[i];\n GroomServerStatus groom = grooms.get(location);\n if (groom == null)\n continue;\n Integer taskInGroom = tasksInGroomMap.get(groom);\n taskInGroom = (taskInGroom == null) ? 0 : taskInGroom;\n if (taskInGroom < groom.getMaxTasks()\n && location.equals(groom.getGroomHostName())) {\n return groom.getGroomHostName();",
"signature": "String getGroomToSchedule(TaskAttemptID taskid,\n Map<String, GroomServerStatus> grooms,\n Map<GroomServerStatus, Integer> tasksInGroomMap,\n String[] possibleLocations)"
},
{
"arguments": [
"Map<String",
" GroomServerStatus> grooms",
"\n Map<GroomServerStatus",
" Integer> tasksInGroomMap"
],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "Iterator<String> groomIter = grooms.keySet().iterator();\n while (groomIter.hasNext()) {\n GroomServerStatus groom = grooms.get(groomIter.next());\n if (groom == null)\n continue;\n Integer taskInGroom = tasksInGroomMap.get(groom);\n taskInGroom = (taskInGroom == null) ? 0 : taskInGroom;\n if (taskInGroom < groom.getMaxTasks()) {\n return groom.getGroomHostName();",
"signature": "String getAnyGroomToSchedule(Map<String, GroomServerStatus> grooms,\n Map<GroomServerStatus, Integer> tasksInGroomMap)"
},
{
"arguments": [
"GroomServerStatus groomStatus"
],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "if(groomStatus == null){\n return null;",
"signature": "Task constructTask(GroomServerStatus groomStatus)"
},
{
"arguments": [
"TaskAttemptID taskid",
"\n // Map<String",
" GroomServerStatus> grooms",
"\n // Map<GroomServerStatus",
" Integer> tasksInGroomMap"
],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "// String splitClass = null;\n // BytesWritable split = null;\n // Task t = null;\n // if (rawSplit != null) {\n // splitClass = rawSplit.getClassName();\n // split = rawSplit.getBytes();\n // String[] possibleLocations = rawSplit.getLocations();\n // String groomName = getGroomToSchedule(taskid, grooms, tasksInGroomMap,\n // possibleLocations);\n // if (groomName != null) {\n // t = new BSPTask(jobId, jobFile, taskid, partition, splitClass, split);\n // activeTasks.put(taskid, groomName);\n // myGroomStatus = grooms.get(groomName);\n //",
"signature": "Task getGroomForTask(TaskAttemptID taskid,\n // Map<String, GroomServerStatus> grooms,\n // Map<GroomServerStatus, Integer> tasksInGroomMap)"
},
{
"arguments": [
"TaskAttemptID taskid",
"\n Map<String",
" GroomServerStatus> grooms",
"\n Map<GroomServerStatus",
" Integer> tasksInGroomMap",
"\n String[] possibleLocations"
],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "String splitClass = null;\n BytesWritable split = null;\n String groomName = getGroomToSchedule(taskid, grooms, tasksInGroomMap,\n possibleLocations);\n if (groomName != null) {\n t = new BSPTask(jobId, jobFile, taskid, partition, splitClass, split);\n activeTasks.put(taskid, groomName);\n myGroomStatus = grooms.get(groomName);",
"signature": "Task getGroomForRecoverTaskInHosts(TaskAttemptID taskid,\n Map<String, GroomServerStatus> grooms,\n Map<GroomServerStatus, Integer> tasksInGroomMap,\n String[] possibleLocations)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "return (nextTaskId < (MAX_TASK_EXECS + maxTaskAttempts));",
"signature": "boolean canStartTask()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "return taskid;\n // /** Remove */\n // public Task getTaskToRun(Map<String, GroomServerStatus> grooms,\n // Map<GroomServerStatus, Integer> tasksInGroomMap) throws IOException {\n // TaskAttemptID taskId = computeTaskId();\n // if (taskId == null) {\n // return null;\n //",
"signature": "TaskAttemptID computeTaskId()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "return mySuperstep;",
"signature": "int getSuperstep()"
},
{
"arguments": [
"int mySuperstep"
],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "this.mySuperstep = mySuperstep;",
"signature": "void setSuperstep(int mySuperstep)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "return this.rawSplit;",
"signature": "RawSplit getFileSplit()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "return this.currentTaskId;",
"signature": "TaskAttemptID getCurrentTaskAttemptId()"
},
{
"arguments": [
"String peerName",
" M message"
],
"filename": "core/src/main/java/org/apache/hama/bsp/message/AbstractMessageManager.java",
"implementation": "Iterator<MessageEventListener<M>> iterator = this.messageListenerQueue\n .iterator();\n while (iterator.hasNext()) {\n iterator.next().onMessageSent(peerName, message);",
"signature": "void notifySentMessage(String peerName, M message)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/message/AbstractMessageManager.java",
"implementation": "Iterator<MessageEventListener<M>> iterator = this.messageListenerQueue\n .iterator();\n while (iterator.hasNext()) {\n iterator.next().onInitialized();",
"signature": "void notifyInit()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/message/AbstractMessageManager.java",
"implementation": "Iterator<MessageEventListener<M>> iterator = this.messageListenerQueue\n .iterator();\n while (iterator.hasNext()) {\n iterator.next().onClose();",
"signature": "void notifyClose()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncBSPMasterClient.java",
"implementation": "return this.zk;",
"signature": "ZooKeeper getZK()"
},
{
"arguments": [
"String key"
],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncClient.java",
"implementation": "InterruptedException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Checking node \" + path);",
"signature": "String correctKey(String key)"
},
{
"arguments": [
"String path",
"\n Writable valueHolder"
],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncClient.java",
"implementation": "try {\n getValueFromBytes(data, valueHolder);",
"signature": "boolean extractData(String path,\n Writable valueHolder)"
},
{
"arguments": [
"String key",
" Writable valueHolder"
],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncClient.java",
"implementation": "return extractData(path, valueHolder);\n /**\n * Clears all sub-children of node bspRoot\n */\n protected void clearZKNodes() {\n try {\n Stat s = zk.exists(bspRoot, false);\n if (s != null) {\n clearZKNodes(bspRoot);",
"signature": "boolean getInformation(String key, Writable valueHolder)"
},
{
"arguments": [
"WatchedEvent arg0"
],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncClient.java",
"implementation": "",
"signature": "void process(WatchedEvent arg0)"
},
{
"arguments": [
"String key",
" SyncEventListener listener"
],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncClient.java",
"implementation": "key = correctKey(key);\n try {\n clearZKNodes(key);\n this.zk.delete(key, -1);\n return true;",
"signature": "boolean remove(String key, SyncEventListener listener)"
},
{
"arguments": [
"TaskAttemptID attemptId",
" BSPPeer<?",
" ?",
" ?",
" ?",
" Text> peer",
"\n Configuration conf",
" InetSocketAddress peerAddress"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "// TODO Auto-generated method stub",
"signature": "void init(TaskAttemptID attemptId, BSPPeer<?, ?, ?, ?, Text> peer,\n Configuration conf, InetSocketAddress peerAddress)"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "// TODO Auto-generated method stub",
"signature": "void close()"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void clearOutgoingQueues()"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return this.messageQueue.size();",
"signature": "int getNumCurrentMessages()"
},
{
"arguments": [
"BSPMessageBundle<? extends Writable> bundle"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "this.loopbackBundle = (BSPMessageBundle<Text>) bundle;",
"signature": "void loopBackMessages(BSPMessageBundle<? extends Writable> bundle)"
},
{
"arguments": [
"Writable message"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void loopBackMessage(Writable message)"
},
{
"arguments": [
"BSPJob job",
" Configuration conf",
" TaskAttemptID taskId",
"\n Counters counters",
" long superstep",
" BSPPeerSyncClient syncClient",
"\n MessageManager<Text> messenger",
" TaskStatus.State state"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "this.conf = conf;\n if (superstep > 0)\n superstepCount = superstep;\n else\n superstepCount = 0L;\n\n try {\n fService = (new AsyncRcvdMsgCheckpointImpl<Text>()).constructPeerFaultTolerance(\n job, (BSPPeer<?, ?, ?, ?, Text>) this,\n (BSPPeerSyncClient) syncClient, null, taskId, superstep, conf,\n messenger);\n this.fService.onPeerInitialized(state);",
"signature": "public TestBSPPeer(BSPJob job, Configuration conf, TaskAttemptID taskId,\n Counters counters, long superstep, BSPPeerSyncClient syncClient,\n MessageManager<Text> messenger, TaskStatus.State state)"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return 1;",
"signature": "int getNumCurrentMessages()"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return superstepCount;",
"signature": "long getSuperstepCount()"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return null;",
"signature": "String getPeerName()"
},
{
"arguments": [
"int index"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return null;",
"signature": "String getPeerName(int index)"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return 1;",
"signature": "int getPeerIndex()"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return 0;",
"signature": "int getNumPeers()"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void clear()"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return null;",
"signature": "Configuration getConfiguration()"
},
{
"arguments": [
"Enum<?> name"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return null;",
"signature": "Counter getCounter(Enum<?> name)"
},
{
"arguments": [
"String group",
" String name"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return null;",
"signature": "Counter getCounter(String group, String name)"
},
{
"arguments": [
"Enum<?> key",
" long amount"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void incrementCounter(Enum<?> key, long amount)"
},
{
"arguments": [
"String group",
" String counter",
" long amount"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void incrementCounter(String group, String counter, long amount)"
},
{
"arguments": [
"BSPJobID jobId",
" String... args"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "StringBuffer buffer = new StringBuffer(100);\n buffer.append(jobId.toString()).append(\"/\");\n for (String arg : args) {\n buffer.append(arg).append(\"/\");",
"signature": "String constructKey(BSPJobID jobId, String... args)"
},
{
"arguments": [
"String key",
" Writable value",
"\n boolean permanent",
" SyncEventListener listener"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "ArrayWritable writables = (ArrayWritable) value;\n long step = ((LongWritable) writables.get()[0]).get();\n long count = ((LongWritable) writables.get()[1]).get();\n\n LOG.info(\"SyncClient Storing value step = \" + step + \" count = \" + count\n + \" for key \" + key);\n valueMap.put(key, value);\n return true;",
"signature": "boolean storeInformation(String key, Writable value,\n boolean permanent, SyncEventListener listener)"
},
{
"arguments": [
"String key",
"\n Writable valueHolder"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "LOG.info(\"Getting value for key \" + key);\n if(!valueMap.containsKey(key)){\n return false;",
"signature": "boolean getInformation(String key,\n Writable valueHolder)"
},
{
"arguments": [
"String key",
" boolean permanent",
"\n SyncEventListener listener"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "valueMap.put(key, NullWritable.get());\n return true;",
"signature": "boolean addKey(String key, boolean permanent,\n SyncEventListener listener)"
},
{
"arguments": [
"String key"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return valueMap.containsKey(key);",
"signature": "boolean hasKey(String key)"
},
{
"arguments": [
"String key",
" SyncEvent event",
"\n SyncEventListener listener"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "return false;",
"signature": "boolean registerListener(String key, SyncEvent event,\n SyncEventListener listener)"
},
{
"arguments": [
"String key",
" SyncEventListener listener"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "valueMap.remove(key);\n return false;",
"signature": "boolean remove(String key, SyncEventListener listener)"
},
{
"arguments": [
"BSPJobID jobId",
" TaskAttemptID taskId",
"\n String hostAddress",
" long port"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void register(BSPJobID jobId, TaskAttemptID taskId,\n String hostAddress, long port)"
},
{
"arguments": [
"BSPJobID jobId",
" TaskAttemptID taskId",
"\n String hostAddress",
" long port"
],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void deregisterFromBarrier(BSPJobID jobId, TaskAttemptID taskId,\n String hostAddress, long port)"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/TestCheckpoint.java",
"implementation": "",
"signature": "void stopServer()"
}
] | [
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/BSPPeerImpl.java",
"implementation": "checkPointInterval = conf.getInt(Constants.CHECKPOINT_INTERVAL, 1);\n if (LOG.isDebugEnabled())\n LOG.debug(new StringBuffer(1000).append(\"Enabled = \")\n .append(conf.getBoolean(Constants.CHECKPOINT_ENABLED, false))\n .append(\" checkPointInterval = \").append(checkPointInterval)\n .append(\" lastCheckPointStep = \").append(lastCheckPointStep)\n .append(\" getSuperstepCount() = \").append(getSuperstepCount())\n .toString());\n return (conf.getBoolean(Constants.CHECKPOINT_ENABLED, false)\n && (checkPointInterval != 0) && (((int) (getSuperstepCount() - lastCheckPointStep)) >= checkPointInterval));\n private final String checkpointedPath() {\n String backup = conf.get(\"bsp.checkpoint.prefix_path\", \"/checkpoint/\");\n String ckptPath = backup + bspJob.getJobID().toString() + \"/\"\n + getSuperstepCount() + \"/\" + this.taskId.toString();\n if (LOG.isDebugEnabled())\n LOG.debug(\"Messages are to be saved to \" + ckptPath);\n return ckptPath;\n final void checkpoint(String checkpointedPath, BSPMessageBundle<M> bundle) {\n FSDataOutputStream out = null;\n try {\n out = this.fs.create(new Path(checkpointedPath));\n bundle.write(out);",
"signature": "boolean isReadyToCheckpoint()"
},
{
"arguments": [
"BSPMaster bspMaster"
],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "this.bspMaster = bspMaster;",
"signature": "void setBspMaster(BSPMaster bspMaster)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/TaskInProgress.java",
"implementation": "return bspMaster;",
"signature": "BSPMaster getBspMaster()"
},
{
"arguments": [
"BSPMessageBundle<M> messages"
],
"filename": "core/src/main/java/org/apache/hama/bsp/message/AvroMessageManagerImpl.java",
"implementation": "peer.incrementCounter(BSPPeerImpl.PeerCounter.TOTAL_MESSAGES_RECEIVED,\n messages.getMessages().size());\n Iterator<M> iterator = messages.getMessages().iterator();\n while (iterator.hasNext()) {\n this.localQueueForNextIteration.add(iterator.next());\n iterator.remove();",
"signature": "void put(BSPMessageBundle<M> messages)"
},
{
"arguments": [
"M msg"
],
"filename": "core/src/main/java/org/apache/hama/bsp/message/HadoopMessageManagerImpl.java",
"implementation": "this.localQueueForNextIteration.add(msg);\n peer.incrementCounter(BSPPeerImpl.PeerCounter.TOTAL_MESSAGES_RECEIVED, 1L);\n public final void put(BSPMessageBundle<M> messages) {\n for (M message : messages.getMessages()) {\n this.localQueueForNextIteration.add(message);",
"signature": "void put(M msg)"
},
{
"arguments": [
"BSPCompressedBundle compMsgBundle"
],
"filename": "core/src/main/java/org/apache/hama/bsp/message/HadoopMessageManagerImpl.java",
"implementation": "for (M message : bundle.getMessages()) {\n this.localQueueForNextIteration.add(message);",
"signature": "void put(BSPCompressedBundle compMsgBundle)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncBSPMasterClient.java",
"implementation": "try {\n Stat s = zk.exists(bspRoot, false);\n if (s != null) {\n clearZKNodes(bspRoot);",
"signature": "void clearZKNodes()"
},
{
"arguments": [
"String key"
],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncClient.java",
"implementation": "InterruptedException {\n * @return The instance of Writable object. \n protected Writable getValueFromBytes(\n byte[] data, Class<? extends Writable> classType) throws IOException{\n Writable value = null;\n value = ReflectionUtils\n .newInstance(classType, new Object[0]);\n value.readFields(diStream);",
"signature": "String correctKey(String key)"
},
{
"arguments": [
"String path",
"\n Class<? extends Writable> classType"
],
"filename": "core/src/main/java/org/apache/hama/bsp/sync/ZKSyncClient.java",
"implementation": "Writable value = null;\n try{\n value = getValueFromBytes(data, classType);",
"signature": "Writable extractData(String path,\n Class<? extends Writable> classType)"
},
{
"arguments": [],
"filename": "core/src/test/java/org/apache/hama/bsp/sync/TestSyncServiceFactory.java",
"implementation": "public String getValue(){\n \n // TODO Auto-generated method stub\n \n \n // TODO Auto-generated method stub\n \n \n // TODO Auto-generated method stub\n final PeerSyncClient syncClient = (PeerSyncClient)\n \t\tSyncServiceFactory.getPeerSyncClient(conf);\n try {\n IntWritable data = new IntWritable(5);\n syncClient.storeInformation(\n syncClient.constructKey(jobId, String.valueOf(1L), \"test\"), data,\n true, null);\n \n ListenerTest listenerTest = new ListenerTest();\n \n \n syncClient.registerListener(\n syncClient.constructKey(jobId, String.valueOf(1L), \"test\"), \n ZKSyncEventFactory.getValueChangeEvent(),\n listenerTest);\n \n IntWritable value = (IntWritable) syncClient.getInformation(\n syncClient.constructKey(jobId, String.valueOf(1L), \"test\"),\n IntWritable.class);\n assertTrue(value != null);\n int intVal = value == null ? 0 : value.get();\n assertTrue(intVal == data.get());\n \n data.set(6);\n syncClient.storeInformation(\n syncClient.constructKey(jobId, String.valueOf(1L), \"test\"), data,\n true, null);\n value = (IntWritable) syncClient.getInformation(\n syncClient.constructKey(jobId, String.valueOf(1L), \"test\"),\n IntWritable.class);\n\n \n intVal = value == null ? 0 : value.get();\n assertTrue(intVal == data.get());\n \n Thread.sleep(5000);\n \n assertEquals(true, listenerTest.getValue().equals(\"Changed\"));\n \n \n syncServer.stopServer();",
"signature": "public ListenerTest()"
}
] |
01c58196580005b10a4f9d6b4ed25aa5061b88fd | [
{
"arguments": [
"TopicConnection connection"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "_subscriber.subscribe(connection);",
"signature": "void didConnect(TopicConnection connection)"
},
{
"arguments": [
"TopicConnection connection"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "_subscriber.unsubscribe();",
"signature": "void didDisconnect(TopicConnection connection)"
},
{
"arguments": [
"NSNotification notification"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "_publisher.publishChange(notification);",
"signature": "void publishChange(NSNotification notification)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "if (_configuration == null)\n _configuration = ERCNConfiguration.getInstance();\n return _configuration;",
"signature": "ERCNConfiguration configuration()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "return ERCNSubscriber.delegate();",
"signature": "ERCNSubscriberDelegate subscriberDelegate()"
},
{
"arguments": [
"ERCNSubscriberDelegate delegate"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "ERCNSubscriber.setDelegate(delegate);",
"signature": "void setSubscriberDelegate(ERCNSubscriberDelegate delegate)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "return _connectionKeeper.topic();",
"signature": "Topic topic()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "return _connectionKeeper.connection();",
"signature": "TopicConnection connection()"
},
{
"arguments": [
"NSNotification notification"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNPublisher.java",
"implementation": "if (! _coordinator.isConnected()) return;\n\n ERCNSnapshot snapshot = new ERCNSnapshot(notification);\n\n if (snapshot.shouldPostChange()) {\n final int deliveryMode = DeliveryMode.NON_PERSISTENT;\n final int priority = 4; // 0:Low -- 9:High\n // set TTL to 63 minutes; little longer than the default\n // value of ec.defaultFetchTimestampLag()\n final long timeToLive = 63 * 60 * 1000;\n\t\t\t\tTopicSession topicSession = _topicSession();\n\t\t\t\tif (topicSession != null) {\n\t\t\t\t\tObjectMessage message = topicSession.createObjectMessage(snapshot);\n Topic topic = _coordinator.topic();\n\t\t\t\t\t_topicPublisher(topic, topicSession).publish(topic, message, deliveryMode, priority, timeToLive);\n\t\t\t\t\tif (NSLog.debug.isEnabled())\n\t\t\t\t\t\tNSLog.debug.appendln(ERCNNotificationCoordinator.LOG_HEADER\n + \"Posted a message with snapshot: \" + snapshot);",
"signature": "void publishChange(NSNotification notification)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNPublisher.java",
"implementation": "TopicSession topicSession = null;\n try {\n TopicConnection connection = _coordinator.connection();\n topicSession = connection.createTopicSession(false, Session.CLIENT_ACKNOWLEDGE);",
"signature": "TopicSession _topicSession()"
},
{
"arguments": [
"Topic topic",
" TopicSession topicSession"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNPublisher.java",
"implementation": "TopicPublisher topicPublisher = null;\n try {\n topicPublisher = topicSession.createPublisher(topic);",
"signature": "TopicPublisher _topicPublisher(Topic topic, TopicSession topicSession)"
},
{
"arguments": [
"String operation"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSnapshot.java",
"implementation": "ERCNConfiguration configuration = ERCNNotificationCoordinator.coordinator().configuration();\n return configuration.changeTypesToSubscrive().containsObject(operation);\n public static boolean shouldSynchronizeEntity(String entityName) {\n ERCNConfiguration configuration = ERCNNotificationCoordinator.coordinator().configuration();\n return ! configuration.entitiesNotToSynchronize().containsObject(entityName);\n NSDictionary snapshot = dbContext.snapshotForGlobalID(globalID);\n if (snapshot != null) {\n snapshotsForEntity.addObject(snapshot);\n _entryCount++;",
"signature": "boolean shouldApplyChangeFor(String operation)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "return _delegate; \n static void setDelegate(ERCNSubscriberDelegate delegate) {\n _delegate = delegate;",
"signature": "ERCNSubscriberDelegate delegate()"
},
{
"arguments": [
"TopicConnection connection"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "_topicSession = connection.createTopicSession(false, Session.CLIENT_ACKNOWLEDGE);\n NSLog.err.appendln(ERCNNotificationCoordinator.LOG_HEADER\n + \"Failed to create a JMS topic session: \" + ex.getMessage());\n\n final String selector = null;\n final boolean noLocal = true;\n if (_coordinator.configuration().isSubscriberDurable()) {\n _topicSubscriber = _topicSession.createDurableSubscriber(_coordinator.topic(),\n NSLog.err.appendln(ERCNNotificationCoordinator.LOG_HEADER\n + \"An exception occured: \" + ex.getMessage());\n try {\n _topicSubscriber.setMessageListener(this);",
"signature": "void subscribe(TopicConnection connection)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "try {\n if (_coordinator.configuration().isSubscriberDurable()) {\n _topicSession.unsubscribe(_coordinator.id());",
"signature": "void unsubscribe()"
},
{
"arguments": [
"ERCNSnapshot ercnSnapshot"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "if (_delegate != null)\n _delegate.processInsertions(ercnSnapshot);",
"signature": "void _processInsertions(ERCNSnapshot ercnSnapshot)"
},
{
"arguments": [
"ERCNSnapshot ercnSnapshot"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "if (_delegate != null)\n _delegate.processDeletions(ercnSnapshot);\n private void _processUpdates(ERCNSnapshot ercnSnapshot) {\n if (_delegate != null) {\n boolean isProcessed = _delegate.processUpdates(ercnSnapshot);\n if (isProcessed)\n return;",
"signature": "void _processDeletions(ERCNSnapshot ercnSnapshot)"
}
] | [
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "return _entitiesNotToSynchronize;",
"signature": "NSArray entitiesNotToSynchronize()"
},
{
"arguments": [
"NSArray newEntitiesNotToSynchronize"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "if (newEntitiesNotToSynchronize != null) \n _entitiesNotToSynchronize = newEntitiesNotToSynchronize;\n else \n _entitiesNotToSynchronize = NSArray.EmptyArray;",
"signature": "void setEntitiesNotToSynchronize(NSArray newEntitiesNotToSynchronize)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "return _changeTypesToTrack;",
"signature": "NSArray changeTypesToTrack()"
},
{
"arguments": [
"NSArray newChangeTypesToTrack"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "if (newChangeTypesToTrack != null) \n _changeTypesToTrack = newChangeTypesToTrack;\n else \n _changeTypesToTrack = NSArray.EmptyArray;",
"signature": "void setChangeTypesToTrack(NSArray newChangeTypesToTrack)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "return _topic;",
"signature": "Topic topic()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNNotificationCoordinator.java",
"implementation": "return _connection;",
"signature": "TopicConnection connection()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNPublisher.java",
"implementation": "super();",
"signature": "private ERCNPublisher()"
},
{
"arguments": [
"ERCNNotificationCoordinator coordinator"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNPublisher.java",
"implementation": "super();\n private TopicSession _topicSession() {\n TopicSession topicSession = (TopicSession)_topicSessionCollection.get();\n if (topicSession == null) {\n topicSession = _coordinator.connection().createTopicSession(false, Session.CLIENT_ACKNOWLEDGE);\n _topicSessionCollection.set(topicSession);\n NSLog.err.appendln(\"An exception occured: \" + ex.getClass().getName() + \" - \" + ex.getMessage());\n ex.printStackTrace();\n return topicSession;\n private TopicPublisher _topicPublisher() {\n TopicPublisher topicPublisher = (TopicPublisher)_topicPublisherCollection.get();\n if (topicPublisher == null) {\n try {\n topicPublisher = _topicSession().createPublisher(_coordinator.topic());\n _topicPublisherCollection.set(topicPublisher);",
"signature": "public ERCNPublisher(ERCNNotificationCoordinator coordinator)"
},
{
"arguments": [
"NSNotification notification"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNPublisher.java",
"implementation": "ERCNSnapshot snapshot = new ERCNSnapshot(notification);\n\n if (snapshot.shouldPostChange()) {\n final int deliveryMode = DeliveryMode.PERSISTENT;\n final int priority = 4; // 0:Low -- 9:High \n // set TTL to 63 minutes; little longer than the default \n // value of ec.defaultFetchTimestampLag()\n final long timeToLive = 63 * 60 * 1000; \n try {\n ObjectMessage message = _topicSession().createObjectMessage(snapshot);\n _topicPublisher().publish(_coordinator.topic(), message, deliveryMode, priority, timeToLive);\n if (NSLog.debug.isEnabled())\n NSLog.debug.appendln(\"Posted a message with snapshot: \" + snapshot);",
"signature": "void publishChange(NSNotification notification)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "super();\n public ERCNSubscriber(ERCNNotificationCoordinator coordinator, boolean isDurable) {\n super();\n _coordinator = coordinator;\n _isDurable = isDurable;\n _topicSession = _coordinator.connection().createTopicSession(false, Session.CLIENT_ACKNOWLEDGE);\n NSLog.err.appendln(\"An exception occured: \" + ex.getClass().getName() + \" - \" + ex.getMessage());\n ex.printStackTrace();\n String selector = null;\n boolean noLocal = true;\n if (_isDurable) {\n _topicSubscriber = _topicSession.createDurableSubscriber(_coordinator.topic(), \n NSLog.err.appendln(\"An exception occured: \" + ex.getClass().getName() + \" - \" + ex.getMessage());\n ex.printStackTrace();",
"signature": "private ERCNSubscriber()"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "return _delegate;",
"signature": "NSKeyValueCoding delegate()"
},
{
"arguments": [
"NSKeyValueCoding newDelegate"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "_delegate = newDelegate;",
"signature": "void setDelegate(NSKeyValueCoding newDelegate)"
},
{
"arguments": [],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "return _topicSubscriber;\n NSLog.debug.appendln(\"Received a message with snapshot: \" + snapshot);\n processInsertions(snapshot.shapshotsForInsertionGroupedByEntity());\n processDeletions(snapshot.globalIDsForDeletionGroupedByEntity());\n processUpdates(snapshot.shapshotsForUpdateGroupedByEntity());\n NSLog.debug.appendln(\"Finished processing changes.\");\n NSLog.err.appendln(\"An exception occured: \" + ex.getClass().getName() + \" - \" + ex.getMessage());\n NSLog.err.appendln(\"An exception occured: \" + ex.getClass().getName() + \" - \" + ex.getMessage());\n public void processInsertions(NSDictionary insertions) {\n if (delegate() != null) {\n delegate().takeValueForKey(insertions, \"processInsertions\");\n \n public void processDeletions(NSDictionary deletions) { \n if (delegate() != null) {\n delegate().takeValueForKey(deletions, \"processDeletions\");",
"signature": "TopicSubscriber topicSubscriber()"
},
{
"arguments": [
"NSDictionary updatedEntDict"
],
"filename": "Common/Frameworks/ERChangeNotificationJMS/Sources/er/changenotification/ERCNSubscriber.java",
"implementation": "NSArray entityNames = updatedEntDict.allKeys();\n \n NSArray snapshots = (NSArray)updatedEntDict.objectForKey(entityName);\n NSLog.debug.appendln(\"snapshot: \" + snapshot);\n // when it's requested to terminate. Should wait *here* for the last \n // notification to finish, then return so that the coordinator can safely \n // close the connection to the JMS server. \n public synchronized void terminate() {\n try {\n if (_isDurable) {\n _topicSession.unsubscribe(_coordinator.id());",
"signature": "void processUpdates(NSDictionary updatedEntDict)"
}
] |
02668af08bebc5266b321ab1df2f45dfe656c813 | [
{
"arguments": [],
"filename": "app-config/src/main/java/org/duracloud/appconfig/ApplicationInitializer.java",
"implementation": "return null != durabossHost && null != durabossPort &&\n null != durabossContext;",
"signature": "boolean durabossEndpointLoad()"
}
] | [
{
"arguments": [],
"filename": "app-config/src/main/java/org/duracloud/appconfig/ApplicationInitializer.java",
"implementation": "return null != durareportHost && null != durareportPort &&\n null != durareportContext;",
"signature": "boolean durareportEndpointLoad()"
}
] |
03336ea9dd5d2aef2e31fe5e6402a04242f4d9f8 | [
{
"arguments": [],
"filename": "src/main/java/org/jsoup/nodes/Document.java",
"implementation": "return title;",
"signature": "String getTitle()"
},
{
"arguments": [
"String title"
],
"filename": "src/main/java/org/jsoup/nodes/Document.java",
"implementation": "this.title = title;",
"signature": "void setTitle(String title)"
},
{
"arguments": [],
"filename": "src/test/java/org/jsoup/parser/ParserTest.java",
"implementation": "@Test public void parsesRoughAttributes() {\n @Test public void parsesComments() {\n\n @Test public void parsesUnterminatedComments() {\n String html = \"<p>Hello<!-- <tr><td>\";\n Document doc = Jsoup.parse(html);\n Element p = doc.getElementsByTag(\"p\").get(0);\n assertEquals(\"Hello\", p.text());\n TextNode text = (TextNode) p.childNode(0);\n assertEquals(\"Hello\", text.getWholeText());\n Comment comment = (Comment) p.childNode(1);\n assertEquals(\" <tr><td>\", comment.getData());",
"signature": "void parsesSimpleDocument()"
},
{
"arguments": [],
"filename": "src/test/java/org/jsoup/parser/ParserTest.java",
"implementation": "String h1 = \"<p\";\n Document doc = Jsoup.parse(h1);\n assertEquals(1, doc.getElementsByTag(\"p\").size());\n\n String h2 = \"<div id=1<p id='2'\";\n doc = Jsoup.parse(h2);\n Element d = doc.getElementById(\"1\");\n assertEquals(1, d.children().size());\n Element p = doc.getElementById(\"2\");\n assertNotNull(p);",
"signature": "void parsesUnterminatedTag()"
},
{
"arguments": [],
"filename": "src/test/java/org/jsoup/parser/ParserTest.java",
"implementation": "String h1 = \"<p id=\\\"foo\";\n Document doc = Jsoup.parse(h1);\n Element p = doc.getElementById(\"foo\");\n assertNotNull(p);\n assertEquals(\"p\", p.tagName());",
"signature": "void parsesUnterminatedAttribute()"
},
{
"arguments": [],
"filename": "src/test/java/org/jsoup/parser/ParserTest.java",
"implementation": "String html = \"<meta name=keywords /><link rel=stylesheet /><title>jsoup</title><p>Hello world</p>\";\n Document doc = Jsoup.parse(html);\n Element head = doc.getHead();\n Element body = doc.getBody();\n\n assertEquals(2, doc.children().size());\n assertEquals(3, head.children().size());\n assertEquals(1, body.children().size());\n\n assertEquals(\"keywords\", head.getElementsByTag(\"meta\").get(0).attr(\"name\"));\n assertEquals(0, body.getElementsByTag(\"meta\").size());\n assertEquals(\"jsoup\", doc.getTitle());\n assertEquals(\"Hello world\", body.text());\n assertEquals(\"Hello world\", body.children().get(0).text());",
"signature": "void createsDocumentStructure()"
}
] | [
{
"arguments": [],
"filename": "src/main/java/org/jsoup/parser/Parser.java",
"implementation": "while (!matches(\"<\")) {\n textAccum.append(consume());\n /**\n * Pulls a string off the queue, up to but exclusive of the match sequence, or to the queue running out.\n * @param seq String to end on (and not include in return, but leave on queue)\n * @return The matched data consumed from queue.\n */\n private String consumeTo(String seq) {\n StringBuilder accum = new StringBuilder();\n while (!queue.isEmpty() && !matches(seq))\n accum.append(consume());\n\n return accum.toString();",
"signature": "void parseText()"
},
{
"arguments": [
"String seq"
],
"filename": "src/main/java/org/jsoup/parser/Parser.java",
"implementation": "String data = consumeTo(seq);\n consume(seq);\n return data;",
"signature": "String chompTo(String seq)"
},
{
"arguments": [],
"filename": "src/main/java/org/jsoup/parser/Parser.java",
"implementation": "return queue.removeFirst();",
"signature": "Character consume()"
},
{
"arguments": [
"String seq"
],
"filename": "src/main/java/org/jsoup/parser/Parser.java",
"implementation": "int len = seq.length();\n if (len > queue.size())\n throw new IllegalStateException(\"Queue not long enough to consume sequence\");\n char[] seqChars = seq.toCharArray();\n for (int i = 0; i < len; i++) {\n Character qChar = consume();\n if (!qChar.equals(seqChars[i]))\n throw new IllegalStateException(\"Queue did not match expected sequence\");",
"signature": "void consume(String seq)"
},
{
"arguments": [],
"filename": "src/main/java/org/jsoup/parser/Parser.java",
"implementation": "while (Character.isWhitespace(queue.peekFirst())) {\n consume();",
"signature": "void consumeWhitespace()"
},
{
"arguments": [],
"filename": "src/main/java/org/jsoup/parser/Parser.java",
"implementation": "StringBuilder wordAccum = new StringBuilder();\n while (Character.isLetterOrDigit(queue.peekFirst())) {\n wordAccum.append(queue.removeFirst());",
"signature": "String consumeWord()"
},
{
"arguments": [
"String seq"
],
"filename": "src/main/java/org/jsoup/parser/Parser.java",
"implementation": "int len = seq.length();\n if (len > queue.size())\n return false;\n List<Character> chars = queue.subList(0, len);\n char[] seqChars = seq.toCharArray();\n for (int i = 0; i < len; i++) {\n if (!chars.get(i).equals(seqChars[i]))\n return false;",
"signature": "boolean matches(String seq)"
}
] |
04a8e6447e0964a256a9dab4605911551a883dcd | [
{
"arguments": [],
"filename": "mes-plugins/mes-plugins-products/src/test/java/com/qcadoo/mes/plugins/products/validation/ValidationUtilsRequiredFieldsTest.java",
"implementation": "fieldTypeFactory = new FieldTypeFactoryImpl();\n entity = new Entity();\n fields = new LinkedList<FieldDefinition>();\n validationUtils = new ValidationService();",
"signature": "void init()"
},
{
"arguments": [],
"filename": "mes-plugins/mes-plugins-products/src/test/java/com/qcadoo/mes/plugins/products/validation/ValidationUtilsTranslateEntityTest.java",
"implementation": "das = mock(DataAccessService.class);",
"signature": "void init()"
}
] | [
{
"arguments": [],
"filename": "mes-plugins/mes-plugins-products/src/main/java/com/qcadoo/mes/plugins/products/data/ListData.java",
"implementation": "super();",
"signature": "public ListData()"
},
{
"arguments": [],
"filename": "mes-plugins/mes-plugins-products/src/main/java/com/qcadoo/mes/plugins/products/data/ListDataUtils.java",
"implementation": "",
"signature": "private ListDataUtils()"
}
] |
04b3b9344932d26b3cec5f220eddc3ccec232d9a | [
{
"arguments": [
"Snapshotter snapshotter"
],
"filename": "companies/src/main/java/org/axonframework/samples/trader/company/config/CompaniesConfig.java",
"implementation": "return new EventCountSnapshotTriggerDefinition(snapshotter, SNAPSHOT_THRESHOLD);",
"signature": "SnapshotTriggerDefinition snapshotTriggerDefinition(Snapshotter snapshotter)"
}
] | [
{
"arguments": [
"EventStore eventStore",
" Cache cache"
],
"filename": "companies/src/main/java/org/axonframework/samples/trader/company/config/CompaniesConfig.java",
"implementation": "//\n// EventCountSnapshotTriggerDefinition snapshotTriggerDefinition = new EventCountSnapshotTriggerDefinition(\n// new SpringAggregateSnapshotter(),\n// SNAPSHOT_TRESHHOLD);\n//\n// AggregateConfigurer<Company> companyAggregateConfigurer = AggregateConfigurer\n// .defaultConfiguration(Company.class);\n//\n// CachingEventSourcingRepository<Company> repository = new CachingEventSourcingRepository<>(\n// companyAggregateConfigurer,\n// eventStore,\n// cache,\n// snapshotTriggerDefinition);\n//\n// return companyAggregateConfigurer.configureRepository(conf -> repository);\n//",
"signature": "Repository companyRepository(EventStore eventStore, Cache cache)"
}
] |
070f8a4124a580cd7a140029dee655beeae8540b | [
{
"arguments": [],
"filename": "src/erjang/EAtom.java",
"implementation": "return \"'\" + encode_escapes(value) + \"'\";",
"signature": "EAtom testAtom()"
},
{
"arguments": [
"CharSequence seq"
],
"filename": "src/erjang/EAtom.java",
"implementation": "StringBuffer sb = new StringBuffer();\n\t\tfor (int i = 0; i < seq.length(); i++) {\n\t\t\tchar ch = seq.charAt(i);\n\t\t\tif ((ch >= 0x20 && ch <= 0xff) && ch != '\\'' && ch != 0x7f) {\n\t\t\t\tsb.append(ch);",
"signature": "String encode_escapes(CharSequence seq)"
},
{
"arguments": [
"String name"
],
"filename": "src/erjang/EAtom.java",
"implementation": "\"intern\", \"(\" + STRING_TYPE.getDescriptor() + \")\"\n\t\t\t\t\t\t+ type.getDescriptor());\n\t\treturn type;",
"signature": "boolean isAtom(String name)"
},
{
"arguments": [],
"filename": "src/erjang/EList.java",
"implementation": "return this;",
"signature": "ECons testNonEmptyList()"
},
{
"arguments": [],
"filename": "src/erjang/ENil.java",
"implementation": "return this;",
"signature": "ENil testNil()"
},
{
"arguments": [],
"filename": "src/erjang/EObject.java",
"implementation": "public ECons testNonEmptyList() {\n\t\treturn null;",
"signature": "EAtom testAtom()"
},
{
"arguments": [],
"filename": "src/erjang/EObject.java",
"implementation": "public ESeq testSeq() {\n\tpublic EPID testPID() {\n\tpublic ENumber testNumber() {\n\tpublic ECons testCons() {\n\tpublic EInteger testInteger() {\n\t\treturn null;",
"signature": "ETuple testTuple()"
},
{
"arguments": [],
"filename": "src/erjang/EPair.java",
"implementation": "return this;",
"signature": "ECons testNonEmptyList()"
},
{
"arguments": [
"EObject h",
" EObject t"
],
"filename": "src/erjang/ERT.java",
"implementation": "return t.cons(h);\n\tpublic static final EAtom ATOM_TRUE = EAtom.intern(\"true\");\n\tpublic static final EAtom ATOM_FALSE = EAtom.intern(\"false\");\n\t\n\tpublic static boolean eq(EObject o1, EObject o2) { return o1==null?o2==null:o1.equals(o2);",
"signature": "ETerm cons(EObject h, EObject t)"
},
{
"arguments": [
"EObject o1",
" EAtom o2"
],
"filename": "src/erjang/ERT.java",
"implementation": "return o1==o2;",
"signature": "boolean eq(EObject o1, EAtom o2)"
},
{
"arguments": [
"EAtom o1",
" EObject o2"
],
"filename": "src/erjang/ERT.java",
"implementation": "return o1==o2;",
"signature": "boolean eq(EAtom o1, EObject o2)"
},
{
"arguments": [
"EAtom o1",
" EAtom o2"
],
"filename": "src/erjang/ERT.java",
"implementation": "return o1==o2;",
"signature": "boolean eq(EAtom o1, EAtom o2)"
},
{
"arguments": [
"byte[] data",
" int off"
],
"filename": "src/erjang/EString.java",
"implementation": "this.data = data;\n\t\tthis.off = off;",
"signature": "private EString(byte[] data, int off)"
},
{
"arguments": [
"obj instanceof String"
],
"filename": "src/erjang/EString.java",
"implementation": "return stringValue().equals(obj);\n\t\treturn (char) (data[off+index] & 0xff);\n\t\treturn data.length-off;\n\t\tif (end == length()) return new EString(data, off+start);\n\t\tif (offset < 0 || length < 0 || (offset+length) > length())\n\t/* (non-Javadoc)\n\t * @see erjang.ESeq#cons(erjang.EObject)\n\t */\n\t@Override\n\tpublic EList cons(EObject h) {\n\t\treturn new EList(h, this);",
"signature": "else if (obj instanceof String)"
},
{
"arguments": [],
"filename": "src/erjang/EString.java",
"implementation": "if (off == data.length) return ENil.NIL;\n\t\treturn new EString(data, off+1);",
"signature": "ESeq tail()"
},
{
"arguments": [],
"filename": "src/erjang/EString.java",
"implementation": "return new EInteger(data[off] & 0xff);",
"signature": "EInteger head()"
},
{
"arguments": [],
"filename": "src/erjang/EString.java",
"implementation": "return length() == 0 ? ENil.NIL : null;",
"signature": "ENil testNil()"
},
{
"arguments": [],
"filename": "src/erjang/EString.java",
"implementation": "return length() == 0 ? null : this;",
"signature": "ECons testNonEmptyList()"
},
{
"arguments": [
"Type typ"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "switch (typ.getSort()) {\n\t\t\t\tcase Type.DOUBLE:\n\t\t\t\t\treturn \"Double\";\n\t\t\t\tcase Type.INT:\n\t\t\t\t\treturn \"Integer\";\n\t\t\t\tcase Type.BOOLEAN:\n\t\t\t\t\treturn \"Atom\";\n\t\t\t\tdefault:\n\t\t\t\t\tthrow new Error();",
"signature": "String primTypeName(Type typ)"
},
{
"arguments": [
"ETerm value",
" int size"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "if (value instanceof EAtom)\n\t\t\t\t\treturn \"atom_\" + EUtil.toJavaIdentifier((EAtom) value);\n\t\t\t\tif (value instanceof ENumber)\n\t\t\t\t\treturn EUtil.toJavaIdentifier(\"num_\"\n\t\t\t\t\t\t\t+ value.toString().replace('.', '_').replace('-',\n\t\t\t\t\t\t\t\t\t'_'));\n\t\t\t\tif (value instanceof EString)\n\t\t\t\t\treturn \"str_\" + size;\n\t\t\t\telse\n\t\t\t\t\treturn \"cst_\" + size;",
"signature": "String getConstantName(ETerm value, int size)"
},
{
"arguments": [
"BeamOpcode opcode",
" Arg[] in",
" Arg out"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "switch (opcode) {\n\t\t\t\tcase put_list:\n\t\t\t\t\tpush(in[0], EOBJECT_TYPE);\n\t\t\t\t\tpush(in[1], EOBJECT_TYPE);\n\t\t\t\t\tmv.visitMethodInsn(INVOKESTATIC,\n\t\t\t\t\t\t\tERT_TYPE.getInternalName(), \"cons\", \"(\"\n\t\t\t\t\t\t\t\t\t+ EOBJECT_TYPE.getDescriptor()\n\t\t\t\t\t\t\t\t\t+ EOBJECT_TYPE.getDescriptor() + \")\"\n\t\t\t\t\t\t\t\t\t+ ECONS_TYPE.getDescriptor());\n\t\t\t\t\tpop(out, ECONS_TYPE);\n\t\t\t\t\treturn;",
"signature": "void visitInsn(BeamOpcode opcode, Arg[] in, Arg out)"
},
{
"arguments": [
"BeamOpcode opcode",
" int val",
" Arg out"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "switch (opcode) {\n\t\t\t\tcase put_tuple:\n\t\t\t\t\tmv.visitTypeInsn(NEW, out.type.getInternalName());\n\t\t\t\t\tmv.visitInsn(DUP);\n\t\t\t\t\tmv.visitMethodInsn(INVOKESPECIAL, out.type\n\t\t\t\t\t\t\t.getInternalName(), \"<init>\", \"()V\");\n\t\t\t\t\tpop(out, out.type);\n\n\t\t\t\t\treturn;",
"signature": "void visitInsn(BeamOpcode opcode, int val, Arg out)"
},
{
"arguments": [
"BeamOpcode opcode",
" Arg val",
" Arg out",
" int pos"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "if (opcode == BeamOpcode.put) {\n\t\t\t\t\tpush(out, out.type);\n\t\t\t\t\tpush(val, EOBJECT_TYPE);\n\t\t\t\t\tmv.visitFieldInsn(PUTFIELD, out.type.getInternalName(),\n\t\t\t\t\t\t\t\"elm\" + pos, EOBJECT_TYPE.getDescriptor());\n\t\t\t\t\treturn;",
"signature": "void visitInsn(BeamOpcode opcode, Arg val, Arg out, int pos)"
},
{
"arguments": [
"opcode == BeamOpcode.get_tuple_element"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "push(val, val.type);\n\t\t\t\t\tmv.visitFieldInsn(GETFIELD, val.type.getInternalName(),\n\t\t\t\t\t\t\t\"elm\" + pos, EOBJECT_TYPE.getDescriptor());\n\t\t\t\t\tpop(out, EOBJECT_TYPE);\n\t\t\t\t\treturn;",
"signature": "else if (opcode == BeamOpcode.get_tuple_element)"
},
{
"arguments": [
"opcode == BeamOpcode.set_tuple_element"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "push(out, out.type);\n\t\t\t\t\tpush(val, val.type);\n\t\t\t\t\tmv.visitFieldInsn(PUTFIELD, val.type.getInternalName(),\n\t\t\t\t\t\t\t\"elm\" + pos, EOBJECT_TYPE.getDescriptor());\n\t\t\t\t\treturn;\n\t\t\t/**\n\t\t\t * @param pos\n\t\t\t */\n\t\t\tprivate void push_int(int pos) {\n\t\t\t\tif (pos >= -1 && pos <= 5) {\n\t\t\t\t\tmv.visitInsn(ICONST_0 + pos);",
"signature": "else if (opcode == BeamOpcode.set_tuple_element)"
},
{
"arguments": [
"arg1 != null"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "mv.visitInsn(DUP);\n\t\t\t\t\t\t\tmv.visitVarInsn(ASTORE, scratch_reg);",
"signature": "test\n\t\t\t\t\t\tif (arg1 != null)"
},
{
"arguments": [
"BeamOpcode test",
" int failLabel",
" Arg arg",
"\n\t\t\t\t\tint arity",
" Type tupleType"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "if (test != BeamOpcode.test_arity)\n\t\t\t\t\tthrow new Error();\n\n\t\t\t\tpush(arg, ETUPLE_TYPE);\n\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL,\n\t\t\t\t\t\tETUPLE_TYPE.getInternalName(), \"count\", \"()I\");\n\t\t\t\tpush_int(arity);\n\t\t\t\tmv.visitJumpInsn(IF_ICMPNE, getLabel(failLabel));\n\t\t\t\tpush(arg, ETUPLE_TYPE);\n\t\t\t\tmv.visitTypeInsn(CHECKCAST, tupleType.getInternalName());\n\t\t\t\tpop(arg, tupleType);",
"signature": "void visitTest(BeamOpcode test, int failLabel, Arg arg,\n\t\t\t\t\tint arity, Type tupleType)"
},
{
"arguments": [
"BeamOpcode opcode",
" Arg[] ys"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "if (opcode == BeamOpcode.allocate_zero\n\t\t\t\t\t\t|| opcode == BeamOpcode.allocate_heap_zero) {\n\n\t\t\t\t\tmv.visitFieldInsn(GETSTATIC, ENIL_TYPE.getInternalName(),\n\t\t\t\t\t\t\t\"NIL\", ENIL_TYPE.getDescriptor());\n\t\t\t\t\tfor (int i = 0; i < ys.length; i++) {\n\t\t\t\t\t\tif (i != (ys.length - 1))\n\t\t\t\t\t\t\tmv.visitInsn(DUP);\n\t\t\t\t\t\tpop(ys[i], ENIL_TYPE);",
"signature": "void visitInsn(BeamOpcode opcode, Arg[] ys)"
},
{
"arguments": [
"opcode == BeamOpcode.get_list"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "push(ys[0], ECONS_TYPE);\n\t\t\t\t\tmv.visitInsn(DUP);\n\t\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, ECONS_TYPE\n\t\t\t\t\t\t\t.getInternalName(), \"head\", \"()\"\n\t\t\t\t\t\t\t+ EOBJECT_TYPE.getDescriptor());\n\t\t\t\t\tpop(ys[1], EOBJECT_TYPE);\n\t\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL, ECONS_TYPE\n\t\t\t\t\t\t\t.getInternalName(), \"tail\", \"()\"\n\t\t\t\t\t\t\t+ EOBJECT_TYPE.getDescriptor());\n\t\t\t\t\tpop(ys[2], EOBJECT_TYPE);\n\t\t\t\t\treturn;",
"signature": "else if (opcode == BeamOpcode.get_list)"
},
{
"arguments": [
"opcode == BeamOpcode.apply"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "for (int i = 0; i < ys.length; i++) {\n\t\t\t\t\t\tpush(ys[i], EOBJECT_TYPE);",
"signature": "else if (opcode == BeamOpcode.apply)"
},
{
"arguments": [
"opcode == BeamOpcode.apply_last"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "for (int i = 0; i < ys.length; i++) {\n\t\t\t\t\t\tpush(ys[i], EOBJECT_TYPE);",
"signature": "else if (opcode == BeamOpcode.apply_last)"
},
{
"arguments": [
"opcode == BeamOpcode.send"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "for (int i = 0; i < ys.length; i++) {\n\t\t\t\t\t\tpush(ys[i], EOBJECT_TYPE);",
"signature": "else if (opcode == BeamOpcode.send)"
},
{
"arguments": [
"BeamOpcode opcode",
" ExtFunc efun",
"\n\t\t\t\t\tArg[] freevars"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "if (opcode == BeamOpcode.make_fun2) {\n\n\t\t\t\t\tString funtype = EFUN_TYPE.getInternalName() + efun.no;\n\t\t\t\t\tfor (int i = 0; i < freevars.length; i++) {\n\t\t\t\t\t\tpush(freevars[i], EOBJECT_TYPE);",
"signature": "void visitInsn(BeamOpcode opcode, ExtFunc efun,\n\t\t\t\t\tArg[] freevars)"
},
{
"arguments": [
"Arg in",
" int failLabel",
" Arg[] values",
"\n\t\t\t\t\tint[] targets"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "int[] hash = new int[values.length];\n\t\t\t\tLabel[] label = new Label[values.length];\n\t\t\t\tfor (int i = 0; i < values.length; i++) {\n\t\t\t\t\thash[i] = values[i].value.hashCode();\n\t\t\t\t\tlabel[i] = new Label();",
"signature": "void visitSelectValue(Arg in, int failLabel, Arg[] values,\n\t\t\t\t\tint[] targets)"
},
{
"arguments": [
"Arg in",
" int failLabel",
" int[] arities",
"\n\t\t\t\t\tint[] targets"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "push(in, ETUPLE_TYPE);\n\n\t\t\t\tmv.visitMethodInsn(INVOKEVIRTUAL,\n\t\t\t\t\t\tETUPLE_TYPE.getInternalName(), \"count\", \"()I\");\n\n\t\t\t\tLabel[] targetLabels = new Label[targets.length];\n\t\t\t\tfor (int i = 0; i < targets.length; i++) {\n\t\t\t\t\ttargetLabels[i] = new Label();",
"signature": "void visitSelectTuple(Arg in, int failLabel, int[] arities,\n\t\t\t\t\tint[] targets)"
},
{
"arguments": [
"int label"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "mv.visitJumpInsn(GOTO, getLabel(label));",
"signature": "void visitJump(int label)"
},
{
"arguments": [
"int i"
],
"filename": "src/erjang/beam/CompilerVisitor.java",
"implementation": "return Type.getType(\"L\" + ETUPLE_TYPE.getInternalName() + i\n\t\t\t\t\t\t+ \";\");",
"signature": "Type getTubleType(int i)"
},
{
"arguments": [
"ETuple ext"
],
"filename": "src/erjang/beam/ExtFunc.java",
"implementation": "super(Kind.EXT_FUNC, ext.elm(3).asInt());\n\t\tthis.mod = ext.elm(1).testAtom();\n\t\tthis.fun = ext.elm(2).testAtom();",
"signature": "public ExtFunc(ETuple ext)"
},
{
"arguments": [
"EObject src"
],
"filename": "src/erjang/beam/analysis/BeamTypeAnalysis.java",
"implementation": "if (src instanceof ETuple2) {\n\t\t\t\t\tETuple2 tup = (ETuple2) src;\n\t\t\t\t\tif (tup.elem1 == ATOM_ATOM) {\n\t\t\t\t\t\treturn new Arg(tup.elem2, EATOM_TYPE);",
"signature": "Arg decode_value(EObject src)"
},
{
"arguments": [
"tup.elem1 == LITERAL_ATOM"
],
"filename": "src/erjang/beam/analysis/BeamTypeAnalysis.java",
"implementation": "return new Arg(tup.elem2);",
"signature": "else if (tup.elem1 == LITERAL_ATOM)"
},
{
"arguments": [
"tup.elem1 == INTEGER_ATOM"
],
"filename": "src/erjang/beam/analysis/BeamTypeAnalysis.java",
"implementation": "if (tup.elem2.testInteger() != null) {\n\t\t\t\t\t\t\treturn new Arg(tup.elem2, Type.INT_TYPE);",
"signature": "else if (tup.elem1 == INTEGER_ATOM)"
},
{
"arguments": [
"tup.elem1 == FLOAT_ATOM"
],
"filename": "src/erjang/beam/analysis/BeamTypeAnalysis.java",
"implementation": "return new Arg(tup.elem2, Type.DOUBLE_TYPE);",
"signature": "else if (tup.elem1 == FLOAT_ATOM)"
},
{
"arguments": [
"src == NIL_ATOM"
],
"filename": "src/erjang/beam/analysis/BeamTypeAnalysis.java",
"implementation": "return new Arg(ENil.NIL, ENIL_TYPE);",
"signature": "else if (src == NIL_ATOM)"
}
] | [
{
"arguments": [],
"filename": "src/erjang/EAtom.java",
"implementation": "return \"'\" + value + \"'\";\n\t\n\tpublic boolean isAtom(String name)\n\t{\n\t\n \n\t\n\n\n\n\t\t\n\t\t\t\t\t\"intern\", \"(\" + STRING_TYPE.getDescriptor() + \")\" + type.getDescriptor());\n\t\t\n\t\treturn type;",
"signature": "EAtom asAtom()"
},
{
"arguments": [
"EObject h",
" ETerm t"
],
"filename": "src/erjang/ERT.java",
"implementation": "if (t instanceof ECons) {\n\t\t\treturn ((ECons) t).cons(h);",
"signature": "ETerm cons(EObject h, ETerm t)"
}
] |
08be4fd102a970fa94004bff2ac8ac58c32305e9 | [
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "for (Input input : inputs.refresh().values()) {\n final String inputName = input.getName();\n if (inputName.startsWith(\"delete-me\")) {\n input.remove();\n assertEventuallyTrue(new EventuallyTrueBehavior() {\n @Override\n public boolean predicate() {\n inputs.refresh();\n return !inputs.containsKey(inputName);",
"signature": "void removeTestInputs()"
},
{
"arguments": [],
"filename": "tests/com/splunk/LicensePoolTest.java",
"implementation": "LicensePoolCollection licensePoolCollection = service.getLicensePools();\n for (LicensePool licensePool : licensePoolCollection.values()) {\n testLicensePoolGetters(licensePool);\n \n private void testLicensePoolGetters(LicensePool licensePool) {\n licensePool.getDescription();\n licensePool.getQuota();\n licensePool.getSlaves();\n licensePool.getSlavesUsageBytes();\n licensePool.getStackId();\n licensePool.getUsedBytes();",
"signature": "void testLicensePoolGetters()"
},
{
"arguments": [],
"filename": "tests/com/splunk/MetadataTest.java",
"implementation": "testMetadataGetters(service.getApplications());\n testMetadataGetters(service.getDeploymentClient());\n testMetadataGetters(service.getDeploymentServerClasses());\n testMetadataGetters(service.getDeploymentTenants());\n testMetadataGetters(service.getDistributedConfiguration());\n testMetadataGetters(service.getDistributedPeers());\n testMetadataGetters(service.getEventTypes());\n testMetadataGetters(service.getFiredAlertGroups());\n testMetadataGetters(service.getIndexes());\n testMetadataGetters(service.getInfo());\n testMetadataGetters(service.getInputs());\n testMetadataGetters(service.getJobs());\n testMetadataGetters(service.getLicenseGroups());\n testMetadataGetters(service.getLicensePools());\n testMetadataGetters(service.getLicenseSlaves());\n testMetadataGetters(service.getLicenseStacks());\n testMetadataGetters(service.getLicenses());\n testMetadataGetters(service.getLoggers());\n testMetadataGetters(service.getMessages());\n testMetadataGetters(service.getOutputDefault());\n testMetadataGetters(service.getOutputGroups());\n testMetadataGetters(service.getOutputServers());\n testMetadataGetters(service.getOutputSyslogs());\n testMetadataGetters(service.getPasswords());\n testMetadataGetters(service.getRoles());\n testMetadataGetters(service.getSavedSearches());\n testMetadataGetters(service.getSettings());\n testMetadataGetters(service.getUsers());",
"signature": "void testMetadataGettersOfDefaultEntities()"
},
{
"arguments": [
"\n EntityCollection<? extends Entity> entityCollection"
],
"filename": "tests/com/splunk/MetadataTest.java",
"implementation": "for (Entity entity : entityCollection.values()) {\n testMetadataGetters(entity);",
"signature": "void testMetadataGetters(\n EntityCollection<? extends Entity> entityCollection)"
},
{
"arguments": [],
"filename": "tests/com/splunk/PasswordTest.java",
"implementation": "for (Password password : service.getPasswords().values()) {\n testGettersOf(password);",
"signature": "void testGettersOfDefaultPasswords()"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "@Override\n public boolean predicate() {\n savedSearches.refresh();\n return !savedSearches.containsKey(savedSearchName);",
"signature": "new EventuallyTrueBehavior()"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "boolean isVisible = savedSearch.isVisible();\n savedSearch.setIsVisible(!isVisible);\n \"rss,email,populate_lookup,script,summary_index\");\n savedSearch.setSearch(\"search index=boris abcd\");\n savedSearch.refresh();\n assertTrue(savedSearch.isActionEmail());\n assertTrue(savedSearch.isActionPopulateLookup());\n assertTrue(savedSearch.isActionRss());\n assertTrue(savedSearch.isActionScript());\n assertTrue(savedSearch.isActionSummaryIndex());\n assertTrue(savedSearch.isDigestMode());\n\n assertEquals(\"sdk-password\", savedSearch.getActionEmailAuthPassword());\n assertEquals(\"sdk-username\", savedSearch.getActionEmailAuthUsername());\n assertEquals(\"sdk-bcc@splunk.com\", savedSearch.getActionEmailBcc());\n assertEquals(\"sdk-cc@splunk.com\", savedSearch.getActionEmailCc());\n assertEquals(\"$name1$\", savedSearch.getActionEmailCommand());\n assertEquals(\"text\", savedSearch.getActionEmailFormat());\n assertEquals(\"sdk@splunk.com\", savedSearch.getActionEmailFrom());\n assertEquals(\"dummy1.host.com\", savedSearch.getActionEmailHostname());\n assertTrue(savedSearch.getActionEmailInline());\n assertEquals(\"splunk.com\", savedSearch.getActionEmailMailServer());\n assertEquals(101, savedSearch.getActionEmailMaxResults());\n assertEquals(\"10s\", savedSearch.getActionEmailMaxTime());\n assertEquals(\"dummy\", savedSearch.getActionEmailPdfView());\n assertEquals(\"*\", savedSearch.getActionEmailPreProcessResults());\n assertEquals(\"landscape\", savedSearch.getActionEmailReportPaperOrientation());\n assertEquals(\"letter\", savedSearch.getActionEmailReportPaperSize());\n assertFalse(savedSearch.getActionEmailReportServerEnabled());\n assertEquals(\"splunk.com\", savedSearch.getActionEmailReportServerUrl());\n assertFalse(savedSearch.getActionEmailSendPdf());\n assertFalse(savedSearch.getActionEmailSendResults());\n assertEquals(\"sdk-subject\", savedSearch.getActionEmailSubject());\n assertEquals(\"sdk-to@splunk.com\", savedSearch.getActionEmailTo());\n assertFalse(savedSearch.getActionEmailTrackAlert());\n assertEquals(\"61\", savedSearch.getActionEmailTtl());\n assertFalse(savedSearch.getActionEmailUseSsl());\n assertFalse(savedSearch.getActionEmailUseTls());\n assertFalse(savedSearch.getActionEmailWidthSortColumns());\n assertEquals(\"$name2$\", savedSearch.getActionPopulateLookupCommand());\n assertEquals(\"dummypath\", savedSearch.getActionPopulateLookupDest());\n assertEquals(\"dummy2.host.com\", savedSearch.getActionPopulateLookupHostname());\n assertEquals(102, savedSearch.getActionPopulateLookupMaxResults());\n assertEquals(\"20s\", savedSearch.getActionPopulateLookupMaxTime());\n assertFalse(savedSearch.getActionPopulateLookupTrackAlert());\n assertEquals(\"62\", savedSearch.getActionPopulateLookupTtl());\n assertEquals(\"$name3$\", savedSearch.getActionRssCommand());\n assertEquals(\"dummy3.host.com\", savedSearch.getActionRssHostname());\n assertEquals(103, savedSearch.getActionRssMaxResults());\n assertEquals(\"30s\", savedSearch.getActionRssMaxTime());\n assertFalse(savedSearch.getActionRssTrackAlert());\n assertEquals(\"63\", savedSearch.getActionRssTtl());\n assertEquals(\"$name4$\", savedSearch.getActionScriptCommand());\n assertEquals(\"dummy4.host.com\", savedSearch.getActionScriptHostname());\n assertEquals(104, savedSearch.getActionScriptMaxResults());\n assertEquals(\"40s\", savedSearch.getActionScriptMaxTime());\n assertFalse(savedSearch.getActionScriptTrackAlert());\n assertEquals(\"64\", savedSearch.getActionScriptTtl());\n assertEquals(\"default\", savedSearch.getActionSummaryIndexName());\n assertEquals(\"$name5$\", savedSearch.getActionSummaryIndexCommand());\n assertEquals(\"dummy5.host.com\", savedSearch.getActionSummaryIndexHostname());\n assertFalse(savedSearch.getActionSummaryIndexInline());\n assertEquals(105, savedSearch.getActionSummaryIndexMaxResults());\n assertEquals(\"50s\", savedSearch.getActionSummaryIndexMaxTime());\n assertFalse(savedSearch.getActionSummaryIndexTrackAlert());\n assertEquals(\"65\", savedSearch.getActionSummaryIndexTtl());\n assertEquals(savedSearch.isVisible(), !isVisible);\n @Test\n public void testUpdateWithBogusKeysFails() {\n try {\n Args args = new Args(\"borisTheMadBaboon\", \"Arrgh!\");\n savedSearch.update(args);\n fail(\"Expected an exception.\");",
"signature": "void testUpdate()"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "String newName = savedSearchName + \"-alteration\";\n try {\n Args args = new Args(\"name\", newName);\n savedSearch.update(args);\n savedSearch.refresh();\n fail(\"Expected exception to be raised when trying to update name.\");",
"signature": "void testCannotUpdateName()"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "final JobCollection jobs = service.getJobs();\n SavedSearchDispatchArgs args = new SavedSearchDispatchArgs();\n args.setDispatchBuckets(100);\n try {\n final Job job = savedSearch.dispatch(args);\n assertEventuallyTrue(new EventuallyTrueBehavior() {\n @Override\n public boolean predicate() {\n return job.isReady();",
"signature": "void testDispatch()"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "final JobCollection jobs = service.getJobs();\n try {\n final Job job = savedSearch.dispatch();\n assertEventuallyTrue(new EventuallyTrueBehavior() {\n @Override\n public boolean predicate() {\n return job.isReady();",
"signature": "void testDispatchWithoutOptions()"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "savedSearch.refresh();\n Job[] oldJobs = savedSearch.history();\n\n try {\n final Job job = savedSearch.dispatch();\n assertEventuallyTrue(new EventuallyTrueBehavior() {\n @Override\n public boolean predicate() {\n return job.isReady();",
"signature": "void testHistory()"
},
{
"arguments": [],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "assertEquals(404, e.getStatus());\n @Test\n public void testInfo() throws Exception {\n assertTrue(info.containsKey(name));\n @Test\n public void testLogin() {\n (String) command.opts.get(\"host\"),\n (Integer) command.opts.get(\"port\"),\n (String) command.opts.get(\"scheme\"));\n assertEquals(401, e.getStatus());\n service.login(\n (String) command.opts.get(\"username\"),\n (String) command.opts.get(\"password\"));\n assertEquals(401, e.getStatus());\n @Test\n public void testJobs() {\n for (Job entity : jobs.values())\n testGetters(entity);\n Job job = jobs.create(\"search *\");\n testGetters(job);\n \n // Perform some non-intrusive inspection of the given Job object.\n private void testGetters(Job job) {\n ready(job);\n job.getDelegate();\n job.getDiskUsage();\n job.getDispatchState();\n job.getDoneProgress();\n job.getDropCount();\n job.getEarliestTime();\n job.getEventAvailableCount();\n job.getEventCount();\n job.getEventFieldCount();\n job.getEventIsStreaming();\n job.getEventIsTruncated();\n job.getEventSearch();\n job.getEventSorting();\n job.getKeywords();\n job.getLabel();\n job.getLatestTime();\n job.getNumPreviews();\n job.getPriority();\n job.getRemoteSearch();\n job.getReportSearch();\n job.getResultCount();\n job.getResultIsStreaming();\n job.getResultPreviewCount();\n job.getRunDuration();\n job.getScanCount();\n job.getSearch();\n job.getSearchEarliestTime();\n job.getSearchLatestTime();\n job.getSid();\n job.getStatusBuckets();\n job.getTtl();\n job.isDone();\n job.isFailed();\n job.isFinalized();\n job.isPaused();\n job.isPreviewEnabled();\n job.isRealTimeSearch();\n job.isSaved();\n job.isSavedSearch();\n job.isZombie();\n assertEquals(job.getName(), job.getSid());",
"signature": "void testGet()"
},
{
"arguments": [],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "// Save\n // Ensure setter updates local state\n assertEquals(\"sdk-host\", settings.getHost());\n // Ensure update() merges arguments with local state\n settings.update(Args.create(\"minFreeSpace\", 500));\n assertEquals(\"sdk-host2\", settings.getHost());\n assertEquals(500, settings.getMinFreeSpace());\n // Ensure update argument takes precedence over local state\n settings.update(Args.create(\"minFreeSpace\", 700));\n assertEquals(700, settings.getMinFreeSpace());\n\n // Restore\n {\n settings.setHost(originalHost);\n settings.setMinimumFreeSpace(originalMinSpace);\n settings.update();\n \n assertEquals(settings.getMinFreeSpace(),\n originalMinSpace);\n assertEquals(settings.getHost(), originalHost);",
"signature": "void testSettersAndGettersPattern()"
},
{
"arguments": [],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "assertFalse(users.containsKey(username));\n {\n args = new Args();\n args.put(\"password\", password);\n args.put(\"roles\", \"power\");\n user = users.create(username, args);\n \n assertTrue(users.containsKey(username));\n assertEquals(username, user.getName());\n assertEquals(1, user.getRoles().length);\n assertTrue(contains(user.getRoles(), \"power\"));\n \n users.remove(username);\n assertFalse(users.containsKey(username));",
"signature": "void testUsers()"
},
{
"arguments": [],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "@Test\n public void testNewServiceArgs() {\n assertEquals(\"Arg setters didn't replicate value to deprecated fields.\",\n args.app, \"myapp\");\n @Test\n public void testNewServiceArgsAsMap() {\n @Test\n public void testNewServiceArgsWithDefaults() {\n \n // === Utility ===\n \n private static void checkResponse(ResponseMessage response) {\n assertEquals(200, response.getStatus());\n \n // Make sure we can at least load the Atom response\n AtomFeed.parseStream(response.getContent());",
"signature": "void testClassicServiceArgs()"
},
{
"arguments": [
"Job job"
],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "while (!job.isReady()) {\n sleep(10);",
"signature": "Job ready(Job job)"
},
{
"arguments": [],
"filename": "tests/com/splunk/SettingsTest.java",
"implementation": "",
"signature": "void testGettersThrowNoExceptions()"
},
{
"arguments": [
"int newHttpPort"
],
"filename": "tests/com/splunk/SettingsTest.java",
"implementation": "Settings settings = service.getSettings();\n settings.setHttpPort(newHttpPort);\n settings.update();\n \n // If you change the splunkweb port, a new splunkweb instance\n // will be created on the new port. However the old splunkweb instance\n // will remain until you do a full restart.\n splunkRestart();\n waitForSplunkwebUp(newHttpPort);\n \n settings = service.getSettings();\n assertEquals(newHttpPort, settings.getHttpPort());",
"signature": "void changeHttpPort(int newHttpPort)"
},
{
"arguments": [
"final int httpPort"
],
"filename": "tests/com/splunk/SettingsTest.java",
"implementation": "// Wait for splunkweb to come back up\n assertEventuallyTrue(new EventuallyTrueBehavior() {\n {\n tries = 20;\n pauseTime = 1000;",
"signature": "void waitForSplunkwebUp(final int httpPort)"
},
{
"arguments": [],
"filename": "tests/com/splunk/SettingsTest.java",
"implementation": "return isPortInUse(httpPort);",
"signature": "boolean predicate()"
},
{
"arguments": [
"int port"
],
"filename": "tests/com/splunk/SettingsTest.java",
"implementation": "try {\n Socket pingSocket = new Socket(\"127.0.0.1\", port);\n pingSocket.close();\n if (VERBOSE_PORT_SCAN) {\n System.out.println(\"IN-USE(\" + port + \")\");",
"signature": "boolean isPortInUse(int port)"
},
{
"arguments": [],
"filename": "tests/com/splunk/UploadTest.java",
"implementation": "String osName = service.getInfo().getOsName();\n if (osName.equals(\"Windows\")) {",
"signature": "void testOneshot()"
}
] | [
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "boolean matches = InputCollection.matchesInputName(InputKind.Tcp, \"1-[]bc\", \"def\");\n SplunkTestCase.assertFalse(matches);\n matches = InputCollection.matchesInputName(InputKind.Tcp, \"1-[]bc\", \"1-[]bc\");\n SplunkTestCase.assertTrue(matches);",
"signature": "void testMatchNonscriptInputName()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "SplunkTestCase.assertTrue(InputCollection.matchesInputName(\n InputKind.Script, \"abc.py\", \"$SPLUNK_HOME/etc/apps/boris/bin/abc.py\"\n ));\n SplunkTestCase.assertFalse(InputCollection.matchesInputName(\n InputKind.Script, \"abc\", \"$SPLUNK_HOME/etc/apps/boris/bin/abc.py\"\n ));",
"signature": "void testMatchScriptInputName()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputs = service.getInputs();\n\n Set<InputKind> kinds = inputs.getInputKinds();\n boolean hasTest2 = false;\n for (InputKind ik : kinds) {\n if (ik.getKind() == \"test2\") {\n hasTest2 = true;",
"signature": "void testInputKinds()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputs = service.getInputs();\n\n SplunkTestCase.assertFalse(inputs.isEmpty());\n boolean hasAbcd = inputs.containsKey(\"abcd\");\n if (!hasAbcd) {\n Args args = new Args();\n args.add(\"field1\", \"boris\");\n inputs.create(\"abcd\", InputKind.create(\"test2\"), args);",
"signature": "void testListInputs()"
},
{
"arguments": [
"Input input"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "InputKind inputKind = input.getKind();\n TcpConnections tcpConnections = null;\n UdpConnections udpConnections = null;\n\n if (inputKind == InputKind.Monitor) {\n MonitorInput monitorInput = (MonitorInput) input;\n monitorInput.getBlacklist();\n monitorInput.getCrcSalt();\n monitorInput.getFileCount();\n monitorInput.getFollowTail();\n monitorInput.getHost();\n monitorInput.getHostRegex();\n monitorInput.getIgnoreOlderThan();\n monitorInput.getIndex();\n monitorInput.getQueue();\n monitorInput.getRcvBuf();\n monitorInput.getRecursive();\n monitorInput.getSource();\n monitorInput.getSourceType();\n monitorInput.getTimeBeforeClose();\n monitorInput.getWhitelist();",
"signature": "void touchSpecificInput(Input input)"
},
{
"arguments": [
"inputKind == InputKind.Script"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "ScriptInput scriptInput = (ScriptInput) input;\n scriptInput.getEndTime();\n scriptInput.getGroup();\n scriptInput.getHost();\n scriptInput.getIndex();\n scriptInput.getInterval();\n scriptInput.getRcvBuf();\n scriptInput.getStartTime();",
"signature": "else if (inputKind == InputKind.Script)"
},
{
"arguments": [
"inputKind == InputKind.Tcp"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "TcpInput tcpInput = (TcpInput) input;\n tcpInput.getConnectionHost();\n tcpInput.getGroup();\n tcpInput.getHost();\n tcpInput.getIndex();\n tcpInput.getQueue();\n tcpInput.getRcvBuf();\n tcpInput.getRestrictToHost();\n tcpInput.getSource();\n tcpInput.getSourceType();\n tcpInput.getSSL();\n tcpConnections = tcpInput.connections();\n tcpConnections.getConnection();\n tcpConnections.getServername();",
"signature": "else if (inputKind == InputKind.Tcp)"
},
{
"arguments": [
"inputKind == InputKind.TcpSplunk"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "TcpSplunkInput tcpSplunkInput = (TcpSplunkInput) input;\n tcpSplunkInput.getConnectionHost();\n tcpSplunkInput.getGroup();\n tcpSplunkInput.getHost();\n tcpSplunkInput.getIndex();\n tcpSplunkInput.getQueue();\n tcpSplunkInput.getRcvBuf();\n tcpSplunkInput.getSource();\n tcpSplunkInput.getSourceType();\n tcpSplunkInput.getSSL();\n tcpConnections = tcpSplunkInput.connections();\n tcpConnections.getConnection();\n tcpConnections.getServername();",
"signature": "else if (inputKind == InputKind.TcpSplunk)"
},
{
"arguments": [
"inputKind == InputKind.Udp"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "UdpInput udpInput = (UdpInput) input;\n udpInput.getConnectionHost();\n udpInput.getGroup();\n udpInput.getHost();\n udpInput.getIndex();\n udpInput.getQueue();\n udpInput.getRcvBuf();\n udpInput.getSource();\n udpInput.getSourceType();\n udpInput.getNoAppendingTimeStamp();\n udpInput.getNoPriorityStripping();\n udpConnections = udpInput.connections();\n udpConnections.getGroup();",
"signature": "else if (inputKind == InputKind.Udp)"
},
{
"arguments": [
"inputKind == InputKind.WindowsActiveDirectory"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "WindowsActiveDirectoryInput windowsActiveDirectoryInput =\n (WindowsActiveDirectoryInput) input;\n windowsActiveDirectoryInput.getIndex();\n windowsActiveDirectoryInput.getMonitorSubtree();\n windowsActiveDirectoryInput.getStartingNode();\n windowsActiveDirectoryInput.getTargetDc();",
"signature": "else if (inputKind == InputKind.WindowsActiveDirectory)"
},
{
"arguments": [
"inputKind == InputKind.WindowsEventLog"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "WindowsEventLogInput windowsEventLogInput =\n (WindowsEventLogInput) input;\n windowsEventLogInput.getHosts();\n windowsEventLogInput.getIndex();\n windowsEventLogInput.getLocalName();\n windowsEventLogInput.getLogs();\n windowsEventLogInput.getLookupHost();",
"signature": "else if (inputKind == InputKind.WindowsEventLog)"
},
{
"arguments": [
"inputKind == InputKind.WindowsPerfmon"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "WindowsPerfmonInput windowsPerfmonInput =\n (WindowsPerfmonInput) input;\n windowsPerfmonInput.getCounters();\n windowsPerfmonInput.getIndex();\n windowsPerfmonInput.getInstances();\n windowsPerfmonInput.getInterval();\n windowsPerfmonInput.getObject();",
"signature": "else if (inputKind == InputKind.WindowsPerfmon)"
},
{
"arguments": [
"inputKind == InputKind.WindowsRegistry"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "WindowsRegistryInput windowsRegistryInput =\n (WindowsRegistryInput) input;\n windowsRegistryInput.getBaseline();\n windowsRegistryInput.getHive();\n windowsRegistryInput.getIndex();\n windowsRegistryInput.getMonitorSubnodes();\n windowsRegistryInput.getProc();\n windowsRegistryInput.getType();",
"signature": "else if (inputKind == InputKind.WindowsRegistry)"
},
{
"arguments": [
"inputKind == InputKind.WindowsWmi"
],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "WindowsWmiInput windowsWmiInput = (WindowsWmiInput) input;\n windowsWmiInput.getClasses();\n windowsWmiInput.getFields();\n windowsWmiInput.getIndex();\n windowsWmiInput.getInstances();\n windowsWmiInput.getInterval();\n windowsWmiInput.getLocalName();\n windowsWmiInput.getLookupHost();\n windowsWmiInput.getServers();\n windowsWmiInput.getWql();",
"signature": "else if (inputKind == InputKind.WindowsWmi)"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n\n InputCollection inputs = service.getInputs();\n\n // Iterate inputs and make sure we can read them.\n for (Input input : inputs.values()) {\n input.getName();\n input.getTitle();\n input.getPath();\n input.getKind();\n touchSpecificInput(input);",
"signature": "void testInputs()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n ServiceInfo info = service.getInfo();\n\n // CRUD Monitor input\n String filename;\n if (info.getOsName().equals(\"Windows\"))\n filename = \"C:\\\\Windows\\\\WindowsUpdate.log\";\n else if (info.getOsName().equals(\"Linux\"))\n filename = \"/var/log/messages\";\n else if (info.getOsName().equals(\"Darwin\")) {\n filename = \"/var/log/system.log\";",
"signature": "void testMonitorInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n ServiceInfo info = service.getInfo();\n\n // CRUD Script input\n String filename;\n if (info.getOsName().equals(\"Windows\"))\n filename = \"echo.bat\";\n else\n filename = \"echo.sh\";\n\n Args args = new Args();\n args.clear();\n args.put(\"interval\", \"60\");\n if (inputCollection.get(filename) != null) {\n inputCollection.remove(filename);",
"signature": "void testScriptInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n String port = \"9999\"; // test port\n\n // CRUD TCP (raw) input\n if (inputCollection.containsKey(port)) {\n inputCollection.remove(port);\n inputCollection.refresh();",
"signature": "void testTcpInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n String port = \"9998\"; // test port\n\n // CRUD TCP (cooked) input\n if (inputCollection.containsKey(port)) {\n inputCollection.remove(port);\n inputCollection.refresh();",
"signature": "void testTcpSplunkInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n String port = \"9997\"; // test port\n\n // CRUD UDP input\n if (inputCollection.containsKey(port)) {\n inputCollection.remove(port);\n inputCollection.refresh();",
"signature": "void testUdpInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "/*\n * Need an active directory domain controller for Windows Active Directory\n *\n\n Service service = connect();\n InputCollection inputCollection = service.getInputs();\n ServiceInfo info = service.getInfo();\n\n if (info.getOsName().equals(\"Windows\")) {\n String name = \"sdk-input-wad\";\n Args args = new Args();\n\n if (inputCollection.containsKey(name)) {\n inputCollection.remove(name);\n inputCollection.refresh();",
"signature": "void testWindowsActiveDirectoryInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n ServiceInfo info = service.getInfo();\n\n if (info.getOsName().equals(\"Windows\")) {\n String name = \"sdk-input-wel\";\n Args args = new Args();\n\n if (inputCollection.containsKey(name)) {\n inputCollection.remove(name);\n inputCollection.refresh();",
"signature": "void testWindowsEventLogInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n ServiceInfo info = service.getInfo();\n\n if (info.getOsName().equals(\"Windows\")) {\n String name = \"sdk-input-wp\";\n Args args = new Args();\n\n if (inputCollection.containsKey(name)) {\n inputCollection.remove(name);\n inputCollection.refresh();",
"signature": "void testWindowsPerfmonInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n ServiceInfo info = service.getInfo();\n\n if (info.getOsName().equals(\"Windows\")) {\n String name = \"sdk-input-wr\";\n Args args = new Args();\n\n if (service.versionCompare(\"4.3\") < 0)\n return;\n\n if (inputCollection.containsKey(name)) {\n inputCollection.remove(name);\n inputCollection.refresh();\n assertFalse(assertRoot + \"#71\", inputCollection.containsKey(name));\n\n // CRUD Windows Registry Input\n args.put(\"disabled\", true);\n args.put(\"baseline\", false);\n args.put(\"hive\", \"HKEY_USERS\");\n args.put(\"proc\", \"*\");\n args.put(\"type\", \"*\");\n inputCollection.create(name, InputKind.WindowsRegistry, args);\n assertTrue(assertRoot + \"#72\", inputCollection.containsKey(name));\n WindowsRegistryInput windowsRegistryInput =\n (WindowsRegistryInput)inputCollection.get(name);\n\n windowsRegistryInput.setIndex(\"main\");\n windowsRegistryInput.setMonitorSubnodes(true);\n windowsRegistryInput.update();\n\n assertFalse(assertRoot + \"#73\", windowsRegistryInput.getBaseline());\n assertEquals(assertRoot + \"#74\", \"main\",\n windowsRegistryInput.getIndex());\n\n // adjust a few of the arguments\n String[] wriType = {\"create\", \"delete\"",
"signature": "void testWindowsRegistryInputCrud()"
},
{
"arguments": [],
"filename": "tests/com/splunk/InputTest.java",
"implementation": "Service service = connect();\n InputCollection inputCollection = service.getInputs();\n ServiceInfo info = service.getInfo();\n\n if (info.getOsName().equals(\"Windows\")) {\n String name = \"sdk-input-wmi\";\n Args args = new Args();\n\n if (inputCollection.containsKey(name)) {\n inputCollection.remove(name);\n inputCollection.refresh();",
"signature": "void testWmiInputCrud()"
},
{
"arguments": [
"LicensePool licensePool"
],
"filename": "tests/com/splunk/LicensePoolTest.java",
"implementation": "licensePool.getDescription();\n licensePool.getQuota();\n licensePool.getSlaves();\n licensePool.getSlavesUsageBytes();\n licensePool.getStackId();\n licensePool.getUsedBytes();",
"signature": "void checkLicensePool(LicensePool licensePool)"
},
{
"arguments": [
"LicensePoolCollection licensePoolCollection"
],
"filename": "tests/com/splunk/LicensePoolTest.java",
"implementation": "for (LicensePool licensePool : licensePoolCollection.values())\n checkLicensePool(licensePool);",
"signature": "void checkLicensePools(LicensePoolCollection licensePoolCollection)"
},
{
"arguments": [
"Entity entity"
],
"filename": "tests/com/splunk/MetadataTest.java",
"implementation": "void checkMetadata(EntityCollection entityCollection) {\n for (Object entity : entityCollection.values())\n checkMetadata((Entity)entity);",
"signature": "void checkMetadata(Entity entity)"
},
{
"arguments": [],
"filename": "tests/com/splunk/MetadataTest.java",
"implementation": "Service service = connect();\n\n checkMetadata(service.getApplications());\n checkMetadata(service.getDeploymentClient());\n checkMetadata(service.getDeploymentServerClasses());\n checkMetadata(service.getDeploymentTenants());\n checkMetadata(service.getDistributedConfiguration());\n checkMetadata(service.getDistributedPeers());\n checkMetadata(service.getEventTypes());\n checkMetadata(service.getFiredAlertGroups());\n checkMetadata(service.getIndexes());\n checkMetadata(service.getInfo());\n checkMetadata(service.getInputs());\n checkMetadata(service.getJobs());\n checkMetadata(service.getLicenseGroups());\n checkMetadata(service.getLicensePools());\n checkMetadata(service.getLicenseSlaves());\n checkMetadata(service.getLicenseStacks());\n checkMetadata(service.getLicenses());\n checkMetadata(service.getLoggers());\n checkMetadata(service.getMessages());\n checkMetadata(service.getOutputDefault());\n checkMetadata(service.getOutputGroups());\n checkMetadata(service.getOutputServers());\n checkMetadata(service.getOutputSyslogs());\n checkMetadata(service.getPasswords());\n checkMetadata(service.getRoles());\n checkMetadata(service.getSavedSearches());\n checkMetadata(service.getSettings());\n checkMetadata(service.getUsers());",
"signature": "void testMetadata()"
},
{
"arguments": [
"Password password"
],
"filename": "tests/com/splunk/PasswordTest.java",
"implementation": "@Test public void testPasswords() {\n Service service = connect();\n for (Password password : service.getPasswords().values())\n checkPassword(password);",
"signature": "void checkPassword(Password password)"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "Service service = connect();\n SavedSearchCollection savedSearches = service.getSavedSearches();\n // Iterate saved searches and make sure we can read them.\n for (SavedSearch savedSearch : savedSearches.values()) {\n // Resource properties\n savedSearch.getName();\n savedSearch.getTitle();\n savedSearch.getPath();\n // SavedSearch properties get\n savedSearch.getActionEmailAuthPassword();\n savedSearch.getActionEmailAuthUsername();\n savedSearch.getActionEmailSendResults();\n savedSearch.getActionEmailBcc();\n savedSearch.getActionEmailCc();\n savedSearch.getActionEmailCommand();\n savedSearch.getActionEmailFormat();\n savedSearch.getActionEmailInline();\n savedSearch.getActionEmailMailServer();\n savedSearch.getActionEmailMaxResults();\n savedSearch.getActionEmailMaxTime();\n savedSearch.getActionEmailReportPaperOrientation();\n savedSearch.getActionEmailReportPaperSize();\n savedSearch.getActionEmailReportServerEnabled();\n savedSearch.getActionEmailReportServerUrl();\n savedSearch.getActionEmailSendPdf();\n savedSearch.getActionEmailSendResults();\n savedSearch.getActionEmailSubject();\n savedSearch.getActionEmailTo();\n savedSearch.getActionEmailTrackAlert();\n savedSearch.getActionEmailTtl();\n savedSearch.getActionEmailUseSsl();\n savedSearch.getActionEmailUseTls();\n savedSearch.getActionEmailWidthSortColumns();\n savedSearch.getActionPopulateLookupCommand();\n savedSearch.getActionPopulateLookupDest();\n savedSearch.getActionPopulateLookupHostname();\n savedSearch.getActionPopulateLookupMaxResults();\n savedSearch.getActionPopulateLookupMaxTime();\n savedSearch.getActionPopulateLookupTrackAlert();\n savedSearch.getActionPopulateLookupTtl();\n savedSearch.getActionRssCommand();\n savedSearch.getActionRssHostname();\n savedSearch.getActionRssMaxResults();\n savedSearch.getActionRssMaxTime();\n savedSearch.getActionRssTrackAlert();\n savedSearch.getActionRssTtl();\n savedSearch.getActionScriptCommand();\n savedSearch.getActionScriptFilename();\n savedSearch.getActionScriptHostname();\n savedSearch.getActionScriptMaxResults();\n savedSearch.getActionScriptMaxTime();\n savedSearch.getActionScriptTrackAlert();\n savedSearch.getActionScriptTtl();\n savedSearch.getActionSummaryIndexName();\n savedSearch.getActionSummaryIndexCommand();\n savedSearch.getActionSummaryIndexHostname();\n savedSearch.getActionSummaryIndexInline();\n savedSearch.getActionSummaryIndexMaxResults();\n savedSearch.getActionSummaryIndexMaxTime();\n savedSearch.getActionSummaryIndexTrackAlert();\n savedSearch.getActionSummaryIndexTtl();\n savedSearch.getAlertDigestMode();\n savedSearch.getAlertExpires();\n savedSearch.getAlertSeverity();\n savedSearch.getAlertSuppress();\n savedSearch.getAlertSuppressFields();\n savedSearch.getAlertSuppressPeriod();\n savedSearch.getAlertTrack();\n savedSearch.getAlertComparator();\n savedSearch.getAlertCondition();\n savedSearch.getAlertThreshold();\n savedSearch.getAlertType();\n savedSearch.getCronSchedule();\n savedSearch.getDescription();\n savedSearch.getDispatchBuckets();\n savedSearch.getDispatchEarliestTime();\n savedSearch.getDispatchLatestTime();\n savedSearch.getDispatchLookups();\n savedSearch.getDispatchMaxCount();\n savedSearch.getDispatchMaxTime();\n savedSearch.getDispatchReduceFreq();\n savedSearch.getDispatchRtBackfill();\n savedSearch.getDispatchSpawnProcess();\n savedSearch.getDispatchTimeFormat();\n savedSearch.getDispatchTtl();\n savedSearch.getDisplayView();\n savedSearch.getMaxConcurrent();\n savedSearch.getNextScheduledTime();\n savedSearch.getQualifiedSearch();\n savedSearch.getRealtimeSchedule();\n savedSearch.getRequestUiDispatchApp();\n savedSearch.getRequestUiDispatchView();\n savedSearch.getRestartOnSearchPeerAdd();\n savedSearch.getRunOnStartup();\n savedSearch.getSearch();\n savedSearch.getVsid();\n savedSearch.isActionEmail();\n savedSearch.isActionPopulateLookup();\n savedSearch.isActionRss();\n savedSearch.isActionScript();\n savedSearch.isActionSummaryIndex();\n savedSearch.isDigestMode();\n savedSearch.isDisabled();\n savedSearch.isScheduled();\n savedSearch.isVisible();",
"signature": "void testSavedSearches()"
},
{
"arguments": [],
"filename": "tests/com/splunk/SavedSearchTest.java",
"implementation": "Service service = connect();\n\n SavedSearchCollection savedSearches = service.getSavedSearches();\n\n // Ensure test starts in a known good state\n if (savedSearches.containsKey(\"sdk-test1\"))\n savedSearches.remove(\"sdk-test1\");\n assertFalse(assertRoot + \"#1\", savedSearches.containsKey(\"sdk-test1\"));\n\n SavedSearch savedSearch;\n String search = \"search index=sdk-tests * earliest=-1m\";\n\n // Create a saved search\n savedSearches.create(\"sdk-test1\", search);\n assertTrue(assertRoot + \"#2\", savedSearches.containsKey(\"sdk-test1\"));\n\n // Read the saved search\n savedSearch = savedSearches.get(\"sdk-test1\");\n assertTrue(assertRoot + \"#3\", savedSearch.isVisible());\n // CONSIDER: Test some additinal default property values.\n\n // Update search properties, but don't specify required args to test\n // pulling them from the existing object\n savedSearch.update(new Args(\"is_visible\", false));\n savedSearch.refresh();\n assertFalse(assertRoot + \"#4\", savedSearch.isVisible());\n // Delete the saved search\n savedSearches.remove(\"sdk-test1\");\n assertFalse(assertRoot + \"#5\", savedSearches.containsKey(\"sdk-test1\"));\n // Create a saved search with some additional arguments\n savedSearch = savedSearches.create(\n \"sdk-test1\", search, new Args(\"is_visible\", false));\n assertFalse(assertRoot + \"#6\", savedSearch.isVisible());\n // set email params\n //savedSearch.setActionScriptFilename(String filename);\n \"rss,email,populate_lookup,script,summary_index\");\n savedSearch.setSearch(search);\n // check\n assertTrue(assertRoot + \"#7\", savedSearch.isActionEmail());\n assertTrue(assertRoot + \"#8\", savedSearch.isActionPopulateLookup());\n assertTrue(assertRoot + \"#9\", savedSearch.isActionRss());\n assertTrue(assertRoot + \"#10\", savedSearch.isActionScript());\n assertTrue(assertRoot + \"#11\", savedSearch.isActionSummaryIndex());\n assertTrue(assertRoot + \"#12\", savedSearch.isDigestMode());\n\n assertEquals(assertRoot + \"#12\", \"sdk-password\",\n savedSearch.getActionEmailAuthPassword());\n assertEquals(assertRoot + \"#13\", \"sdk-username\",\n savedSearch.getActionEmailAuthUsername());\n assertEquals(assertRoot + \"#14\", \"sdk-bcc@splunk.com\",\n savedSearch.getActionEmailBcc());\n assertEquals(assertRoot + \"#15\", \"sdk-cc@splunk.com\",\n savedSearch.getActionEmailCc());\n assertEquals(assertRoot + \"#16\", \"$name1$\",\n savedSearch.getActionEmailCommand());\n assertEquals(assertRoot + \"#17\", \"text\",\n savedSearch.getActionEmailFormat());\n assertEquals(assertRoot + \"#18\", \"sdk@splunk.com\",\n savedSearch.getActionEmailFrom());\n assertEquals(assertRoot + \"#19\", \"dummy1.host.com\",\n savedSearch.getActionEmailHostname());\n assertTrue(assertRoot + \"#20\", savedSearch.getActionEmailInline());\n assertEquals(assertRoot + \"#21\", \"splunk.com\",\n savedSearch.getActionEmailMailServer());\n assertEquals(assertRoot + \"#22\", 101,\n savedSearch.getActionEmailMaxResults());\n assertEquals(assertRoot + \"#23\", \"10s\",\n savedSearch.getActionEmailMaxTime());\n assertEquals(assertRoot + \"#24\", \"dummy\",\n savedSearch.getActionEmailPdfView());\n assertEquals(assertRoot + \"#25\", \"*\",\n savedSearch.getActionEmailPreProcessResults());\n assertEquals(assertRoot + \"#26\", \"landscape\",\n savedSearch.getActionEmailReportPaperOrientation());\n assertEquals(assertRoot + \"#27\", \"letter\",\n savedSearch.getActionEmailReportPaperSize());\n assertFalse(assertRoot + \"#28\",\n savedSearch.getActionEmailReportServerEnabled());\n assertEquals(assertRoot + \"#29\", \"splunk.com\",\n savedSearch.getActionEmailReportServerUrl());\n assertFalse(assertRoot + \"#30\", savedSearch.getActionEmailSendPdf());\n assertFalse(assertRoot + \"#31\",\n savedSearch.getActionEmailSendResults());\n assertEquals(assertRoot + \"#32\", \"sdk-subject\",\n savedSearch.getActionEmailSubject());\n assertEquals(assertRoot + \"#33\", \"sdk-to@splunk.com\",\n savedSearch.getActionEmailTo());\n assertFalse(assertRoot + \"#34\", savedSearch.getActionEmailTrackAlert());\n assertEquals(assertRoot + \"#35\", \"61\", savedSearch.getActionEmailTtl());\n assertFalse(assertRoot + \"#36\", savedSearch.getActionEmailUseSsl());\n assertFalse(assertRoot + \"#37\", savedSearch.getActionEmailUseTls());\n assertFalse(assertRoot + \"#38\",\n savedSearch.getActionEmailWidthSortColumns());\n assertEquals(assertRoot + \"#39\", \"$name2$\",\n savedSearch.getActionPopulateLookupCommand());\n assertEquals(assertRoot + \"#40\", \"dummypath\",\n savedSearch.getActionPopulateLookupDest());\n assertEquals(assertRoot + \"#41\", \"dummy2.host.com\",\n savedSearch.getActionPopulateLookupHostname());\n assertEquals(assertRoot + \"#42\", 102,\n savedSearch.getActionPopulateLookupMaxResults());\n assertEquals(assertRoot + \"#43\", \"20s\",\n savedSearch.getActionPopulateLookupMaxTime());\n assertFalse(assertRoot + \"#44\",\n savedSearch.getActionPopulateLookupTrackAlert());\n assertEquals(assertRoot + \"#45\", \"62\",\n savedSearch.getActionPopulateLookupTtl());\n assertEquals(assertRoot + \"#46\", \"$name3$\",\n savedSearch.getActionRssCommand());\n assertEquals(assertRoot + \"#47\", \"dummy3.host.com\",\n savedSearch.getActionRssHostname());\n assertEquals(assertRoot + \"#48\", 103,\n savedSearch.getActionRssMaxResults());\n assertEquals(assertRoot + \"#49\", \"30s\",\n savedSearch.getActionRssMaxTime());\n assertFalse(assertRoot + \"#50\", savedSearch.getActionRssTrackAlert());\n assertEquals(assertRoot + \"#51\", \"63\", savedSearch.getActionRssTtl());\n assertEquals(assertRoot + \"#52\", \"$name4$\",\n savedSearch.getActionScriptCommand());\n //savedSearch.setActionScriptFilename(String filename);\n assertEquals(assertRoot + \"#53\", \"dummy4.host.com\",\n savedSearch.getActionScriptHostname());\n assertEquals(assertRoot + \"#54\", 104,\n savedSearch.getActionScriptMaxResults());\n assertEquals(assertRoot + \"#55\", \"40s\",\n savedSearch.getActionScriptMaxTime());\n assertFalse(assertRoot + \"#56\",\n savedSearch.getActionScriptTrackAlert());\n assertEquals(assertRoot + \"#57\", \"64\",\n savedSearch.getActionScriptTtl());\n assertEquals(assertRoot + \"#58\", \"default\",\n savedSearch.getActionSummaryIndexName());\n assertEquals(assertRoot + \"#59\", \"$name5$\",\n savedSearch.getActionSummaryIndexCommand());\n assertEquals(assertRoot + \"#60\", \"dummy5.host.com\",\n savedSearch.getActionSummaryIndexHostname());\n assertFalse(assertRoot + \"#61\",\n savedSearch.getActionSummaryIndexInline());\n assertEquals(assertRoot + \"#62\", 105,\n savedSearch.getActionSummaryIndexMaxResults());\n assertEquals(assertRoot + \"#63\", \"50s\",\n savedSearch.getActionSummaryIndexMaxTime());\n assertFalse(assertRoot + \"#64\",\n savedSearch.getActionSummaryIndexTrackAlert());\n assertEquals(assertRoot + \"#65\", \"65\",\n savedSearch.getActionSummaryIndexTtl());\n\n // Delete the saved search - using alternative method\n savedSearch.remove();\n savedSearches.refresh();\n assertFalse(assertRoot + \"#66\", savedSearches.containsKey(\"sdk-test1\"));\n @Test public void testDispatch() throws IOException, InterruptedException {\n Service service = connect();\n\n SavedSearchCollection savedSearches = service.getSavedSearches();\n\n // Ensure test starts in a known good state\n if (savedSearches.containsKey(\"sdk-test1\"))\n savedSearches.remove(\"sdk-test1\");\n assertFalse(assertRoot + \"#67\", savedSearches.containsKey(\"sdk-test1\"));\n\n String search = \"search index=sdk-tests * earliest=-1m\";\n\n // Create a saved search\n SavedSearch savedSearch = savedSearches.create(\"sdk-test1\", search);\n\n Job job;\n\n // Dispatch the saved search and wait for results.\n job = savedSearch.dispatch();\n wait(job);\n job.getResults().close();\n job.cancel();\n\n // Dispatch with some additional search options\n job = savedSearch.dispatch(new Args(\"dispatch.buckets\", 100));\n wait(job);\n job.getTimeline().close();\n job.cancel();\n\n // Delete the saved search\n savedSearches.remove(\"sdk-test1\");\n assertFalse(assertRoot + \"#68\", savedSearches.containsKey(\"sdk-test1\"));\n \n @Test public void testDispatchWithAbsoluteTimeArg() throws IOException, InterruptedException {\n Service service = connect();\n\n SavedSearchCollection savedSearches = service.getSavedSearches();\n\n // Ensure test starts in a known good state\n if (savedSearches.containsKey(\"sdk-test1\"))\n savedSearches.remove(\"sdk-test1\");\n assertFalse(assertRoot + \"#67\", savedSearches.containsKey(\"sdk-test1\"));\n String search = \"search index=sdk-tests * earliest=-1m\";\n\n // Create a saved search\n SavedSearch savedSearch = savedSearches.create(\"sdk-test1\", search);\n \n Calendar c = new GregorianCalendar();\n c.setTime(new Date());\n c.add(Calendar.MINUTE, -2);\n Date expectedTime = c.getTime();\n \n SavedSearchDispatchArgs dispatchArgs = new SavedSearchDispatchArgs();\n dispatchArgs.setDispatchEarliestTime(expectedTime);\n\n // Dispatch the saved search and check job properties\n Job job = savedSearch.dispatch(dispatchArgs);\n ready(job);\n Date actualTime = job.getEarliestTime();\n \n boolean nearlyEqual = actualTime.toString().equals(expectedTime.toString());\n assertTrue(actualTime + \" != \" + expectedTime, nearlyEqual);\n \n @Test public void testDispatchWithRelativeTimeArg() throws IOException, InterruptedException {\n Service service = connect();\n\n SavedSearchCollection savedSearches = service.getSavedSearches();\n // Ensure test starts in a known good state\n if (savedSearches.containsKey(\"sdk-test1\"))\n savedSearches.remove(\"sdk-test1\");\n assertFalse(assertRoot + \"#67\", savedSearches.containsKey(\"sdk-test1\"));\n String search = \"search index=sdk-tests * earliest=-1m\";\n // Create a saved search\n SavedSearch savedSearch = savedSearches.create(\"sdk-test1\", search);\n \n String expectedTimeString = \"-2m\";\n \n Calendar c = new GregorianCalendar();\n c.setTime(new Date());\n c.add(Calendar.MINUTE, -2);\n Date expectedTime = c.getTime();\n \n SavedSearchDispatchArgs dispatchArgs = new SavedSearchDispatchArgs();\n dispatchArgs.setDispatchEarliestTime(expectedTimeString);\n // Dispatch the saved search and check job properties\n Job job = savedSearch.dispatch(dispatchArgs);\n ready(job);\n Date actualTime = job.getEarliestTime();\n \n boolean nearlyEqual = actualTime.toString().equals(expectedTime.toString());\n assertTrue(actualTime + \" != \" + expectedTime, nearlyEqual);",
"signature": "void testSavedSearchCrud()"
},
{
"arguments": [
"Job job"
],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "ready(job);\n job.getDelegate();\n job.getDiskUsage();\n job.getDispatchState();\n job.getDoneProgress();\n job.getDropCount();\n job.getEarliestTime();\n job.getEventAvailableCount();\n job.getEventCount();\n job.getEventFieldCount();\n job.getEventIsStreaming();\n job.getEventIsTruncated();\n job.getEventSearch();\n job.getEventSorting();\n job.getKeywords();\n job.getLabel();\n job.getLatestTime();\n job.getNumPreviews();\n job.getPriority();\n job.getRemoteSearch();\n job.getReportSearch();\n job.getResultCount();\n job.getResultIsStreaming();\n job.getResultPreviewCount();\n job.getRunDuration();\n job.getScanCount();\n job.getSearch();\n job.getSearchEarliestTime();\n job.getSearchLatestTime();\n job.getSid();\n job.getStatusBuckets();\n job.getTtl();\n job.isDone();\n job.isFailed();\n job.isFinalized();\n job.isPaused();\n job.isPreviewEnabled();\n job.isRealTimeSearch();\n job.isSaved();\n job.isSavedSearch();\n job.isZombie();\n assertEquals(assertRoot + \"#1\", job.getName(), job.getSid());",
"signature": "void checkJob(Job job)"
},
{
"arguments": [
"ResponseMessage response"
],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "assertEquals(assertRoot + \"#2\", 200, response.getStatus());\n try {\n // Make sure we can at least load the Atom response\n AtomFeed.parseStream(response.getContent());",
"signature": "void checkResponse(ResponseMessage response)"
},
{
"arguments": [],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "Service service = connect();\n\n assertEquals(assertRoot + \"#4\", 404, e.getStatus());\n @Test public void testInfo() throws Exception {\n Service service = connect();\n\n assertTrue(assertRoot + \"#5\", info.containsKey(name));\n @Test public void testLogin() {\n command.host, \n command.port, \n command.scheme);\n assertEquals(assertRoot + \"#6\", 401, e.getStatus());\n service.login(command.username, command.password);\n assertEquals(assertRoot + \"#7\", 401, e.getStatus());\n @Test public void testRestart() throws Exception {\n splunkRestart();",
"signature": "void testGet()"
},
{
"arguments": [],
"filename": "tests/com/splunk/ServiceTest.java",
"implementation": "Job job;\n\n Service service = connect();\n\n for (Entity entity : jobs.values())\n checkJob((Job)entity);\n job = jobs.create(\"search *\");\n checkJob(job);\n @Test public void testSettersAndGetters() {\n\n // The individual classes test most of the set/get methods,\n // but call out some specific cases here.\n\n Service service = connect();\n // make sure set updates state before getting.\n // entity.setMethod(value)\n // entity.getMethod() --> gets value.\n assertEquals(assertRoot + \"#8\", \"sdk-host\", settings.getHost());\n // make sure posts arguments are merged\n // entity.setMethod(value)\n // entity.update(args.create(\"key2\", value2))\n settings.update(\n new HashMap<String, Object>(Args.create(\"minFreeSpace\", 500)));\n assertEquals(assertRoot + \"#9\", \"sdk-host2\", settings.getHost());\n assertEquals(assertRoot + \"#10\", 500, settings.getMinFreeSpace());\n // make sure live posts argument take precedents over setters\n // entity.setMethod(value)\n // entity.update(args.create(\"samekey\", value2))\n settings.update(\n new HashMap<String, Object>(Args.create(\"minFreeSpace\", 700)));\n assertEquals(assertRoot + \"#11\", 700, settings.getMinFreeSpace());\n\n // Restore original\n settings.setHost(originalHost);\n settings.setMinimumFreeSpace(originalMinSpace);\n settings.update();\n assertEquals(assertRoot + \"#12\", settings.getMinFreeSpace(),\n originalMinSpace);\n assertEquals(assertRoot + \"#13\", settings.getHost(), originalHost);\n @Test public void testUsers() {\n Service service = connect();\n\n assertFalse(assertRoot + \"#14\", users.containsKey(username));\n args = new Args();\n args.put(\"password\", password);\n args.put(\"roles\", \"power\");\n user = users.create(username, args);\n assertTrue(assertRoot + \"#15\", users.containsKey(username));\n assertEquals(assertRoot + \"#16\", username, user.getName());\n assertEquals(assertRoot + \"#17\", 1, user.getRoles().length);\n assertTrue(assertRoot + \"#18\", contains(user.getRoles(), \"power\"));\n\n users.remove(username);\n assertFalse(assertRoot + \"#19\", users.containsKey(username));\n user = users.create(username, password, \"power\");\n assertTrue(assertRoot + \"#21\", users.containsKey(username));\n assertEquals(assertRoot + \"#22\", username, user.getName());\n assertEquals(assertRoot + \"#23\", 1, user.getRoles().length);\n assertTrue(assertRoot + \"#24\", contains(user.getRoles(), \"power\"));\n\n users.remove(username);\n assertFalse(assertRoot + \"#25\", users.containsKey(username));\n user = users.create(\n username, password, new String[] { \"power\", \"user\"",
"signature": "void testJobs()"
}
] |
026d9229913aeeb0b961b3efdc0c64f289aada2d | [
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "public void isInstanceOfSuperclass() {\n assertThat(3).isInstanceOf(Number.class);",
"signature": "void isInstanceOfExactType()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "if (isGwt()) {\n try {\n assertThat(\"a\").isInstanceOf(CharSequence.class);\n fail();",
"signature": "void isInstanceOfImplementedInterface()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "public void isInstanceOfUnrelatedInterface() {\n if (isGwt()) {\n try {\n assertThat(4.5).isInstanceOf(CharSequence.class);\n fail();",
"signature": "void isInstanceOfUnrelatedClass()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "expectFailure.whenTesting().that((Object) null).isInstanceOf(Long.class);\n assertThat(expectFailure.getFailure())\n .hasMessageThat()\n .isEqualTo(\"Not true that <null> is an instance of <java.lang.Long>\");",
"signature": "void isInstanceOfClassForNull()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "expectFailure.whenTesting().that((Object) null).isInstanceOf(CharSequence.class);\n assertThat(expectFailure.getFailure())\n .hasMessageThat()\n .isEqualTo(\"Not true that <null> is an instance of <java.lang.CharSequence>\");",
"signature": "void isInstanceOfInterfaceForNull()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "public void isNotInstanceOfUnrelatedInterface() {\n if (isGwt()) {\n try {\n assertThat(5).isNotInstanceOf(CharSequence.class);\n fail();",
"signature": "void isNotInstanceOfUnrelatedClass()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "expectFailure.whenTesting().that(5).isNotInstanceOf(Integer.class);\n assertThat(expectFailure.getFailure())\n .hasMessageThat()\n .isEqualTo(\"<5> expected not to be an instance of java.lang.Integer, but was.\");",
"signature": "void isNotInstanceOfExactType()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/SubjectTest.java",
"implementation": "@Test\n public void isNotInstanceOfImplementedInterface() {\n if (isGwt()) {\n try {\n assertThat(\"a\").isNotInstanceOf(CharSequence.class);\n fail();",
"signature": "void isNotInstanceOfSuperclass()"
}
] | [
{
"arguments": [
"Object instance",
" Class<?> clazz"
],
"filename": "core/src/main/java/com/google/common/truth/Platform.java",
"implementation": "/**\n * Returns true if the instance is assignable to the type Clazz (suitable for a GWT environment).\n */\n static boolean isInstanceOfTypeGWT(Object instance, Class<?> clazz) {\n String className = clazz.getName();\n Set<String> types = new LinkedHashSet<>();\n types.add(instance.getClass().getCanonicalName());\n addTypeNames(instance.getClass(), types);\n return types.contains(className);",
"signature": "boolean isInstanceOfTypeJava(Object instance, Class<?> clazz)"
},
{
"arguments": [
"Class<?>[] interfaces",
" Set<String> types"
],
"filename": "core/src/main/java/com/google/common/truth/Platform.java",
"implementation": "for (Class<?> interfaze : interfaces) {\n types.add(interfaze.getName());\n addInterfaceNames(interfaze.getInterfaces(), types);",
"signature": "void addInterfaceNames(Class<?>[] interfaces, Set<String> types)"
},
{
"arguments": [
"Class<?> clazz",
" Set<String> types"
],
"filename": "core/src/main/java/com/google/common/truth/Platform.java",
"implementation": "for (Class<?> current = clazz; current != null; current = current.getSuperclass()) {\n types.add(current.getName());\n addInterfaceNames(current.getInterfaces(), types);",
"signature": "void addTypeNames(Class<?> clazz, Set<String> types)"
},
{
"arguments": [
"though in GWT clazz can only be a\n * concrete class that is an ancestor class of the instance or the direct type of the instance.\n */\n static boolean isInstanceOfTypeGWT"
],
"filename": "core/src/main/java/com/google/common/truth/super/com/google/common/truth/Platform.java",
"implementation": "String className = clazz.getName();\n Set<String> types = new LinkedHashSet<String>();\n addTypeNames(instance.getClass(), types);\n return types.contains(className);",
"signature": "type Clazz (though in GWT clazz can only be a\n * concrete class that is an ancestor class of the instance or the direct type of the instance.\n */\n static boolean isInstanceOfTypeGWT(Object instance, Class<?> clazz)"
}
] |
02e22b24a77665fb2eab634322ed84dc4b41f9dd | [
{
"arguments": [
"String smallPublicNetwork"
],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "this.smallPublicNetwork = smallPublicNetwork;\n public void setSmallPrivateNetwork(String smallPrivateNetwork) {\n this.smallPrivateNetwork = smallPrivateNetwork;\n public void setCustomPublicNetwork(String customPublicNetwork) {\n this.customPublicNetwork = customPublicNetwork;\n public void setCustomPrivateNetwork(String customPrivateNetwork) {\n this.customPrivateNetwork = customPrivateNetwork;",
"signature": "void setSmallPublicNetwork(String smallPublicNetwork)"
},
{
"arguments": [
"String largePublicNetwork"
],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "this.largePublicNetwork = largePublicNetwork;",
"signature": "void setLargePublicNetwork(String largePublicNetwork)"
},
{
"arguments": [
"String largePrivateNetwork"
],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "this.largePrivateNetwork = largePrivateNetwork;",
"signature": "void setLargePrivateNetwork(String largePrivateNetwork)"
},
{
"arguments": [
"String xlargePublicNetwork"
],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "this.xlargePublicNetwork = xlargePublicNetwork;",
"signature": "void setXlargePublicNetwork(String xlargePublicNetwork)"
},
{
"arguments": [
"String xlargePrivateNetwork"
],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "this.xlargePrivateNetwork = xlargePrivateNetwork;\n public String getSmallPublicNetwork() {\n return this.smallPublicNetwork;",
"signature": "void setXlargePrivateNetwork(String xlargePrivateNetwork)"
},
{
"arguments": [],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "return this.smallPrivateNetwork;",
"signature": "String getSmallPrivateNetwork()"
},
{
"arguments": [],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "return this.customPublicNetwork;",
"signature": "String getCustomPublicNetwork()"
},
{
"arguments": [],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "return this.customPrivateNetwork;\n public String getLargePublicNetwork() {\n return this.largePublicNetwork;\n public String getLargePrivateNetwork() {\n return this.largePrivateNetwork;\n public String getXlargePublicNetwork() {\n return this.xlargePublicNetwork;",
"signature": "String getCustomPrivateNetwork()"
},
{
"arguments": [],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "return this.xlargePrivateNetwork;\n protected String getMatchingName(int memory, int cpus, String publicNetwork, String privateNetwork) {\n if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallPublicNetwork.equals(publicNetwork) && this.smallPrivateNetwork.equals(privateNetwork)) {",
"signature": "String getXlargePrivateNetwork()"
},
{
"arguments": [],
"filename": "service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultResourceAllocation.java",
"implementation": "return this.publicNetwork;\n public String getPrivateNetwork() {\n return this.privateNetwork;",
"signature": "String getPublicNetwork()"
},
{
"arguments": [
"String publicNetwork"
],
"filename": "service-api/java/source/src/org/nimbustools/api/defaults/repr/vm/DefaultResourceAllocation.java",
"implementation": "this.publicNetwork = publicNetwork;",
"signature": "void setPublicNetwork(String publicNetwork)"
}
] | [
{
"arguments": [
"String smallNetwork"
],
"filename": "messaging/gt4.0-elastic/java/msgbridge/src/org/nimbustools/messaging/gt4_0_elastic/v2008_05_05/general/defaults/DefaultResourceAllocations.java",
"implementation": "this.smallNetwork = smallNetwork;\n public void setCustomNetwork(String customNetwork) {\n this.customNetwork = customNetwork;\n public void setLargeNetwork(String largeNetwork) {\n this.largeNetwork = largeNetwork;\n public void setXlargeNetwork(String xlargeNetwork) {\n this.xlargeNetwork = xlargeNetwork;\n public String getSmallNetwork() {\n return this.smallNetwork;\n public String getCustomNetwork() {\n return this.customNetwork;\n public String getLargeNetwork() {\n return this.largeNetwork;\n public String getXlargeNetwork() {\n return this.xlargeNetwork;\n protected String getMatchingName(int memory, int cpus, String network) {\n if (this.smallMemory == memory && this.smallCPUs == cpus && this.smallNetwork.equals(network)) {",
"signature": "void setSmallNetwork(String smallNetwork)"
}
] |
0497f457266bb24edc24b2e1a5c86dfc2ea1958a | [
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "return CN_PREFIX + SEPARATOR + SEPARATOR + path.join(SEPARATOR);\n private LeaseHandle createTemporary(final CloudnamePath path, final String data) {\n pathToKv(instancePath.get()), data, session.getId());\n public boolean writeData(final String data) {\n pathToKv(instancePath.get()), data, session.getId());\n public boolean writeLeaseData(final CloudnamePath path, final String data) {\n return consul.writeSessionData(pathToKv(path), data, session.getId());\n public String readLeaseData(final CloudnamePath path) {\n return consul.readData(pathToKv(path));\n public LeaseHandle createLease(\n final LeaseType type, final CloudnamePath path, final String data) {\n switch (type) {\n case PERMANENT:\n if (consul.createPermanentData(pathToKv(path), data)) {\n return new LeaseHandle() {\n @Override\n public boolean writeData(final String data) {\n return writeLeaseData(path, data);",
"signature": "String pathToKv(final CloudnamePath path)"
},
{
"arguments": [],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "return path;",
"signature": "CloudnamePath getLeasePath()"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "final String consulPath = pathToKv(path);\n public void addLeaseListener(final CloudnamePath leaseToObserve, final LeaseListener listener) {\n final ConsulWatch watch = consul.createWatch(pathToKv(leaseToObserve));\n watches.put(listener, watch);\n watch.startWatching(new ConsulWatch.ConsulWatchListener() {\n @Override\n public void created(final String valueName, final String value) {\n final CloudnamePath path = kvNameToCloudnamePath(valueName);\n if (path.equals(leaseToObserve)) {\n listener.leaseCreated(path, value);",
"signature": "boolean removeLease(final CloudnamePath path)"
},
{
"arguments": [
"final String valueName",
" final String value"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "final CloudnamePath path = kvNameToCloudnamePath(valueName);\n if (path.equals(leaseToObserve)) {\n listener.dataChanged(path, value);",
"signature": "void changed(final String valueName, final String value)"
},
{
"arguments": [
"final String valueName"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "final CloudnamePath path = kvNameToCloudnamePath(valueName);\n if (path.equals(leaseToObserve)) {\n listener.leaseRemoved(path);",
"signature": "void removed(final String valueName)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "final String zkPath = ZK_ROOT + path.join('/');\n public String readLeaseData(final CloudnamePath path) {\n final String zkPath = ZK_ROOT + path.join('/');\n private CloudnamePath toCloudnamePath(final String zkPath) {\n final String clientPath = zkPath.substring(ZK_ROOT.length());\n public void addLeaseCollectionListener(\n final String zkPath = ZK_ROOT + pathToObserve.join('/');\n listener.leaseCreated(toCloudnamePath(path), data);\n listener.dataChanged(toCloudnamePath(path), data);\n listener.leaseRemoved(toCloudnamePath(path));\n collectionListeners.put(listener, watcher);\n public void addLeaseListener(final CloudnamePath leaseToObserve, final LeaseListener listener) {\n final String parentPath = ZK_ROOT + leaseToObserve.getParent().join('/');\n final String fullPath = ZK_ROOT + leaseToObserve.join('/');\n listener.leaseCreated(toCloudnamePath(path), data);\n listener.dataChanged(toCloudnamePath(path), data);\n listener.leaseRemoved(toCloudnamePath(path));\n leaseListeners.put(listener, watcher);\n public void removeLeaseListener(final LeaseListener listener) {\n final NodeCollectionWatcher collectionWatcher = collectionListeners.get(listener);\n if (collectionWatcher != null) {\n collectionListeners.remove(listener);\n collectionWatcher.shutdown();",
"signature": "boolean writeLeaseData(final CloudnamePath path, final String data)"
},
{
"arguments": [
"\n final LeaseType type",
" final CloudnamePath path",
" final String data"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "if (type == null || path == null || data == null) {\n return null;",
"signature": "LeaseHandle createLease(\n final LeaseType type, final CloudnamePath path, final String data)"
},
{
"arguments": [],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "private AtomicBoolean closed = new AtomicBoolean(false);\n\n @Override\n public boolean writeData(final String data) {\n if (closed.get()) {\n LOG.info(\"Attempt to write data to closed leased handle \" + data);\n return false;",
"signature": "new LeaseHandle()"
},
{
"arguments": [],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "if (closed.get()) {\n return null;",
"signature": "CloudnamePath getLeasePath()"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "final String zkPath = ZK_ROOT + path.join('/');\n try {\n final Stat nodeStat = curator.checkExists().forPath(zkPath);\n if (nodeStat != null) {\n curator.delete()\n .withVersion(nodeStat.getVersion())\n .forPath(zkPath);\n return true;\n return false;",
"signature": "boolean removeLease(final CloudnamePath path)"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "return new CloudnamePath(path, \"node\" + Integer.toHexString(nodeCounter.incrementAndGet()));",
"signature": "CloudnamePath appendUniqueName(final CloudnamePath path)"
},
{
"arguments": [],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "@Override\n public void leaseCreated(final CloudnamePath path, final String data) {\n assertThat(\"Notification belongs to root path\",\n rootLease.isSubpathOf(path), is(true));\n createNotifications.countDown();",
"signature": "new LeaseListener()"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "removeNotifications.countDown();",
"signature": "void leaseRemoved(final CloudnamePath path)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "dataNotifications.countDown();",
"signature": "void dataChanged(final CloudnamePath path, final String data)"
},
{
"arguments": [],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "backend.addLeaseListener(permanentB, new LeaseListener() {\n backend.addLeaseListener(permanentC, new LeaseListener() {\n backend.createLease(LeaseType.PERMANENT, permanentA, \"Some data that belongs to A\");\n backend.createLease(LeaseType.PERMANENT, permanentB, \"Some data that belongs to B\");",
"signature": "new LeaseListener()"
}
] | [
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "return CN_PREFIX + SEPARATOR + EPHEMERAL_PREFIX + SEPARATOR + path.join(SEPARATOR);",
"signature": "String pathToEphemeralKv(final CloudnamePath path)"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "return CN_PREFIX + SEPARATOR + PERMANENT_PREFIX + SEPARATOR + path.join(SEPARATOR);\n @Override\n public LeaseHandle createTemporaryLease(final CloudnamePath path, final String data) {\n pathToEphemeralKv(instancePath.get()), data, session.getId());\n public boolean writeLeaseData(final String data) {\n pathToEphemeralKv(instancePath.get()), data, session.getId());\n public boolean writeTemporaryLeaseData(final CloudnamePath path, final String data) {\n return consul.writeSessionData(pathToEphemeralKv(path), data, session.getId());\n public String readTemporaryLeaseData(final CloudnamePath path) {\n return consul.readData(pathToEphemeralKv(path));\n public void addTemporaryLeaseListener(\n final CloudnamePath pathToWatch, final LeaseListener listener) {\n final ConsulWatch watch = consul.createWatch(pathToEphemeralKv(pathToWatch));\n watches.put(listener, watch);\n watch.startWatching(new ConsulWatch.ConsulWatchListener() {\n @Override\n public void created(final String valueName, final String value) {\n listener.leaseCreated(kvNameToCloudnamePath(valueName), value);",
"signature": "String pathToPermanentKv(final CloudnamePath path)"
},
{
"arguments": [
"final String valueName",
" final String value"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "listener.dataChanged(kvNameToCloudnamePath(valueName), value);",
"signature": "void changed(final String valueName, final String value)"
},
{
"arguments": [
"final String valueName"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "listener.leaseRemoved(kvNameToCloudnamePath(valueName));",
"signature": "void removed(final String valueName)"
},
{
"arguments": [
"final LeaseListener listener"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "// Remove watcher\n final ConsulWatch watch = watches.get(listener);\n if (watch != null) {\n watch.stop();\n public boolean createPermanantLease(final CloudnamePath path, final String data) {\n return consul.createPermanentData(pathToPermanentKv(path), data);",
"signature": "void removeTemporaryLeaseListener(final LeaseListener listener)"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-consul/src/main/java/org/cloudname/backends/consul/ConsulBackend.java",
"implementation": "final String consulPath = pathToPermanentKv(path);\n public boolean writePermanentLeaseData(final CloudnamePath path, final String data) {\n return consul.writePermanentData(pathToPermanentKv(path), data);",
"signature": "boolean removePermanentLease(final CloudnamePath path)"
},
{
"arguments": [
"CloudnamePath path",
" String data"
],
"filename": "cn-core/src/test/java/org/cloudname/core/BackendManagerTest.java",
"implementation": "public boolean writeTemporaryLeaseData(CloudnamePath path, String data) {\n public String readTemporaryLeaseData(CloudnamePath path) {\n public void addTemporaryLeaseListener(CloudnamePath pathToWatch, LeaseListener listener) {",
"signature": "LeaseHandle createTemporaryLease(CloudnamePath path, String data)"
},
{
"arguments": [
"LeaseListener listener"
],
"filename": "cn-core/src/test/java/org/cloudname/core/BackendManagerTest.java",
"implementation": "",
"signature": "void removeTemporaryLeaseListener(LeaseListener listener)"
},
{
"arguments": [
"CloudnamePath path",
" String data"
],
"filename": "cn-core/src/test/java/org/cloudname/core/BackendManagerTest.java",
"implementation": "public boolean removePermanentLease(CloudnamePath path) {\n return false;",
"signature": "boolean createPermanantLease(CloudnamePath path, String data)"
},
{
"arguments": [
"CloudnamePath path",
" String data"
],
"filename": "cn-core/src/test/java/org/cloudname/core/BackendManagerTest.java",
"implementation": "return false;",
"signature": "boolean writePermanentLeaseData(CloudnamePath path, String data)"
},
{
"arguments": [
"final CloudnamePath leasePath"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "synchronized (syncObject) {\n if (temporaryLeases.containsKey(leasePath)) {\n temporaryLeases.remove(leasePath);\n notifyTemporaryObservers(leasePath, LeaseEvent.REMOVED, null);",
"signature": "void removeTemporaryLease(final CloudnamePath leasePath)"
},
{
"arguments": [],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "return Long.toHexString(random.nextLong());",
"signature": "String createRandomInstanceName()"
},
{
"arguments": [
"\n final CloudnamePath path",
" final LeaseEvent event",
" final String data"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "for (final CloudnamePath observedPath : observedTemporaryPaths.keySet()) {\n if (observedPath.isSubpathOf(path)) {\n for (final LeaseListener listener : observedTemporaryPaths.get(observedPath)) {\n switch (event) {\n case CREATED:\n listener.leaseCreated(path, data);\n break;\n case REMOVED:\n listener.leaseRemoved(path);\n break;\n case DATA:\n listener.dataChanged(path, data);\n break;\n default:\n throw new RuntimeException(\"Don't know how to handle \" + event);",
"signature": "void notifyTemporaryObservers(\n final CloudnamePath path, final LeaseEvent event, final String data)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "assert path != null : \"Path to lease must be set!\";\n assert data != null : \"Lease data is required\";\n synchronized (syncObject) {\n if (permanentLeases.containsKey(path)) {\n return false;",
"signature": "boolean createPermanantLease(final CloudnamePath path, final String data)"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "synchronized (syncObject) {\n if (!permanentLeases.containsKey(path)) {\n return false;",
"signature": "boolean removePermanentLease(final CloudnamePath path)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "synchronized (syncObject) {\n if (!permanentLeases.containsKey(path)) {\n return false;",
"signature": "boolean writePermanentLeaseData(final CloudnamePath path, final String data)"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "if (!permanentLeases.containsKey(path)) {\n return permanentLeases.get(path);\n public boolean writeTemporaryLeaseData(final CloudnamePath path, final String data) {\n if (!temporaryLeases.containsKey(path)) {\n temporaryLeases.put(path, data);\n notifyTemporaryObservers(path, LeaseEvent.DATA, data);\n public String readTemporaryLeaseData(final CloudnamePath path) {\n if (!temporaryLeases.containsKey(path)) {\n return null;\n return temporaryLeases.get(path);\n public LeaseHandle createTemporaryLease(final CloudnamePath path, final String data) {\n final String instanceName = createRandomInstanceName();\n CloudnamePath instancePath = new CloudnamePath(path, instanceName);\n while (temporaryLeases.containsKey(instancePath)) {\n instancePath = new CloudnamePath(path, instanceName);\n temporaryLeases.put(instancePath, data);\n notifyTemporaryObservers(instancePath, LeaseEvent.CREATED, data);\n return new MemoryLeaseHandle(this, instancePath);\n private void regenerateEventsForTemporaryListener(\n temporaryLeases.keySet().forEach((temporaryPath) -> {\n listener.leaseCreated(temporaryPath, temporaryLeases.get(temporaryPath));\n /**\n * Generate created events on permanent leases for newly attached listeners.\n */\n private void regenerateEventsForPermanentListener(\n final CloudnamePath path, final LeaseListener listener) {\n permanentLeases.keySet().forEach((permanentPath) -> {\n if (path.isSubpathOf(permanentPath)) {\n listener.leaseCreated(permanentPath, permanentLeases.get(permanentPath));",
"signature": "String readPermanentLeaseData(final CloudnamePath path)"
},
{
"arguments": [
"\n final CloudnamePath pathToObserve",
" final LeaseListener listener"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "Set<LeaseListener> listeners = observedTemporaryPaths.get(pathToObserve);\n if (listeners == null) {\n listeners = new HashSet<>();",
"signature": "void addTemporaryLeaseListener(\n final CloudnamePath pathToObserve, final LeaseListener listener)"
},
{
"arguments": [
"final LeaseListener listener"
],
"filename": "cn-memory/src/main/java/org/cloudname/backends/memory/MemoryBackend.java",
"implementation": "synchronized (syncObject) {\n for (final Set<LeaseListener> listeners : observedTemporaryPaths.values()) {\n if (listeners.contains(listener)) {\n listeners.remove(listener);\n return;",
"signature": "void removeTemporaryLeaseListener(final LeaseListener listener)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "boolean created = false;\n CloudnamePath tempInstancePath = null;\n String tempZkPath = null;\n while (!created) {\n final long instanceId = random.nextLong();\n tempInstancePath = new CloudnamePath(path, Long.toHexString(instanceId));\n tempZkPath = TEMPORARY_ROOT + tempInstancePath.join('/');\n try {\n\n curator.create()\n .creatingParentContainersIfNeeded()\n .withMode(CreateMode.EPHEMERAL)\n .forPath(tempZkPath, data.getBytes(Charsets.UTF_8));\n created = true;",
"signature": "LeaseHandle createTemporaryLease(final CloudnamePath path, final String data)"
},
{
"arguments": [],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "private AtomicBoolean closed = new AtomicBoolean(false);\n\n @Override\n public boolean writeLeaseData(final String data) {\n if (closed.get()) {\n LOG.info(\"Attempt to write data to closed leased handle \" + data);\n return false;",
"signature": "new LeaseHandle()"
},
{
"arguments": [],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "if (closed.get()) {\n return null;",
"signature": "CloudnamePath getLeasePath()"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "final String zkPath = TEMPORARY_ROOT + path.join('/');\n public String readTemporaryLeaseData(final CloudnamePath path) {\n final String zkPath = TEMPORARY_ROOT + path.join('/');\n private CloudnamePath toCloudnamePath(final String zkPath, final String pathPrefix) {\n final String clientPath = zkPath.substring(pathPrefix.length());\n public void addTemporaryLeaseListener(\n final String zkPath = TEMPORARY_ROOT + pathToObserve.join('/');\n listener.leaseCreated(toCloudnamePath(path, TEMPORARY_ROOT), data);\n listener.dataChanged(toCloudnamePath(path, TEMPORARY_ROOT), data);\n listener.leaseRemoved(toCloudnamePath(path, TEMPORARY_ROOT));\n clientListeners.put(listener, watcher);\n public void removeTemporaryLeaseListener(final LeaseListener listener) {\n synchronized (syncObject) {\n final NodeCollectionWatcher watcher = clientListeners.get(listener);\n if (watcher != null) {\n clientListeners.remove(listener);\n watcher.shutdown();",
"signature": "boolean writeTemporaryLeaseData(final CloudnamePath path, final String data)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "final String zkPath = PERMANENT_ROOT + path.join('/');\n try {\n curator.sync().forPath(zkPath);\n final Stat nodeStat = curator.checkExists().forPath(zkPath);\n if (nodeStat == null) {\n curator.create()\n .creatingParentContainersIfNeeded()\n .forPath(zkPath, data.getBytes(Charsets.UTF_8));\n return true;",
"signature": "boolean createPermanantLease(final CloudnamePath path, final String data)"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "final String zkPath = PERMANENT_ROOT + path.join('/');\n try {\n final Stat nodeStat = curator.checkExists().forPath(zkPath);\n if (nodeStat != null) {\n curator.delete()\n .withVersion(nodeStat.getVersion())\n .forPath(zkPath);\n return true;",
"signature": "boolean removePermanentLease(final CloudnamePath path)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "final String zkPath = PERMANENT_ROOT + path.join('/');\n try {\n curator.sync().forPath(zkPath);\n final Stat nodeStat = curator.checkExists().forPath(zkPath);\n if (nodeStat == null) {\n LOG.log(Level.WARNING, \"Can't write permanent lease data for lease \" + path\n + \" with data \" + data + \" since the lease doesn't exist\");\n return false;",
"signature": "boolean writePermanentLeaseData(final CloudnamePath path, final String data)"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "cn-zookeeper/src/main/java/org/cloudname/backends/zookeeper/ZooKeeperBackend.java",
"implementation": "final String zkPath = PERMANENT_ROOT + path.join('/');\n try {\n curator.sync().forPath(zkPath);\n final byte[] bytes = curator.getData().forPath(zkPath);\n return new String(bytes, Charsets.UTF_8);",
"signature": "String readPermanentLeaseData(final CloudnamePath path)"
},
{
"arguments": [],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "@Override\n public void run() {\n final String myData = Long.toHexString(random.nextLong());\n final LeaseHandle handle = backend.createTemporaryLease(rootLease, myData);\n assertThat(\"Got a valid handle back\", handle, is(notNullValue()));\n backend.addTemporaryLeaseListener(rootLease, new LeaseListener() {\n @Override\n public void leaseCreated(final CloudnamePath path, final String data) {\n assertThat(\"Notification belongs to root path\",\n rootLease.isSubpathOf(path), is(true));\n createNotifications.countDown();",
"signature": "new Runnable()"
},
{
"arguments": [
"final CloudnamePath path"
],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "removeNotifications.countDown();",
"signature": "void leaseRemoved(final CloudnamePath path)"
},
{
"arguments": [
"final CloudnamePath path",
" final String data"
],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "dataNotifications.countDown();",
"signature": "void dataChanged(final CloudnamePath path, final String data)"
},
{
"arguments": [
"final LeaseWorker worker : workers"
],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "worker.writeData();",
"signature": "other\n for (final LeaseWorker worker : workers)"
},
{
"arguments": [],
"filename": "testtools/src/main/java/org/cloudname/testtools/backend/CoreBackendTest.java",
"implementation": "backend.addPermanentLeaseListener(permanentB, new LeaseListener() {\n backend.addPermanentLeaseListener(permanentC, new LeaseListener() {\n backend.createPermanantLease(permanentA, \"Some data that belongs to A\");\n backend.createPermanantLease(permanentB, \"Some data that belongs to B\");\n // Some might say this is a dirty trick but permanent and temporary leases should not\n // interfere with eachother.\n final LeaseHandle handle = backend.createTemporaryLease(\n permanentC, \"Some data that belongs to C\");\n assertThat(handle, is(notNullValue()));\n handle.writeLeaseData(\"Some other data that belongs to C\");\n try {\n handle.close();",
"signature": "new LeaseListener()"
}
] |
0d962a34955070a8d50e3cb7758d095b04774cd1 | [
{
"arguments": [
"boolean approx",
" boolean i18n",
" Currency accum",
" Currency withShipping",
" Currency withRealShipping",
" Currency realAccum"
],
"filename": "src/com/jbidwatcher/ui/AuctionsUIModel.java",
"implementation": "if (accum != null && !accum.isNull()) {\n String sAndH = \"s/h\";\n if (!Locale.getDefault().equals(Locale.US)) sAndH = \"p/p\";\n\n StringBuilder result = new StringBuilder();\n // If we managed to do the i18n thing through it all, and we have\n // some real values, return it.\n if (i18n && realAccum != null) {\n result.append(realAccum.toString());\n if (withRealShipping != null && !realAccum.equals(withRealShipping)) {\n result.append(\" (\").append(withRealShipping).append(\" with \").append(sAndH).append(')');",
"signature": "String formatSum(boolean approx, boolean i18n, Currency accum, Currency withShipping, Currency withRealShipping, Currency realAccum)"
},
{
"arguments": [
"Currency accum",
" Currency withShipping",
" String sAndH",
" StringBuilder result"
],
"filename": "src/com/jbidwatcher/ui/AuctionsUIModel.java",
"implementation": "result.append(accum.toString())\n .append(\" (\")\n .append(withShipping)\n .append(\" with \")\n .append(sAndH)\n .append(')');\n public JPanel getPanel() { return mPanel;",
"signature": "void formatAmountAndShipping(Currency accum, Currency withShipping, String sAndH, StringBuilder result)"
},
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/AuctionsUIModel.java",
"implementation": "return _table;",
"signature": "JTable getTable()"
},
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/table/AuctionSortable.java",
"implementation": "",
"signature": "public AuctionSortable()"
},
{
"arguments": [
"AuctionEntry ae"
],
"filename": "src/com/jbidwatcher/ui/table/AuctionSortable.java",
"implementation": "entry = ae;",
"signature": "void setEntry(AuctionEntry ae)"
},
{
"arguments": [
"MultiSnipeManager multiManager",
" AuctionList inList"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "this.multiManager = multiManager;\n dispList = inList;",
"signature": "public auctionTableModel(MultiSnipeManager multiManager, AuctionList inList)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "Currency shipping = aEntry.getShippingWithInsurance();\n if (shipping.getCurrencyType() == Currency.NONE) {\n return \"--\"; // shipping not set so cannot add up values",
"signature": "Object priceWithShippingColumn(AuctionEntry aEntry)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "String thumb = aEntry.getThumbnail();\n if (thumb != null) {\n if (iconCache.containsKey(thumb)) return iconCache.get(thumb);\n thumb = thumb.replaceAll(\"file:\", \"\");\n ImageIcon base = new ImageIcon(thumb);\n int h = base.getIconHeight();\n int w = base.getIconWidth();\n if (h <= 64 && w <= 64) {\n h = -1;\n w = -1;",
"signature": "Object thumbnailColumn(AuctionEntry aEntry)"
},
{
"arguments": [
"w > h"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "w = 64;\n h = -1;",
"signature": "else if (w > h)"
},
{
"arguments": [
"h == w"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "h = 64;\n w = -1;",
"signature": "else if (h == w)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "if (aEntry.getEndDate() == null || aEntry.getEndDate().equals(Constants.FAR_FUTURE))\n return \"N/A\";\n SimpleDateFormat fmt = new SimpleDateFormat(\"dd-MMM-yy HH:mm:ss zzz\");\n return fmt.format(aEntry.getEndDate());",
"signature": "Object endDateColumn(AuctionEntry aEntry)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "if (aEntry.getEndDate() == null || aEntry.getEndDate().equals(Constants.FAR_FUTURE))\n return \"N/A\";\n String endTime = aEntry.getTimeLeft();\n if (endTime.equals(AuctionEntry.endedAuction)) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"dd-MMM-yy HH:mm:ss zzz\");\n endTime = fmt.format(aEntry.getEndDate());\n if (!aEntry.isComplete()) {\n endTime = \"<html><body color=\\\"red\\\">\" + endTime + \"</body></html>\";",
"signature": "Object timeLeftColumn(AuctionEntry aEntry)"
},
{
"arguments": [
"AuctionEntry aEntry",
" String errorNote"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "if (aEntry.isSniped()) {\n return formatSnipe(aEntry, errorNote);",
"signature": "Object snipeColumn(AuctionEntry aEntry, String errorNote)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "Currency curPrice = aEntry.getCurrentPrice();\n if (aEntry.isFixed()) {\n return curPrice + \" (FP\" + ((aEntry.getQuantity() > 1) ? \" x \" + aEntry.getQuantity() + \")\" : \")\");",
"signature": "Object currentBid(AuctionEntry aEntry)"
},
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "return dispList.size();",
"signature": "int getRowCount()"
},
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "return TableColumnController.columnCount();",
"signature": "int getColumnCount()"
},
{
"arguments": [
"int aColumn"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "return TableColumnController.getInstance().getColumnName(aColumn);",
"signature": "String getColumnName(int aColumn)"
},
{
"arguments": [
"int aColumn"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "if (aColumn != 5) return String.class;\n return Icon.class;",
"signature": "Class getColumnClass(int aColumn)"
},
{
"arguments": [
"int row",
" int column"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "return false;\n public void delete(int row) {\n dispList.remove(row);\n fireTableRowsDeleted(row, row);\n public synchronized int findRow(Comparison c) {\n for (int i = 0; i < getRowCount(); i++) {\n if (c.match(getValueAt(i, -1))) return i;\n return -1;\n public synchronized int findRow(Object o) {\n List<Object> cache = new ArrayList<>();\n for (int i = 0; i < getRowCount(); i++) {\n Object curStep = getValueAt(i, -1);\n if (curStep == o) return i;\n cache.add(curStep);\n for (int i = 0; i < cache.size(); i++) {\n if (cache.get(i).equals(o)) return i;",
"signature": "boolean isCellEditable(int row, int column)"
},
{
"arguments": [
"Object o"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "int row = findRow(o);\n if (row != -1) {\n delete(row);\n fireTableRowsDeleted(row, row);\n return row != -1;\n public int insert(Object o) {\n dispList.add((AuctionEntry) o);\n int row = findRow(o);\n fireTableRowsInserted(row, row);\n return dispList.size() - 1;\n // Except when we want to sort them...\n public Class getSortByColumnClass(int i) {\n // Status is the only one where the type is very different than the dummy data.\n if (i == TableColumnController.STATUS ||\n i == TableColumnController.THUMBNAIL ||\n i == TableColumnController.SELLER_FEEDBACK ||\n i == TableColumnController.BIDCOUNT ||\n i == TableColumnController.SELLER_POSITIVE_FEEDBACK) return Integer.class;\n\n if (i == -1 || i > TableColumnController.MAX_FIXED_COLUMN) return String.class;\n\n Object o = getDummyValueAtColumn(i);\n return o.getClass();",
"signature": "boolean delete(Object o)"
},
{
"arguments": [
"int i",
" int j"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "try {\n AuctionEntry entry = dispList.get(i);\n\n featherweightSortBy.setEntry(entry);\n AuctionSortable sortBy = featherweightSortBy;\n\n switch (j) {\n case -1:\n return entry;\n case TableColumnController.ID:\n return sortBy.getId();\n case TableColumnController.CUR_BID:\n return sortBy.getCurrentBid();\n case TableColumnController.SNIPE_OR_MAX:\n return sortBy.getSnipeOrMax();\n case TableColumnController.TIME_LEFT:\n return entry.getEndDate();\n case TableColumnController.TITLE:\n return entry.getTitle();\n case TableColumnController.STATUS:\n return buildEntryFlags(entry);\n case TableColumnController.THUMBNAIL:\n return 0;\n case TableColumnController.SELLER:\n return entry.getSellerName();\n case TableColumnController.FIXED_PRICE:\n return sortBy.getFixedPrice();\n case TableColumnController.SHIPPING_INSURANCE:\n return sortBy.getShippingInsurance();\n case TableColumnController.BIDDER:\n return entry.getHighBidder();\n case TableColumnController.MAX:\n return sortBy.getMax();\n case TableColumnController.SNIPE:\n return sortBy.getSnipe();\n case TableColumnController.COMMENT:\n return sortBy.getComment();\n case TableColumnController.END_DATE:\n return entry.getEndDate();\n case TableColumnController.SELLER_FEEDBACK:\n return sortBy.getSellerFeedback();\n case TableColumnController.ITEM_LOCATION:\n return entry.getItemLocation();\n case TableColumnController.BIDCOUNT:\n return entry.getNumBidders();\n case TableColumnController.JUSTPRICE:\n return entry.getUSCurBid();\n case TableColumnController.SELLER_POSITIVE_FEEDBACK:\n return sortBy.getSellerPositiveFeedback();\n case TableColumnController.CUR_TOTAL:\n return sortBy.getCurrentTotal();\n case TableColumnController.SNIPE_TOTAL:\n return sortBy.getSnipeTotal();\n // Columns beyond the MAX_FIXED_COLUMN are custom columns, or a bug.\n default: {\n if (j > TableColumnController.MAX_FIXED_COLUMN && j < TableColumnController.columnCount()) {\n return TableColumnController.getInstance().customColumn(j, entry);",
"signature": "Object getSortByValueAt(int i, int j)"
}
] | [
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/AuctionsUIModel.java",
"implementation": "return mPanel;",
"signature": "JPanel getPanel()"
},
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/AuctionsUIModel.java",
"implementation": "return _table;",
"signature": "JTable getTable()"
},
{
"arguments": [
"AuctionEntry ae"
],
"filename": "src/com/jbidwatcher/ui/table/AuctionSortable.java",
"implementation": "entry = ae;",
"signature": "public AuctionSortable(AuctionEntry ae)"
},
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "return dispList.size();",
"signature": "int getRowCount()"
},
{
"arguments": [],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "return TableColumnController.columnCount();",
"signature": "int getColumnCount()"
},
{
"arguments": [
"int aColumn"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "return TableColumnController.getInstance().getColumnName(aColumn);",
"signature": "String getColumnName(int aColumn)"
},
{
"arguments": [
"int row"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "dispList.remove(row);\n fireTableRowsDeleted(row, row);",
"signature": "void delete(int row)"
},
{
"arguments": [
"Comparison c"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "for(int i=0; i<getRowCount(); i++) {\n if(c.match(getValueAt(i, -1))) return i;",
"signature": "int findRow(Comparison c)"
},
{
"arguments": [
"Object o"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "List<Object> cache = new ArrayList<>();\n for(int i=0; i<getRowCount(); i++) {\n Object curStep = getValueAt(i, -1);\n if(curStep == o) return i;\n cache.add(curStep);",
"signature": "int findRow(Object o)"
},
{
"arguments": [
"Object o"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "int row = findRow(o);\n if(row != -1) {\n delete(row);\n fireTableRowsDeleted(row, row);",
"signature": "boolean delete(Object o)"
},
{
"arguments": [
"Object o"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "dispList.add((AuctionEntry)o);\n int row = findRow(o);\n fireTableRowsInserted(row, row);\n return dispList.size()-1;",
"signature": "int insert(Object o)"
},
{
"arguments": [
"int aColumn"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "if(aColumn != 5) return String.class; return Icon.class;",
"signature": "Class getColumnClass(int aColumn)"
},
{
"arguments": [
"int i"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "// Status is the only one where the type is very different than the dummy data.\n if (i == TableColumnController.STATUS ||\n i == TableColumnController.THUMBNAIL ||\n i == TableColumnController.SELLER_FEEDBACK ||\n i == TableColumnController.BIDCOUNT ||\n i == TableColumnController.SELLER_POSITIVE_FEEDBACK) return Integer.class;\n\n if (i == -1 || i > TableColumnController.MAX_FIXED_COLUMN) return String.class;\n\n Object o = getDummyValueAtColumn(i);\n return o.getClass();",
"signature": "Class getSortByColumnClass(int i)"
},
{
"arguments": [
"int i",
" int j"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "try {\n AuctionEntry entry = dispList.get(i);\n AuctionSortable sortBy = new AuctionSortable(entry);\n\n switch(j) {\n case -1: return entry;\n case TableColumnController.ID: return sortBy.getId();\n case TableColumnController.CUR_BID: return sortBy.getCurrentBid();\n case TableColumnController.SNIPE_OR_MAX: return sortBy.getSnipeOrMax();\n case TableColumnController.TIME_LEFT: return entry.getEndDate();\n case TableColumnController.TITLE: return entry.getTitle();\n case TableColumnController.STATUS: return buildEntryFlags(entry);\n case TableColumnController.THUMBNAIL: return 0;\n case TableColumnController.SELLER: return entry.getSellerName();\n case TableColumnController.FIXED_PRICE: return sortBy.getFixedPrice();\n case TableColumnController.SHIPPING_INSURANCE: return sortBy.getShippingInsurance();\n case TableColumnController.BIDDER: return entry.getHighBidder();\n case TableColumnController.MAX: return sortBy.getMax();\n case TableColumnController.SNIPE: return sortBy.getSnipe();\n case TableColumnController.COMMENT: return sortBy.getComment();\n case TableColumnController.END_DATE: return entry.getEndDate();\n case TableColumnController.SELLER_FEEDBACK: return sortBy.getSellerFeedback();\n case TableColumnController.ITEM_LOCATION: return entry.getItemLocation();\n case TableColumnController.BIDCOUNT: return entry.getNumBidders();\n case TableColumnController.JUSTPRICE: return entry.getUSCurBid();\n case TableColumnController.SELLER_POSITIVE_FEEDBACK: return sortBy.getSellerPositiveFeedback();\n case TableColumnController.CUR_TOTAL: return sortBy.getCurrentTotal();\n case TableColumnController.SNIPE_TOTAL: return sortBy.getSnipeTotal();\n // Columns beyond the MAX_FIXED_COLUMN are custom columns, or a bug.\n default: {\n if(j > TableColumnController.MAX_FIXED_COLUMN && j < TableColumnController.columnCount()) {\n return TableColumnController.getInstance().customColumn(j, entry);",
"signature": "Object getSortByValueAt(int i, int j)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "Currency shipping = aEntry.getShippingWithInsurance();\n if(shipping.getCurrencyType() == Currency.NONE) {\n return \"--\"; // shipping not set so cannot add up values",
"signature": "Object priceWithShippingColumn(AuctionEntry aEntry)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "String thumb = aEntry.getThumbnail();\n if (thumb != null) {\n if(iconCache.containsKey(thumb)) return iconCache.get(thumb);\n thumb = thumb.replaceAll(\"file:\", \"\");\n ImageIcon base = new ImageIcon(thumb);\n int h = base.getIconHeight();\n int w = base.getIconWidth();\n if (h <= 64 && w <= 64) {\n h = -1;\n w = -1;",
"signature": "Object thumbnailColumn(AuctionEntry aEntry)"
},
{
"arguments": [
"w > h"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "w = 64;\n h = -1;",
"signature": "else if (w > h)"
},
{
"arguments": [
"h == w"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "h = 64;\n w = -1;",
"signature": "else if (h == w)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "if (aEntry.getEndDate() == null || aEntry.getEndDate().equals(Constants.FAR_FUTURE))\n return \"N/A\";\n SimpleDateFormat fmt = new SimpleDateFormat(\"dd-MMM-yy HH:mm:ss zzz\");\n return fmt.format(aEntry.getEndDate());\n private Object timeLeftColumn(AuctionEntry aEntry) {\n if (aEntry.getEndDate() == null || aEntry.getEndDate().equals(Constants.FAR_FUTURE))\n return \"N/A\";\n String endTime = aEntry.getTimeLeft();\n if(endTime.equals(AuctionEntry.endedAuction)) {\n SimpleDateFormat fmt = new SimpleDateFormat(\"dd-MMM-yy HH:mm:ss zzz\");\n endTime = fmt.format(aEntry.getEndDate());\n if(!aEntry.isComplete()) {\n endTime = \"<html><body color=\\\"red\\\">\" + endTime + \"</body></html>\";",
"signature": "Object endDateColumn(AuctionEntry aEntry)"
},
{
"arguments": [
"AuctionEntry aEntry",
" String errorNote"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "if (aEntry.isSniped()) {\n return formatSnipe(aEntry, errorNote);",
"signature": "Object snipeColumn(AuctionEntry aEntry, String errorNote)"
},
{
"arguments": [
"AuctionEntry aEntry"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "Currency curPrice = aEntry.getCurrentPrice();\n if(aEntry.isFixed()) {\n return curPrice + \" (FP\" + ((aEntry.getQuantity() > 1) ? \" x \" + aEntry.getQuantity() + \")\" : \")\");",
"signature": "Object currentBid(AuctionEntry aEntry)"
},
{
"arguments": [
"MultiSnipeManager multiManager",
" AuctionList inList"
],
"filename": "src/com/jbidwatcher/ui/table/auctionTableModel.java",
"implementation": "this.multiManager = multiManager;\n dispList = inList;\n public boolean isCellEditable(int row, int column) {\n return false;",
"signature": "public auctionTableModel(MultiSnipeManager multiManager, AuctionList inList)"
}
] |
11493695b30a2ff73c2677d8674249e5779da4e8 | [
{
"arguments": [
"String id",
" URL resource"
],
"filename": "nuxeo-platform-document-routing-core/src/main/java/org/nuxeo/ecm/platform/routing/core/impl/DocumentRoutingServiceImpl.java",
"implementation": "routeModelTemplateResouces.put(id, resource);",
"signature": "void registerRouteModelTemplateResource(String id, URL resource)"
}
] | [
{
"arguments": [],
"filename": "nuxeo-platform-document-routing-core/src/main/java/org/nuxeo/ecm/platform/routing/core/listener/RouteModelsInitializator.java",
"implementation": "try {\n if (service == null) {\n service = Framework.getService(DocumentRoutingService.class);",
"signature": "DocumentRoutingService getDocumentRoutingService()"
}
] |
12d194800b131c39c0d2241bbe4c81429cc1c370 | [
{
"arguments": [],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/Beneficiario.java",
"implementation": "return leftPadWithZeros(agencia, 4);",
"signature": "String getAgenciaFormatada()"
},
{
"arguments": [],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/Boleto.java",
"implementation": "return beneficiario;",
"signature": "Beneficiario getBeneficiario()"
},
{
"arguments": [
"Beneficiario beneficiario"
],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/Boleto.java",
"implementation": "this.beneficiario = beneficiario;\n\t\treturn this;",
"signature": "Boleto comBeneficiario(Beneficiario beneficiario)"
},
{
"arguments": [],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/Endereco.java",
"implementation": "return logradouro\n\t\t\t\t+ bairro != null ? \", \" + bairro : \"\"\n\t\t\t\t+ cep != null ? \" \" + cep : \"\"\n\t\t\t\t+ cidade != null ? \" - \" + cidade : \"\"\n\t\t\t\t+ uf != null ? \" - \" + uf : \"\";",
"signature": "String getEnderecoCompleto()"
},
{
"arguments": [],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/Endereco.java",
"implementation": "return this.getEnderecoCompleto();",
"signature": "String toString()"
}
] | [
{
"arguments": [
"Emissor emissor"
],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/bancos/Bradesco.java",
"implementation": "return leftPadWithZeros(emissor.getContaCorrente(), 7);\n\tpublic String getCarteiraDoEmissorFormatado(Emissor emissor) {\t\n\t\treturn leftPadWithZeros(emissor.getCarteira(), 2);\n\tpublic String getNossoNumeroDoEmissorFormatado(Emissor emissor) {\n\t\treturn leftPadWithZeros(emissor.getNossoNumero(), 11);",
"signature": "String getContaCorrenteDoEmissorFormatado(Emissor emissor)"
},
{
"arguments": [
"Emissor emissor"
],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/bancos/Caixa.java",
"implementation": "return leftPadWithZeros(emissor.getCarteira(), 2);\n\tpublic String getContaCorrenteDoEmissorFormatado(Emissor emissor) {\n\t\treturn leftPadWithZeros(emissor.getContaCorrente(), 5);",
"signature": "String getCarteiraDoEmissorFormatado(Emissor emissor)"
},
{
"arguments": [
"Emissor emissor"
],
"filename": "stella-boleto/src/main/java/br/com/caelum/stella/boleto/bancos/Santander.java",
"implementation": "return leftPadWithZeros(emissor.getCarteira(), 3);\n\tpublic String getContaCorrenteDoEmissorFormatado(Emissor emissor) {\n\t\treturn leftPadWithZeros(emissor.getContaCorrente(), 7);\n\tpublic String getNossoNumeroDoEmissorFormatado(Emissor emissor) {\n\t\tif (emissor.getDigitoNossoNumero() != null) {\n\t\t\treturn leftPadWithZeros(emissor.getNossoNumero()+emissor.getDigitoNossoNumero(), 13);\n\t\treturn leftPadWithZeros(emissor.getNossoNumero(), 13);\n\tpublic String getAgenciaECodigoCedente(Emissor emissor) {\n\t\tbuilder.append(leftPadWithZeros(emissor.getAgencia(), 5));\n\t\tbuilder.append(\"/\").append(getNumeroConvenioFormatado(emissor));\n\tpublic String getNossoNumeroECodDocumento(Boleto boleto) {\n\t\tEmissor emissor = boleto.getEmissor();\n\t\tString nossoNumero = getNossoNumeroDoEmissorFormatado(emissor);\n\tpublic String getNumeroConvenioFormatado(Emissor emissor) {\n\t\treturn leftPadWithZeros(emissor.getNumeroConvenio(), 7);\n\t\n\tpublic String calcularDigitoVerificadorNossoNumero(Emissor emissor) {\n\t\tif (emissor == null || emissor.getNossoNumero() == null || emissor.getNossoNumero().length() > 12) {\n\t\t\tthrow new IllegalArgumentException(\"Nosso Número inválido: \" + emissor.getNossoNumero());",
"signature": "String getCarteiraDoEmissorFormatado(Emissor emissor)"
},
{
"arguments": [],
"filename": "stella-boleto/src/test/java/br/com/caelum/stella/boleto/bancos/CaixaTest.java",
"implementation": "Emissor emissor = Emissor.novoEmissor().comCodigoOperacao(\"2\");\n\t\tString numeroFormatado = this.banco.getCodigoOperacaoFormatado(emissor);\n\t\tassertEquals(3, numeroFormatado.length());\n\t\tassertEquals(\"002\", numeroFormatado);",
"signature": "void codOperacaoDeveTerTresDigitos()"
}
] |
13a20d5e199860dd1941f55d7fe59c76dc36341e | [
{
"arguments": [
"pp instanceof java.util.List"
],
"filename": "bundles/org.scribble.protocol.projection/src/main/java/org/scribble/protocol/projection/impl/ProtocolProjectorRule.java",
"implementation": "for (Object obj : (java.util.List<?>)pp) {\r\n if (obj instanceof Protocol) {\r\n projected.getNestedProtocols().add((Protocol)obj);",
"signature": "else if (pp instanceof java.util.List)"
},
{
"arguments": [
"Choice choice",
" Journal l"
],
"filename": "bundles/org.scribble.protocol/src/main/java/org/scribble/protocol/validation/rules/ChoiceValidatorRule.java",
"implementation": "// Confirm each path has distinct initial interactions\n java.util.List<ModelObject> interactions=new java.util.Vector<ModelObject>();\n \n for (Block path : choice.getPaths()) {\n java.util.List<ModelObject> initial=InteractionUtil.getInitialInteractions(path);\n \n if (!Collections.disjoint(interactions, initial)) {\n l.error(MessageFormat.format(\n java.util.PropertyResourceBundle.getBundle(\"org.scribble.protocol.Messages\").\n getString(\"_AMBIGUOUS_CHOICE\"), (Object[])null), null);",
"signature": "void checkForAmbiguity(Choice choice, Journal l)"
},
{
"arguments": [
"String baseDir"
],
"filename": "qa/org.scribble.protocol.ctk/src/test/java/org/scribble/protocol/ctk/CTKUtil.java",
"implementation": "public ProtocolModel parse(ProtocolTools context, Content content, Journal journal)\n DefaultResourceLocator locator=null;\n if (baseDir != null) {\n java.net.URL url=ClassLoader.getSystemResource(baseDir);\n \n if (url == null) {\n fail(\"Failed to find base directory '\"+baseDir+\"'\");",
"signature": "ProtocolTools getProtocolTools(String baseDir)"
},
{
"arguments": [
"String globalModelFile",
" String expectedLocalModelFile",
" ProtocolTools context"
],
"filename": "qa/org.scribble.protocol.ctk/src/test/java/org/scribble/protocol/ctk/ProtocolProjectorTest.java",
"implementation": "{\"InlineProtocol.spr\", \"InlineProtocol@Buyer.spr\", CTKUtil.getProtocolTools(\"tests/protocol/global\")",
"signature": "public ProtocolProjectorTest(String globalModelFile, String expectedLocalModelFile, ProtocolTools context)"
}
] | [
{
"arguments": [
"ProjectorContext context",
" Choice projected",
"\r\n Role role",
" Journal l"
],
"filename": "bundles/org.scribble.protocol.projection/src/main/java/org/scribble/protocol/projection/impl/ChoiceProjectorRule.java",
"implementation": "// Confirm each path has distinct initial interactions\r\n java.util.List<ModelObject> interactions=new java.util.Vector<ModelObject>();\r\n \r\n for (Block path : projected.getPaths()) {\r\n java.util.List<ModelObject> initial=InteractionUtil.getInitialInteractions(path);\r\n \r\n if (!Collections.disjoint(interactions, initial)) {\r\n l.error(MessageFormat.format(\r\n java.util.PropertyResourceBundle.getBundle(\"org.scribble.protocol.projection.Messages\").\r\n getString(\"_AMBIGUOUS_CHOICE\"),\r\n role.getName()), null);",
"signature": "void checkForAmbiguity(ProjectorContext context, Choice projected,\r\n Role role, Journal l)"
},
{
"arguments": [
"pp instanceof java.util.List"
],
"filename": "bundles/org.scribble.protocol.projection/src/main/java/org/scribble/protocol/projection/impl/ProtocolProjectorRule.java",
"implementation": "for (Object obj : (java.util.List<?>)pp) {\r\n if (obj instanceof Protocol) {\r\n prot.getNestedProtocols().add((Protocol)obj);",
"signature": "else if (pp instanceof java.util.List)"
},
{
"arguments": [
"String globalModelFile",
" String expectedLocalModelFile",
" ProtocolContext context"
],
"filename": "qa/org.scribble.protocol.ctk/src/test/java/org/scribble/protocol/ctk/ProtocolProjectorTest.java",
"implementation": "{\"InlineProtocol.spr\", \"InlineProtocol@Buyer.spr\", CTKUtil.getProtocolContext(\"tests/protocol/global\")",
"signature": "public ProtocolProjectorTest(String globalModelFile, String expectedLocalModelFile, ProtocolContext context)"
}
] |
14da817cf7cc74de98af1649d9dde7da3b4b6c7d | [
{
"arguments": [],
"filename": "pmd/src/net/sourceforge/pmd/PMD.java",
"implementation": "Report report = new Report();\n ctx.setReport(report);\n\n report.addError(\n report.addError(\n report.addError(\n return report;\n public static void processFiles(int threadCount, RuleSetFactory ruleSetFactory, SourceType sourceType, List<DataSource> files, RuleContext ctx,\n Renderer renderer, String rulesets, boolean debugEnabled, final boolean shortNamesEnabled, final String inputPath,\n List<Future<Report>> tasks = new LinkedList<Future<Report>>();\n \n Collections.sort(files, new Comparator<DataSource>() {\n public int compare(DataSource d1,DataSource d2) {\n String s1 = d1.getNiceFileName(shortNamesEnabled, inputPath);\n String s2 = d2.getNiceFileName(shortNamesEnabled, inputPath);\n return s1.compareTo(s2);",
"signature": "Report call()"
},
{
"arguments": [
"t instanceof Error"
],
"filename": "pmd/src/net/sourceforge/pmd/PMD.java",
"implementation": "throw (Error) t;",
"signature": "else if (t instanceof Error)"
},
{
"arguments": [
"Writer writer"
],
"filename": "pmd/src/net/sourceforge/pmd/renderers/AbstractRenderer.java",
"implementation": "this.writer = writer;",
"signature": "void setWriter(Writer writer)"
},
{
"arguments": [],
"filename": "pmd/src/net/sourceforge/pmd/renderers/AbstractRenderer.java",
"implementation": "return writer;",
"signature": "Writer getWriter()"
}
] | [
{
"arguments": [],
"filename": "pmd/src/net/sourceforge/pmd/PMD.java",
"implementation": "ctx.getReport().addError(\n ctx.getReport().addError(\n ctx.getReport().addError(\n context.setReport(new Report());\n public static void processFiles(int threadCount, RuleSetFactory ruleSetFactory, SourceType sourceType, List<DataSource> files, RuleContext ctx, String rulesets,\n boolean debugEnabled, boolean shortNamesEnabled, String inputPath,\n Runnable r = new PmdRunnable(executor, dataSource, niceFileName, sourceType, debugEnabled,\n executor.execute(r);\n try {\n executor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);",
"signature": "void run()"
}
] |
16356cc19607ae29888e271edecd025b0b3db1e9 | [
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "changePattern();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n fireValueChange();",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n if (m_endsAfter.getText().isEmpty()) {\r\n m_endsAfter.setValue(\"1\");",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n m_endDate.setValue(new Date());\r\n fireValueChange();",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void execute() {\r\n\r\n fireChangeIfChanged();",
"signature": "new ScheduledCommand()"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onDurationChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<Date> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "m_groupDuration.selectButton(m_endsAtRadioButton);\r\n fireValueChange();\r\n /**\r\n * Handles the ends after change event.<p>\r\n * @param event the change event\r\n */\r\n @UiHandler(\"m_endsAfter\")\r\n public void onEndsAfterChange(ValueChangeEvent<String> event) {\r\n\r\n fireValueChange();",
"signature": "void onEndDateChange(ValueChangeEvent<Date> event)"
},
{
"arguments": [
"FocusEvent event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "m_groupDuration.selectButton(m_endsAfterRadioButton);",
"signature": "void onEndsAfterFocus(FocusEvent event)"
},
{
"arguments": [
"KeyPressEvent event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onEndsAfterKeyPress(KeyPressEvent event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onEndTimeChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<Date> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onStartDateChange(ValueChangeEvent<Date> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onStartTimeChange(ValueChangeEvent<String> event)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "//nothing to do\r\n if (active != m_active) {\r\n m_active = active;\r\n m_dailyRadioButton.setEnabled(active);\r\n m_weeklyRadioButton.setEnabled(active);\r\n m_monthlyRadioButton.setEnabled(active);\r\n m_yearlyRadioButton.setEnabled(active);\r\n\r\n m_noEndingRadioButton.setEnabled(active);\r\n m_endsAfterRadioButton.setEnabled(active);\r\n m_endsAtRadioButton.setEnabled(active);\r\n m_groupPattern.selectButton(m_dailyRadioButton);\r\n m_groupDuration.selectButton(m_noEndingRadioButton);",
"signature": "void reset()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "if (m_active) {\r\n String current = getFormValueAsString();\r\n if (!current.equals(m_previousValue)) {\r\n m_previousValue = current;\r\n ValueChangeEvent.fire(this, current);",
"signature": "void fireChangeIfChanged()"
},
{
"arguments": [
"int type"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "CmsRadioButton duration = null;\r\n switch (type) {\r\n case 0:\r\n duration = m_noEndingRadioButton;\r\n break;\r\n case 1:\r\n duration = m_endsAfterRadioButton;\r\n break;\r\n case 2:\r\n duration = m_endsAtRadioButton;",
"signature": "CmsRadioButton getDurationButtonForType(int type)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelDaily.java",
"implementation": "initWidget(uiBinder.createAndBindUi(this));\r\n m_labelDays.setInnerText(m_labels.get(\"GUI_SERIALDATE_DAILY_DAYS_0\").isString().stringValue());\r\n m_everyDay.setValue(\"1\");\r\n public String getInterval() {\r\n * Handles the days key press event.<p>\r\n * \r\n * @param event the event\r\n @UiHandler(\"m_everyDay\")\r\n public void onDaysKeyPress(KeyPressEvent event) {\r\n fireValueChange();\r\n * Sets the panel active.<p>\r\n * \r\n * @param active if active\r\n public void setActive(boolean active) {\r\n\r\n m_everyRadioButton.setEnabled(active);\r\n m_workingRadioButton.setEnabled(active);\r\n m_everyDay.setEnabled(active);\r\n if (active) {\r\n m_everyDay.setText(\"1\");\r\n m_everyRadioButton.setChecked(true);",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelMonthly.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"KeyPressEvent event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelMonthly.java",
"implementation": "fireValueChange();",
"signature": "void onAtMonthKeyPress(KeyPressEvent event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelYearly.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
}
] | [
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n changePattern();",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "//nothing to do\r\n /** Selects the right ending element. \r\n * @param element the element that should be checked\r\n * */\r\n public void selectEnding(int element) {\r\n m_groupDuration.selectButton(m_lowRadioButton[element]);\r\n // Iterate about all radio button.\r\n for (int i = 0; i < m_arrayRadiobox.length; i++) {\r\n // set the radio button active / inactive.\r\n m_arrayRadiobox[i].setEnabled(active);\r\n // if this widget is set inactive.\r\n if (!active) {\r\n // deselect all radio button.\r\n m_arrayRadiobox[i].setChecked(active);",
"signature": "void reset()"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "FlexTable table = new FlexTable();\r\n table.insertRow(0);\r\n FlowPanel cell1 = new FlowPanel();\r\n Label startDate = new Label(m_labels.get(\"GUI_SERIALDATE_TIME_STARTDATE_0\").isString().stringValue());\r\n startDate.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().serialDateLable());\r\n cell1.add(startDate);\r\n cell1.getElement().getStyle().setWidth(100, Unit.PCT);\r\n cell1.add(m_dateboxbegin);\r\n m_dateboxbegin.setDateOnly(true);\r\n m_dateboxbegin.getElement().getStyle().setWidth(100, Unit.PX);\r\n m_dateboxbegin.getElement().getStyle().setFloat(Float.RIGHT);\r\n m_dateboxbegin.addValueChangeHandler(new ValueChangeHandler<Date>() {\r\n\r\n public void onValueChange(ValueChangeEvent<Date> event) {\r\n\r\n fireValueChange();",
"signature": "void setLowPanel()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n fireValueChange();",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n if (m_times.getText().isEmpty()) {\r\n m_times.setValue(\"1\");",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n m_dateboxend.setValue(new Date());\r\n fireValueChange();",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onKeyPress(KeyPressEvent event) {\r\n\r\n fireValueChange();",
"signature": "new KeyPressHandler()"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onFocus(FocusEvent event) {\r\n\r\n selectEnding(1);",
"signature": "new FocusHandler()"
},
{
"arguments": [
"ValueChangeEvent<Date> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<Date> event)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n selectEnding(2);",
"signature": "new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "m_arrayRadiobox = new CmsRadioButton[4];\r\n m_arrayRadiobox[0] = new CmsRadioButton(\r\n KEY_DAILY,\r\n m_labels.get(\"GUI_SERIALDATE_TYPE_DAILY_0\").isString().stringValue());\r\n m_arrayRadiobox[0].setGroup(m_groupPattern);\r\n m_arrayRadiobox[0].setChecked(true);\r\n m_arrayRadiobox[1] = new CmsRadioButton(\r\n KEY_WEEKLY,\r\n m_labels.get(\"GUI_SERIALDATE_TYPE_WEEKLY_0\").isString().stringValue());\r\n m_arrayRadiobox[1].setGroup(m_groupPattern);\r\n m_arrayRadiobox[2] = new CmsRadioButton(\r\n KEY_MONTHLY,\r\n m_labels.get(\"GUI_SERIALDATE_TYPE_MONTHLY_0\").isString().stringValue());\r\n m_arrayRadiobox[2].setGroup(m_groupPattern);\r\n m_arrayRadiobox[3] = new CmsRadioButton(\r\n KEY_YEARLY,\r\n m_labels.get(\"GUI_SERIALDATE_TYPE_YEARLY_0\").isString().stringValue());\r\n m_arrayRadiobox[3].setGroup(m_groupPattern);",
"signature": "void setSelectVaues()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "Label l_start = new Label(m_labels.get(\"GUI_SERIALDATE_TIME_STARTTIME_0\").isString().stringValue());\r\n l_start.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().serialDateLable());\r\n l_start.getElement().getStyle().setFloat(Float.LEFT);\r\n m_startDate.setStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().textBoxSerialDate());\r\n m_startDate.getElement().getStyle().setWidth(110, Unit.PX);\r\n m_startDate.getElement().getStyle().setMarginRight(1, Unit.PX);\r\n m_startDate.getElement().getStyle().setFloat(Float.RIGHT);\r\n m_startDate.addValueChangeHandler(new ValueChangeHandler<String>() {\r\n\r\n public void onValueChange(ValueChangeEvent<String> event) {\r\n\r\n fireValueChange();",
"signature": "void setTopPanel()"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"ValueChangeEvent<String> event"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/CmsSerialDate.java",
"implementation": "fireValueChange();",
"signature": "void onValueChange(ValueChangeEvent<String> event)"
},
{
"arguments": [
"\r\n sel1.addClickHandler"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelDaily.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n fireValueChange();",
"signature": "new CmsRadioButton(\r\n sel1.addClickHandler(new ClickHandler()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelDaily.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n m_selection[1] = sel2;\r\n sel2.setGroup(m_group);\r\n this.add(sel1);\r\n this.add(m_everyPanel);\r\n\r\n this.add(sel2);\r\n public String getIterval() {\r\n /**\r\n * Returns the selection.<p>\r\n * @return the selection\r\n * */\r\n public CmsRadioButton[] getSelection() {\r\n\r\n return m_selection;",
"signature": "new ClickHandler()"
},
{
"arguments": [
"Widget child"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelDaily.java",
"implementation": "return remove(child);\r\n m_group.selectButton(m_selection[selection - 1]);",
"signature": "boolean remove(Widget child)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelDaily.java",
"implementation": "m_everyPanel.add(m_everyDay);\r\n m_everyDay.setStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().textBoxSerialDate());\r\n m_everyDay.setText(\"1\");\r\n m_everyDay.getElement().getStyle().setWidth(25, Unit.PX);\r\n m_everyDay.addKeyPressHandler(new KeyPressHandler() {\r\n\r\n public void onKeyPress(KeyPressEvent event) {\r\n\r\n fireValueChange();",
"signature": "void createEverPanel()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelMonthly.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n fireValueChange();",
"signature": "new ClickHandler()"
},
{
"arguments": [
"Widget child"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelMonthly.java",
"implementation": "return remove(child);\r\n m_atNummer.selectValue(dayOfMonthStr + \"\");\r\n m_group.selectButton(m_radio[0]);\r\n m_group.selectButton(m_radio[1]);\r\n private void createAtPanel() {\r\n m_atPanel.add(m_atNummer);\r\n m_atNummer.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().selectBoxPanel());\r\n m_atNummer.getOpener().setStyleName(\r\n m_atNummer.getSelectorPopup().addStyleName(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().selectBoxPopup());\r\n m_atNummer.addOption(\"1\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_1_0\").isString().stringValue());\r\n m_atNummer.addOption(\"2\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_2_0\").isString().stringValue());\r\n m_atNummer.addOption(\"3\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_3_0\").isString().stringValue());\r\n m_atNummer.addOption(\"4\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_4_0\").isString().stringValue());\r\n m_atNummer.addOption(\"5\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_5_0\").isString().stringValue());\r\n m_atNummer.setWidth(\"80px\");\r\n\r\n m_atPanel.add(m_atDay);\r\n m_atDay.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().selectBoxPanel());\r\n\r\n Label every = new Label(m_labels.get(\"GUI_SERIALDATE_MONTHLY_WEEKDAY_EVERY_0\").isString().stringValue());\r\n every.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().serialDateLable());\r\n m_atPanel.add(every);\r\n m_atPanel.add(m_atMonth);\r\n m_atMonth.setStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().textBoxSerialDate());\r\n m_atMonth.addKeyPressHandler(new KeyPressHandler() {\r\n\r\n public void onKeyPress(KeyPressEvent event) {\r\n\r\n fireValueChange();",
"signature": "boolean remove(Widget child)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelMonthly.java",
"implementation": "m_everyPanel.add(m_everyDay);\r\n m_everyDay.setStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().textBoxSerialDate());\r\n m_everyDay.setText(\"1\");\r\n m_everyDay.addKeyPressHandler(new KeyPressHandler() {\r\n\r\n public void onKeyPress(KeyPressEvent event) {\r\n\r\n fireValueChange();",
"signature": "void createEverPanel()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelMonthly.java",
"implementation": "public void onKeyPress(KeyPressEvent event) {\r\n\r\n fireValueChange();",
"signature": "new KeyPressHandler()"
},
{
"arguments": [
"Widget child"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelWeekly.java",
"implementation": "return remove(child);\r\n CmsCheckBox test = new CmsCheckBox(m_labels.get(\"GUI_SERIALDATE_DAY_MONDAY_0\").isString().stringValue());\r\n test.setInternalValue(\"2\");\r\n m_checkboxes.add(test);\r\n test = new CmsCheckBox(m_labels.get(\"GUI_SERIALDATE_DAY_TUESDAY_0\").isString().stringValue());\r\n test.setInternalValue(\"3\");\r\n m_checkboxes.add(test);\r\n test = new CmsCheckBox(m_labels.get(\"GUI_SERIALDATE_DAY_WEDNESDAY_0\").isString().stringValue());\r\n test.setInternalValue(\"4\");\r\n m_checkboxes.add(test);\r\n test = new CmsCheckBox(m_labels.get(\"GUI_SERIALDATE_DAY_THURSDAY_0\").isString().stringValue());\r\n test.setInternalValue(\"5\");\r\n m_checkboxes.add(test);\r\n test = new CmsCheckBox(m_labels.get(\"GUI_SERIALDATE_DAY_FRIDAY_0\").isString().stringValue());\r\n test.setInternalValue(\"6\");\r\n m_checkboxes.add(test);\r\n test = new CmsCheckBox(m_labels.get(\"GUI_SERIALDATE_DAY_SATURDAY_0\").isString().stringValue());\r\n test.setInternalValue(\"7\");\r\n m_checkboxes.add(test);\r\n test = new CmsCheckBox(m_labels.get(\"GUI_SERIALDATE_DAY_SUNDAY_0\").isString().stringValue());\r\n test.setInternalValue(\"1\");\r\n m_checkboxes.add(test);",
"signature": "boolean remove(Widget child)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelWeekly.java",
"implementation": "m_everyPanel.add(new Label(m_labels.get(\"GUI_SERIALDATE_WEEKLY_EVERY_0\").isString().stringValue()));\r\n m_everyPanel.add(m_everyDay);\r\n m_everyDay.setStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().textBoxSerialDate());\r\n m_everyDay.setText(\"1\");\r\n m_everyDay.addKeyPressHandler(new KeyPressHandler() {\r\n\r\n public void onKeyPress(KeyPressEvent event) {\r\n\r\n fireValueChange();",
"signature": "void createEverPanel()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelYearly.java",
"implementation": "public void onClick(ClickEvent event) {\r\n\r\n fireValueChange();",
"signature": "new ClickHandler()"
},
{
"arguments": [
"Widget child"
],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelYearly.java",
"implementation": "return remove(child);",
"signature": "boolean remove(Widget child)"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelYearly.java",
"implementation": "m_atPanel.add(m_atNummer);\r\n m_atNummer.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().selectBoxPanel());\r\n m_atNummer.getOpener().setStyleName(\r\n m_atNummer.getSelectorPopup().addStyleName(I_CmsLayoutBundle.INSTANCE.globalWidgetCss().selectBoxPopup());\r\n m_atNummer.setWidth(\"80px\");\r\n m_atNummer.addOption(\"1\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_1_0\").isString().stringValue());\r\n m_atNummer.addOption(\"2\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_2_0\").isString().stringValue());\r\n m_atNummer.addOption(\"3\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_3_0\").isString().stringValue());\r\n m_atNummer.addOption(\"4\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_4_0\").isString().stringValue());\r\n m_atNummer.addOption(\"5\", m_labels.get(\"GUI_SERIALDATE_WEEKDAYNUMBER_5_0\").isString().stringValue());\r\n m_atPanel.add(m_atDay);\r\n m_atDay.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().selectBoxPanel());\r\n m_atPanel.add(new Label(m_labels.get(\"GUI_SERIALDATE_YEARLY_IN_0\").isString().stringValue()));\r\n m_atPanel.add(m_atMonth);\r\n m_atMonth.addStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().selectBoxPanel());",
"signature": "void createAtPanel()"
},
{
"arguments": [],
"filename": "com.alkacon.opencms.v8.calendar/src/com/alkacon/opencms/v8/calendar/client/input/serialdate/CmsPatternPanelYearly.java",
"implementation": "m_everyPanel.add(m_everyDay);\r\n m_everyDay.setStyleName(I_CmsLayoutBundle.INSTANCE.widgetCss().textBoxSerialDate());\r\n m_everyDay.setText(\"1\");\r\n m_everyDay.addKeyPressHandler(new KeyPressHandler() {\r\n\r\n public void onKeyPress(KeyPressEvent event) {\r\n\r\n fireValueChange();",
"signature": "void createEverPanel()"
}
] |
26533bc3494541b32d3125793194b0621eec090f | [
{
"arguments": [
"LuceneObject o",
" LuceneSerializer serializer"
],
"filename": "src/main/java/gov/nysenate/openleg/lucene/DocumentBuilder.java",
"implementation": "if(o == null) {\n\t\t\treturn null;",
"signature": "Document buildDocument(LuceneObject o, LuceneSerializer serializer)"
},
{
"arguments": [
"String[] args"
],
"filename": "src/main/java/gov/nysenate/openleg/search/Result.java",
"implementation": "System.out.println(XStreamBuilder.writeResponse(\"xml\", new SearchEngine2().get(\"xml\", \"bill\", \"s1234-2009\", null, 0, 1, true)));",
"signature": "void main(String[] args)"
}
] | [
{
"arguments": [
"Bill bill",
" BillEvent billEvent",
" StringBuilder searchContent",
" HashMap<String",
"String> fields"
],
"filename": "src/main/java/gov/nysenate/openleg/search/SearchEngine.java",
"implementation": "fields.put(\"when\", billEvent.getEventDate().getTime()+\"\");\n\t\tfields.put(\"billno\", billEvent.getBillId() );\n\t\t\n\t\tsearchContent.append(billEvent.getBillId()).append(\" \");\n\t\t\n\t\ttry\n\t\t{\n\t\t\tif (bill.getSponsor()!=null) {\n \t\t\tsearchContent.append(bill.getSponsor().getFullname()).append(\" \");\n \t\t\tfields.put(\"sponsor\", bill.getSponsor().getFullname());",
"signature": "void indexBillEvent (Bill bill, BillEvent billEvent, StringBuilder searchContent, HashMap<String,String> fields)"
},
{
"arguments": [
"obj instanceof Supplemental"
],
"filename": "src/main/java/gov/nysenate/openleg/search/SearchEngine.java",
"implementation": "Supplemental supp = (Supplemental)obj;\n \t\tCalendar calendar = supp.getCalendar();\n \t\ttype = \"calendar\";\n \t\tid = calendar.getId();\n \t\tfields.put(\"ctype\",calendar.getType());\n \t\t\n \t\t\n \t\tif (supp.getCalendarDate()!=null)\n \t\t\tfields.put(\"when\", supp.getCalendarDate().getTime()+\"\");\n \t\t\n \t\ttitle = calendar.getNo() + \" - \" + calendar.getType();\n \t\t\n \t\tif (supp.getCalendarDate()!=null)\n \t\t\ttitle += \" - \" + DATE_FORMAT_MEDIUM.format(supp.getCalendarDate());\n \t\t\n \t\t\n \t\telse if (supp.getReleaseDateTime()!=null)\n \t\t{\n \t\t\ttitle += \" - \" + DATE_FORMAT_MEDIUM.format(supp.getCalendarDate());",
"signature": "else if (obj instanceof Supplemental)"
},
{
"arguments": [
"obj instanceof Agenda"
],
"filename": "src/main/java/gov/nysenate/openleg/search/SearchEngine.java",
"implementation": "Agenda agenda = (Agenda)obj;\n\n \t\tif (agenda.getAddendums() != null) {\n\t \t\tIterator<Addendum> itAnd = agenda.getAddendums().iterator();\n\t \t\t\n\t \t\twhile (itAnd.hasNext()) {\n\t \t\t\tIterator<Meeting> itMeetings = itAnd.next().getMeetings().iterator();\n\t \t\t\twhile (itMeetings.hasNext()) {\n\t \t\t\t\tindexSenateObject (itMeetings.next(), indexWriter, pm);",
"signature": "else if (obj instanceof Agenda)"
},
{
"arguments": [
"obj instanceof Meeting"
],
"filename": "src/main/java/gov/nysenate/openleg/search/SearchEngine.java",
"implementation": "Meeting meeting = (Meeting)obj;\n \t\ttype = \"meeting\";\n \t\tid = meeting.getId();\n \t\t\n \t\tsearchContent.append(meeting.getCommitteeName()).append(\" - \");\n \t\tsearchContent.append(meeting.getCommitteeChair()).append(\" - \");\n \t\tsearchContent.append(meeting.getLocation()).append(\" - \");\n \t\tsearchContent.append(meeting.getNotes());\n \t\t\n \t\tfields.put(\"committee\",meeting.getCommitteeName());\n \t\tfields.put(\"chair\",meeting.getCommitteeChair());\n \t\tfields.put(\"location\",meeting.getLocation());\n \t\tfields.put(\"notes\", meeting.getNotes());\n \t\tfields.put(\"when\", meeting.getMeetingDateTime().getTime() + \"\");\n \t\t\n \t\tDateFormat df = java.text.DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);\n \t\t\n \t\ttitle = meeting.getCommitteeName() + \" - \" + df.format(meeting.getMeetingDateTime());\n \t\tsummary = meeting.getLocation();",
"signature": "else if (obj instanceof Meeting)"
},
{
"arguments": [
"obj instanceof Transcript"
],
"filename": "src/main/java/gov/nysenate/openleg/search/SearchEngine.java",
"implementation": "Transcript transcript = (Transcript)obj;\n \t\ttype = \"transcript\";\n \t\tid = transcript.getId();\n \t\t\n \t\tsearchContent.append(transcript.getTranscriptText());\n \t\t\n \t\tfields.put(\"full\", transcript.getTranscriptText());\n \t\t\n \t\tif (transcript.getTimeStamp()!=null)\n \t\t\tfields.put(\"when\",transcript.getTimeStamp().getTime()+\"\");\n \t\telse\n \t\t\tfields.put(\"when\",\"\");\n \t\t\n \t\tfields.put(\"location\",transcript.getLocation());\n \t\tfields.put(\"session-type\",transcript.getType());\n \t\n \t\tDateFormat df = java.text.DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);\n\n \t\ttitle = transcript.getType();\n \t\t\n \t\tif (transcript.getTimeStamp()!=null)\n \t\t\ttitle += \" - \" + df.format(transcript.getTimeStamp());\n \t\t\n \t\tsummary = transcript.getLocation();",
"signature": "else if (obj instanceof Transcript)"
},
{
"arguments": [
"obj instanceof Vote"
],
"filename": "src/main/java/gov/nysenate/openleg/search/SearchEngine.java",
"implementation": "Vote vote = (Vote)obj;\n \t\ttype = \"vote\";\n \t\tid = vote.getId();\n \t\t\n \t\tBill bill = vote.getBill();\n \t\t\n \t\ttitle = bill.getSenateBillNo() + \" - \" + DATE_FORMAT_MEDIUM.format(vote.getVoteDate());\n \t\t\n \t\tsearchContent.append(bill.getSenateBillNo());\n \t\tsearchContent.append(\" \");\n \t\t\n \t\tfields.put(\"billno\", bill.getSenateBillNo());\n \t\t\n \t\tswitch(vote.getVoteType()) {\n \t\t\tcase Vote.VOTE_TYPE_COMMITTEE:\n \t\t\t\t\n \t\t\t\ttitle += \" - Committee Vote\";\n \t\t\t\t\n \t\t\t\tif (vote.getDescription()!=null)\n \t\t\t\t\tfields.put(\"committee\", vote.getDescription());\n \t\t\t\telse\n \t\t\t\t\tfields.put(\"committee\", bill.getCurrentCommittee());\n \t\t\t\t\n \t\t\t\tsearchContent.append(\" Committee Vote \");\n \t\t\t\tsearchContent.append(bill.getCurrentCommittee());\n \t\t\t\tbreak;\n \t\t\tcase Vote.VOTE_TYPE_FLOOR:\n \t\t\t\ttitle += \" - Floor Vote\";\n \t\t\t\tsearchContent.append(\" Floor Vote \");\n \t\t\t\tbreak;",
"signature": "else if (obj instanceof Vote)"
},
{
"arguments": [
"obj instanceof BillEvent"
],
"filename": "src/main/java/gov/nysenate/openleg/search/SearchEngine.java",
"implementation": "BillEvent billEvent = (BillEvent)obj;\n \t\ttype = \"action\";\n \t\tid = billEvent.getBillEventId();\n \t\ttitle = billEvent.getEventText();\n \t\tsummary = DATE_FORMAT_MEDIUM.format(billEvent.getEventDate());\n\n \t\tBill bill = PMF.getBill(pm,billEvent.getBillId());\n \t\t\n \t\tif (bill.getTitle()!=null) {\n \t\t\tsummary += \" - \" + bill.getTitle();",
"signature": "else if (obj instanceof BillEvent)"
}
] |
3068de968fb925cdefb0eb9772bcfb16c7c133d4 | [
{
"arguments": [],
"filename": "base/src/org/open2jam/gui/ChartModelLoader.java",
"implementation": "//let's make a crc32 hash for the cache name\n CRC32 cs = new CRC32();\n cs.reset();\n\n byte[] d = dir.toString().getBytes();\n cs.update(d, 0, d.length);\n\n String str = \"cache_\"+Long.toHexString(cs.getValue()).toUpperCase()+\".obj\";\n try {\n new ObjectOutputStream(new FileOutputStream(str)).writeObject(table_model.getRawList());",
"signature": "void done()"
},
{
"arguments": [
"java.awt.event.ActionEvent evt"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "btn_reloadActionPerformed(evt);",
"signature": "void actionPerformed(java.awt.event.ActionEvent evt)"
},
{
"arguments": [
"java.awt.event.ActionEvent evt"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "//GEN-FIRST:event_btn_configurationActionPerformed",
"signature": "void btn_configurationActionPerformed(java.awt.event.ActionEvent evt)"
},
{
"arguments": [
"java.awt.event.ActionEvent evt"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "//GEN-FIRST:event_btn_skinActionPerformed",
"signature": "void btn_skinActionPerformed(java.awt.event.ActionEvent evt)"
},
{
"arguments": [
"java.awt.event.ActionEvent evt"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "//GEN-FIRST:event_btn_reloadActionPerformed\n updateSelection();",
"signature": "void btn_reloadActionPerformed(java.awt.event.ActionEvent evt)"
},
{
"arguments": [
"String s"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "//let's make a crc32 hash for the cache name\n CRC32 cs = new CRC32();\n cs.reset();\n\n byte[] d = s.getBytes();\n cs.update(d, 0, d.length);\n\n return \"cache_\"+Long.toHexString(cs.getValue()).toUpperCase()+\".obj\";",
"signature": "String dirToCRC32(String s)"
},
{
"arguments": [
"String dir"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "File cache = new File(dirToCRC32(dir));\n if(cache.exists()){\n try {\n @SuppressWarnings(\"unchecked\") // yes, I'm sure its a list of chartlist\n List<ChartList> l = (List<ChartList>) new ObjectInputStream(new FileInputStream(cache)).readObject();\n model_songlist.clear();\n for(ChartList c : l)model_songlist.addRow(c);",
"signature": "void loadCache(String dir)"
}
] | [
{
"arguments": [
"java.awt.event.ActionEvent evt"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "//GEN-FIRST:event_bConfigurationActionPerformed",
"signature": "void bConfigurationActionPerformed(java.awt.event.ActionEvent evt)"
},
{
"arguments": [
"java.awt.event.ActionEvent evt"
],
"filename": "base/src/org/open2jam/gui/NewInterface.java",
"implementation": "//GEN-FIRST:event_bSkinActionPerformed",
"signature": "void bSkinActionPerformed(java.awt.event.ActionEvent evt)"
}
] |
3468e0eadfa2f54e2fcef6ea33cc78bcb13b521e | [
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "pool.closeAllConnections();",
"signature": "void closeAllConnections()"
},
{
"arguments": [
"Waiter waiter"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "// Enqueue\n if (maxWaitQueueSize < 0 || waiters.size() < maxWaitQueueSize || pool.canCreateStream(connCount)) {\n if (metrics != null) {\n waiter.metric = metrics.enqueueRequest(metric);",
"signature": "void getConnection(Waiter waiter)"
},
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "while (true) {\n Waiter waiter = waiters.peek();\n if (waiter == null) {\n break;",
"signature": "void checkPending()"
},
{
"arguments": [
"Waiter waiter"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "connCount++;\n sslHelper.validate(vertx);\n Bootstrap bootstrap = new Bootstrap();\n bootstrap.group(waiter.context.nettyEventLoop());\n bootstrap.channel(vertx.transport().channelType(false));\n connector.connect(this, bootstrap, waiter.context, peerHost, ssl, pool.version(), host, port, ar -> {\n initConnection(waiter, ar.result());\n waiter.context.executeFromIO(() -> {\n closeConnection();\n private synchronized void initConnection(Waiter waiter, HttpClientConnection conn) {\n conn.lifecycleHandler(reuse -> {\n if (reuse) {\n recycleConnection(conn);\n evictConnection(conn);",
"signature": "void createConnection(Waiter waiter)"
},
{
"arguments": [
"HttpClientConnection conn"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "pool.evictConnection(conn);\n private synchronized void recycleConnection(HttpClientConnection conn) {\n pool.recycleConnection(conn);\n private void deliverInternal(HttpClientConnection conn, Waiter waiter) {\n if (conn.getContext().nettyEventLoop().inEventLoop()) {\n conn.getContext().executeFromIO(() -> {\n HttpClientStream stream;\n try {\n stream = pool.createStream(conn);",
"signature": "void evictConnection(HttpClientConnection conn)"
},
{
"arguments": [
"int connCount"
],
"filename": "src/main/java/io/vertx/core/http/impl/Http1xPool.java",
"implementation": "return connCount < maxSockets;",
"signature": "boolean canCreateStream(int connCount)"
},
{
"arguments": [
"int connCount"
],
"filename": "src/main/java/io/vertx/core/http/impl/Http2Pool.java",
"implementation": "for (Http2ClientConnection conn : allConnections) {\n if (canReserveStream(conn)) {\n return true;",
"signature": "boolean canCreateStream(int connCount)"
}
] | [
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/ClientConnection.java",
"implementation": "return count++;",
"signature": "int use()"
},
{
"arguments": [
"Waiter waiter"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "HttpClientConnection conn = pool.pollConnection();\n if (conn != null) {\n conn.getContext().runOnContext(v -> deliver(conn, waiter));\n if (pool.canCreateConnection(connCount)) {\n // Create a new connection\n createNewConnection(waiter);\n // Wait in queue\n if (maxWaitQueueSize < 0 || waiters.size() < maxWaitQueueSize) {\n if (metrics != null) {\n waiter.metric = metrics.enqueueRequest(metric);",
"signature": "void getConnection(Waiter waiter)"
},
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "pool.closeAllConnections();",
"signature": "void closeAllConnections()"
},
{
"arguments": [
"Waiter waiter"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "ContextImpl context;\n if (waiter.context == null) {\n // Embedded\n context = vertx.getOrCreateContext();",
"signature": "void createNewConnection(Waiter waiter)"
},
{
"arguments": [
"Waiter waiter",
" HttpClientConnection conn"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "conn.lifecycleHandler(reuse -> recycleConnection(conn, reuse));\n deliver(conn, waiter);",
"signature": "void newConnection(Waiter waiter, HttpClientConnection conn)"
},
{
"arguments": [
"HttpClientConnection conn",
" boolean reuse"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "if (reuse) {\n recycle(conn);",
"signature": "void recycleConnection(HttpClientConnection conn, boolean reuse)"
},
{
"arguments": [
"ContextImpl context",
" Handler<AsyncResult<HttpClientConnection>> handler"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "connCount++;\n sslHelper.validate(vertx);\n Bootstrap bootstrap = new Bootstrap();\n bootstrap.group(context.nettyEventLoop());\n bootstrap.channel(vertx.transport().channelType(false));\n connector.connect(this, bootstrap, context, peerHost, ssl, pool.version(), host, port, handler);",
"signature": "void createNewConnection(ContextImpl context, Handler<AsyncResult<HttpClientConnection>> handler)"
},
{
"arguments": [
"HttpClientConnection conn"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "pool.recycleConnection(conn);\n checkPending();",
"signature": "void recycle(HttpClientConnection conn)"
},
{
"arguments": [
"HttpClientConnection conn",
" Waiter waiter"
],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "if (conn.isValid()) {\n if (!waiter.isCancelled()) {\n deliverInternal(conn, waiter);\n // Should check connection is still VALID\n recycle(conn);\n getConnection(waiter);\n private void deliverInternal(HttpClientConnection conn, Waiter waiter) {\n conn.getContext().executeFromIO(() -> {\n HttpClientStream stream;\n try {\n stream = pool.createStream(conn);",
"signature": "void deliver(HttpClientConnection conn, Waiter waiter)"
},
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "while (true) {\n Waiter waiter = waiters.peek();\n if (waiter == null) {\n break;",
"signature": "void checkPending()"
},
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "Waiter waiter = waiters.poll();\n if (metrics != null && waiter != null) {\n metrics.dequeueRequest(metric, waiter.metric);",
"signature": "Waiter getNextWaiter()"
},
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/ConnectionManager.java",
"implementation": "Waiter waiter = getNextWaiter();\n if (waiter != null) {\n // There's a waiter - so it can have a new connection\n createNewConnection(waiter);",
"signature": "void connectionClosed()"
},
{
"arguments": [],
"filename": "src/main/java/io/vertx/core/http/impl/Http2ClientConnection.java",
"implementation": "return count++;",
"signature": "int use()"
}
] |
3a8ed89b69d74541dfc93082008b10ead9e1b48f | [
{
"arguments": [],
"filename": "scribble-core/src/main/java/org/scribble/model/endpoint/actions/EAction.java",
"implementation": "return this.ef;",
"signature": "EModelFactory getEModelFactory()"
}
] | [
{
"arguments": [
"not the Scribble job root",
" i.e. main"
],
"filename": "scribble-core/src/main/java/org/scribble/main/ScribbleException.java",
"implementation": "CommonTree root = blame;\n\t\twhile (root.parent != null)\n\t\t{\n\t\t\troot = root.parent;",
"signature": "this CommonTree (not the Scribble job root, i.e. main)"
}
] |
410c981149b5fb2c658e9cd071945b50995390f1 | [
{
"arguments": [
"IMatrixView matrixView"
],
"filename": "gitools-core/src/main/java/org/gitools/matrix/model/MatrixView.java",
"implementation": "this.contents = matrixView.getContents();\n\t\tthis.visibleRows = matrixView.getVisibleRows();\n\t\tthis.visibleColumns = matrixView.getVisibleColumns();\n\t\tthis.selectedRows = matrixView.getSelectedRows();\n\t\tthis.selectedColumns = matrixView.getSelectedColumns();\n\t\tthis.selectionLeadRow = matrixView.getLeadSelectionRow();\n\t\tthis.selectionLeadColumn = matrixView.getLeadSelectionColumn();\n\t\tthis.selectedPropertyIndex = matrixView.getSelectedPropertyIndex();\n\n\t\tselectedColumnsBitmap = newSelectionBitmap(contents.getColumnCount());\n\t\tselectedRowsBitmap = newSelectionBitmap(contents.getRowCount());",
"signature": "public MatrixView(IMatrixView matrixView)"
},
{
"arguments": [
"T x"
],
"filename": "gitools-core/src/main/java/org/gitools/utils/SerialClone.java",
"implementation": "XStream xstream = new XStream();\n\t\tString xml = xstream.toXML(x);\n\t\treturn (T) xstream.fromXML(xml);",
"signature": "T xclone(T x)"
},
{
"arguments": [
"List<BaseAction> actions"
],
"filename": "gitools-ui-platform/src/main/java/org/gitools/ui/platform/actions/ActionSet.java",
"implementation": "this(actions.toArray(new BaseAction[actions.size()]));",
"signature": "public ActionSet(List<BaseAction> actions)"
},
{
"arguments": [],
"filename": "gitools-ui/src/main/java/org/gitools/ui/actions/file/SaveAction.java",
"implementation": "@Override\n\t\t\tpublic void run(IProgressMonitor monitor) {\n\t\t\t\tcurrentEditor.doSave(monitor);",
"signature": "new JobRunnable()"
},
{
"arguments": [
"Heatmap heatmap",
" List<BaseAction> externalToolbarActions"
],
"filename": "gitools-ui/src/main/java/org/gitools/ui/heatmap/editor/HeatmapEditor.java",
"implementation": "this.externalToolbarActions = externalToolbarActions;\n\t\t//final IMatrixView matrixView = getMatrixView();\n\t\tList<BaseAction> actions = new ArrayList<BaseAction>(toolBarAS.getActions());\n\t\tif (externalToolbarActions != null)\n\t\t\tactions.addAll(externalToolbarActions);\n\t\tActionSet as = new ActionSet(actions);\n\t\t\n\t\tJToolBar toolBar = ActionSetUtils.createToolBar(as);\n\n\t\tadd(toolBar, BorderLayout.NORTH);\n\n\t@Override\n\tpublic void doSave(IProgressMonitor monitor) {\n\t\tFile file = null; //getEditorFile();\n\n\t\ttry {\n\t\t\tPersistenceManager.getDefault().store(file, getModel(), monitor);",
"signature": "public HeatmapEditor(Heatmap heatmap, List<BaseAction> externalToolbarActions)"
},
{
"arguments": [],
"filename": "gitools-ui/src/main/java/org/gitools/ui/intogen/dialog/IntogenOncomodulesDialog.java",
"implementation": "@Override public void run() {\n\t\t\t\ttry {\n\t\t\t\t\trcontext.navigate(new URL(Settings.getDefault().getIntogenOncomodulesUrl()), \"_this\");",
"signature": "new Runnable()"
},
{
"arguments": [],
"filename": "gitools-ui/src/main/java/org/gitools/ui/settings/Settings.java",
"implementation": "return intogenOncomodulesUrl;",
"signature": "String getIntogenOncomodulesUrl()"
},
{
"arguments": [
"String intogenOncomodulesUrl"
],
"filename": "gitools-ui/src/main/java/org/gitools/ui/settings/Settings.java",
"implementation": "this.intogenOncomodulesUrl = intogenOncomodulesUrl;",
"signature": "void setIntogenOncomodulesUrl(String intogenOncomodulesUrl)"
}
] | [
{
"arguments": [
"matrix instanceof DoubleMatrix"
],
"filename": "gitools-ui/src/main/java/org/gitools/ui/actions/file/OpenHeatmapAction.java",
"implementation": "figure.setShowGrid(false);",
"signature": "else if (matrix instanceof DoubleMatrix)"
},
{
"arguments": [
"matrix instanceof ObjectMatrix"
],
"filename": "gitools-ui/src/main/java/org/gitools/ui/actions/file/OpenHeatmapAction.java",
"implementation": "ElementDecorator decorator =\n\t\t\t\t\t\t\tElementDecoratorFactory.create(\n\t\t\t\t\t\t\t\t\tElementDecoratorNames.PVALUE,\n\t\t\t\t\t\t\t\t\tmatrix.getCellAdapter());\n\t\t\t\t\t\tfigure.setCellDecorator(decorator);",
"signature": "else if (matrix instanceof ObjectMatrix)"
}
] |
41a9015ab6ccfb3c0d1af4ab9f1b1e8dbde35013 | [
{
"arguments": [
"String name"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "Objects.requireNonNull(name);\n\n return labels.containsKey(name)\n || macros.containsKey(name)\n || constants.containsKey(name)\n || variables.containsKey(name);\n private <T> boolean addIdentifier(Map<String, T> identifiers, T identifier, String name) {\n if (identifiers.get(name) == identifier) {\n return true;",
"signature": "boolean identifierExists(String name)"
},
{
"arguments": [
"Label label"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "return addIdentifier(labels, label, label.getName());",
"signature": "boolean addLabel(Label label)"
},
{
"arguments": [
"PseudoMACRO macro"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "return addIdentifier(macros, macro, macro.getName());\n return macros.get(name);\n public boolean addConstant(PseudoEQU constant) {\n return addIdentifier(constants, constant, constant.getName());\n public PseudoEQU getConstant(String name) {\n return constants.get(name);\n public boolean setVariable(PseudoVAR variable) {\n if (identifierExists(variable.getName()) && !variables.containsKey(variable.getName())) {\n return false;",
"signature": "boolean addMacro(PseudoMACRO macro)"
},
{
"arguments": [
"int val"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java",
"implementation": "return 1;",
"signature": "int getSize(int val)"
},
{
"arguments": [
"val <= 65535 && val >= -32768"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java",
"implementation": "return 2;",
"signature": "else if (val <= 65535 && val >= -32768)"
},
{
"arguments": [
"val <= 16777215 && val >= -8388608"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java",
"implementation": "return 3;\n return 4;\n\n if (size < neededSize) {\n size = neededSize;",
"signature": "else if (val <= 16777215 && val >= -8388608)"
}
] | [
{
"arguments": [
"String name"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "if (defLabels.containsKey(name)) {\n return true;",
"signature": "boolean idExists(String name)"
},
{
"arguments": [
"Label l"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "String n = l.getName();\n if (idExists(n) == true) {",
"signature": "boolean addLabelDef(Label l)"
},
{
"arguments": [
"PseudoMACRO m"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "String n = m.getName();\n if (idExists(n) == true) {\n return false;",
"signature": "boolean addMacroDef(PseudoMACRO m)"
},
{
"arguments": [
"PseudoEQU e"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "String n = e.getName();\n if (idExists(n) == true) {\n return false;",
"signature": "boolean addEquDef(PseudoEQU e)"
},
{
"arguments": [
"String name"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/impl/Namespace.java",
"implementation": "return defEqus.get(name);\n // prida alebo prepise existujucu definiciu\n // pridava sa samozrejme az v pass2\n public boolean addVarDef(PseudoVAR s) {\n defVars.put(s.getName(), s);\n public PseudoVAR getVar(String name) {\n return defVars.get(name);\n defLabels.remove(name);\n defMacros.remove(name);\n defEqus.remove(name);\n defVars.remove(name);\n Iterator<?> i = defLabels.values().iterator();\n while (i.hasNext()) {\n env.addLabelDef((Label) i.next());\n i = defMacros.values().iterator();\n while (i.hasNext()) {\n env.addMacroDef((PseudoMACRO) i.next());\n i = defEqus.values().iterator();\n while (i.hasNext()) {\n env.addEquDef((PseudoEQU) i.next());\n i = defVars.values().iterator();\n while (i.hasNext()) {\n env.addVarDef((PseudoVAR) i.next());\n return (Row) passNeed.get(index);\n public void clearPassNeeds() {\n passNeed.clear();",
"signature": "PseudoEQU getEqu(String name)"
},
{
"arguments": [],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/tree/Address.java",
"implementation": "return value;",
"signature": "int getAddress()"
},
{
"arguments": [
"ArrayList<DataValue> vec"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/tree/DataNode.java",
"implementation": "list.addAll(vec);",
"signature": "void addAll(ArrayList<DataValue> vec)"
},
{
"arguments": [],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/tree/Row.java",
"implementation": "return this.current_address;",
"signature": "int getCurrentAddress()"
},
{
"arguments": [],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java",
"implementation": "if (value <= 255 && value >= -128) {\n return true;",
"signature": "boolean is8Bit()"
},
{
"arguments": [
"int val"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java",
"implementation": "return true;",
"signature": "boolean is8Bit(int val)"
},
{
"arguments": [
"double val"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java",
"implementation": "return Math.log(val) / Math.log(2.0);",
"signature": "double log2(double val)"
},
{
"arguments": [
"int val"
],
"filename": "plugins/compilers/as-z80/src/main/java/net/sf/emustudio/zilogZ80/assembler/treeAbstract/Expression.java",
"implementation": "int y = (int) (Math.ceil(log2(val + 1) / 8.0));\n return (y == 0) ? 1 : y;\n for (int j = size; j < neededSize; j++) {\n s += \"00\";",
"signature": "int getSize(int val)"
}
] |
4249b9b8e406cfef551c36071a4c42528d0fe8a5 | [
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/CallableSuspiciousClasses.java",
"implementation": "try {\n return this.a();",
"signature": "Object call()"
},
{
"arguments": [
"ICommandSender icommandsender",
" String s0",
" double d0",
" double d1"
],
"filename": "src/main/java/net/minecraft/server/CommandBase.java",
"implementation": "throw new NumberInvalidException(\"commands.generic.double.tooSmall\", new Object[]{ Double.valueOf(d2), Double.valueOf(d0)",
"signature": "double a(ICommandSender icommandsender, String s0, double d0, double d1)"
},
{
"arguments": [
"ICommandSender icommandsender",
" double d0",
" String s0",
" int i0",
" int i1"
],
"filename": "src/main/java/net/minecraft/server/CommandBase.java",
"implementation": "throw new NumberInvalidException(\"commands.generic.num.invalid\", new Object[]{ Double.valueOf(d0)",
"signature": "double a(ICommandSender icommandsender, double d0, String s0, int i0, int i1)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/Entity.java",
"implementation": "return true;",
"signature": "boolean O()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/Entity.java",
"implementation": "public void Q() {",
"signature": "String P()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/Entity.java",
"implementation": "public boolean T() {\n public void U() {\n this.o.V();\n public void V() {\n this.n.b(this.u, this.v + this.X() + this.n.W(), this.w);\n public double W() {\n public double X() {\n public float Y() {\n public Vec3 Z() {\n public void aa() {\n this.ao = this.ab();\n public int ab() {\n public ItemStack[] ad() {\n public boolean ae() {\n public boolean af() {\n public boolean ag() {\n public boolean ah() {\n public boolean ai() {\n public int ak() {\n public void al() {\n public String am() {\n public Entity[] an() {\n public float ao() {\n public boolean ap() {\n return String.format(\"%s[\\'%s\\'/%d, l=\\'%s\\', x=%.2f, y=%.2f, z=%.2f]\", new Object[]{ this.getClass().getSimpleName(), this.am(), Integer.valueOf(this.k), this.q == null ? \"~NULL~\" : this.q.N().k(), Double.valueOf(this.u), Double.valueOf(this.v), Double.valueOf(this.w)",
"signature": "boolean S()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityBat.java",
"implementation": "protected float ba() {\n return super.ba() * 0.95F;\n return this.bJ() && this.ab.nextInt(4) != 0 ? null : \"mob.bat.idle\";\n protected String aN() {\n protected String aO() {\n protected void bi() {",
"signature": "float aZ()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityCreature.java",
"implementation": "protected void bk() {\n this.bn = this.bJ();\n Entity entity = this.bL();",
"signature": "boolean bJ()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityCreature.java",
"implementation": "protected Entity bL() {\n public boolean bs() {\n return super.bs() && this.a(i0, i1, i2) >= 0.0F;\n public boolean bM() {\n public Entity bN() {\n public boolean bO() {\n public ChunkCoordinates bP() {\n public float bQ() {\n public void bR() {\n public boolean bS() {\n protected void bF() {\n super.bF();\n if (this.bH() && this.bI() != null && this.bI().q == this.q) {\n Entity entity = this.bI();\n if (this instanceof EntityTameable && ((EntityTameable) this).bU()) {\n this.a(true, true);\n this.o(f0);\n this.a(true, true);",
"signature": "void bK()"
},
{
"arguments": [
"float f0"
],
"filename": "src/main/java/net/minecraft/server/EntityCreature.java",
"implementation": "",
"signature": "void o(float f0)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityDragon.java",
"implementation": "super.ay();\n if (this.aM() <= 0.0F) {\n if (this.aM() <= 0.0F) {\n this.bJ();\n this.bK();\n private void bJ() {",
"signature": "void ay()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityDragon.java",
"implementation": "protected void aA() {\n protected void bo() {",
"signature": "void bK()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityEnderman.java",
"implementation": "super.ay();\n nbttagcompound.a(\"carried\", (short) this.bV());\n nbttagcompound.a(\"carriedData\", (short) this.bW());\n protected Entity bL() {\n if (this.bV() == 0) {\n this.q.f(i0, i1, i2, this.bV(), this.bW(), 3);\n this.bT();\n if (this.F() || this.ae()) {\n this.bT();\n if (this.bX() && !this.bv && this.ab.nextInt(100) == 0) {\n if (!this.q.I && this.S()) {\n this.bT();\n public boolean bT() { // CanaryMod: protected -> public\n return this.bX() ? \"mob.endermen.scream\" : \"mob.endermen.idle\";\n protected String aN() {\n protected String aO() {\n public int bV() {\n public int bW() {\n if (this.aq()) {\n if (this.bT()) {\n public boolean bX() {\n /* CanaryMod: Disable all default allowed pick ups\n static {\n // br[Block.z.cF] = true;\n // br[Block.A.cF] = true;\n // br[Block.J.cF] = true;\n // br[Block.K.cF] = true;\n // br[Block.ai.cF] = true;\n // br[Block.aj.cF] = true;\n // br[Block.ak.cF] = true;\n // br[Block.al.cF] = true;\n // br[Block.ar.cF] = true;\n // br[Block.ba.cF] = true;\n // br[Block.bb.cF] = true;\n // br[Block.bf.cF] = true;\n // br[Block.bw.cF] = true;\n // br[Block.bD.cF] = true;",
"signature": "void ay()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHanging.java",
"implementation": "return false;",
"signature": "boolean O()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "this.cJ();\n public int bU() {\n public String am() {\n if (this.bB()) {\n return this.bA();\n int i0 = this.bT();\n public boolean bV() {\n public boolean bW() {\n public boolean ca() {\n return this.bV();",
"signature": "int bT()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "return this.ah.e(21);\n public float cc() {\n this.a(this.cc());\n public boolean cd() {\n public void i(boolean flag0) {\n public void j(boolean flag0) {\n public boolean bG() {\n return !this.cy() && super.bG();\n protected void o(float f0) {\n if (f0 > 6.0F && this.cg()) {\n this.o(false);",
"signature": "String cb()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "public int cf() {\n public boolean cg() {\n public boolean ch() {\n public boolean ci() {\n public boolean cj() {\n this.cJ();\n public void k(boolean flag0) {\n public void l(boolean flag0) {\n public void m(boolean flag0) {\n public void n(boolean flag0) {\n public int ck() {\n int i1 = MathHelper.a(this.ck() + i0, 0, this.cq());\n return this.n != null && this.n.equals(entity) ? false : super.a(damagesource, f0);\n public int aP() {\n return by[this.cf()];\n public boolean cl() {\n public void cm() {\n if (!this.q.I && this.ce()) {\n this.l(false);\n private void cF() {\n this.cM();\n private int cG() {\n int i0 = this.bT();\n return this.ce() && (i0 == 1 || i0 == 2) ? 17 : 2;\n private void cH() {\n this.bG = new AnimalChest(\"HorseChest\", this.cG());\n this.bG.a(this.am());\n this.cI();\n private void cI() {\n this.n(this.bG.a(0) != null);\n if (this.cv()) {\n int i0 = this.cf();\n boolean flag0 = this.co();\n this.cI();\n if (i0 == 0 && i0 != this.cf()) {\n if (!flag0 && this.co()) {\n public boolean bs() {\n this.cl();\n return super.bs();\n public double cn() {\n protected String aO() {\n this.cM();\n int i0 = this.bT();\n int i0 = this.bT();\n protected String aN() {\n this.cM();\n this.cO();\n int i0 = this.bT();\n public boolean co() {\n this.cM();\n if (this.ab.nextInt(10) == 0 && !this.bb()) {\n this.cO();\n int i0 = this.bT();\n protected String cp() {\n this.cM();\n this.cO();\n int i0 = this.bT();\n int i4 = this.bT();\n protected void ay() {\n super.ay();\n this.aW().b(bv);\n public int bv() {\n public int cq() {\n protected float aZ() {\n private void cJ() {\n if (!this.q.I && (this.n == null || this.n == entityplayer) && this.bW()) {\n this.bG.a(this.am());",
"signature": "boolean ce()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "return this.bT() == 0;\n public boolean cw() {\n int i0 = this.bT();\n protected boolean bb() {\n return this.n != null && this.co() ? true : this.cg() || this.ch();\n public boolean cy() {\n int i0 = this.bT();\n public boolean cz() {\n return this.cy() || this.bT() == 2;\n private void cL() {\n this.cE();\n this.cL();\n if (!this.cg() && this.n == null && this.ab.nextInt(300) == 0 && this.q.a(MathHelper.c(this.u), MathHelper.c(this.v) - 1, MathHelper.c(this.w)) == Block.z.cF) {\n this.o(true);\n if (this.cg() && ++this.bD > 50) {\n this.o(false);\n if (this.ci() && !this.bV() && !this.cg()) {\n this.cJ();\n this.p(false);\n if (this.cg()) {\n if (this.ch()) {\n private void cM() {\n private boolean cN() {\n return this.n == null && this.o == null && this.bW() && this.bV() && !this.cz() && this.aM() >= this.aS();\n public void o(boolean flag0) {\n public void p(boolean flag0) {\n this.o(false);\n private void cO() {\n this.p(true);\n public void cD() {\n this.cO();\n String s0 = this.cp();\n this.a(s0, this.aZ(), this.ba());\n public void cE() {\n this.cm();\n this.i(true);\n if (this.n != null && this.co()) {\n if (this.F && this.bt == 0.0F && this.ch() && !this.bI) {\n if (this.bt > 0.0F && !this.cd() && this.F) {\n this.y = this.cn() * (double) this.bt;\n this.j(true);\n this.aR = this.bf() * 0.1F;\n this.j(false);\n nbttagcompound.a(\"EatingHaystack\", this.cg());\n nbttagcompound.a(\"ChestedHorse\", this.ce());\n nbttagcompound.a(\"HasReproduced\", this.cj());\n nbttagcompound.a(\"Bred\", this.ci());\n nbttagcompound.a(\"Type\", this.bT());\n nbttagcompound.a(\"Variant\", this.bU());\n nbttagcompound.a(\"Temper\", this.ck());\n nbttagcompound.a(\"Tame\", this.bW());\n nbttagcompound.a(\"OwnerName\", this.cb());\n if (this.ce()) {\n this.o(nbttagcompound.n(\"EatingHaystack\"));\n this.k(nbttagcompound.n(\"Bred\"));\n this.l(nbttagcompound.n(\"ChestedHorse\"));\n this.m(nbttagcompound.n(\"HasReproduced\"));\n this.i(nbttagcompound.n(\"Tame\"));\n if (nbttagcompound.b(\"OwnerName\")) {\n this.b(nbttagcompound.i(\"OwnerName\"));",
"signature": "boolean cv()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "if (this.co()) {\n if (i0 < 0) {\n i0 = 0;",
"signature": "boolean be()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "this.aW().b(SharedMonsterAttributes.a);\n this.aW().b(SharedMonsterAttributes.c);\n this.aW().b(SharedMonsterAttributes.d);\n if (!this.be()) {\n public boolean az() {\n if (this.S() && this.T()) {\n DamageHook hook = (DamageHook) new DamageHook(null, entity, new CanaryDamageSource(DamageSource.d), 1.0F).call();\n if (this.S() && this.a(Material.h)) {\n if (!this.az() && !this.i(Potion.o.H) && !flag0) {\n this.g(this.h(this.ak()));\n if (this.ak() == -20) {\n DamageHook hook = (DamageHook) new DamageHook(null, entity, new CanaryDamageSource(DamageSource.e), 2.0F).call();\n if (!this.q.I && this.af() && this.o instanceof EntityLivingBase) {\n if (this.aM() <= 0.0F) {\n this.aA();\n if (this.bn != null && !this.bn.S()) {\n if (this.i != null && !this.i.S()) {\n this.b((EntityLivingBase) null);\n this.aI();\n protected void aA() {\n if (!this.q.I && (this.aT > 0 || this.aB()) && !this.g_() && this.q.O().b(\"doMobLoot\")) {\n protected boolean aB() {\n public Random aC() {\n public EntityLivingBase aD() {\n public int aE() {\n return this.j;",
"signature": "void ay()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "public int aG() {\n return this.bo;",
"signature": "EntityLivingBase aF()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "nbttagcompound.a(\"HealF\", this.aM());\n nbttagcompound.a(\"Health\", (short) ((int) Math.ceil((double) this.aM())));\n nbttagcompound.a(\"AbsorptionAmount\", this.bm());\n ItemStack[] aitemstack = this.ad();\n nbttagcompound.a(\"Attributes\", (NBTBase) SharedMonsterAttributes.a(this.aW()));\n aitemstack = this.ad();\n SharedMonsterAttributes.a(this.aW(), nbttagcompound.m(\"Attributes\"), this.q == null ? null : this.q.Y());\n this.g(this.aS());\n protected void aI() {\n this.b(potioneffect);\n this.a(potioneffect, false);\n if (!this.ai()) {\n public void aJ() {\n this.b(potioneffect);\n public Collection aK() {\n public void c(PotionEffect potioneffect) {\n if (this.d(potioneffect)) {\n if (this.d(potioneffect)) {\n this.a((PotionEffect) this.f.get(Integer.valueOf(potioneffect.a())), true);\n public boolean d(PotionEffect potioneffect) {\n if (this.aX() == EnumCreatureAttribute.b) {\n public boolean aL() {\n return this.aX() == EnumCreatureAttribute.b;\n this.b(potioneffect);\n Potion.a[potioneffect.a()].b(this, this.aW(), potioneffect.c());\n protected void a(PotionEffect potioneffect, boolean flag0) {\n if (flag0 && !this.q.I) {\n Potion.a[potioneffect.a()].a(this, this.aW(), potioneffect.c());\n Potion.a[potioneffect.a()].b(this, this.aW(), potioneffect.c());\n protected void b(PotionEffect potioneffect) {\n Potion.a[potioneffect.a()].a(this, this.aW(), potioneffect.c());\n float f1 = this.aM();\n public final float aM() {\n this.ah.b(6, Float.valueOf(MathHelper.a(f0, 0.0F, this.aS())));\n if (this.aq()) {\n if (this.aM() <= 0.0F) {\n this.ax = this.aM();\n if (entitywolf.bT()) {\n if (this.aM() <= 0.0F) {\n this.a(this.aO(), this.aZ(), this.ba());\n this.a(this.aN(), this.aZ(), this.ba());\n EntityLivingBase entitylivingbase = this.aR();\n protected String aN() {\n protected String aO() {\n public boolean S() {\n return !this.M && this.aM() > 0.0F;\n public int aP() {\n ItemStack[] aitemstack = this.ad();\n int i0 = 25 - this.aP();\n i0 = EnchantmentHelper.a(this.ad(), damagesource);\n if (!this.aq()) {\n f0 = Math.max(f0 - this.bm(), 0.0F);\n this.m(this.bm() - (f1 - f0));\n float f2 = this.aM();\n this.aQ().a(damagesource, f2, f0);\n this.m(this.bm() - f0);\n public CombatTracker aQ() {\n public EntityLivingBase aR() {\n public final float aS() {\n public final int aT() {\n public void aU() {\n protected void aV() {\n return this.aW().a(attribute);\n public BaseAttributeMap aW() {\n this.d = new ServersideAttributeMap();\n public EnumCreatureAttribute aX() {\n public abstract ItemStack aY();\n AttributeInstance attributeinstance = this.a(SharedMonsterAttributes.d);\n if (attributeinstance.a(b) != null) {",
"signature": "int aH()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "protected float ba() {\n protected boolean bb() {\n return this.aM() <= 0.0F;\n protected void bd() {\n if (this.ah()) {\n this.a(f0, f1, this.be() ? 0.04F : 0.02F);\n f4 = this.bf() * f3;\n boolean flag0 = this.ag() && this instanceof EntityPlayer;\n protected boolean be() {\n public float bf() {\n return this.be() ? this.bp : 0.1F;\n this.bp = f0;\n public boolean bg() {\n int i0 = this.aT();\n if (this.bq > 0) {\n --this.bq;",
"signature": "float aZ()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "",
"signature": "void bh()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "public void U() {\n super.U();\n protected void bj() {",
"signature": "void bi()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "public Vec3 Z() {\n public boolean bl() {\n public float ao() {\n public float bm() {\n return this.br;\n this.br = f0;",
"signature": "void bk()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "return null;",
"signature": "Team bn()"
},
{
"arguments": [
"EntityLivingBase entitylivingbase"
],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "return this.a(entitylivingbase.bn());",
"signature": "boolean c(EntityLivingBase entitylivingbase)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityOcelot.java",
"implementation": "return !this.bT() && this.ac > 2400;\n public boolean be() {\n protected void ay() {\n super.ay();\n nbttagcompound.a(\"CatType\", this.ca());\n return this.bT() ? (this.bY() ? \"mob.cat.purr\" : (this.ab.nextInt(4) == 0 ? \"mob.cat.purreow\" : \"mob.cat.meow\")) : \"\";\n protected String aN() {\n protected String aO() {\n protected float aZ() {\n if (this.aq()) {\n if (this.bT()) {\n this.bp.a(!this.bU());\n this.j(true);\n this.i(true);\n this.i(false);\n if (this.bT()) {\n entityocelot.j(true);\n entityocelot.p(this.ca());",
"signature": "void bj()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityPig.java",
"implementation": "protected void ay() {\n super.ay();\n protected void bh() {\n super.bh();\n public boolean by() {\n ItemStack itemstack = ((EntityPlayer) this.n).aY();\n nbttagcompound.a(\"Saddle\", this.bT());\n this.i(nbttagcompound.n(\"Saddle\"));\n protected String aN() {\n protected String aO() {",
"signature": "boolean be()"
},
{
"arguments": [
"TileEntity tileentity"
],
"filename": "src/main/java/net/minecraft/server/EntityPlayerMP.java",
"implementation": "if (tileentity instanceof TileEntitySign) {\n ((TileEntitySign) tileentity).a((EntityPlayer) this);\n this.a.b(new Packet133TileEditorOpen(0, tileentity.l, tileentity.m, tileentity.n));",
"signature": "void a(TileEntity tileentity)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntitySilverfish.java",
"implementation": "super.ay();\n protected Entity bL() {\n protected String aN() {\n protected String aO() {\n if (this.aq()) {\n protected void bk() {\n super.bk();\n if (this.j == null && !this.bM()) {\n this.bK();",
"signature": "void ay()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntitySpider.java",
"implementation": "super.ay();\n protected Entity bL() {\n protected String aN() {\n protected String aO() {\n return this.bT();\n public void al() {",
"signature": "void ay()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWitch.java",
"implementation": "protected String aO() {\n public boolean bT() {\n protected void ay() {\n super.ay();\n public boolean be() {\n if (this.bT()) {\n ItemStack itemstack = this.aY();\n this.c(new PotionEffect(potioneffect));\n if (this.ab.nextFloat() < 0.15F && this.ae() && !this.a(Potion.n)) {",
"signature": "String aN()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWither.java",
"implementation": "protected String aO() {\n if (this.v < entity.v || !this.bV() && this.v < entity.v + 5.0D) {\n boolean flag0 = this.bV();\n if (this.bU() > 0) {\n protected void bh() {\n if (this.bU() > 0) {\n i0 = this.bU() - 1;\n super.bh();\n if (entity != null && entity.S() && this.e(entity) <= 900.0D && this.o(entity)) {\n if (entitylivingbase != this && entitylivingbase.S() && this.o(entitylivingbase)) {\n public void bT() {\n this.g(this.aS() / 3.0F);\n public void al() {",
"signature": "String aN()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWither.java",
"implementation": "if (this.aq()) {",
"signature": "int aP()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWither.java",
"implementation": "public void c(PotionEffect potioneffect) {",
"signature": "void bo()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "super.ay();\n if (this.bT()) {\n public boolean be() {\n public void d(EntityLivingBase entitylivingbase) {\n super.d(entitylivingbase);\n this.l(false);",
"signature": "void ay()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "this.ah.b(18, Float.valueOf(this.aM()));\n this.ah.a(18, new Float(this.aM()));\n nbttagcompound.a(\"Angry\", this.cc());\n nbttagcompound.a(\"CollarColor\", (byte) this.cd());\n this.l(nbttagcompound.n(\"Angry\"));\n return this.cc() ? \"mob.wolf.growl\" : (this.ab.nextInt(3) == 0 ? (this.bT() && this.ah.d(18) < 10.0F ? \"mob.wolf.whine\" : \"mob.wolf.panting\") : \"mob.wolf.bark\");\n protected String aN() {\n protected String aO() {\n protected float aZ() {\n if (!this.q.I && this.bs && !this.bt && !this.bM() && this.F) {\n if (this.ce()) {\n if (this.ce()) {\n this.a(\"mob.wolf.shake\", this.aZ(), (this.ab.nextFloat() - this.ab.nextFloat()) * 0.2F + 1.0F);\n public int bp() {\n return this.bU() ? 20 : super.bp();\n if (this.aq()) {\n int i0 = this.bT() ? 4 : 2;\n public void j(boolean flag0) {\n super.j(flag0);\n if (this.bT()) {\n if (i0 != this.cd()) {\n this.bp.a(!this.bU());\n this.b((Entity) null);\n this.d((EntityLivingBase) null);",
"signature": "void bj()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "public boolean cc() {\n public void l(boolean flag0) {\n public int cd() {\n entitywolf.j(true);\n public void m(boolean flag0) {",
"signature": "int bv()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "return !this.bT() && this.ac > 2400;",
"signature": "boolean ce()"
},
{
"arguments": [
"EntityLivingBase entitylivingbase",
" EntityLivingBase entitylivingbase1"
],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "if (!(entitylivingbase instanceof EntityCreeper) && !(entitylivingbase instanceof EntityGhast)) {\n if (entitylivingbase instanceof EntityWolf) {\n EntityWolf entitywolf = (EntityWolf) entitylivingbase;\n\n if (entitywolf.bT() && entitywolf.bV() == entitylivingbase1) {\n return false;",
"signature": "boolean a(EntityLivingBase entitylivingbase, EntityLivingBase entitylivingbase1)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityZombie.java",
"implementation": "super.ay();\n this.aW().b(bp).a(this.ab.nextDouble() * 0.10000000149011612D);\n public int aP() {\n int i0 = super.aP() + 2;\n protected boolean be() {\n public boolean bT() {\n public void i(boolean flag0) {\n if (entitylivingbase == null && this.bN() instanceof EntityLivingBase) {\n entitylivingbase = (EntityLivingBase) this.bN();\n entityzombie.d(entitylivingbase);\n if (!this.q.I && this.bV()) {\n int i0 = this.bX();\n this.bW();\n if (flag0 && this.aY() == null && this.ae() && this.ab.nextFloat() < (float) this.q.r * 0.3F) {\n protected String aN() {\n protected String aO() {\n public EnumCreatureAttribute aX() {\n protected void bw() {\n super.bw();\n if (this.bT()) {\n nbttagcompound.a(\"ConversionTime\", this.bV() ? this.bs : -1);\n this.i(true);\n entityzombie.i(true);\n Object object = super.a(entitylivingdata);\n if (object == null) {\n object = new EntityZombieGroupData(this, this.q.s.nextFloat() < 0.05F, this.q.s.nextFloat() < 0.05F, (EntityZombieINNER1) null);\n if (object instanceof EntityZombieGroupData) {\n EntityZombieGroupData entityzombiegroupdata = (EntityZombieGroupData) object;\n\n if (entityzombiegroupdata.b) {\n this.i(true);",
"signature": "void ay()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/NetLoginHandler.java",
"implementation": "this.e();\n this.e.an().a(\"Disconnecting \" + this.f() + \": \" + s0);\n if (packet2clientprotocol.d() != 74) {\n if (packet2clientprotocol.d() > 74) {\n public void e() {\n this.e.an().a(this.f() + \" lost connection\");\n public String f() {\n public boolean c() {\n return this.b;",
"signature": "void d()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/NetServerHandler.java",
"implementation": "this.c.o.V();\n this.c.X = 0.0F;\n this.c.o.V();\n if (this.c.bg()) {\n double d4;\n\n if (!this.c.bg() && (d4 > 1.65D || d4 < 0.1D)) {\n double d5 = d2 - this.c.v;\n double d6 = d3 - this.c.w;\n double d7 = Math.min(Math.abs(d4), Math.abs(this.c.x));\n double d8 = Math.min(Math.abs(d5), Math.abs(this.c.y));\n double d9 = Math.min(Math.abs(d6), Math.abs(this.c.z));\n double d10 = d7 * d7 + d8 * d8 + d9 * d9;\n\n if (d10 > 100.0D && (!this.d.K() || !this.d.J().equals(this.c.c_()))) {\n this.d.an().b(this.c.c_() + \" moved too quickly! \" + d4 + \",\" + d5 + \",\" + d6 + \" (\" + d7 + \", \" + d8 + \", \" + d9 + \")\");\n if (this.c.F && !packet10flying.g && d5 > 0.0D) {\n this.c.d(d4, d5, d6);\n this.c.j(d4, d5, d6);\n double d11 = d5;\n d5 = d2 - this.c.v;\n if (d5 > -0.5D || d5 < 0.5D) {\n d5 = 0.0D;\n d6 = d3 - this.c.w;\n d10 = d4 * d4 + d5 * d5 + d6 * d6;\n if (d10 > 0.0625D && !this.c.bg() && !this.c.c.d()) {\n if (flag0 && (flag1 || !flag2) && !this.c.bg()) {\n if (d11 >= -0.03125D) {\n this.c.bs();\n ChatMessageComponent chatmessagecomponent = ChatMessageComponent.b(\"chat.type.text\", new Object[] { this.c.ax(), s0",
"signature": "void e()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/NetServerHandler.java",
"implementation": "if (this.c.aM() > 0.0F) {\n if (!tileentitysign.a() || tileentitysign.b() != this.c) {\n public boolean c() {\n return this.b;",
"signature": "int f()"
},
{
"arguments": [
"String s0"
],
"filename": "src/main/java/net/minecraft/server/ScorePlayerTeam.java",
"implementation": "return this.e() + s0 + this.f();",
"signature": "String d(String s0)"
},
{
"arguments": [
"ChatMessageComponent chatmessagecomponent"
],
"filename": "src/main/java/net/minecraft/server/ServerConfigurationManager.java",
"implementation": "this.a(chatmessagecomponent, true);",
"signature": "void a(ChatMessageComponent chatmessagecomponent)"
},
{
"arguments": [
"EntityPlayer entityplayer"
],
"filename": "src/main/java/net/minecraft/server/TileEntitySign.java",
"implementation": "this.d = entityplayer;",
"signature": "void a(EntityPlayer entityplayer)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/TileEntitySign.java",
"implementation": "return this.d;",
"signature": "EntityPlayer b()"
}
] | [
{
"arguments": [
"ICommandSender icommandsender"
],
"filename": "src/main/java/net/minecraft/server/CommandBase.java",
"implementation": "// return \"/\" + this.c();\n //",
"signature": "String a(ICommandSender icommandsender)"
},
{
"arguments": [
"ICommandSender icommandsender",
" String s0",
" double d0",
"\n double d1"
],
"filename": "src/main/java/net/minecraft/server/CommandBase.java",
"implementation": "throw new NumberInvalidException(\n \"commands.generic.double.tooSmall\", new Object[]{\n Double.valueOf(d2), Double.valueOf(d0)",
"signature": "double a(ICommandSender icommandsender, String s0, double d0,\n double d1)"
},
{
"arguments": [
"ICommandSender icommandsender",
" double d0",
" String s0",
"\n int i0",
" int i1"
],
"filename": "src/main/java/net/minecraft/server/CommandBase.java",
"implementation": "throw new NumberInvalidException(\"commands.generic.num.invalid\",\n new Object[]{ Double.valueOf(d0)",
"signature": "double a(ICommandSender icommandsender, double d0, String s0,\n int i0, int i1)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/Entity.java",
"implementation": "public void P() {",
"signature": "String O()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/Entity.java",
"implementation": "public boolean S() {\n public void T() {\n this.o.U();\n this.A = (float) ((double) this.A + d0);\n this.B = (float) ((double) this.B + d1);\n public void U() {\n this.n.b(this.u, this.v + this.W() + this.n.V(), this.w);\n public double V() {\n public double W() {\n public float X() {\n public Vec3 Y() {\n public void Z() {\n this.ao = this.aa();\n public int aa() {\n public ItemStack[] ac() {\n public boolean ad() {\n public boolean ae() {\n public boolean af() {\n public boolean ag() {\n public boolean ah() {\n public int aj() {\n public void ak() {\n public String al() {\n public Entity[] am() {\n public float an() {\n public boolean ao() {\n return String.format(\"%s[\\'%s\\'/%d, l=\\'%s\\', x=%.2f, y=%.2f, z=%.2f]\", new Object[]{ this.getClass().getSimpleName(), this.al(), Integer.valueOf(this.k), this.q == null ? \"~NULL~\" : this.q.N().k(), Double.valueOf(this.u), Double.valueOf(this.v), Double.valueOf(this.w)",
"signature": "boolean R()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityBat.java",
"implementation": "protected float aX() {\n return super.aX() * 0.95F;\n return this.bF() && this.ab.nextInt(4) != 0 ? null : \"mob.bat.idle\";\n protected String aK() {\n protected String aL() {\n protected void bf() {",
"signature": "float aW()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityCreature.java",
"implementation": "protected void bh() {\n this.bn = this.bF();\n Entity entity = this.bH();",
"signature": "boolean bF()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityCreature.java",
"implementation": "protected Entity bH() {\n public boolean bo() {\n return super.bo() && this.a(i0, i1, i2) >= 0.0F;\n public boolean bI() {\n public Entity bJ() {\n public boolean bK() {\n public ChunkCoordinates bL() {\n public float bM() {\n public void bN() {\n public boolean bO() {\n protected void bB() {\n super.bB();\n if (this.bD() && this.bE() != null && this.bE().q == this.q) {\n Entity entity = this.bE();\n if (this instanceof EntityTameable && ((EntityTameable) this).bQ()) {\n this.i(true);\n this.i(true);",
"signature": "void bG()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityDragon.java",
"implementation": "super.ax();\n if (this.aJ() <= 0.0F) {\n if (this.aJ() <= 0.0F) {\n this.bF();\n this.bG();\n private void bF() {",
"signature": "void ax()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityDragon.java",
"implementation": "protected void az() {\n protected void bk() {",
"signature": "void bG()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityEnderman.java",
"implementation": "super.ax();\n nbttagcompound.a(\"carried\", (short) this.bR());\n nbttagcompound.a(\"carriedData\", (short) this.bS());\n protected Entity bH() {\n if (this.bR() == 0) {\n this.q.f(i0, i1, i2, this.bR(), this.bS(), 3);\n this.bP();\n if (this.F() || this.ad()) {\n this.bP();\n if (this.bT() && !this.bv && this.ab.nextInt(100) == 0) {\n if (!this.q.I && this.R()) {\n this.bP();\n public boolean bP() { // CanaryMod: protected -> public\n return this.bT() ? \"mob.endermen.scream\" : \"mob.endermen.idle\";\n protected String aK() {\n protected String aL() {\n public int bR() {\n public int bS() {\n if (this.ap()) {\n if (this.bP()) {\n public boolean bT() {\n static {\n // CanaryMod: Disable all default allowed pick ups\n // br[Block.z.cF] = true;\n // br[Block.A.cF] = true;\n // br[Block.J.cF] = true;\n // br[Block.K.cF] = true;\n // br[Block.ai.cF] = true;\n // br[Block.aj.cF] = true;\n // br[Block.ak.cF] = true;\n // br[Block.al.cF] = true;\n // br[Block.ar.cF] = true;\n // br[Block.ba.cF] = true;\n // br[Block.bb.cF] = true;\n // br[Block.bf.cF] = true;\n // br[Block.bw.cF] = true;\n // br[Block.bD.cF] = true;",
"signature": "void ax()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "this.cF();\n public int bQ() {\n public String al() {\n if (this.bx()) {\n return this.bw();\n int i0 = this.bP();\n public boolean bR() {\n public boolean bS() {\n public boolean bW() {\n return this.bR();\n public float bY() {\n this.a(this.bY());\n public boolean bZ() {\n public void j(boolean flag0) {\n public void k(boolean flag0) {\n public boolean bC() {\n return !this.cu() && super.bC();\n public boolean ca() {\n public int cb() {\n public boolean cc() {\n public boolean cd() {\n public boolean ce() {\n public boolean cf() {\n this.cF();\n public void l(boolean flag0) {\n public void m(boolean flag0) {\n public void n(boolean flag0) {\n public void o(boolean flag0) {\n public int cg() {\n int i1 = MathHelper.a(this.cg() + i0, 0, this.cm());\n if (this.n != null && this.n.equals(entity)) {\n return false;",
"signature": "int bP()"
},
{
"arguments": [
"entity instanceof EntityWolf"
],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "((EntityWolf) entity).b((Entity) null);\n return false;",
"signature": "else if (entity instanceof EntityWolf)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "return by[this.cb()];\n public boolean ch() {\n public void ci() {\n if (!this.q.I && this.ca()) {\n this.m(false);\n private void cB() {\n this.cI();\n private int cC() {\n int i0 = this.bP();\n return this.ca() && (i0 == 1 || i0 == 2) ? 17 : 2;\n private void cD() {\n this.bG = new AnimalChest(\"HorseChest\", this.cC());\n this.bG.a(this.al());\n this.cE();\n private void cE() {\n this.o(this.bG.a(0) != null);\n if (this.cr()) {\n int i0 = this.cb();\n boolean flag0 = this.ck();\n this.cE();\n if (i0 == 0 && i0 != this.cb()) {\n if (!flag0 && this.ck()) {\n public boolean bo() {\n this.ch();\n return super.bo();\n public double cj() {\n protected String aL() {\n this.cI();\n int i0 = this.bP();\n int i0 = this.bP();\n protected String aK() {\n this.cI();\n this.cK();\n int i0 = this.bP();\n public boolean ck() {\n this.cI();\n if (this.ab.nextInt(10) == 0 && !this.aY()) {\n this.cK();\n int i0 = this.bP();\n protected String cl() {\n this.cI();\n this.cK();\n int i0 = this.bP();\n int i4 = this.bP();\n protected void ax() {\n super.ax();\n this.aT().b(bv);\n public int br() {\n public int cm() {\n protected float aW() {\n private void cF() {\n if (!this.q.I && (this.n == null || this.n == entityplayer) && this.bS()) {\n this.bG.a(this.al());",
"signature": "int aM()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "return this.bP() == 0;\n public boolean cs() {\n int i0 = this.bP();\n protected boolean aY() {\n return this.n != null && this.ck() ? true : this.cc() || this.cd();\n public boolean cu() {\n int i0 = this.bP();\n public boolean cv() {\n return this.cu() || this.bP() == 2;\n private void cH() {\n this.cA();\n this.cH();\n if (!this.cc() && this.n == null && this.ab.nextInt(300) == 0 && this.q.a(MathHelper.c(this.u), MathHelper.c(this.v) - 1, MathHelper.c(this.w)) == Block.z.cF) {\n this.p(true);\n if (this.cc() && ++this.bD > 50) {\n this.p(false);\n if (this.ce() && !this.bR() && !this.cc()) {\n this.cF();\n this.q(false);\n if (this.cc()) {\n if (this.cd()) {\n private void cI() {\n private boolean cJ() {\n return this.n == null && this.o == null && this.bS() && this.bR() && !this.cv() && this.aJ() >= this.aP();",
"signature": "boolean cr()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "if (this.q.I || !this.bS() && !this.ce() || this.aJ() <= 0.0F) {\n super.w();",
"signature": "void w()"
},
{
"arguments": [
"boolean flag0"
],
"filename": "src/main/java/net/minecraft/server/EntityHorse.java",
"implementation": "public void q(boolean flag0) {\n this.p(false);\n private void cK() {\n this.q(true);\n public void cz() {\n this.cK();\n String s0 = this.cl();\n this.a(s0, this.aW(), this.aX());\n public void cA() {\n this.ci();\n this.j(true);\n if (this.n != null && this.ck()) {\n if (this.F && this.bt == 0.0F && this.cd() && !this.bI) {\n if (this.bt > 0.0F && !this.bZ() && this.F) {\n this.y = this.cj() * (double) this.bt;\n this.k(true);\n this.aR = this.bc() * 0.1F;\n this.k(false);\n nbttagcompound.a(\"EatingHaystack\", this.cc());\n nbttagcompound.a(\"ChestedHorse\", this.ca());\n nbttagcompound.a(\"HasReproduced\", this.cf());\n nbttagcompound.a(\"Bred\", this.ce());\n nbttagcompound.a(\"Type\", this.bP());\n nbttagcompound.a(\"Variant\", this.bQ());\n nbttagcompound.a(\"Temper\", this.cg());\n nbttagcompound.a(\"Tame\", this.bS());\n if (this.ca()) {\n this.p(nbttagcompound.n(\"EatingHaystack\"));\n this.l(nbttagcompound.n(\"Bred\"));\n this.m(nbttagcompound.n(\"ChestedHorse\"));\n this.n(nbttagcompound.n(\"HasReproduced\"));\n this.j(nbttagcompound.n(\"Tame\"));\n AttributeInstance attributeinstance = this.aT().a(\"Speed\");\n if (this.ca()) {\n this.cD();\n this.cE();\n if (this.cJ() && entityhorse.cJ()) {\n int i0 = this.bP();\n int i1 = entityhorse.bP();\n int i0 = this.bP();\n int i1 = entityhorse.bP();\n i4 = this.bQ() & 255;\n i4 = entityhorse.bQ() & 255;\n i4 |= this.bQ() & '\\uff00';\n i4 |= entityhorse.bQ() & '\\uff00';\n double d0 = this.a(SharedMonsterAttributes.a).b() + entityageable.a(SharedMonsterAttributes.a).b() + (double) this.cL();\n double d1 = this.a(bv).b() + entityageable.a(bv).b() + this.cM();\n double d2 = this.a(SharedMonsterAttributes.d).b() + entityageable.a(SharedMonsterAttributes.d).b() + this.cN();\n this.a(SharedMonsterAttributes.a).a((double) this.cL());\n this.a(SharedMonsterAttributes.d).a(this.cN());\n this.a(bv).a(this.cM());\n this.g(this.aP());\n protected boolean bb() {\n if (i0 < 0) {\n i0 = 0;",
"signature": "void p(boolean flag0)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "this.aT().b(SharedMonsterAttributes.a);\n this.aT().b(SharedMonsterAttributes.c);\n this.aT().b(SharedMonsterAttributes.d);\n if (!this.bb()) {\n public boolean ay() {\n if (this.R() && this.S()) {\n DamageHook hook = (DamageHook) new DamageHook(null, entity, new CanaryDamageSource(DamageSource.d), 1).call();\n if (this.R() && this.a(Material.h)) {\n if (!this.ay() && !this.i(Potion.o.H) && !flag0) {\n this.g(this.h(this.aj()));\n if (this.aj() == -20) {\n DamageHook hook = (DamageHook) new DamageHook(null, entity, new CanaryDamageSource(DamageSource.e), 2).call();\n if (!this.q.I && this.ae() && this.o instanceof EntityLivingBase) {\n if (this.aJ() <= 0.0F) {\n this.az();\n if (this.bn != null && !this.bn.R()) {\n if (this.i != null) {\n if (!this.i.R()) {\n this.b((EntityLivingBase) null);",
"signature": "void ax()"
},
{
"arguments": [
"this.j > 0"
],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "--this.j;",
"signature": "else if (this.j > 0)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "if (!this.q.I && (this.aT > 0 || this.aA()) && !this.g_() && this.q.O().b(\"doMobLoot\")) {\n protected boolean aA() {\n public Random aB() {\n public EntityLivingBase aC() {\n this.j = this.i != null ? 100 : 0;\n public EntityLivingBase aD() {\n public int aE() {\n nbttagcompound.a(\"HealF\", this.aJ());\n nbttagcompound.a(\"Health\", (short) ((int) Math.ceil((double) this.aJ())));\n nbttagcompound.a(\"AbsorptionAmount\", this.bj());\n ItemStack[] aitemstack = this.ac();\n nbttagcompound.a(\"Attributes\", (NBTBase) SharedMonsterAttributes.a(this.aT()));\n aitemstack = this.ac();\n SharedMonsterAttributes.a(this.aT(), nbttagcompound.m(\"Attributes\"), this.q == null ? null : this.q.Y());\n this.g(this.aP());\n protected void aF() {\n this.c(potioneffect);\n this.b(potioneffect);\n if (!this.ah()) {\n public void aG() {\n this.c(potioneffect);\n public Collection aH() {\n public void d(PotionEffect potioneffect) {\n if (this.e(potioneffect)) {\n if (this.e(potioneffect)) {\n this.b((PotionEffect) this.f.get(Integer.valueOf(potioneffect.a())));\n public boolean e(PotionEffect potioneffect) {\n if (this.aU() == EnumCreatureAttribute.b) {\n public boolean aI() {\n return this.aU() == EnumCreatureAttribute.b;\n this.c(potioneffect);\n Potion.a[potioneffect.a()].b(this, this.aT(), potioneffect.c());\n protected void b(PotionEffect potioneffect) {\n if (!this.q.I) {\n Potion.a[potioneffect.a()].a(this, this.aT(), potioneffect.c());",
"signature": "void az()"
},
{
"arguments": [
"PotionEffect potioneffect"
],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "Potion.a[potioneffect.a()].a(this, this.aT(), potioneffect.c());\n float f1 = this.aJ();\n public final float aJ() {\n this.ah.b(6, Float.valueOf(MathHelper.a(f0, 0.0F, this.aP())));\n if (this.ap()) {\n if (this.aJ() <= 0.0F) {\n this.ax = this.aJ();\n if (entitywolf.bP()) {\n if (this.aJ() <= 0.0F) {\n this.a(this.aL(), this.aW(), this.aX());\n this.a(this.aK(), this.aW(), this.aX());\n EntityLivingBase entitylivingbase = this.aO();\n protected String aK() {\n protected String aL() {\n public boolean R() {\n return !this.M && this.aJ() > 0.0F;\n public int aM() {\n ItemStack[] aitemstack = this.ac();\n int i0 = 25 - this.aM();\n i0 = EnchantmentHelper.a(this.ac(), damagesource);\n if (!this.ap()) {\n f0 = Math.max(f0 - this.bj(), 0.0F);\n this.m(this.bj() - (f1 - f0));\n float f2 = this.aJ();\n this.aN().a(damagesource, f2, f0);\n this.m(this.bj() - f0);\n public CombatTracker aN() {\n public EntityLivingBase aO() {\n public final float aP() {\n public final int aQ() {\n public void aR() {\n protected void aS() {\n return this.aT().a(attribute);\n public BaseAttributeMap aT() {\n if (this.q != null && !this.q.I) {\n this.d = new ServersideAttributeMap();",
"signature": "void c(PotionEffect potioneffect)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "public abstract ItemStack aV();\n if (!this.q.I) {\n AttributeInstance attributeinstance = this.a(SharedMonsterAttributes.d);\n if (flag0) {\n attributeinstance.a(c);",
"signature": "EnumCreatureAttribute aU()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "protected float aX() {\n protected boolean aY() {\n return this.aJ() <= 0.0F;\n protected void ba() {\n if (this.ag()) {\n this.a(f0, f1, this.bb() ? 0.04F : 0.02F);\n f4 = this.bc() * f3;\n boolean flag0 = this.af() && this instanceof EntityPlayer;\n protected boolean bb() {\n public float bc() {\n return this.bb() ? this.bo : 0.1F;\n this.bo = f0;\n public boolean bd() {\n int i0 = this.aQ();\n if (this.bp > 0) {\n --this.bp;",
"signature": "float aW()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "",
"signature": "void be()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityLivingBase.java",
"implementation": "public void T() {\n super.T();\n protected void bg() {",
"signature": "void bf()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityOcelot.java",
"implementation": "return !this.bP() && this.ac > 2400;\n public boolean bb() {\n protected void ax() {\n super.ax();\n nbttagcompound.a(\"CatType\", this.bW());\n return this.bP() ? (this.bU() ? \"mob.cat.purr\" : (this.ab.nextInt(4) == 0 ? \"mob.cat.purreow\" : \"mob.cat.meow\")) : \"\";\n protected String aK() {\n protected String aL() {\n protected float aW() {\n if (this.ap()) {\n if (this.bP()) {\n this.bp.a(!this.bQ());\n this.k(true);\n this.j(true);\n this.j(false);\n if (this.bP()) {\n entityocelot.k(true);\n entityocelot.p(this.bW());",
"signature": "void bg()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityPig.java",
"implementation": "protected void ax() {\n super.ax();\n protected void be() {\n super.be();\n public boolean bu() {\n ItemStack itemstack = ((EntityPlayer) this.n).aV();\n nbttagcompound.a(\"Saddle\", this.bP());\n this.j(nbttagcompound.n(\"Saddle\"));\n protected String aK() {\n protected String aL() {",
"signature": "boolean bb()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityPlayer.java",
"implementation": "super.ax();\n this.aT().b(SharedMonsterAttributes.e).a(1.0D);\n public boolean bm() {\n public void bo() {\n this.bp();\n public void bp() {\n public boolean bq() {\n return this.bm() && Item.g[this.f.d].c_(this.f) == EnumAction.d;\n this.bp();\n if (this.bd()) {\n if (this.ad() && this.bG.a) {\n public int aa() {\n this.bp();\n protected boolean aY() {\n return this.aJ() <= 0.0F || this.bd();\n public void T() {\n if (!this.q.I && this.af()) {\n super.T();\n protected void bh() {\n super.bh();\n this.aS();\n if (this.q.r == 0 && this.aJ() < this.aP() && this.q.O().b(\"naturalRegeneration\") && this.ac % 20 * 12 == 0) {\n if (this.ag()) {\n if (!this.F || this.aJ() <= 0.0F) {\n if (this.F || this.aJ() <= 0.0F) {\n if (this.aJ() > 0.0F) {\n public int br() {\n int i1 = this.br();\n Collection collection = this.bH().a(ScoreObjectiveCriteria.e);\n collection.addAll(this.bH().a(ScoreObjectiveCriteria.d));\n Score score = this.bH().a(this.al(), scoreobjective);\n nbttagcompound.a(\"Score\", this.br());\n if (this.ap()) {\n if (this.aJ() <= 0.0F) {\n if (this.bd() && !this.q.I) {\n if (entity instanceof EntityLivingBase) {\n this.a((EntityLivingBase) entity, false);",
"signature": "void ax()"
},
{
"arguments": [
"EntityLivingBase entitylivingbase",
" boolean flag0"
],
"filename": "src/main/java/net/minecraft/server/EntityPlayer.java",
"implementation": "if (!(entitylivingbase instanceof EntityCreeper) && !(entitylivingbase instanceof EntityGhast)) {\n if (entitylivingbase instanceof EntityWolf) {\n EntityWolf entitywolf = (EntityWolf) entitylivingbase;\n\n if (entitywolf.bP() && this.bu.equals(entitywolf.h_())) {\n return;",
"signature": "void a(EntityLivingBase entitylivingbase, boolean flag0)"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityPlayer.java",
"implementation": "public float bs() {\n if (!this.ap()) {\n if (!damagesource.e() && this.bq() && f0 > 0.0F) {\n f0 = Math.max(f0 - this.bj(), 0.0F);\n this.m(this.bj() - (f1 - f0));\n float f2 = this.aJ();\n this.g(this.aJ() - f0);\n this.aN().a(damagesource, f2, f0);\n ItemStack itemstack = this.bt();\n this.bu();\n if (itemstack != null && itemstack == this.bt()) {\n this.bu();\n public ItemStack bt() {\n public void bu() {\n public double V() {\n if (entity.ao()) {\n if (this.ag()) {\n if (entity instanceof EntityLivingBase && i1 > 0 && !entity.ad()) {\n ItemStack itemstack = this.bt();\n this.bu();\n if (entity.R()) {\n this.a((EntityLivingBase) entity, true);",
"signature": "int aM()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntitySilverfish.java",
"implementation": "super.ax();\n protected Entity bH() {\n protected String aK() {\n protected String aL() {\n if (this.ap()) {\n protected void bh() {\n super.bh();\n if (this.j == null && !this.bI()) {\n this.bG();",
"signature": "void ax()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntitySpider.java",
"implementation": "super.ax();\n protected Entity bH() {\n protected String aK() {\n protected String aL() {\n return this.bP();\n public void ak() {",
"signature": "void ax()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWitch.java",
"implementation": "protected String aL() {\n public boolean bP() {\n protected void ax() {\n super.ax();\n public boolean bb() {\n if (this.bP()) {\n ItemStack itemstack = this.aV();\n this.d(new PotionEffect(potioneffect));\n if (this.ab.nextFloat() < 0.15F && this.ad() && !this.a(Potion.n)) {",
"signature": "String aK()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWither.java",
"implementation": "protected String aL() {\n if (this.v < entity.v || !this.bR() && this.v < entity.v + 5.0D) {\n boolean flag0 = this.bR();\n if (this.bQ() > 0) {\n protected void be() {\n if (this.bQ() > 0) {\n i0 = this.bQ() - 1;\n super.be();\n if (entity != null && entity.R() && this.e(entity) <= 900.0D && this.o(entity)) {\n if (entitylivingbase != this && entitylivingbase.R() && this.o(entitylivingbase)) {\n public void bP() {\n this.g(this.aP() / 3.0F);\n public void ak() {",
"signature": "String aK()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWither.java",
"implementation": "if (this.ap()) {",
"signature": "int aM()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWither.java",
"implementation": "public void d(PotionEffect potioneffect) {",
"signature": "void bk()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "super.ax();\n if (this.bP()) {\n public boolean bb() {\n public void c(EntityLivingBase entitylivingbase) {\n super.c(entitylivingbase);\n if (!this.bY()) {\n return;",
"signature": "void ax()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "this.ah.b(18, Float.valueOf(this.aJ()));\n this.ah.a(18, new Float(this.aJ()));\n nbttagcompound.a(\"Angry\", this.bY());\n nbttagcompound.a(\"CollarColor\", (byte) this.bZ());\n this.m(nbttagcompound.n(\"Angry\"));\n return this.bY() ? \"mob.wolf.growl\" : (this.ab.nextInt(3) == 0 ? (this.bP() && this.ah.d(18) < 10.0F ? \"mob.wolf.whine\" : \"mob.wolf.panting\") : \"mob.wolf.bark\");\n protected String aK() {\n protected String aL() {\n protected float aW() {\n if (!this.q.I && this.bs && !this.bt && !this.bI() && this.F) {\n if (this.ca()) {\n if (this.ca()) {\n this.a(\"mob.wolf.shake\", this.aW(), (this.ab.nextFloat() - this.ab.nextFloat()) * 0.2F + 1.0F);\n public int bl() {\n return this.bQ() ? 20 : super.bl();\n if (this.ap()) {\n int i0 = this.bP() ? 4 : 2;\n public void k(boolean flag0) {\n super.k(flag0);\n if (this.bP()) {\n if (i0 != this.bZ()) {\n this.bp.a(!this.bQ());",
"signature": "void bg()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/EntityWolf.java",
"implementation": "public boolean bY() {\n public void m(boolean flag0) {\n public int bZ() {\n entitywolf.k(true);\n public void n(boolean flag0) {",
"signature": "int br()"
},
{
"arguments": [],
"filename": "src/main/java/net/minecraft/server/NetServerHandler.java",
"implementation": "double d4;\n this.c.o.U();\n double d5 = 0.0D;\n\n d4 = 0.0D;\n if (packet10flying.h && packet10flying.b == -999.0D && packet10flying.d == -999.0D) {\n if (Math.abs(packet10flying.a) > 1.0D || Math.abs(packet10flying.c) > 1.0D) {\n System.err.println(this.c.c_() + \" was caught trying to crash the server with an invalid position.\");\n this.c(\"Nope!\");\n return;",
"signature": "void d()"
},
{
"arguments": [
"ChatMessageComponent chatmessagecomponent"
],
"filename": "src/main/java/net/minecraft/server/ServerConfigurationManager.java",
"implementation": "this.a(chatmessagecomponent, true);",
"signature": "void a(ChatMessageComponent chatmessagecomponent)"
},
{
"arguments": [
"Entity entity",
" boolean flag0"
],
"filename": "src/main/java/net/minecraft/server/WorldServer.java",
"implementation": "try {\n super.a(entity, flag0);",
"signature": "void b(Entity entity, boolean flag0)"
}
] |
42584cd5328fc55a499d318dda6fefff6459242c | [
{
"arguments": [],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "this(new MapWritable());",
"signature": "public SparseVector()"
},
{
"arguments": [
"MapWritable m"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "this.entries = m;",
"signature": "public SparseVector(MapWritable m)"
},
{
"arguments": [
"RowResult row"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "this.initMap(row);",
"signature": "public SparseVector(RowResult row)"
},
{
"arguments": [
"double alpha",
" Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "if (alpha == 0)\n return this;\n\n for (Map.Entry<Writable, Writable> e : v.getEntries().entrySet()) {\n if (this.entries.containsKey(e.getKey())) {\n // add\n double value = alpha * ((DoubleEntry) e.getValue()).getValue()\n + this.get(((IntWritable) e.getKey()).get());\n this.entries.put(e.getKey(), new DoubleEntry(value));",
"signature": "Vector add(double alpha, Vector v)"
},
{
"arguments": [
"Vector v2"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "for (Map.Entry<Writable, Writable> e : v2.getEntries().entrySet()) {\n int key = ((IntWritable) e.getKey()).get();\n if (this.entries.containsKey(e.getKey())) {\n this.add(key, ((DoubleEntry) e.getValue()).getValue());",
"signature": "SparseVector add(Vector v2)"
},
{
"arguments": [
"Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\n return 0;",
"signature": "double dot(Vector v)"
},
{
"arguments": [
"Norm type"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\n return 0;",
"signature": "double norm(Norm type)"
},
{
"arguments": [
"double alpha"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "for (Map.Entry<Writable, Writable> e : this.entries.entrySet()) {\n this.entries.put(e.getKey(), new DoubleEntry(((DoubleEntry) e.getValue())\n .getValue()\n * alpha));",
"signature": "SparseVector scale(double alpha)"
},
{
"arguments": [
"int index"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "double value;\n try {\n value = ((DoubleEntry) this.entries.get(new IntWritable(index)))\n .getValue();",
"signature": "double get(int index)"
},
{
"arguments": [
"int index",
" double value"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// If entries are null, create new object\n if (this.entries == null) {\n this.entries = new MapWritable();",
"signature": "void set(int index, double value)"
},
{
"arguments": [
"int index",
" double value"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "set(index, get(index) + value);",
"signature": "void add(int index, double value)"
},
{
"arguments": [
"Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "return new SparseVector(v.getEntries());",
"signature": "SparseVector set(Vector v)"
},
{
"arguments": [
"int i0",
" int i1"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\n return null;",
"signature": "Vector subVector(int i0, int i1)"
},
{
"arguments": [
"double alpha",
" Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\n return null;",
"signature": "Vector set(double alpha, Vector v)"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/mapred/TestBlockMatrixMapReduce.java",
"implementation": "super();",
"signature": "public TestBlockMatrixMapReduce()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "v2.scale(0.5);\n\n for (int i = 0; i < v2.size(); i++) {\n assertEquals(values[1][i] * 0.5, v2.get(i));",
"signature": "void scalingTest()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "v1.add(v2);\n int i = 0;\n Iterator<Writable> it = v1.iterator();\n while (it.hasNext()) {\n DoubleEntry c = (DoubleEntry) it.next();\n assertEquals(c.getValue(), values[0][i] + values[1][i]);\n i++;",
"signature": "void add()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "v1.set(v2);\n\n for(int i = 0; i < v1.size(); i ++) {\n assertEquals(v2.get(i), v1.get(i));",
"signature": "void setTest()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "int start = 2;\n Vector subVector = v1.subVector(start, v1.size() - 1);\n Iterator<Writable> it = subVector.iterator();\n\n int i = start;\n while (it.hasNext()) {\n assertEquals(v1.get(i), ((DoubleEntry) it.next()).getValue());\n i++;",
"signature": "void subVector()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "((DenseVector) v1).clear();\n assertEquals(v1.size(), 0);",
"signature": "void clear()"
}
] | [
{
"arguments": [],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "this(new MapWritable());",
"signature": "public SparseVector()"
},
{
"arguments": [
"MapWritable m"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "this.entries = m;",
"signature": "public SparseVector(MapWritable m)"
},
{
"arguments": [
"RowResult row"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "this.initMap(row);",
"signature": "public SparseVector(RowResult row)"
},
{
"arguments": [
"double alpha",
" Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "if (alpha == 0)\r\n return this;\r\n\r\n for (Map.Entry<Writable, Writable> e : v.getEntries().entrySet()) {\r\n if (this.entries.containsKey(e.getKey())) {\r\n // add\r\n double value = alpha * ((DoubleEntry) e.getValue()).getValue()\r\n + this.get(((IntWritable) e.getKey()).get());\r\n this.entries.put(e.getKey(), new DoubleEntry(value));",
"signature": "Vector add(double alpha, Vector v)"
},
{
"arguments": [
"Vector v2"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "for (Map.Entry<Writable, Writable> e : v2.getEntries().entrySet()) {\r\n int key = ((IntWritable) e.getKey()).get();\r\n if (this.entries.containsKey(e.getKey())) {\r\n this.add(key, ((DoubleEntry) e.getValue()).getValue());",
"signature": "SparseVector add(Vector v2)"
},
{
"arguments": [
"Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\r\n return 0;",
"signature": "double dot(Vector v)"
},
{
"arguments": [
"Norm type"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\r\n return 0;",
"signature": "double norm(Norm type)"
},
{
"arguments": [
"double alpha"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "for (Map.Entry<Writable, Writable> e : this.entries.entrySet()) {\r\n this.entries.put(e.getKey(), new DoubleEntry(((DoubleEntry) e.getValue())\r\n .getValue()\r\n * alpha));",
"signature": "SparseVector scale(double alpha)"
},
{
"arguments": [
"int index"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "double value;\r\n try {\r\n value = ((DoubleEntry) this.entries.get(new IntWritable(index)))\r\n .getValue();",
"signature": "double get(int index)"
},
{
"arguments": [
"int index",
" double value"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// If entries are null, create new object\r\n if (this.entries == null) {\r\n this.entries = new MapWritable();",
"signature": "void set(int index, double value)"
},
{
"arguments": [
"int index",
" double value"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "set(index, get(index) + value);",
"signature": "void add(int index, double value)"
},
{
"arguments": [
"Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "return new SparseVector(v.getEntries());",
"signature": "SparseVector set(Vector v)"
},
{
"arguments": [
"int i0",
" int i1"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\r\n return null;",
"signature": "Vector subVector(int i0, int i1)"
},
{
"arguments": [
"double alpha",
" Vector v"
],
"filename": "src/java/org/apache/hama/matrix/SparseVector.java",
"implementation": "// TODO Auto-generated method stub\r\n return null;",
"signature": "Vector set(double alpha, Vector v)"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/graph/TestGraph.java",
"implementation": "TestSetup setup = new TestSetup(new TestSuite(TestGraph.class)) {\n protected void setUp() throws Exception {\n HCluster hCluster = new HCluster();\n hCluster.setUp();\n conf = hCluster.getConf();\n adj = new SparseGraph(conf);",
"signature": "Test suite()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/graph/TestGraph.java",
"implementation": "",
"signature": "void tearDown()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/mapred/TestBlockMatrixMapReduce.java",
"implementation": "super();",
"signature": "public TestBlockMatrixMapReduce()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "TestSetup setup = new TestSetup(new TestSuite(TestDenseMatrix.class)) {\n protected void setUp() throws Exception {\n HCluster hCluster = new HCluster();\n hCluster.setUp();\n\n conf = hCluster.getConf();\n admin = new HBaseAdmin(conf);\n hamaAdmin = new HamaAdminImpl(conf, admin);\n\n m1 = DenseMatrix.random(hCluster.getConf(), SIZE, SIZE);\n m2 = DenseMatrix.random(hCluster.getConf(), SIZE, SIZE);\n m3 = DenseMatrix.random(hCluster.getConf(), SIZE, SIZE);\n m4 = DenseMatrix.random(hCluster.getConf(), SIZE-2, SIZE-2);\n m5 = DenseMatrix.random(hCluster.getConf(), SIZE, SIZE);",
"signature": "Test suite()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "try {\n closeTest();",
"signature": "void tearDown()"
},
{
"arguments": [
"int i = 0; i < 3; i++"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "for (int j = 0; j < 3; j++) {\n for (int k = 0; k < 4; k++) {\n C[i][j] += m1.get(i + 2, k + 2) * m2.get(k, j);",
"signature": "B\n for (int i = 0; i < 3; i++)"
},
{
"arguments": [
"i=0; i<SIZE; i++"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "for(j=0; j<SIZE; j++) {\n E[i][j] = 0;",
"signature": "changed\n for(i=0; i<SIZE; i++)"
},
{
"arguments": [
"state != 0 && loops > 0"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "// find index(k, l) for pivot p\n m = 0;\n for(k = 1; k <= SIZE-2; k++) {\n if(Math.abs(S[m][ind[m]]) < Math.abs(S[k][ind[k]])) {\n m = k;",
"signature": "rotation\n while(state != 0 && loops > 0)"
},
{
"arguments": [
"i = 0; i < SIZE; i++"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "e1 = E[k][i];\n e2 = E[l][i];\n \n E[k][i] = c * e1 - s * e2;\n E[l][i] = s * e1 + c * e2;",
"signature": "eigenvectors\n for(i = 0; i < SIZE; i++)"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "try {\n m1.add(m4);\n fail(\"Matrix-Addition should be failed while rows and columns aren't same.\");",
"signature": "void testEnsureForAddition()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "try {\n m1.mult(m4);\n fail(\"Matrix-Mult should be failed while A.columns!=B.rows.\");",
"signature": "void testEnsureForMultiplication()"
},
{
"arguments": [
"double[][] S",
" int row",
" int size"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "int m = row + 1;\n for(int i=row + 2; i<size; i++) {\n if(Math.abs(S[row][i]) > Math.abs(S[row][m]))\n m = i;",
"signature": "int maxind(double[][] S, int row, int size)"
},
{
"arguments": [
"double[] e",
" boolean[] changed",
" int row",
" double value",
" int state"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "double y = e[row];\n e[row] += value;\n \n if(changed[row] && y == e[row]) {\n changed[row] = false;\n return state - 1;",
"signature": "int update(double[] e, boolean[] changed, int row, double value, int state)"
},
{
"arguments": [
"!changed[row] && y != e[row]"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "changed[row] = true;\n return state + 1;",
"signature": "else if(!changed[row] && y != e[row])"
},
{
"arguments": [
"double[][] S",
" int k",
" int l",
" int i",
" int j",
" double c",
" double s"
],
"filename": "src/test/org/apache/hama/matrix/TestDenseMatrix.java",
"implementation": "double s1 = S[k][l], s2 = S[i][j];\n S[k][l] = c * s1 - s * s2;\n S[i][j] = s * s1 + c * s2;",
"signature": "void rotate(double[][] S, int k, int l, int i, int j, double c, double s)"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "TestSetup setup = new TestSetup(new TestSuite(TestDenseVector.class)) {\r\n protected void setUp() throws Exception {\r\n HCluster hCluster = new HCluster();\r\n hCluster.setUp();\r\n\r\n m1 = new DenseMatrix(hCluster.getConf(), 2, 4);\r\n\r\n for (int i = 0; i < 2; i++)\r\n for (int j = 0; j < 4; j++)\r\n m1.set(i, j, values[i][j]);\r\n\r\n v1 = m1.getRow(0);\r\n v2 = m1.getRow(1);\r\n smallSize.set(0, 0.5);",
"signature": "Test suite()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "LOG.info(\"tearDown()\");",
"signature": "void tearDown()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "double cos = v1.dot(v2);\r\n assertEquals(cos, cosine);\r\n \r\n boolean except = false;\r\n try {\r\n v1.dot(smallSize);",
"signature": "void testDot()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "int start = 2;\r\n Vector subVector = v1.subVector(start, v1.size() - 1);\r\n Iterator<Writable> it = subVector.iterator();\r\n\r\n int i = start;\r\n while (it.hasNext()) {\r\n assertEquals(v1.get(i), ((DoubleEntry) it.next()).getValue());\r\n i++;",
"signature": "void testSubVector()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "assertEquals(norm1, v1.norm(Vector.Norm.One));",
"signature": "void testNom1()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "assertEquals(norm2, v1.norm(Vector.Norm.Two));",
"signature": "void testNom2()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "assertEquals(normInf, v1.norm(Vector.Norm.Infinity));",
"signature": "void testNormInf()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "assertEquals(norm2Robust, v1.norm(Vector.Norm.TwoRobust));",
"signature": "void testNorm2Robust()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "v2.scale(0.5);\r\n\r\n for (int i = 0; i < v2.size(); i++) {\r\n assertEquals(values[1][i] * 0.5, v2.get(i));",
"signature": "void scalingTest()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "v1.add(v2);\r\n int i = 0;\r\n Iterator<Writable> it = v1.iterator();\r\n while (it.hasNext()) {\r\n DoubleEntry c = (DoubleEntry) it.next();\r\n assertEquals(c.getValue(), values[0][i] + values[1][i]);\r\n i++;",
"signature": "void testAdd()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "v1.set(v2);\r\n \r\n for(int i = 0; i < v1.size(); i ++) {\r\n assertEquals(v2.get(i), v1.get(i));",
"signature": "void testSet()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestDenseVector.java",
"implementation": "((DenseVector) v1).clear();\r\n assertEquals(v1.size(), 0);",
"signature": "void testClear()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestMatrixVectorMult.java",
"implementation": "TestSetup setup = new TestSetup(new TestSuite(TestMatrixVectorMult.class)) {\n protected void setUp() throws Exception {\n HCluster hCluster = new HCluster();\n hCluster.setUp();\n conf = hCluster.getConf();\n m1 = new DenseMatrix(conf, \"A\", true);\n m1.setDimension(2, 2);\n m1.set(0, 0, 1);\n m1.set(0, 1, 2);\n m1.set(1, 0, 3);\n m1.set(1, 1, 4);\n m2 = new DenseMatrix(conf, \"B\", true);\n m2.setDimension(2, 1);\n m2.set(0, 0, 1);\n m2.set(1, 0, 2);",
"signature": "Test suite()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestMatrixVectorMult.java",
"implementation": "try {\n closeTest();",
"signature": "void tearDown()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestSingularValueDecomposition.java",
"implementation": "TestSetup setup = new TestSetup(new TestSuite(TestSingularValueDecomposition.class)) {\n protected void setUp() throws Exception {\n HCluster hCluster = new HCluster();\n hCluster.setUp();\n conf = hCluster.getConf();\n m1 = new DenseMatrix(conf, 2, 2);\n for (int i = 0; i < 2; i++)\n for (int j = 0; j < 2; j++)\n m1.set(i, j, matrixA[i][j]);",
"signature": "Test suite()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestSingularValueDecomposition.java",
"implementation": "// do nothing",
"signature": "void tearDown()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestSparseMatrix.java",
"implementation": "TestSetup setup = new TestSetup(new TestSuite(TestSparseMatrix.class)) {\n protected void setUp() throws Exception {\n HCluster hCluster = new HCluster();\n hCluster.setUp();\n\n m1 = SparseMatrix.random(hCluster.getConf(), SIZE, SIZE);\n m2 = SparseMatrix.random(hCluster.getConf(), SIZE, SIZE);",
"signature": "Test suite()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestSparseMatrix.java",
"implementation": "try {\n closeTest();",
"signature": "void tearDown()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestSparseVector.java",
"implementation": "TestSetup setup = new TestSetup(new TestSuite(TestSparseVector.class)) {\n protected void setUp() throws Exception {\n HCluster hCluster = new HCluster();\n hCluster.setUp();\n m1 = new SparseMatrix(hCluster.getConf(), 2, 4);\n for (int i = 0; i < 2; i++)\n for (int j = 0; j < 4; j++)\n m1.set(i, j, values[i][j]);\n v1 = m1.getRow(0);\n v2 = m1.getRow(1);",
"signature": "Test suite()"
},
{
"arguments": [],
"filename": "src/test/org/apache/hama/matrix/TestSparseVector.java",
"implementation": "LOG.info(\"tearDown()\");",
"signature": "void tearDown()"
}
] |
44f6da4f5f4b2a33161fa998b0f72183b09ac4a3 | [
{
"arguments": [],
"filename": "edu.illinois.keshmesh.detector.tests/src/edu/illinois/keshmesh/detector/tests/vna00j/VNA00JTests.java",
"implementation": "public static class VNA00JTest05 extends VNA00JTest {\n\n\t\t@Before\n\t\tpublic void setup() throws Exception {\n\t\t\tsetupProjectAndAnalyze(\"05\", \"A.java\");",
"signature": "String getExpectedUnprotectedInstructionsThatMayAccessUnsafelySharedFields()"
},
{
"arguments": [],
"filename": "edu.illinois.keshmesh.detector.tests/src/edu/illinois/keshmesh/detector/tests/vna00j/VNA00JTests.java",
"implementation": "return \"[<Application,Lp/A>]\";",
"signature": "String getExpectedThreadSafeClasses()"
},
{
"arguments": [],
"filename": "edu.illinois.keshmesh.detector.tests/src/edu/illinois/keshmesh/detector/tests/vna00j/VNA00JTests.java",
"implementation": "return \"[<Application,Lp/A>]\";",
"signature": "String getExpectedThreadSafeClasses()"
},
{
"arguments": [
"InstructionInfo instructionInfo",
" IClassHierarchy classHierarchy"
],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/util/AnalysisUtils.java",
"implementation": "if (canBeUnsafelyShared(argumentValueNumber, instructionInfo.getCGNode(), classHierarchy)) {\n\t\t\t\treturn true;",
"signature": "boolean canAnyArgumentBeUnsafelyShared(InstructionInfo instructionInfo, IClassHierarchy classHierarchy)"
},
{
"arguments": [
"int valueNumber",
" CGNode enclosingCGNode",
" IClassHierarchy classHierarchy"
],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/util/AnalysisUtils.java",
"implementation": "DefUse defUse = enclosingCGNode.getDU();\n\t\tSSAInstruction defInstruction = defUse.getDef(valueNumber);\n\t\t//\t\tif (defInstruction instanceof SSAGetInstruction && !isFinalOrVolatile((SSAFieldAccessInstruction) defInstruction, classHierarchy)) {\n\t\t//\t\t\treturn true;\n\t\t//",
"signature": "boolean canBeUnsafelyShared(int valueNumber, CGNode enclosingCGNode, IClassHierarchy classHierarchy)"
},
{
"arguments": [
"int valueNumber",
" CGNode enclosingCGNode",
" IClassHierarchy classHierarchy",
" boolean isFirstCall"
],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/util/AnalysisUtils.java",
"implementation": "int numberOfParametersOfCaller = enclosingCGNode.getMethod().getNumberOfParameters();\n\t\tDefUse defUse = enclosingCGNode.getDU();\n\t\tif (valueNumber <= numberOfParametersOfCaller) {\n\t\t\t// valueNumber represents a parameter of the enclosing method.\n\t\t\tif (isFirstCall) {\n\t\t\t\treturn true;",
"signature": "boolean isDirectlyOrIndirectlyLocal(int valueNumber, CGNode enclosingCGNode, IClassHierarchy classHierarchy, boolean isFirstCall)"
},
{
"arguments": [
"SSAFieldAccessInstruction fieldAccessInstruction",
" IClassHierarchy classHierarchy"
],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/util/AnalysisUtils.java",
"implementation": "IField accessedField = classHierarchy.resolveField(fieldAccessInstruction.getDeclaredField());\n\t\t//FIXME: We do not know why it could be null here, e.g. the field sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION \n\t\t//can not be resolved because its class can not be looked up.\n\t\tif (accessedField != null) {\n\t\t\treturn accessedField.isFinal() || accessedField.isVolatile();",
"signature": "boolean isFinalOrVolatile(SSAFieldAccessInstruction fieldAccessInstruction, IClassHierarchy classHierarchy)"
}
] | [
{
"arguments": [],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/VNA00JBugDetector.java",
"implementation": "Map<CGNode, Collection<InstructionInfo>> intermediateMapOfUnsafeInstructions = null;\n\t\t\tintermediateMapOfUnsafeInstructions = new HashMap<CGNode, Collection<InstructionInfo>>();\n\t\t\tCollection<InstructionInfo> unsafeInstructionsThatAccessUnprotectedFields = new HashSet<InstructionInfo>();\n\t\t\tif (canContainUnsafeAccesses(cgNode.getMethod())) {\n\t\t\t\tCollection<InstructionInfo> instructionsThatAccessUnprotectedFields = getInstructionsThatAccessUnprotectedFields(cgNode);\n\t\t\t\tfor (InstructionInfo instructionThatAccessesUnprotectedFields : instructionsThatAccessUnprotectedFields) {\n\t\t\t\t\tif (!AnalysisUtils.isProtectedByAnySynchronizedBlock(synchronizedBlocks, instructionThatAccessesUnprotectedFields)) {\n\t\t\t\t\t\tunsafeInstructionsThatAccessUnprotectedFields.add(instructionThatAccessesUnprotectedFields);\n\t\t\t\tfor (InstructionInfo instructionThatAccessesUnprotectedFields : instructionsThatAccessUnprotectedFields) {\n\t\t\t\t\tLogger.log(\"MODIFY: \" + instructionThatAccessesUnprotectedFields);\n\t\t\t\tfor (InstructionInfo unsafeInstruction : unsafeInstructionsThatAccessUnprotectedFields) {\n\t\t\t\t\tbitVector.set(globalValues.add(unsafeInstruction));\n\t\t\t\t\tLogger.log(\"UNSAFE INSTRUCTION: \" + unsafeInstruction);\n\t\t\tif (!Modes.isInProductionMode() && intermediateMapOfUnsafeInstructions != null) {\n\t\t\t\tintermediateMapOfUnsafeInstructions.put(cgNode, unsafeInstructionsThatAccessUnprotectedFields);\n\t\t\tintermediateResults.setUnsafeInstructionsThatAccessUnprotectedFields(intermediateMapOfUnsafeInstructions);\n\tprivate boolean canContainUnsafeAccesses(IMethod method) {\n\tprivate Collection<InstructionInfo> getInstructionsThatAccessUnprotectedFields(CGNode cgNode) {\n\t\tCollection<InstructionInfo> instructionsThatAccessUnprotectedFields = new HashSet<InstructionInfo>();\n\t\tIR ir = cgNode.getIR();\n\t\tif (ir == null) {\n\t\t\treturn instructionsThatAccessUnprotectedFields;",
"signature": "void populateMapOfunsafeInstructionsThatAccessUnprotectedFields()"
},
{
"arguments": [],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/VNA00JBugDetector.java",
"implementation": "return doesAccessUnprotectedField(defUse, instructionInfo.getInstruction());\n\t\treturn instructionsThatAccessUnprotectedFields;\n\t * @param defUse\n\t * @param ssaInstruction\n\tprivate boolean doesAccessUnprotectedField(final DefUse defUse, SSAInstruction ssaInstruction) {\n\t\t\tSSAInstruction defInstruction = defUse.getDef(ssaInstruction.getUse(i));\n\t\t\tif (defInstruction instanceof SSAGetInstruction && !isProtected((SSAFieldAccessInstruction) defInstruction)) {\n\t/**\n\t * \n\t * @param fieldAccessInstruction\n\t * @return true if the changes to the given field are visible to other\n\t * threads.\n\t */\n\tprivate boolean isProtected(SSAFieldAccessInstruction fieldAccessInstruction) {\n\t\treturn isFinal(fieldAccessInstruction) || isVolatile(fieldAccessInstruction);",
"signature": "new InstructionFilter()"
},
{
"arguments": [
"SSAFieldAccessInstruction fieldAccessInstruction"
],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/VNA00JBugDetector.java",
"implementation": "IField accessedField = basicAnalysisData.classHierarchy.resolveField(fieldAccessInstruction.getDeclaredField());\n\t\treturn accessedField.isFinal();",
"signature": "boolean isFinal(SSAFieldAccessInstruction fieldAccessInstruction)"
},
{
"arguments": [
"SSAFieldAccessInstruction fieldAccessInstruction"
],
"filename": "edu.illinois.keshmesh.detector/src/edu/illinois/keshmesh/detector/VNA00JBugDetector.java",
"implementation": "IField accessedField = basicAnalysisData.classHierarchy.resolveField(fieldAccessInstruction.getDeclaredField());\n\t\treturn accessedField.isVolatile();",
"signature": "boolean isVolatile(SSAFieldAccessInstruction fieldAccessInstruction)"
}
] |
482afa1f8b138461d8ead39386e18d3dcdb61a8b | [
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "return name;",
"signature": "String getName()"
},
{
"arguments": [
"String newName"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "String oldName = name;\r\n name = newName;\r\n if (eNotificationRequired())\r\n eNotify(new ENotificationImpl(this, Notification.SET, JavaModelPackage.IMPORT_DECLARATION__NAME, oldName, name));",
"signature": "void setName(String newName)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "JavaResourceBundle getResourceBundle()"
},
{
"arguments": [
"String source"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "Annotation getAnnotation(String source)"
},
{
"arguments": [
"String source",
" boolean createOnDemand"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "Annotation getAnnotation(String source, boolean createOnDemand)"
},
{
"arguments": [
"String source",
" String key"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "String getAnnotationData(String source, String key)"
},
{
"arguments": [
"Class<T> extensionType"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "T getExtension(Class<T> extensionType)"
},
{
"arguments": [
"T extension"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "void addExtension(T extension)"
},
{
"arguments": [
"T extension"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "void removeExtension(T extension)"
},
{
"arguments": [
"Class<T> extentionType"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "void removeExtensions(Class<T> extentionType)"
},
{
"arguments": [
"int derivedFeatureID",
" Class<?> baseClass"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "if (baseClass == Extendable.class)\r\n {\r\n switch (derivedFeatureID)\r\n {\r\n case JavaModelPackage.IMPORT_DECLARATION__EXTENSIONS :\r\n return CommonModelPackage.EXTENDABLE__EXTENSIONS;\r\n default :\r\n return -1;",
"signature": "int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)"
},
{
"arguments": [
"int baseFeatureID",
" Class<?> baseClass"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "if (baseClass == Extendable.class)\r\n {\r\n switch (baseFeatureID)\r\n {\r\n case CommonModelPackage.EXTENDABLE__EXTENSIONS :\r\n return JavaModelPackage.IMPORT_DECLARATION__EXTENSIONS;\r\n default :\r\n return -1;",
"signature": "int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/ImportDeclarationImpl.java",
"implementation": "if (eIsProxy())\r\n return super.toString();\r\n\r\n StringBuffer result = new StringBuffer(super.toString());\r\n result.append(\" (name: \");\r\n result.append(name);\r\n result.append(')');\r\n return result.toString();",
"signature": "String toString()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelFactoryImpl.java",
"implementation": "JavaPackageImpl javaPackage = new JavaPackageImpl();\r\n return javaPackage;",
"signature": "JavaPackage createJavaPackage()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelFactoryImpl.java",
"implementation": "JavaClassImpl javaClass = new JavaClassImpl();\r\n return javaClass;",
"signature": "JavaClass createJavaClass()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelFactoryImpl.java",
"implementation": "JavaCompilationUnitImpl javaCompilationUnit = new JavaCompilationUnitImpl();\r\n return javaCompilationUnit;",
"signature": "JavaCompilationUnit createJavaCompilationUnit()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelFactoryImpl.java",
"implementation": "ImportDeclarationImpl importDeclaration = new ImportDeclarationImpl();\r\n return importDeclaration;",
"signature": "ImportDeclaration createImportDeclaration()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelFactoryImpl.java",
"implementation": "JavaTypeImpl javaType = new JavaTypeImpl();\r\n return javaType;",
"signature": "JavaType createJavaType()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelPackageImpl.java",
"implementation": "return javaCompilationUnitEClass;",
"signature": "EClass getJavaCompilationUnit()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelPackageImpl.java",
"implementation": "return (EReference) javaCompilationUnitEClass.getEStructuralFeatures().get(0);\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n public EClass getImportDeclaration()\r\n return importDeclarationEClass;\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n public EReference getImportDeclaration_CompilationUnit()\r\n return (EReference) importDeclarationEClass.getEStructuralFeatures().get(0);\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n public EClass getJavaType()\r\n return javaTypeEClass;\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n public EReference getJavaType_InnerTypes()\r\n return (EReference) javaTypeEClass.getEStructuralFeatures().get(0);\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n public EReference getJavaType_OuterType()\r\n return (EReference) javaTypeEClass.getEStructuralFeatures().get(1);\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * \r\n * @generated\r\n */\r\n public EClass getJavaResource()\r\n {\r\n return javaResourceEClass;",
"signature": "EReference getJavaCompilationUnit_ImportDeclarations()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaModelPackageImpl.java",
"implementation": "return javaResourcesTypeEEnum;",
"signature": "EEnum getJavaResourcesType()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaPackageImpl.java",
"implementation": "super();",
"signature": "protected JavaPackageImpl()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaPackageImpl.java",
"implementation": "return JavaModelPackage.Literals.JAVA_PACKAGE;",
"signature": "EClass eStaticClass()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaPackageImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "String getQualifiedName()"
},
{
"arguments": [
"int derivedFeatureID",
" Class<?> baseClass"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaPackageImpl.java",
"implementation": "if (baseClass == QualifiedJavaElement.class)\r\n {\r\n switch (derivedFeatureID)\r\n {\r\n default :\r\n return -1;",
"signature": "int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "return name;",
"signature": "String getName()"
},
{
"arguments": [
"String newName"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "String oldName = name;\r\n name = newName;\r\n if (eNotificationRequired())\r\n eNotify(new ENotificationImpl(this, Notification.SET, JavaModelPackage.JAVA_TYPE__NAME, oldName, name));",
"signature": "void setName(String newName)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "JavaResourceBundle getResourceBundle()"
},
{
"arguments": [
"String source"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "Annotation getAnnotation(String source)"
},
{
"arguments": [
"String source",
" boolean createOnDemand"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n public String getAnnotationData(String source, String key)\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n public <T extends EObject> T getExtension(Class<T> extensionType)\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * \r\n * @generated\r\n */\r\n public <T extends EObject> EList<T> getExtensions(Class<T> extensionType)\r\n {\r\n // TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "Annotation getAnnotation(String source, boolean createOnDemand)"
},
{
"arguments": [
"T extension"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "void addExtension(T extension)"
},
{
"arguments": [
"T extension"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "void removeExtension(T extension)"
},
{
"arguments": [
"Class<T> extentionType"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "// TODO: implement this method\r\n // Ensure that you remove @generated or mark it @generated NOT\r\n throw new UnsupportedOperationException();",
"signature": "void removeExtensions(Class<T> extentionType)"
},
{
"arguments": [
"int derivedFeatureID",
" Class<?> baseClass"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "if (baseClass == Extendable.class)\r\n {\r\n switch (derivedFeatureID)\r\n {\r\n case JavaModelPackage.JAVA_TYPE__EXTENSIONS :\r\n return CommonModelPackage.EXTENDABLE__EXTENSIONS;\r\n default :\r\n return -1;",
"signature": "int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass)"
},
{
"arguments": [
"int baseFeatureID",
" Class<?> baseClass"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaTypeImpl.java",
"implementation": "if (baseClass == Extendable.class)\r\n {\r\n switch (baseFeatureID)\r\n {\r\n case CommonModelPackage.EXTENDABLE__EXTENSIONS :\r\n return JavaModelPackage.JAVA_TYPE__EXTENSIONS;\r\n default :\r\n return -1;",
"signature": "int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass)"
},
{
"arguments": [
"JavaProject object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return createJavaProjectAdapter();\r\n public Adapter caseJavaResourceDirectory(JavaResourceDirectory object)\r\n return createJavaResourceDirectoryAdapter();",
"signature": "Adapter caseJavaProject(JavaProject object)"
},
{
"arguments": [
"JavaResourcesRoot object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return createJavaResourcesRootAdapter();",
"signature": "Adapter caseJavaResourcesRoot(JavaResourcesRoot object)"
},
{
"arguments": [
"JavaPackage object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return createJavaPackageAdapter();",
"signature": "Adapter caseJavaPackage(JavaPackage object)"
},
{
"arguments": [
"JavaFile object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return createJavaFileAdapter();",
"signature": "Adapter caseJavaFile(JavaFile object)"
},
{
"arguments": [
"JavaClass object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return createJavaClassAdapter();\r\n public Adapter caseJavaCompilationUnit(JavaCompilationUnit object)\r\n {\r\n return createJavaCompilationUnitAdapter();",
"signature": "Adapter caseJavaClass(JavaClass object)"
},
{
"arguments": [
"JavaResource object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return createJavaResourceAdapter();\r\n * Creates an adapter for the <code>target</code>.\r\n * <!-- begin-user-doc -->\r\n * <!-- end-user-doc -->\r\n * Creates a new adapter for an object of class '{@link org.sourcepit.osgify.core.model.java.Named <em>Named</em>",
"signature": "Adapter caseJavaResource(JavaResource object)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return null;",
"signature": "Adapter createJavaResourceBundleAdapter()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return null;",
"signature": "Adapter createJavaResourceDirectoryAdapter()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return null;",
"signature": "Adapter createJavaResourcesRootAdapter()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return null;",
"signature": "Adapter createJavaFileAdapter()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return null;",
"signature": "Adapter createJavaClassAdapter()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return null;",
"signature": "Adapter createJavaCompilationUnitAdapter()"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelAdapterFactory.java",
"implementation": "return null;",
"signature": "Adapter createImportDeclarationAdapter()"
},
{
"arguments": [
"JavaProject object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelSwitch.java",
"implementation": "return null;",
"signature": "T caseJavaProject(JavaProject object)"
},
{
"arguments": [
"JavaResourceDirectory object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelSwitch.java",
"implementation": "return null;",
"signature": "T caseJavaResourceDirectory(JavaResourceDirectory object)"
},
{
"arguments": [
"JavaResourcesRoot object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelSwitch.java",
"implementation": "return null;",
"signature": "T caseJavaResourcesRoot(JavaResourcesRoot object)"
},
{
"arguments": [
"JavaPackage object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelSwitch.java",
"implementation": "return null;",
"signature": "T caseJavaPackage(JavaPackage object)"
},
{
"arguments": [
"JavaFile object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelSwitch.java",
"implementation": "return null;",
"signature": "T caseJavaFile(JavaFile object)"
},
{
"arguments": [
"JavaClass object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelSwitch.java",
"implementation": "return null;",
"signature": "T caseJavaClass(JavaClass object)"
},
{
"arguments": [
"ImportDeclaration object"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/util/JavaModelSwitch.java",
"implementation": "return null;",
"signature": "T caseImportDeclaration(ImportDeclaration object)"
}
] | [
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "return type;",
"signature": "JavaType getType()"
},
{
"arguments": [
"JavaType newType",
" NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "JavaType oldType = type;\r\n type = newType;\r\n if (eNotificationRequired())\r\n {\r\n ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,\r\n JavaModelPackage.JAVA_CLASS__TYPE, oldType, newType);\r\n if (msgs == null)\r\n msgs = notification;\r\n else\r\n msgs.add(notification);",
"signature": "NotificationChain basicSetType(JavaType newType, NotificationChain msgs)"
},
{
"arguments": [
"JavaType newType"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "if (newType != type)\r\n {\r\n NotificationChain msgs = null;\r\n if (type != null)\r\n msgs = ((InternalEObject) type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE\r\n - JavaModelPackage.JAVA_CLASS__TYPE, null, msgs);\r\n if (newType != null)\r\n msgs = ((InternalEObject) newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE\r\n - JavaModelPackage.JAVA_CLASS__TYPE, null, msgs);\r\n msgs = basicSetType(newType, msgs);\r\n if (msgs != null)\r\n msgs.dispatch();",
"signature": "void setType(JavaType newType)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "if (eContainerFeatureID() != JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE)\r\n return null;\r\n return (JavaPackage) eContainer();",
"signature": "JavaPackage getParentPackage()"
},
{
"arguments": [
"JavaPackage newParentPackage",
" NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "msgs = eBasicSetContainer((InternalEObject) newParentPackage, JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE, msgs);\r\n return msgs;",
"signature": "NotificationChain basicSetParentPackage(JavaPackage newParentPackage, NotificationChain msgs)"
},
{
"arguments": [
"JavaPackage newParentPackage"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "if (newParentPackage != eInternalContainer()\r\n || (eContainerFeatureID() != JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE && newParentPackage != null))\r\n {\r\n if (EcoreUtil.isAncestor(this, newParentPackage))\r\n throw new IllegalArgumentException(\"Recursive containment not allowed for \" + toString());\r\n NotificationChain msgs = null;\r\n if (eInternalContainer() != null)\r\n msgs = eBasicRemoveFromContainer(msgs);\r\n if (newParentPackage != null)\r\n msgs = ((InternalEObject) newParentPackage).eInverseAdd(this, JavaModelPackage.JAVA_PACKAGE__TYPE_ROOTS,\r\n JavaPackage.class, msgs);\r\n msgs = basicSetParentPackage(newParentPackage, msgs);\r\n if (msgs != null)\r\n msgs.dispatch();",
"signature": "void setParentPackage(JavaPackage newParentPackage)"
},
{
"arguments": [
"InternalEObject otherEnd",
" int featureID",
" NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "switch (featureID)\r\n {\r\n case JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE :\r\n if (eInternalContainer() != null)\r\n msgs = eBasicRemoveFromContainer(msgs);\r\n return basicSetParentPackage((JavaPackage) otherEnd, msgs);",
"signature": "NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs)"
},
{
"arguments": [
"InternalEObject otherEnd",
" int featureID",
" NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "switch (featureID)\r\n {\r\n case JavaModelPackage.JAVA_CLASS__TYPE :\r\n return basicSetType(null, msgs);\r\n case JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE :\r\n return basicSetParentPackage(null, msgs);",
"signature": "NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs)"
},
{
"arguments": [
"NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "switch (eContainerFeatureID())\r\n {\r\n case JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE :\r\n return eInternalContainer().eInverseRemove(this, JavaModelPackage.JAVA_PACKAGE__TYPE_ROOTS,\r\n JavaPackage.class, msgs);",
"signature": "NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)"
},
{
"arguments": [
"int featureID",
" boolean resolve",
" boolean coreType"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "switch (featureID)\r\n {\r\n case JavaModelPackage.JAVA_CLASS__TYPE :\r\n return getType();\r\n case JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE :\r\n return getParentPackage();",
"signature": "Object eGet(int featureID, boolean resolve, boolean coreType)"
},
{
"arguments": [
"int featureID",
" Object newValue"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "switch (featureID)\r\n {\r\n case JavaModelPackage.JAVA_CLASS__TYPE :\r\n setType((JavaType) newValue);\r\n return;\r\n case JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE :\r\n setParentPackage((JavaPackage) newValue);\r\n return;",
"signature": "void eSet(int featureID, Object newValue)"
},
{
"arguments": [
"int featureID"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "switch (featureID)\r\n {\r\n case JavaModelPackage.JAVA_CLASS__TYPE :\r\n setType((JavaType) null);\r\n return;\r\n case JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE :\r\n setParentPackage((JavaPackage) null);\r\n return;",
"signature": "void eUnset(int featureID)"
},
{
"arguments": [
"int featureID"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaClassImpl.java",
"implementation": "switch (featureID)\r\n {\r\n case JavaModelPackage.JAVA_CLASS__TYPE :\r\n return type != null;\r\n case JavaModelPackage.JAVA_CLASS__PARENT_PACKAGE :\r\n return getParentPackage() != null;",
"signature": "boolean eIsSet(int featureID)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaCompilationUnitImpl.java",
"implementation": "return type;",
"signature": "JavaType getType()"
},
{
"arguments": [
"JavaType newType",
" NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaCompilationUnitImpl.java",
"implementation": "JavaType oldType = type;\r\n type = newType;\r\n if (eNotificationRequired())\r\n {\r\n ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,\r\n JavaModelPackage.JAVA_COMPILATION_UNIT__TYPE, oldType, newType);\r\n if (msgs == null)\r\n msgs = notification;\r\n else\r\n msgs.add(notification);",
"signature": "NotificationChain basicSetType(JavaType newType, NotificationChain msgs)"
},
{
"arguments": [
"JavaType newType"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaCompilationUnitImpl.java",
"implementation": "if (newType != type)\r\n {\r\n NotificationChain msgs = null;\r\n if (type != null)\r\n msgs = ((InternalEObject) type).eInverseRemove(this, EOPPOSITE_FEATURE_BASE\r\n - JavaModelPackage.JAVA_COMPILATION_UNIT__TYPE, null, msgs);\r\n if (newType != null)\r\n msgs = ((InternalEObject) newType).eInverseAdd(this, EOPPOSITE_FEATURE_BASE\r\n - JavaModelPackage.JAVA_COMPILATION_UNIT__TYPE, null, msgs);\r\n msgs = basicSetType(newType, msgs);\r\n if (msgs != null)\r\n msgs.dispatch();",
"signature": "void setType(JavaType newType)"
},
{
"arguments": [],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaCompilationUnitImpl.java",
"implementation": "if (eContainerFeatureID() != JavaModelPackage.JAVA_COMPILATION_UNIT__PARENT_PACKAGE)\r\n return null;\r\n return (JavaPackage) eContainer();",
"signature": "JavaPackage getParentPackage()"
},
{
"arguments": [
"JavaPackage newParentPackage",
" NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaCompilationUnitImpl.java",
"implementation": "msgs = eBasicSetContainer((InternalEObject) newParentPackage,\r\n JavaModelPackage.JAVA_COMPILATION_UNIT__PARENT_PACKAGE, msgs);\r\n return msgs;",
"signature": "NotificationChain basicSetParentPackage(JavaPackage newParentPackage, NotificationChain msgs)"
},
{
"arguments": [
"JavaPackage newParentPackage"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaCompilationUnitImpl.java",
"implementation": "if (newParentPackage != eInternalContainer()\r\n || (eContainerFeatureID() != JavaModelPackage.JAVA_COMPILATION_UNIT__PARENT_PACKAGE && newParentPackage != null))\r\n {\r\n if (EcoreUtil.isAncestor(this, newParentPackage))\r\n throw new IllegalArgumentException(\"Recursive containment not allowed for \" + toString());\r\n NotificationChain msgs = null;\r\n if (eInternalContainer() != null)\r\n msgs = eBasicRemoveFromContainer(msgs);\r\n if (newParentPackage != null)\r\n msgs = ((InternalEObject) newParentPackage).eInverseAdd(this, JavaModelPackage.JAVA_PACKAGE__TYPE_ROOTS,\r\n JavaPackage.class, msgs);\r\n msgs = basicSetParentPackage(newParentPackage, msgs);\r\n if (msgs != null)\r\n msgs.dispatch();",
"signature": "void setParentPackage(JavaPackage newParentPackage)"
},
{
"arguments": [
"NotificationChain msgs"
],
"filename": "osgify-core/gen/main/emf/org/sourcepit/osgify/core/model/java/impl/JavaCompilationUnitImpl.java",
"implementation": "switch (eContainerFeatureID())\r\n {\r\n case JavaModelPackage.JAVA_COMPILATION_UNIT__PARENT_PACKAGE :\r\n return eInternalContainer().eInverseRemove(this, JavaModelPackage.JAVA_PACKAGE__TYPE_ROOTS,\r\n JavaPackage.class, msgs);",
"signature": "NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs)"
}
] |
48408a77df4365c4ca1487e0de0597fb8e8dfaf0 | [
{
"arguments": [],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/AbstractBaseModel.java",
"implementation": "// Do generic stuff\n\n // Do custom stuff\n initInnerModels();",
"signature": "void initInternalInnerModels()"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/AbstractBaseModel.java",
"implementation": "// Call user code\n showView();\n\n if (this.viewDisplayed) {\n //\n getView().reload();",
"signature": "void showInternalView()"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/AbstractBaseModel.java",
"implementation": "//\n hideView();\n //\n getView().hide();",
"signature": "void hideInternalView()"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/fxml/AbstractFXMLModel.java",
"implementation": "bind();\n * Method handler for Wave JRebirthWaves.SHOW_VIEW\n * \n @Override\n public final void doShowView(final Wave wave) {\n showInternalView();",
"signature": "void bindInternal()"
},
{
"arguments": [
"final Wave wave"
],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/fxml/AbstractFXMLModel.java",
"implementation": "hideInternalView();",
"signature": "void doHideView(final Wave wave)"
}
] | [
{
"arguments": [],
"filename": "org.jrebirth/archetype/src/main/resources/archetype-resources/src/main/java/ui/SampleModel.java",
"implementation": "protected void customInitializeInnerModels() {\n protected void customBind() {\n /**\n * {@inheritDoc",
"signature": "void customInitialize()"
},
{
"arguments": [
"final Wave wave"
],
"filename": "org.jrebirth/archetype/src/main/resources/archetype-resources/src/main/java/ui/SampleModel.java",
"implementation": "// Process a wave action, you must listen the wave type before",
"signature": "void processAction(final Wave wave)"
},
{
"arguments": [],
"filename": "org.jrebirth/archetype/src/main/resources/archetype-resources/src/main/java/ui/SampleModel.java",
"implementation": "// Custom code to process when the view is displayed",
"signature": "void customShowView()"
},
{
"arguments": [],
"filename": "org.jrebirth/archetype/src/main/resources/archetype-resources/src/main/java/ui/SampleModel.java",
"implementation": "// Custom code to process when the view is hidden",
"signature": "void customHideView()"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/AbstractModel.java",
"implementation": "customBind();",
"signature": "void bind()"
},
{
"arguments": [
"final Wave wave"
],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/AbstractModel.java",
"implementation": "showView();\n public final void showView() {\n //\n customShowView();\n\n if (this.viewDisplayed) {\n //\n getView().doReload();",
"signature": "void performShowView(final Wave wave)"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/fxml/DefaultFXMLModel.java",
"implementation": "// Nothing to do yet",
"signature": "void showView()"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/main/java/org/jrebirth/core/ui/fxml/DefaultFXMLModel.java",
"implementation": "// Nothing to do yet",
"signature": "void hideView()"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/test/java/org/jrebirth/core/ui/fxml/TestFXMLModel.java",
"implementation": "// Nothing to do yet",
"signature": "void showView()"
},
{
"arguments": [],
"filename": "org.jrebirth/core/src/test/java/org/jrebirth/core/ui/fxml/TestFXMLModel.java",
"implementation": "// Nothing to do yet",
"signature": "void hideView()"
},
{
"arguments": [
"final Wave wave"
],
"filename": "org.jrebirth/core/src/test/java/org/jrebirth/core/ui/fxml/TestFXMLModel.java",
"implementation": "// Nothing to do yet",
"signature": "void performShowView(final Wave wave)"
},
{
"arguments": [
"final Wave wave"
],
"filename": "org.jrebirth/core/src/test/java/org/jrebirth/core/ui/fxml/TestFXMLModel.java",
"implementation": "// Nothing to do yet",
"signature": "void performHideView(final Wave wave)"
},
{
"arguments": [],
"filename": "org.jrebirth/presentation/src/main/java/org/jrebirth/presentation/ui/base/AbstractSlideView.java",
"implementation": "// // Nothing to do yet\n //",
"signature": "void doHide()"
},
{
"arguments": [],
"filename": "org.jrebirth/presentation/src/main/java/org/jrebirth/presentation/ui/base/AbstractSlideView.java",
"implementation": "// // Nothing to do yet\n //\n //",
"signature": "void customInitializeComponents()"
},
{
"arguments": [],
"filename": "org.jrebirth/presentation/src/main/java/org/jrebirth/presentation/ui/classic/ClassicView.java",
"implementation": "// Nothing to do yet",
"signature": "void doHide()"
},
{
"arguments": [],
"filename": "org.jrebirth/presentation/src/main/java/org/jrebirth/presentation/ui/classic/ClassicView.java",
"implementation": "// Nothing to do yet",
"signature": "void doStart()"
},
{
"arguments": [],
"filename": "org.jrebirth/sample/src/main/java/org/jrebirth/sample/ui/SampleModel.java",
"implementation": "protected void customInitializeInnerModels() {\n protected void customBind() {\n /**\n * {@inheritDoc",
"signature": "void customInitialize()"
},
{
"arguments": [],
"filename": "org.jrebirth/sample/src/main/java/org/jrebirth/sample/ui/SampleModel.java",
"implementation": "// Custom code to process when the view is displayed",
"signature": "void customShowView()"
},
{
"arguments": [],
"filename": "org.jrebirth/sample/src/main/java/org/jrebirth/sample/ui/SampleModel.java",
"implementation": "// Custom code to process when the view is hidden",
"signature": "void customHideView()"
}
] |
48abae94e4cb076adbd9068e2e132a3c66d6e0eb | [
{
"arguments": [
"DatasetService datasetService",
" DisplayService displayService"
],
"filename": "src/main/java/loci/slim2/process/interactive/DefaultInteractiveProcessor.java",
"implementation": "public boolean process(final Dataset dataset) {\n\t\tquit = openFile = false;\n\t\t\n\t\t\t\t\t// hide the UI, quit\n\t\t\t\t\tuiPanel.getFrame().setVisible(false);\n\t\t\t\t\tquit = true;\n\t\t\t\t\t// open a different file\n\t\t\t\t\topenFile = true;\n\n\t\t//TODO ARG loop and handle fits, refits, cancellations\n\t\tdo {\n\t\t\tSystem.out.println(\"quit is \" + quit + \" openFile is \" + openFile);\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);",
"signature": "void init(DatasetService datasetService, DisplayService displayService)"
}
] | [
{
"arguments": [
"DatasetService datasetService",
" DisplayService displayService"
],
"filename": "src/main/java/loci/slim2/process/interactive/DefaultInteractiveProcessor.java",
"implementation": "public boolean process(Dataset dataset) {\n\t\t\t\t\t/*_grayScaleImage.close();\n _quit = true;*/\n\t\t\t\t\tSystem.out.println(\"quit\");\n /*File[] files = showFileDialog(getPathFromPreferences());\n\t\t\t\t // were multiple files opened?\n\t\t\t\t if (1 < files.length) {\n\t\t\t\t\t batchProcessingWithUI(files);",
"signature": "public DefaultInteractiveProcessor(DatasetService datasetService, DisplayService displayService)"
},
{
"arguments": [
"1 == files.length"
],
"filename": "src/main/java/loci/slim2/process/interactive/DefaultInteractiveProcessor.java",
"implementation": "String savePath = _path;\n\t\t\t\t\t String saveFile = _file;\n\t\t\t\t\t \n\t\t\t\t\t String[] pathAndFile = getPathAndFile(files[0]);\n\t\t\t _path = pathAndFile[0];\n\t\t\t _file = pathAndFile[1];\n\n\t\t\t _image = loadImage(_path, _file);\n\t\t\t if (null == _image) {\n\t\t\t\t showError(\"Error\", \"Could not load image\");",
"signature": "else if (1 == files.length)"
}
] |
491e32ed0d72cf81d94562b69b1a543509c717ff | [
{
"arguments": [
"Member member"
],
"filename": "engine/src/main/java/org/hibernate/validator/internal/metadata/core/AnnotationProcessingOptionsImpl.java",
"implementation": "if ( annotationIgnoresForCrossParameter.contains( member ) ) {\n\t\t\treturn true;",
"signature": "boolean areCrossParameterConstraintsIgnoredFor(Member member)"
},
{
"arguments": [
"Member member"
],
"filename": "engine/src/main/java/org/hibernate/validator/internal/metadata/core/AnnotationProcessingOptionsImpl.java",
"implementation": "public void ignoreConstraintAnnotationsForCrossParameterConstraint(Member member) {\n\t\tannotationIgnoresForCrossParameter.add( member );",
"signature": "void ignoreConstraintAnnotationsForReturnValue(Member member)"
}
] | [
{
"arguments": [
"\n\t\t\t\texecutableElement\n\t\tfor "
],
"filename": "engine/src/main/java/org/hibernate/validator/internal/xml/ConstrainedExecutableBuilder.java",
"implementation": "MetaConstraint<?> metaConstraint = MetaConstraintBuilder.buildMetaConstraint(\n\t\t\t\t\tconstraintLocation,\n\t\t\t\t\tconstraintType,\n\t\t\t\t\texecutableElement.getElementType(),\n\t\t\t\t\tdefaultPackage,\n\t\t\t\t\tconstraintHelper\n\t\t\t);\n\t\t\tcrossParameterConstraints.add( metaConstraint );",
"signature": "new CrossParameterConstraintLocation(\n\t\t\t\texecutableElement\n\t\tfor ( ConstraintType constraintType : crossParameterConstraintList )"
}
] |
4a177db577e6328331307efa3b093f2448988fa4 | [
{
"arguments": [
"Map<String",
" RoadInput> roadInputMap",
" Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/OutputInput.java",
"implementation": "// if (elem == null) {\n// return;\n//",
"signature": "public OutputInput(Map<String, RoadInput> roadInputMap, Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// parseRoadElement(elem);\n//",
"signature": "public RoadInput(Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "//\n// id = elem.getAttributeValue(\"id\");\n//\n// final Element heterogenElem = elem.getChild(XmlElementNames.TrafficComposition);\n// // optional for specific road\n// if (heterogenElem != null) {\n// trafficCompositionInputData = new ArrayList<VehicleTypeInput>();\n// final List<Element> vehTypeElems = elem.getChild(XmlElementNames.TrafficComposition).getChildren(\n// XmlElementNames.RoadVehicleType);\n// for (final Element vehTypeElem : vehTypeElems) {\n// final Map<String, String> map = XmlUtils.putAttributesInHash(vehTypeElem);\n// trafficCompositionInputData.add(new VehicleTypeInput(map));\n//",
"signature": "void parseRoadElement(Element elem)"
},
{
"arguments": [
"ICMicroData o1",
" ICMicroData o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// final Double pos1 = new Double((o1).getX());\n// final Double pos2 = new Double((o2).getX());\n// return pos2.compareTo(pos1); // sort with DECREASING x because of FC veh counting\n//",
"signature": "int compare(ICMicroData o1, ICMicroData o2)"
},
{
"arguments": [
"ICMacroData o1",
" ICMacroData o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// final Double pos1 = new Double((o1).getX());\n// final Double pos2 = new Double((o2).getX());\n// return pos1.compareTo(pos2); // sort with increasing x\n//",
"signature": "int compare(ICMacroData o1, ICMacroData o2)"
},
{
"arguments": [
"FlowConservingBottleneckDataPoint o1",
" FlowConservingBottleneckDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// final Double pos1 = new Double((o1).getPosition());\n// final Double pos2 = new Double((o2).getPosition());\n// return pos1.compareTo(pos2); // sort with increasing x\n//",
"signature": "int compare(FlowConservingBottleneckDataPoint o1, FlowConservingBottleneckDataPoint o2)"
},
{
"arguments": [
"SpeedLimitDataPoint o1",
" SpeedLimitDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// final Double pos1 = new Double((o1).getPosition());\n// final Double pos2 = new Double((o2).getPosition());\n// return pos1.compareTo(pos2); // sort with increasing x\n//",
"signature": "int compare(SpeedLimitDataPoint o1, SpeedLimitDataPoint o2)"
},
{
"arguments": [
"SlopeDataPoint o1",
" SlopeDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// final Double pos1 = new Double((o1).getPosition());\n// final Double pos2 = new Double((o2).getPosition());\n// return pos1.compareTo(pos2); // sort with increasing x\n//",
"signature": "int compare(SlopeDataPoint o1, SlopeDataPoint o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// return trafficSourceData;\n//",
"signature": "TrafficSourceData getTrafficSourceData()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// return trafficSinkData;\n//",
"signature": "TrafficSinkData getTrafficSinkData()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// return id;\n//",
"signature": "String getId()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// return isWithWriteFundamentalDiagrams;\n//",
"signature": "boolean isWithWriteFundamentalDiagrams()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// return simpleRamp;\n//",
"signature": "SimpleRampData getSimpleRamp()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// return detectorInput;\n//",
"signature": "DetectorInput getDetectorInput()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "// return trafficLightsInput;\n//",
"signature": "TrafficLightsInput getTrafficLightsInput()"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// timestep = Double.parseDouble(elem.getAttributeValue(\"dt\"));\n// duration = Double.parseDouble(elem.getAttributeValue(\"duration\"));\n// randomSeed = Integer.parseInt(elem.getAttributeValue(\"seed\"));\n// if (elem.getAttributeValue(\"fixed_seed\").equalsIgnoreCase(\"true\")) {\n// withFixedSeed = true;\n//",
"signature": "public SimulationInput(Element elem)"
},
{
"arguments": [
"String xodrFilename"
],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// final int i = xodrFilename.lastIndexOf(\".xodr\");\n// if (i < 0) {\n// System.out\n// .println(\"Please provide OpenDRIVE file with ending \\\".xodr\\\" as argument with option -n, exit. \");\n// return false;\n//",
"signature": "boolean validateOpenDriveFileName(String xodrFilename)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return timestep;\n//",
"signature": "double getTimestep()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return duration;\n//",
"signature": "double getSimulationDuration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return withFixedSeed;\n//",
"signature": "boolean isWithFixedSeed()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return randomSeed;\n//",
"signature": "int getRandomSeed()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// // Quick hack: assume only one single main road !!!\n// return roadInputMap.get(0);\n//",
"signature": "RoadInput getSingleRoadInput()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return outputInput;\n//",
"signature": "OutputInput getOutputInput()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return withCrashExit;\n//",
"signature": "boolean isWithCrashExit()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return isWithWriteFundamentalDiagrams;\n//",
"signature": "boolean isWithWriteFundamentalDiagrams()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// return routesInput;\n//",
"signature": "RoutesInput getRoutesInput()"
},
{
"arguments": [
"Map<String",
" RoadInput> roadInputMap",
" Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/output/RoutesInput.java",
"implementation": "// routes = new ArrayList<RouteInput>();\n//\n// @SuppressWarnings(\"unchecked\")\n// final List<Element> routeElems = elem.getChildren(XmlElementNames.OutputRoute);\n// if (routeElems != null) {\n// for (final Element routeElem : routeElems) {\n// RouteInput route = new RouteInput();\n// route.setName(routeElem.getAttributeValue(\"label\"));\n// @SuppressWarnings(\"unchecked\")\n// List<Element> roads = routeElem.getChildren(XmlElementNames.OutputRoadId);\n// for (Element road : roads) {\n// String roadId = road.getAttributeValue(\"id\");\n// route.add(roadId);\n//",
"signature": "public RoutesInput(Map<String, RoadInput> roadInputMap, Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "//\n// if (elem == null) {\n// isInitialized = false;\n// return;\n//",
"signature": "public DetectorInput(Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "//\n// this.dtSample = Double.parseDouble(elem.getAttributeValue(\"dt\"));\n// this.withLogging = Boolean.parseBoolean(elem.getAttributeValue(\"logging\"));\n// this.loggingLanes = Boolean.parseBoolean(elem.getAttributeValue(\"logging_lanes\"));\n//\n// // Detector\n// positions = new ArrayList<Double>();\n//\n// final List<Element> crossElems = elem.getChildren(\"CROSS_SECTION\");\n// if (crossElems != null) {\n// for (final Element crossElem : crossElems) {\n// positions.add(Double.parseDouble(crossElem.getAttributeValue(\"x\")));\n//",
"signature": "void parseElement(Element elem)"
},
{
"arguments": [
"Double o1",
" Double o2"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "// final Double pos1 = new Double((o1).doubleValue());\n// final Double pos2 = new Double((o2).doubleValue());\n// return pos1.compareTo(pos2); // sort with increasing x\n//",
"signature": "int compare(Double o1, Double o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "// return dtSample;\n//",
"signature": "double getSampleInterval()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "// return isInitialized;\n//",
"signature": "boolean isWithDetectors()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "// return withLogging;\n//",
"signature": "boolean isWithLogging()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "// return loggingLanes;\n//",
"signature": "boolean isLoggingLanes()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "// this.x = Double.parseDouble(map.get(\"x\"));\n// this.alphaT = Double.parseDouble(map.get(\"alpha_T\"));\n// this.alphaV0 = Double.parseDouble(map.get(\"alpha_v0\"));\n//",
"signature": "public FlowConservingBottleneckDataPoint(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "// return x;\n//",
"signature": "double getPosition()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "// return alphaT;\n//",
"signature": "double getAlphaT()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "// return alphaV0;\n//",
"signature": "double getAlphaV0()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "// this.x = Double.parseDouble(map.get(\"x\"));\n// this.rho = Units.INVKM_TO_INVM*Double.parseDouble(map.get(\"rho_per_km\"));\n// // negative speed value allowed for using equilibrium speed\n// this.speed = Double.parseDouble(map.get(\"v\"));\n//",
"signature": "public ICMacroData(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "// return x;\n//",
"signature": "double getX()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "// return rho;\n//",
"signature": "double getRho()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "// return speed;\n//",
"signature": "double getSpeed()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "// this.initPosition = Double.parseDouble(map.get(\"x\"));\n// this.initSpeed = Double.parseDouble(map.get(\"v\"));\n// // TODO check lane numbering with road segment logic and xodr !!!\n// this.initLane = Integer.parseInt(map.get(\"lane\"));\n// this.typeLabel = map.get(\"label\");\n//",
"signature": "public ICMicroData(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "// return initPosition;\n//",
"signature": "double getX()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "// return initSpeed;\n//",
"signature": "double getSpeed()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "// return initLane;\n//",
"signature": "int getInitLane()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "// return typeLabel;\n//",
"signature": "String getLabel()"
},
{
"arguments": [
"Inflow inflowDataPoint"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "// this(inflowDataPoint.getT(), inflowDataPoint.getQPerHour(), inflowDataPoint.getV());\n//",
"signature": "public InflowDataPoint(Inflow inflowDataPoint)"
},
{
"arguments": [
"double time",
" double flowPerHour",
" double speed"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "// this.time = time;\n// this.flow = flowPerHour * Units.INVH_TO_INVS;\n// this.speed = speed; // given in m/s\n//",
"signature": "public InflowDataPoint(double time, double flowPerHour, double speed)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "// return time;\n//",
"signature": "double getTime()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "// return flow;\n//",
"signature": "double getFlow()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "// return speed;\n//",
"signature": "double getSpeed()"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "// this.relativeGap = Double.parseDouble(elem.getAttributeValue(\"relative_gap\"));\n// this.relativeSpeed = Double.parseDouble(elem.getAttributeValue(\"relative_speed\"));\n// this.withLogging = Boolean.parseBoolean(elem.getAttributeValue(\"logging\"));\n//\n// final List<Element> inflowElems = elem.getChildren(XmlElementNames.RoadInflow);\n// parseAndSortInflowElements(inflowElems);\n//\n//",
"signature": "public SimpleRampData(Element elem)"
},
{
"arguments": [
"List<Element> inflowElems"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "// inflowTimeSeries = new ArrayList<InflowDataPoint>();\n// for (final Element inflowElem : inflowElems) {\n// final Map<String, String> map = XmlUtils.putAttributesInHash(inflowElem);\n// inflowTimeSeries.add(new InflowDataPoint(map));\n//",
"signature": "void parseAndSortInflowElements(List<Element> inflowElems)"
},
{
"arguments": [
"InflowDataPoint o1",
" InflowDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "// final Double pos1 = new Double((o1).getTime());\n// final Double pos2 = new Double((o2).getTime());\n// return pos1.compareTo(pos2); // sort with increasing t\n//",
"signature": "int compare(InflowDataPoint o1, InflowDataPoint o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "// return withLogging;\n//",
"signature": "boolean withLogging()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "// return relativeSpeed;\n//",
"signature": "double getRelativeSpeedToLeader()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "// return relativeGap;\n//",
"signature": "double getRelativeGapToLeader()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java",
"implementation": "// this.x = Double.parseDouble(map.get(\"x\"));\n// this.gradient = Double.parseDouble(map.get(\"gradient\"));\n//",
"signature": "public SlopeDataPoint(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java",
"implementation": "// return x;\n//",
"signature": "double getPosition()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java",
"implementation": "// return gradient;\n//",
"signature": "double getGradient()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java",
"implementation": "// this.x = Double.parseDouble(map.get(\"x\"));\n// this.speedlimit = Double.parseDouble(map.get(\"speedlimit_kmh\")) / 3.6;\n//",
"signature": "public SpeedLimitDataPoint(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java",
"implementation": "// return x;\n//",
"signature": "double getPosition()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java",
"implementation": "// return speedlimit;\n//",
"signature": "double getSpeedlimit()"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "// if (elem == null) {\n// withLogging = false;\n//",
"signature": "public TrafficSourceData(Element elem)"
},
{
"arguments": [
"List<Element> upInflowElems"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "// for (final Element upInflowElem : upInflowElems) {\n// final Map<String, String> inflowMap = XmlUtils.putAttributesInHash(upInflowElem);\n// inflowTimeSeries.add(new InflowDataPoint(inflowMap));\n//",
"signature": "void parseAndSortInflowElements(List<Element> upInflowElems)"
},
{
"arguments": [
"InflowDataPoint o1",
" InflowDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "// final Double pos1 = new Double((o1).getTime());\n// final Double pos2 = new Double((o2).getTime());\n// return pos1.compareTo(pos2); // sort with increasing t\n//",
"signature": "int compare(InflowDataPoint o1, InflowDataPoint o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "// return withLogging;\n//",
"signature": "boolean withLogging()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "//",
"signature": "public LaneChangeMobilData()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "// safeDeceleration = Double.parseDouble(map.get(\"b_safe\"));\n// minimumGap = Double.parseDouble(map.get(\"s_min\"));\n// thresholdAcceleration = Double.parseDouble(map.get(\"threshold\"));\n// rightBiasAcceleration = Double.parseDouble(map.get(\"bias_right\"));\n// politeness = Double.parseDouble(map.get(\"politeness\"));\n//",
"signature": "void init(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "// return safeDeceleration;\n//",
"signature": "double getSafeDeceleration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "// return minimumGap;\n//",
"signature": "double getMinimumGap()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "// return thresholdAcceleration;\n//",
"signature": "double getThresholdAcceleration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "// return rightBiasAcceleration;\n//",
"signature": "double getRightBiasAcceleration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "// return politeness;\n//",
"signature": "double getPoliteness()"
},
{
"arguments": [
"RoadSegment roadSegment",
" org.movsim.core.autogen.Detectors detectorInput"
],
"filename": "core/src/main/java/org/movsim/output/detector/LoopDetectors.java",
"implementation": "Preconditions.checkNotNull(detectorInput);\n final double dtSample = detectorInput.getSampleInterval();\n for (final Double detPosition : getSortedPositions(detectorInput.getCrossSection())) {\n detectors.add(new LoopDetector(roadSegment, detPosition, dtSample, detectorInput.isLogging(),\n detectorInput.isLoggingLanes()));",
"signature": "public LoopDetectors(RoadSegment roadSegment, org.movsim.core.autogen.Detectors detectorInput)"
},
{
"arguments": [
"Double o1",
" Double o2"
],
"filename": "core/src/main/java/org/movsim/output/detector/LoopDetectors.java",
"implementation": "final Double pos1 = new Double((o1).doubleValue());\n final Double pos2 = new Double((o2).doubleValue());\n return pos1.compareTo(pos2); // sort with increasing x",
"signature": "int compare(Double o1, Double o2)"
},
{
"arguments": [
"List<Road> roads"
],
"filename": "core/src/main/java/org/movsim/simulator/Simulator.java",
"implementation": "for (final Road roadInput : roads) {\n * @param inputData2\n private VehicleGenerator createVehicleGenerator() {\n Preconditions.checkNotNull(inputData);\n return new VehicleGenerator(simulationRunnable.timeStep(), inputData.getVehicleTypes(), inputData\n .getSimulation().getTrafficComposition(), fuelConsumptionModelPool, routes);\n * @param road\n private void defaultTestingRoadMapping(Road roadInput) {\n addInputToRoadSegment(roadSegment, roadInput, vehGenerator);\n private void addInputToRoadSegment(RoadSegment roadSegment, Road roadInput,\n // final List<VehicleTypeInput> roadVehicleTypeInputs = roadInput.getTrafficCompositionInputData();\n if (roadInput.isSetTrafficComposition()) {\n roadVehGenerator = new VehicleGenerator(simulationRunnable.timeStep(), inputData.getVehicleTypes(),\n roadInput.getTrafficComposition(), fuelConsumptionModelPool, routes);\n if (roadInput.isSetTrafficSource()) {\n final org.movsim.core.autogen.TrafficSource trafficSourceData = roadInput.getTrafficSource();\n if (trafficSourceData.isSetInflow()) {\n final InflowTimeSeries inflowTimeSeries = new InflowTimeSeries(trafficSourceData.getInflow());\n if (trafficSourceData.isLogging()) {",
"signature": "void matchRoadSegmentsAndRoadInput(List<Road> roads)"
},
{
"arguments": [
"RoadSegment roadSegment",
" InitialConditions initialConditions",
"\n VehicleGenerator vehGenerator"
],
"filename": "core/src/main/java/org/movsim/simulator/Simulator.java",
"implementation": "Preconditions.checkNotNull(initialConditions);\n\n if (initialConditions.isSetMacroIC()) {\n setMacroInitialConditions(roadSegment, initialConditions.getMacroIC(), vehGenerator);",
"signature": "void initialConditions(RoadSegment roadSegment, InitialConditions initialConditions,\n VehicleGenerator vehGenerator)"
},
{
"arguments": [
"FlowConservingInhomogeneities flowConservingInhomogeneities"
],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java",
"implementation": "generateSpaceSeriesData(flowConservingInhomogeneities.getInhomogeneity());\n * @param list\n private void generateSpaceSeriesData(List<Inhomogeneity> list) {\n final int size = list.size();\n posValues[i] = list.get(i).getPosition();\n alphaTValues[i] = list.get(i).getAlphaT();\n alphaV0Values[i] = list.get(i).getAlphaV0();\n private final class FlowConservingBottleneckDataPoint {\n\n /** The position in m */\n private final double x;\n\n /** The alpha t. */\n private final double alphaT;\n\n /** The alpha v0. */\n private final double alphaV0;\n\n /**\n * Instantiates a new flow conserving bottleneck data point impl.\n * \n * @param map\n * the map\n */\n public FlowConservingBottleneckDataPoint(Map<String, String> map) {\n this.x = Double.parseDouble(map.get(\"x\"));\n this.alphaT = Double.parseDouble(map.get(\"alpha_T\"));\n this.alphaV0 = Double.parseDouble(map.get(\"alpha_v0\"));",
"signature": "public FlowConservingBottlenecks(FlowConservingInhomogeneities flowConservingInhomogeneities)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java",
"implementation": "return x;",
"signature": "double getPosition()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java",
"implementation": "return alphaT;",
"signature": "double getAlphaT()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/FlowConservingBottlenecks.java",
"implementation": "return alphaV0;",
"signature": "double getAlphaV0()"
},
{
"arguments": [
"List<Inflow> inflow"
],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java",
"implementation": "generateTimeSeriesData(inflow);\n private void generateTimeSeriesData(List<Inflow> inflow) {\n List<InflowDataPoint> sortedInflowDataPoints = getSortedInflowDataPoints(inflow);\n\n final int size = sortedInflowDataPoints.size();\n if (sortedInflowDataPoints.isEmpty()) {\n final InflowDataPoint inflowDataPoint = sortedInflowDataPoints.get(i);\n private List<InflowDataPoint> getSortedInflowDataPoints(List<Inflow> inflow) {\n List<InflowDataPoint> dataPoints = new ArrayList<>();\n for (final Inflow inflowDataPoint : inflow) {\n dataPoints.add(new InflowDataPoint(inflowDataPoint));",
"signature": "public InflowTimeSeries(List<Inflow> inflow)"
},
{
"arguments": [
"InflowDataPoint o1",
" InflowDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java",
"implementation": "final Double pos1 = new Double((o1).getTime());\n final Double pos2 = new Double((o2).getTime());\n return pos1.compareTo(pos2); // sort with increasing t",
"signature": "int compare(InflowDataPoint o1, InflowDataPoint o2)"
},
{
"arguments": [
"Inflow inflowDataPoint"
],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java",
"implementation": "this(inflowDataPoint.getT(), inflowDataPoint.getQPerHour(), inflowDataPoint.getV());",
"signature": "public InflowDataPoint(Inflow inflowDataPoint)"
},
{
"arguments": [
"double time",
" double flowPerHour",
" double speed"
],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java",
"implementation": "this.time = time;\n this.flow = flowPerHour * Units.INVH_TO_INVS;\n this.speed = speed; // given in m/s",
"signature": "public InflowDataPoint(double time, double flowPerHour, double speed)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java",
"implementation": "return time;",
"signature": "double getTime()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java",
"implementation": "return flow;",
"signature": "double getFlow()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InflowTimeSeries.java",
"implementation": "return speed;",
"signature": "double getSpeed()"
},
{
"arguments": [
"List<MacroIC> macroIC"
],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InitialConditionsMacro.java",
"implementation": "final int size = macroIC.size();\nif(useUserDefinedSpeeds(macroIC)){\n speed = new double[size];",
"signature": "public InitialConditionsMacro(List<MacroIC> macroIC)"
},
{
"arguments": [
"List<MacroIC> macroIC"
],
"filename": "core/src/main/java/org/movsim/simulator/roadnetwork/InitialConditionsMacro.java",
"implementation": "boolean userDefinedSpeed = true;\n for (int i = 0, N = macroIC.size(); i < N; i++) {\n if (i == 0) {\n // set initial value\n userDefinedSpeed = macroIC.get(i).isSetSpeed();",
"signature": "boolean useUserDefinedSpeeds(List<MacroIC> macroIC)"
},
{
"arguments": [
"org.movsim.core.autogen.LaneChangeModel laneChangeModelParameter"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/lanechange/LaneChangeModel.java",
"implementation": "this.parameter = laneChangeModelParameter;\n // this.withEuropeanRules = laneChangeModelParameter.isWithEuropeanRules();\n // this.vCritEur = laneChangeModelParameter.getCritSpeedEuroRules();\n // isInitialized = laneChangeModelParameter.isInitializedMobilData();\n // public LaneChangeModel(Vehicle vehicle, MOBIL lcModelMOBIL) {\n // this.lcModelMOBIL = lcModelMOBIL;\n // this.me = vehicle;\n // this.withEuropeanRules = true;\n // this.vCritEur = 5.0;\n // this.parameter = null;\n // isInitialized = true;\n //",
"signature": "public LaneChangeModel(org.movsim.core.autogen.LaneChangeModel laneChangeModelParameter)"
},
{
"arguments": [
"Vehicle vehicle"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java",
"implementation": "// // TODO handle this case with *no* <MOBIL> xml element\n //",
"signature": "public MOBIL(Vehicle vehicle)"
},
{
"arguments": [
"Vehicle vehicle",
" ModelParameterMOBIL modelParameterMOBIL"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java",
"implementation": "this.param = modelParameterMOBIL;\n\n if (modelParameterMOBIL.getSafeDeceleration() > vehicle.getMaxDeceleration()) {\n bSafe = Math.min(modelParameterMOBIL.getSafeDeceleration(), vehicle.getMaxDeceleration());\n // public MOBIL(Vehicle vehicle, double minimumGap, double safeDeceleration, double politeness,\n // double thresholdAcceleration, double rightBiasAcceleration) {\n // bSafeRef = bSafe = safeDeceleration;\n // biasRightRef = biasRight = rightBiasAcceleration;\n // gapMin = minimumGap;\n // thresholdRef = threshold = thresholdAcceleration;\n // pRef = this.politeness = politeness;\n //",
"signature": "public MOBIL(Vehicle vehicle, ModelParameterMOBIL modelParameterMOBIL)"
},
{
"arguments": [
"ModelParameter param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "return param.getV0() >= 0 && param.getV0() <= MovsimConstants.MAX_VEHICLE_SPEED;",
"signature": "boolean isValidDesiredSpeed(ModelParameter param)"
},
{
"arguments": [
"ModelParameter param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "return param.getS0() >= 0;",
"signature": "boolean isValidMinimumGap(ModelParameter param)"
},
{
"arguments": [
"double p"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "return p >= 0 && p <= 1;",
"signature": "boolean isValidProbabilityRange(double p)"
},
{
"arguments": [
"ModelParameterACC param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (param.getCoolness() < 0 || param.getCoolness() > 1) {\n throw new IllegalStateException(\"Invalid parameter for ACC coolness parameter= \" + param.getCoolness()\n + \". Choose value within [0,1].\");",
"signature": "boolean isValidParameters(ModelParameterACC param)"
},
{
"arguments": [
"ModelParameterIDM param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (!isValidDesiredSpeed(param) || isValidMinimumGap(param) || param.getT() <= 0 || param.getS1() < 0\n || param.getDelta() <= 0 || param.getA() <= 0 || param.getB() <= 0) {\n throw new IllegalStateException(\"invalid parameters for IDM model\");",
"signature": "boolean isValidParameters(ModelParameterIDM param)"
},
{
"arguments": [
"ModelParameterOVMFVDM param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (!isValidDesiredSpeed(param) || !isValidMinimumGap(param) || param.getTau() <= 0\n || param.getTransitionWidth() < 0 || param.getBeta() < 0 || param.getGamma() < 0) {\n throw new IllegalStateException(\"invalid parameters for OVM/FVDM.\");",
"signature": "boolean isValidParameter(ModelParameterOVMFVDM param)"
},
{
"arguments": [
"ModelParameterGipps param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (!isValidDesiredSpeed(param) || !isValidMinimumGap(param) || param.getA() <= 0 || param.getB() <= 0) {\n throw new IllegalStateException(\"invalid parameters for Gipps model\");",
"signature": "boolean isValidParameters(ModelParameterGipps param)"
},
{
"arguments": [
"ModelParameterKrauss param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (!isValidDesiredSpeed(param) || isValidMinimumGap(param) || param.getA() <= 0 || param.getB() <= 0) {\n throw new IllegalStateException(\"invalid parameters for Krauss model\");",
"signature": "boolean isValidParameter(ModelParameterKrauss param)"
},
{
"arguments": [
"ModelParameterNewell param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (!isValidDesiredSpeed(param) || isValidMinimumGap(param)) {\n throw new IllegalStateException(\"invalid parameters for Newell model\");",
"signature": "boolean isValidParameter(ModelParameterNewell param)"
},
{
"arguments": [
"ModelParameterNSM param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (!isValidDesiredSpeed(param) || isValidMinimumGap(param)\n || !ModelParameters.isValidProbabilityRange(param.getPSlowdown())\n || !ModelParameters.isValidProbabilityRange(param.getPSlowdown())) {\n throw new IllegalStateException(\"invalid parameters for NSM\");",
"signature": "boolean isValidParameter(ModelParameterNSM param)"
},
{
"arguments": [
"ModelParameterKKW param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "if (!isValidDesiredSpeed(param) || isValidMinimumGap(param) || param.getK() < 0\n || !ModelParameters.isValidProbabilityRange(param.getPb0())\n || !ModelParameters.isValidProbabilityRange(param.getPb1())\n || !ModelParameters.isValidProbabilityRange(param.getPa1())\n || !ModelParameters.isValidProbabilityRange(param.getPa2())\n || !ModelParameters.isValidProbabilityRange(param.getVp())) {\n throw new IllegalStateException(\"invalid parameters for KKW model\");",
"signature": "boolean isValidParameter(ModelParameterKKW param)"
},
{
"arguments": [
"ModelParameterPTM param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "// TODO implement method\n return false;",
"signature": "boolean issValidParameters(ModelParameterPTM param)"
},
{
"arguments": [
"ModelParameterCCS param"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "// TODO implement method\n return false;",
"signature": "boolean isValidParameters(ModelParameterCCS param)"
}
] | [
{
"arguments": [
"Map<String",
" RoadInput> roadInputMap",
" Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/OutputInput.java",
"implementation": "if (elem == null) {\n return;",
"signature": "public OutputInput(Map<String, RoadInput> roadInputMap, Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "parseRoadElement(elem);",
"signature": "public RoadInput(Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "id = elem.getAttributeValue(\"id\");\n\n final Element heterogenElem = elem.getChild(XmlElementNames.TrafficComposition);\n // optional for specific road\n if (heterogenElem != null) {\n trafficCompositionInputData = new ArrayList<VehicleTypeInput>();\n final List<Element> vehTypeElems = elem.getChild(XmlElementNames.TrafficComposition).getChildren(\n XmlElementNames.RoadVehicleType);\n for (final Element vehTypeElem : vehTypeElems) {\n final Map<String, String> map = XmlUtils.putAttributesInHash(vehTypeElem);\n trafficCompositionInputData.add(new VehicleTypeInput(map));",
"signature": "void parseRoadElement(Element elem)"
},
{
"arguments": [
"ICMicroData o1",
" ICMicroData o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "final Double pos1 = new Double((o1).getX());\n final Double pos2 = new Double((o2).getX());\n return pos2.compareTo(pos1); // sort with DECREASING x because of FC veh counting",
"signature": "int compare(ICMicroData o1, ICMicroData o2)"
},
{
"arguments": [
"ICMacroData o1",
" ICMacroData o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "final Double pos1 = new Double((o1).getX());\n final Double pos2 = new Double((o2).getX());\n return pos1.compareTo(pos2); // sort with increasing x",
"signature": "int compare(ICMacroData o1, ICMacroData o2)"
},
{
"arguments": [
"FlowConservingBottleneckDataPoint o1",
" FlowConservingBottleneckDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "final Double pos1 = new Double((o1).getPosition());\n final Double pos2 = new Double((o2).getPosition());\n return pos1.compareTo(pos2); // sort with increasing x",
"signature": "int compare(FlowConservingBottleneckDataPoint o1, FlowConservingBottleneckDataPoint o2)"
},
{
"arguments": [
"SpeedLimitDataPoint o1",
" SpeedLimitDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "final Double pos1 = new Double((o1).getPosition());\n final Double pos2 = new Double((o2).getPosition());\n return pos1.compareTo(pos2); // sort with increasing x",
"signature": "int compare(SpeedLimitDataPoint o1, SpeedLimitDataPoint o2)"
},
{
"arguments": [
"SlopeDataPoint o1",
" SlopeDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "final Double pos1 = new Double((o1).getPosition());\n final Double pos2 = new Double((o2).getPosition());\n return pos1.compareTo(pos2); // sort with increasing x",
"signature": "int compare(SlopeDataPoint o1, SlopeDataPoint o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "return trafficSourceData;",
"signature": "TrafficSourceData getTrafficSourceData()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "return trafficSinkData;",
"signature": "TrafficSinkData getTrafficSinkData()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "return id;",
"signature": "String getId()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "return isWithWriteFundamentalDiagrams;",
"signature": "boolean isWithWriteFundamentalDiagrams()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "return simpleRamp;",
"signature": "SimpleRampData getSimpleRamp()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "return detectorInput;",
"signature": "DetectorInput getDetectorInput()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/RoadInput.java",
"implementation": "return trafficLightsInput;",
"signature": "TrafficLightsInput getTrafficLightsInput()"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "timestep = Double.parseDouble(elem.getAttributeValue(\"dt\"));\n duration = Double.parseDouble(elem.getAttributeValue(\"duration\"));\n randomSeed = Integer.parseInt(elem.getAttributeValue(\"seed\"));\n if (elem.getAttributeValue(\"fixed_seed\").equalsIgnoreCase(\"true\")) {\n withFixedSeed = true;",
"signature": "public SimulationInput(Element elem)"
},
{
"arguments": [
"heterogenElem != null"
],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "@SuppressWarnings(\"unchecked\")\n final List<Element> vehTypeElems = elem.getChild(XmlElementNames.TrafficComposition).getChildren(\n XmlElementNames.RoadVehicleType);\n for (final Element vehTypeElem : vehTypeElems) {\n final Map<String, String> map = XmlUtils.putAttributesInHash(vehTypeElem);\n vehicleTypeInputs.add(new VehicleTypeInput(map));",
"signature": "road\n if (heterogenElem != null)"
},
{
"arguments": [
"String xodrFilename"
],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "final int i = xodrFilename.lastIndexOf(\".xodr\");\n if (i < 0) {\n System.out\n .println(\"Please provide OpenDRIVE file with ending \\\".xodr\\\" as argument with option -n, exit. \");\n return false;",
"signature": "boolean validateOpenDriveFileName(String xodrFilename)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return timestep;",
"signature": "double getTimestep()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return duration;",
"signature": "double getSimulationDuration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return withFixedSeed;",
"signature": "boolean isWithFixedSeed()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return randomSeed;",
"signature": "int getRandomSeed()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "// Quick hack: assume only one single main road !!!\n return roadInputMap.get(0);",
"signature": "RoadInput getSingleRoadInput()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return outputInput;",
"signature": "OutputInput getOutputInput()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return withCrashExit;",
"signature": "boolean isWithCrashExit()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return isWithWriteFundamentalDiagrams;",
"signature": "boolean isWithWriteFundamentalDiagrams()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/SimulationInput.java",
"implementation": "return routesInput;",
"signature": "RoutesInput getRoutesInput()"
},
{
"arguments": [
"Map<String",
" RoadInput> roadInputMap",
" Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/output/RoutesInput.java",
"implementation": "routes = new ArrayList<RouteInput>();\n\n @SuppressWarnings(\"unchecked\")\n final List<Element> routeElems = elem.getChildren(XmlElementNames.OutputRoute);\n if (routeElems != null) {\n for (final Element routeElem : routeElems) {\n RouteInput route = new RouteInput();\n route.setName(routeElem.getAttributeValue(\"label\"));\n @SuppressWarnings(\"unchecked\")\n List<Element> roads = routeElem.getChildren(XmlElementNames.OutputRoadId);\n for (Element road : roads) {\n String roadId = road.getAttributeValue(\"id\");\n route.add(roadId);",
"signature": "public RoutesInput(Map<String, RoadInput> roadInputMap, Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "if (elem == null) {\n isInitialized = false;\n return;",
"signature": "public DetectorInput(Element elem)"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "this.dtSample = Double.parseDouble(elem.getAttributeValue(\"dt\"));\n this.withLogging = Boolean.parseBoolean(elem.getAttributeValue(\"logging\"));\n this.loggingLanes = Boolean.parseBoolean(elem.getAttributeValue(\"logging_lanes\")); \n\n // Detector\n positions = new ArrayList<Double>();\n\n final List<Element> crossElems = elem.getChildren(\"CROSS_SECTION\");\n if (crossElems != null) {\n for (final Element crossElem : crossElems) {\n positions.add(Double.parseDouble(crossElem.getAttributeValue(\"x\")));",
"signature": "void parseElement(Element elem)"
},
{
"arguments": [
"Double o1",
" Double o2"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "final Double pos1 = new Double((o1).doubleValue());\n final Double pos2 = new Double((o2).doubleValue());\n return pos1.compareTo(pos2); // sort with increasing x",
"signature": "int compare(Double o1, Double o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "return dtSample;",
"signature": "double getSampleInterval()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "return isInitialized;",
"signature": "boolean isWithDetectors()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "return withLogging;",
"signature": "boolean isWithLogging()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/DetectorInput.java",
"implementation": "return loggingLanes;",
"signature": "boolean isLoggingLanes()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "this.x = Double.parseDouble(map.get(\"x\"));\n this.alphaT = Double.parseDouble(map.get(\"alpha_T\"));\n this.alphaV0 = Double.parseDouble(map.get(\"alpha_v0\"));",
"signature": "public FlowConservingBottleneckDataPoint(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "return x;",
"signature": "double getPosition()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "return alphaT;",
"signature": "double getAlphaT()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/FlowConservingBottleneckDataPoint.java",
"implementation": "return alphaV0;",
"signature": "double getAlphaV0()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "this.x = Double.parseDouble(map.get(\"x\"));\n this.rho = Units.INVKM_TO_INVM*Double.parseDouble(map.get(\"rho_per_km\"));\n // negative speed value allowed for using equilibrium speed \n this.speed = Double.parseDouble(map.get(\"v\"));",
"signature": "public ICMacroData(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "return x;",
"signature": "double getX()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "return rho;",
"signature": "double getRho()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMacroData.java",
"implementation": "return speed;",
"signature": "double getSpeed()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "this.initPosition = Double.parseDouble(map.get(\"x\"));\n this.initSpeed = Double.parseDouble(map.get(\"v\"));\n // TODO check lane numbering with road segment logic and xodr !!!\n this.initLane = Integer.parseInt(map.get(\"lane\"));\n this.typeLabel = map.get(\"label\");",
"signature": "public ICMicroData(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "return initPosition;",
"signature": "double getX()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "return initSpeed;",
"signature": "double getSpeed()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "return initLane;",
"signature": "int getInitLane()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/ICMicroData.java",
"implementation": "return typeLabel;",
"signature": "String getLabel()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "this.time = Double.parseDouble(map.get(\"t\"));\n // convert to SI\n this.flow = Double.parseDouble(map.get(\"q_per_hour\")) / 3600.0;\n this.speed = Double.parseDouble(map.get(\"v\"));",
"signature": "public InflowDataPoint(Map<String, String> map)"
},
{
"arguments": [
"double time",
" double flowPerHour",
" double speed"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "this.time = time;\n // convert to SI\n this.flow = flowPerHour / 3600.0;\n this.speed = speed;",
"signature": "public InflowDataPoint(double time, double flowPerHour, double speed)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "return time;",
"signature": "double getTime()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "return flow;",
"signature": "double getFlow()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/InflowDataPoint.java",
"implementation": "return speed;",
"signature": "double getSpeed()"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "this.relativeGap = Double.parseDouble(elem.getAttributeValue(\"relative_gap\"));\n this.relativeSpeed = Double.parseDouble(elem.getAttributeValue(\"relative_speed\"));\n this.withLogging = Boolean.parseBoolean(elem.getAttributeValue(\"logging\"));\n\n final List<Element> inflowElems = elem.getChildren(XmlElementNames.RoadInflow);\n parseAndSortInflowElements(inflowElems);",
"signature": "public SimpleRampData(Element elem)"
},
{
"arguments": [
"List<Element> inflowElems"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "inflowTimeSeries = new ArrayList<InflowDataPoint>();\n for (final Element inflowElem : inflowElems) {\n final Map<String, String> map = XmlUtils.putAttributesInHash(inflowElem);\n inflowTimeSeries.add(new InflowDataPoint(map));",
"signature": "void parseAndSortInflowElements(List<Element> inflowElems)"
},
{
"arguments": [
"InflowDataPoint o1",
" InflowDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "final Double pos1 = new Double((o1).getTime());\n final Double pos2 = new Double((o2).getTime());\n return pos1.compareTo(pos2); // sort with increasing t",
"signature": "int compare(InflowDataPoint o1, InflowDataPoint o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "return withLogging;",
"signature": "boolean withLogging()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "return relativeSpeed;",
"signature": "double getRelativeSpeedToLeader()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SimpleRampData.java",
"implementation": "return relativeGap;",
"signature": "double getRelativeGapToLeader()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java",
"implementation": "this.x = Double.parseDouble(map.get(\"x\"));\n this.gradient = Double.parseDouble(map.get(\"gradient\"));",
"signature": "public SlopeDataPoint(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java",
"implementation": "return x;",
"signature": "double getPosition()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SlopeDataPoint.java",
"implementation": "return gradient;",
"signature": "double getGradient()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java",
"implementation": "this.x = Double.parseDouble(map.get(\"x\"));\n this.speedlimit = Double.parseDouble(map.get(\"speedlimit_kmh\")) / 3.6;",
"signature": "public SpeedLimitDataPoint(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java",
"implementation": "return x;",
"signature": "double getPosition()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/SpeedLimitDataPoint.java",
"implementation": "return speedlimit;",
"signature": "double getSpeedlimit()"
},
{
"arguments": [
"Element elem"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "if (elem == null) {\n withLogging = false;",
"signature": "public TrafficSourceData(Element elem)"
},
{
"arguments": [
"List<Element> upInflowElems"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "for (final Element upInflowElem : upInflowElems) {\n final Map<String, String> inflowMap = XmlUtils.putAttributesInHash(upInflowElem);\n inflowTimeSeries.add(new InflowDataPoint(inflowMap));",
"signature": "void parseAndSortInflowElements(List<Element> upInflowElems)"
},
{
"arguments": [
"InflowDataPoint o1",
" InflowDataPoint o2"
],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "final Double pos1 = new Double((o1).getTime());\n final Double pos2 = new Double((o2).getTime());\n return pos1.compareTo(pos2); // sort with increasing t",
"signature": "int compare(InflowDataPoint o1, InflowDataPoint o2)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/simulation/TrafficSourceData.java",
"implementation": "return withLogging;",
"signature": "boolean withLogging()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "",
"signature": "public LaneChangeMobilData()"
},
{
"arguments": [
"Map<String",
" String> map"
],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "safeDeceleration = Double.parseDouble(map.get(\"b_safe\"));\n minimumGap = Double.parseDouble(map.get(\"s_min\"));\n thresholdAcceleration = Double.parseDouble(map.get(\"threshold\"));\n rightBiasAcceleration = Double.parseDouble(map.get(\"bias_right\"));\n politeness = Double.parseDouble(map.get(\"politeness\"));",
"signature": "void init(Map<String, String> map)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "return safeDeceleration;",
"signature": "double getSafeDeceleration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "return minimumGap;",
"signature": "double getMinimumGap()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "return thresholdAcceleration;",
"signature": "double getThresholdAcceleration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "return rightBiasAcceleration;",
"signature": "double getRightBiasAcceleration()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/input/model/vehicle/lanechange/LaneChangeMobilData.java",
"implementation": "return politeness;",
"signature": "double getPoliteness()"
},
{
"arguments": [
"RoadSegment roadSegment",
" DetectorInput input"
],
"filename": "core/src/main/java/org/movsim/output/detector/LoopDetectors.java",
"implementation": "detectors = new ArrayList<LoopDetector>();\n if (input.isWithDetectors()) {\n final double dtSample = input.getSampleInterval();\n final List<Double> positions = input.getPositions();\n for (final Double detPosition : positions) {\n detectors.add(new LoopDetector(roadSegment, detPosition, dtSample, input.isWithLogging(), input.isLoggingLanes()));",
"signature": "public LoopDetectors(RoadSegment roadSegment, DetectorInput input)"
},
{
"arguments": [
"Map<String",
" RoadInput> roadInputMap"
],
"filename": "core/src/main/java/org/movsim/simulator/Simulator.java",
"implementation": "for (final RoadInput roadInput : roadInputMap.values()) {\n * @param simInput\n private VehicleGenerator createVehicleGenerator(SimulationInput simInput) {\n final List<VehicleTypeInput> vehicleTypeInputs = simInput.getVehicleTypeInput();\n final VehicleGenerator vehGenerator = new VehicleGenerator(simulationRunnable.timeStep(),\n inputData.getVehiclesInput(), vehicleTypeInputs, fuelConsumptionModelPool, routes);\n return vehGenerator;\n\n * @param roadInputMap\n private void defaultTestingRoadMapping(Map<String, RoadInput> roadInputMap) {\n final RoadInput roadinput = roadInputMap.values().iterator().next();\n addInputToRoadSegment(roadSegment, roadinput, vehGenerator);\n private void addInputToRoadSegment(RoadSegment roadSegment, RoadInput roadInput,\n final List<VehicleTypeInput> roadVehicleTypeInputs = roadInput.getTrafficCompositionInputData();\n if (roadVehicleTypeInputs != null) {\n roadVehGenerator = new VehicleGenerator(simulationRunnable.timeStep(), inputData.getVehiclesInput(),\n roadVehicleTypeInputs, fuelConsumptionModelPool, routes);\n final TrafficSourceData trafficSourceData = roadInput.getTrafficSourceData();\n if (trafficSourceData.getInflowTimeSeries().size() != 0) {\n final InflowTimeSeries inflowTimeSeries = new InflowTimeSeries(trafficSourceData.getInflowTimeSeries());\n if (trafficSourceData.withLogging()) {\n if (roadInput.getSimpleRamp() != null) {\n SimpleRampData simpleRampData = roadInput.getSimpleRamp();\n InflowTimeSeries inflowTimeSeries = new InflowTimeSeries(simpleRampData.getInflowTimeSeries());\n if (simpleRampData.withLogging()) {\n final TrafficLightsInput trafficLightsInput = roadInput.getTrafficLightsInput();\n if (trafficLightsInput.isWithLogging()) {\n final int nDt = trafficLightsInput.getnDtSample();\n final SpeedLimits speedLimits = new SpeedLimits(roadInput.getSpeedLimitInputData());\n final Slopes slopes = new Slopes(roadInput.getSlopesInputData());\n final LoopDetectors loopDetectors = new LoopDetectors(roadSegment, roadInput.getDetectorInput());\n roadSegment.setLoopDetectors(loopDetectors);\n\n final FlowConservingBottlenecks flowConservingBottlenecks = new FlowConservingBottlenecks(\n roadInput.getFlowConsBottleneckInputData());\n roadSegment.setFlowConservingBottlenecks(flowConservingBottlenecks);\n initialConditions(roadSegment, roadInput, roadVehGenerator);\n private static void initialConditions(RoadSegment roadSegment, RoadInput roadInput, VehicleGenerator vehGenerator) {\n final List<ICMacroData> icMacroData = roadInput.getIcMacroData();\n if (!icMacroData.isEmpty()) {\n setMacroInitialConditions(roadSegment, roadInput, vehGenerator, icMacroData);",
"signature": "void matchRoadSegmentsAndRoadInput(Map<String, RoadInput> roadInputMap)"
},
{
"arguments": [
"LaneChangeInputData lcInputData"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/lanechange/LaneChangeModel.java",
"implementation": "this.lcInputData = lcInputData;\n this.withEuropeanRules = lcInputData.isWithEuropeanRules();\n this.vCritEur = lcInputData.getCritSpeedEuroRules();\n\n isInitialized = lcInputData.isInitializedMobilData();\n public LaneChangeModel(Vehicle vehicle, MOBIL lcModelMOBIL) {\n this.lcModelMOBIL = lcModelMOBIL;\n this.me = vehicle;\n this.withEuropeanRules = true;\n this.vCritEur = 5.0;\n this.lcInputData = null;\n isInitialized = true;",
"signature": "public LaneChangeModel(LaneChangeInputData lcInputData)"
},
{
"arguments": [
"Vehicle vehicle"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java",
"implementation": "// TODO handle this case with *no* <MOBIL> xml element",
"signature": "public MOBIL(Vehicle vehicle)"
},
{
"arguments": [
"Vehicle vehicle",
" LaneChangeMobilData lcMobilData"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java",
"implementation": "if (lcMobilData.getSafeDeceleration() > vehicle.getMaxDeceleration()) {\n bSafeRef = bSafe = Math.min(lcMobilData.getSafeDeceleration(), vehicle.getMaxDeceleration());\n biasRightRef = biasRight = lcMobilData.getRightBiasAcceleration();\n gapMin = lcMobilData.getMinimumGap();\n thresholdRef = threshold = lcMobilData.getThresholdAcceleration();\n pRef = politeness = lcMobilData.getPoliteness();\n public MOBIL(Vehicle vehicle, double minimumGap, double safeDeceleration, double politeness,\n double thresholdAcceleration, double rightBiasAcceleration) {\n bSafeRef = bSafe = safeDeceleration;\n biasRightRef = biasRight = rightBiasAcceleration;\n gapMin = minimumGap;\n thresholdRef = threshold = thresholdAcceleration;\n pRef = this.politeness = politeness;",
"signature": "public MOBIL(Vehicle vehicle, LaneChangeMobilData lcMobilData)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/lanechange/MOBIL.java",
"implementation": "return gapMin;\n public double getSafeDeceleration() {\n return bSafe;",
"signature": "double getMinimumGap()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ACC.java",
"implementation": "return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameters();",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ACC.java",
"implementation": "if (param.getCoolness() < 0 || param.getCoolness() > 1) {\n logger.error(\" coolness parameter = {",
"signature": "boolean isValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/CCS.java",
"implementation": "// TODO Auto-generated method stub\n return false;",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Gipps.java",
"implementation": "return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameters();",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Gipps.java",
"implementation": "if (param.getA() < 0 || param.getB() < 0) {\n logger.error(\" negative parameter values for {",
"signature": "boolean isValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/IDM.java",
"implementation": "// TODO Auto-generated method stub\n return false;",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/KKW.java",
"implementation": "return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/KKW.java",
"implementation": "if (param.getK() < 0 || !ModelParameters.isValidProbabilityRange(param.getPb0())\n || !ModelParameters.isValidProbabilityRange(param.getPb1())\n || !ModelParameters.isValidProbabilityRange(param.getPa1())\n || !ModelParameters.isValidProbabilityRange(param.getPa2())\n || !ModelParameters.isValidProbabilityRange(param.getVp())) {\n logger.error(\" negative parameter values for {",
"signature": "boolean isValidParameter()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Krauss.java",
"implementation": "return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Krauss.java",
"implementation": "if (param.getA() <= 0 || param.getB() <= 0) {\n logger.error(\n \" non-positive parameter values for {",
"signature": "boolean isValidParameter()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelBase.java",
"implementation": "return getDesiredSpeed() > 0 && getDesiredSpeed() <= MovsimConstants.MAX_VEHICLE_SPEED;",
"signature": "boolean isValidDesiredSpeed()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelBase.java",
"implementation": "return getMinimumGap() >= 0;",
"signature": "boolean isValidMinimumGap()"
},
{
"arguments": [
"double vehLength",
" ModelParameter longitudinalModelParameter",
"\n if "
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "longModel = new IDM((ModelParameterIDM) longitudinalModelParameter);",
"signature": "LongitudinalModelBase create(double vehLength, ModelParameter longitudinalModelParameter,\n if (longitudinalModelParameter instanceof ModelParameterIDM)"
},
{
"arguments": [
"longitudinalModelParameter instanceof ModelParameterACC"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "longModel = new ACC((ModelParameterACC) longitudinalModelParameter);",
"signature": "else if (longitudinalModelParameter instanceof ModelParameterACC)"
},
{
"arguments": [
"longitudinalModelParameter instanceof ModelParameterOVMFVDM"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "longModel = new OVM_FVDM((ModelParameterOVMFVDM) longitudinalModelParameter);",
"signature": "else if (longitudinalModelParameter instanceof ModelParameterOVMFVDM)"
},
{
"arguments": [
"longitudinalModelParameter instanceof ModelParameterGipps"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "longModel = new Gipps(simulationTimestep, (ModelParameterGipps) longitudinalModelParameter);",
"signature": "else if (longitudinalModelParameter instanceof ModelParameterGipps)"
},
{
"arguments": [
"longitudinalModelParameter instanceof ModelParameterKrauss"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "longModel = new Krauss(simulationTimestep, (ModelParameterKrauss) longitudinalModelParameter);",
"signature": "else if (longitudinalModelParameter instanceof ModelParameterKrauss)"
},
{
"arguments": [
"longitudinalModelParameter instanceof ModelParameterNewell"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "return new Newell(simulationTimestep, (ModelParameterNewell) longitudinalModelParameter);",
"signature": "else if (longitudinalModelParameter instanceof ModelParameterNewell)"
},
{
"arguments": [
"longitudinalModelParameter instanceof ModelParameterNSM"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "longModel = new NSM((ModelParameterNSM) longitudinalModelParameter);",
"signature": "else if (longitudinalModelParameter instanceof ModelParameterNSM)"
},
{
"arguments": [
"longitudinalModelParameter instanceof ModelParameterKKW"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/LongitudinalModelFactory.java",
"implementation": "longModel = new KKW((ModelParameterKKW) longitudinalModelParameter, vehLength);",
"signature": "else if (longitudinalModelParameter instanceof ModelParameterKKW)"
},
{
"arguments": [
"double p"
],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/ModelParameters.java",
"implementation": "return p >= 0 && p <= 1;",
"signature": "boolean isValidProbabilityRange(double p)"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/NSM.java",
"implementation": "return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/NSM.java",
"implementation": "if (!ModelParameters.isValidProbabilityRange(param.getPSlowdown())\n || !ModelParameters.isValidProbabilityRange(param.getPSlowdown())) {\n logger.error(\" negative parameter values for {",
"signature": "boolean isValidParameter()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/Newell.java",
"implementation": "// TODO Auto-generated method stub\n return false;",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/OVM_FVDM.java",
"implementation": "return isValidDesiredSpeed() && isValidMinimumGap() && isValidParameter();",
"signature": "boolean hasValidParameters()"
},
{
"arguments": [],
"filename": "core/src/main/java/org/movsim/simulator/vehicles/longitudinalmodel/acceleration/OVM_FVDM.java",
"implementation": "if ( param.getTau() <= 0 || param.getTransitionWidth() < 0 || param.getBeta() < 0 || param.getGamma() < 0 ) {\n logger.error(\" negative parameter values for {",
"signature": "boolean isValidParameter()"
}
] |
4a42ea3b577766d9356220fa21eb59720d8f7631 | [
{
"arguments": [
"long iterationCount",
" double dt",
" double simulationTime"
],
"filename": "src/main/java/org/movsim/simulator/roadSection/impl/OnrampImpl.java",
"implementation": "// TODO Auto-generated method stub",
"signature": "void updateDetectors(long iterationCount, double dt, double simulationTime)"
},
{
"arguments": [
"long iterationCount",
" double dt",
" double simulationTime"
],
"filename": "src/main/java/org/movsim/simulator/roadSection/impl/OnrampMobilImpl.java",
"implementation": "// TODO Auto-generated method stub",
"signature": "void updateDetectors(long iterationCount, double dt, double simulationTime)"
},
{
"arguments": [
"long iterationCount",
" double dt",
" double time"
],
"filename": "src/main/java/org/movsim/simulator/roadSection/impl/RoadSectionImpl.java",
"implementation": "// TODO",
"signature": "void laneChanging(long iterationCount, double dt, double time)"
}
] | [
{
"arguments": [
"InputData inputData"
],
"filename": "src/main/java/org/movsim/simulator/roadSection/impl/RoadSectionImpl.java",
"implementation": "onramps = new ArrayList<Onramp>();\n\n @Override\n public Onramp getMobilRampHack(){\n return onramps.get(0);",
"signature": "void initOnramps(InputData inputData)"
},
{
"arguments": [
"long iterationCount",
" double dt",
" double time"
],
"filename": "src/main/java/org/movsim/simulator/roadSection/impl/RoadSectionImpl.java",
"implementation": "// TODO Auto-generated method stub",
"signature": "void laneChanging(long iterationCount, double dt, double time)"
}
] |
0224fc94cfed181d1dcc6a225361eb5c5a231813 | [
{
"arguments": [],
"filename": "jdeeco-simulation/src/cz/cuni/mff/d3s/deeco/simulation/matsim/MATSimOMNetSimulation.java",
"implementation": "long currentTime = getCurrentMilliseconds();\n\tpublic long getMATSimMilliseconds() {\n\t\treturn getCurrentMilliseconds()\n\t\t\t\t+ (Math.round(controler.getConfig().getQSimConfigGroup()\n\t\t\t\t\t\t.getStartTime()) * MILLIS_IN_SECOND);",
"signature": "long getMATSimSeconds()"
}
] | [
{
"arguments": [],
"filename": "jdeeco-core/src/cz/cuni/mff/d3s/deeco/network/PacketReceiver.java",
"implementation": "if (timeProvider.getCurrentTime() - lastMessagesWipe >= messageWipePeriod) {\n\t\t\tint origCnt = messages.size();\n\n\t\t\tSet<Integer> droppedIds = new HashSet<>();\n\t\t\t\n\t\t\tMessage message;\n\t\t\tIterator<Entry<Integer, Message>> it = messages.entrySet().iterator();\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tEntry<Integer, Message> entry = it.next();\t\t\t\t\n\t\t\t\tmessage = entry.getValue();\n\t\t\t\tif (message != null && message.isStale()) {\n\t\t\t\t\tdroppedIds.add(entry.getKey());\n\t\t\t\t\tit.remove();",
"signature": "void clearCachedMessagesIfNecessary()"
}
] |
076b558804cdebd66ac967e1701108f2d5d1526a | [
{
"arguments": [
"CommandHook hook"
],
"filename": "zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableCommand.java",
"implementation": "return this.getName().equals(hook.getCommand());",
"signature": "boolean isForThisCommand(CommandHook hook)"
}
] | [
{
"arguments": [
"CommandHook hook"
],
"filename": "zanata-client-commands/src/main/java/org/zanata/client/commands/ConfigurableProjectCommand.java",
"implementation": "return this.getName().equals(hook.getCommand());",
"signature": "boolean isForThisCommand(CommandHook hook)"
}
] |
0979e2023d06ac357434dbf69cff0f00c196cf3e | [
{
"arguments": [
"Position position",
" String containerID"
],
"filename": "src/org/eclipse/iee/editor/core/container/ContainerManager.java",
"implementation": "return new Container(\n position, containerID, fStyledText, this);",
"signature": "Container createContainer(Position position, String containerID)"
},
{
"arguments": [
"String containerID"
],
"filename": "src/org/eclipse/iee/editor/core/pad/Pad.java",
"implementation": "fContainerID = containerID;",
"signature": "void setContainerID(String containerID)"
},
{
"arguments": [],
"filename": "src/org/eclipse/iee/editor/core/pad/PadManager.java",
"implementation": "fContainerManagers = new HashSet<ContainerManager>();\n\t\tInitListener();\n\t\n\tpublic void registerContainerManager(ContainerManager containerManager) {\n\t\tSystem.out.println(\"registerContainerManager\");\n\t\tcontainerManager.addContainerManagerListener(fContainerManagerListener);\n\t\tfContainerManagers.add(containerManager);",
"signature": "public PadManager()"
},
{
"arguments": [
"ContainerManager containerManager"
],
"filename": "src/org/eclipse/iee/editor/core/pad/PadManager.java",
"implementation": "containerManager.removeContainerManagerListener(fContainerManagerListener);\n\t\tfContainerManagers.remove(containerManager);",
"signature": "void releaseContainerManager(ContainerManager containerManager)"
},
{
"arguments": [
"Pad pad",
" int location",
" ContainerManager containerManager"
],
"filename": "src/org/eclipse/iee/editor/core/pad/PadManager.java",
"implementation": "Assert.isLegal(fContainerManagers.contains(containerManager));\n\t\tfSuspendedPads.put(pad.getContainerID(), pad);\n\t\tcontainerManager.RequestContainerAllocation(pad.getContainerID(), location);\n\tpublic void destroyPad(Pad pad, ContainerManager containerManager) {\n\t\t\tString containerID = pad.getContainerID();\n\t\t\tcontainerManager.RequestContainerRelease(containerID);\n\t\t\n\tprotected void InitListener() {\n\t\tfContainerManagerListener = new IContainerManagerListener() {\n\t\t\t\tAssert.isLegal(pad.getContainerID().equals(containerID));\n\t\t\t\tAssert.isNotNull(pad); // stash save\n\t\t\t\tPad pad = original.copy();\n\t\t\t\tpad.setContainerID(containerID);",
"signature": "void createPad(Pad pad, int location, ContainerManager containerManager)"
}
] | [
{
"arguments": [
"StyledText styledText"
],
"filename": "src/org/eclipse/iee/editor/core/container/Container.java",
"implementation": "fStyledText = styledText;",
"signature": "void setStyledText(StyledText styledText)"
},
{
"arguments": [
"ContainerManager containerManager"
],
"filename": "src/org/eclipse/iee/editor/core/container/Container.java",
"implementation": "fContainerManager = containerManager;",
"signature": "void setContainerManager(ContainerManager containerManager)"
},
{
"arguments": [
"ContainerManager containerManager"
],
"filename": "src/org/eclipse/iee/editor/core/pad/PadManager.java",
"implementation": "fContainerManager = containerManager;\n\t\t\n\t\tInitListeners();\n\t\treturn fPads.keySet().toArray();\n\t\t\n\tpublic void addPad(Pad pad, int location) {\n\t\tfSuspendedPads.put(pad.getContainerID(), pad);\t\t\n\t\tfContainerManager.RequestContainerAllocation(pad.getContainerID(), location);\n\tpublic void removePad(Pad pad) {\n\t\t\tString containerID = pad.getContainer().getContainerID();\n\t\t\tfContainerManager.RequestContainerRelease(containerID);\n\tprotected void InitListeners() {\n\t\tfContainerManager.addContainerManagerListener(new IContainerManagerListener() {\n\t\t\t\tAssert.isNotNull(pad);\n\t\t\t\tPad pad = original.copy(containerID);",
"signature": "public PadManager(ContainerManager containerManager)"
}
] |
0fd2b432779b31d6801ff1c1c1c6f00148e1e066 | [
{
"arguments": [
"final Iterable<T> theIterable",
" final Predicate<? super T> thePredicate"
],
"filename": "core/src/com/clarkparsia/empire/Empire.java",
"implementation": "try {\r\n return find(theIterable, thePredicate) != null;",
"signature": "boolean find2(final Iterable<T> theIterable, final Predicate<? super T> thePredicate)"
},
{
"arguments": [],
"filename": "core/src/com/clarkparsia/empire/annotation/AnnotationChecker.java",
"implementation": "",
"signature": "private AnnotationChecker()"
},
{
"arguments": [
"final Field theField"
],
"filename": "core/src/com/clarkparsia/empire/annotation/RdfGenerator.java",
"implementation": "if (theField.getAnnotation(RdfProperty.class) != null) {\n\t\t\t\t\t\taAccessMap.put(FACTORY.createURI(PrefixMapping.GLOBAL.uri(theField.getAnnotation(RdfProperty.class).value())),\n\t\t\t\t\t\t\t\t\t theField);\n\t\t\t\t\t\taAccessMap.put(FACTORY.createURI(aBase + theField.getName()),\n\t\t\t\t\t\t\t\t\t theField);\n\n\t\t\t\t\treturn true;\n\t\t\tIterables2.each(aMethods, new Predicate<Method>() {\n\t\t\t\tpublic boolean apply(final Method theMethod) {\n\t\t\t\t\tRdfProperty aAnnotation = BeanReflectUtil.getAnnotation(theMethod, RdfProperty.class);\n\t\t\t\t\t\taAccessMap.put(FACTORY.createURI(PrefixMapping.GLOBAL.uri(aAnnotation.value())),\n\t\t\t\t\t\t\t\t\t theMethod);\n\n\t\t\t\t\treturn true;\n\t\tString aValue = hash(Strings2.getRandomString(10));\n\t\t\t\taValue = Strings2.urlEncode(aValObj.toString());\n\t\t\t\tif (aValObj instanceof java.net.URI || NetUtils.isURI(aValObj.toString())) {\n\t\t\tPrefixMapping.GLOBAL.addMapping(aPrefix, aURI);\n\t\t\tResourceBuilder aRes = aBuilder.instance(aBuilder.getValueFactory().createURI(PrefixMapping.GLOBAL.uri(aClass.value())),\n\t\t\t\t\t\t\t\t? aBuilder.getValueFactory().createURI(PrefixMapping.GLOBAL.uri(aPropertyAnnotation.value()))\n\t\t\treturn Lists.newArrayList(Collections2.transform(theCollection, new AsValueFunction(theAccess)));\n\t\treturn Strings2.hex(Strings2.md5(theObj.toString()));\n\t\t\tif (!Iterables2.find(aList, CONTAINS_RESOURCES)) {\n\t\t\t\t\tCollection<Value> aLangFiltered = Collections2.filter(aList, new Predicate<Value>() { public boolean apply(final Value theValue) { return ((Literal)theValue).getLanguage() == null;",
"signature": "boolean apply(final Field theField)"
},
{
"arguments": [],
"filename": "core/src/com/clarkparsia/empire/codegen/BeanGenerator.java",
"implementation": "",
"signature": "private BeanGenerator()"
},
{
"arguments": [
"final Resource theValue"
],
"filename": "core/src/com/clarkparsia/empire/codegen/BeanGenerator.java",
"implementation": "for (BindingSet aBinding : AdunaIterations.iterable(aResults)) {\n\t\t\t\tCollection aCollection = Sets.newHashSet(theGraph.getValues( (Resource) aBinding.getValue(\"s\"), theProp));\n\t\t\taLabel = ((URI) theClass).getLocalName();\n\t\tCollection<Resource> aClasses = Sets.newHashSet(Iterators.transform(new MultiIterator<Statement>(AdunaIterations.iterator(aRepository.getStatements(null, RDF.TYPE, RDFS.CLASS)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AdunaIterations.iterator(aRepository.getStatements(null, RDF.TYPE, OWL.CLASS))),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew StatementToSubject()));\n\t\taClasses = Collections2.filter(aClasses, new Predicate<Resource>() { public boolean apply(Resource theRes) { return theRes instanceof URI;",
"signature": "boolean apply(final Resource theValue)"
},
{
"arguments": [],
"filename": "core/src/com/clarkparsia/empire/codegen/InstanceGenerator.java",
"implementation": "",
"signature": "private InstanceGenerator()"
},
{
"arguments": [],
"filename": "core/src/com/clarkparsia/empire/ds/DataSourceUtil.java",
"implementation": "",
"signature": "private DataSourceUtil()"
},
{
"arguments": [
"com.hp.hpl.jena.rdf.model.Statement theStatement"
],
"filename": "jena/src/com/clarkparsia/empire/jena/JenaDataSource.java",
"implementation": "return JenaSesameUtils.asSesameStatement(theStatement);",
"signature": "Statement apply(com.hp.hpl.jena.rdf.model.Statement theStatement)"
}
] | [
{
"arguments": [],
"filename": "core/src/com/clarkparsia/empire/annotation/RdfGenerator.java",
"implementation": "if (getData().getAnnotation(RdfProperty.class) != null) {\n\t\t\t\t\t\taAccessMap.put(FACTORY.createURI(NamespaceUtils.uri(getData().getAnnotation(RdfProperty.class).value())),\n\t\t\t\t\t\t\t\t\t getData());\n\t\t\t\t\t\taAccessMap.put(FACTORY.createURI(aBase + getData().getName()),\n\t\t\t\t\t\t\t\t\t getData());\n\t\t\tCollectionUtil.each(aMethods, new AbstractDataCommand<Method>() {\n\t\t\t\tpublic void execute() {\n\t\t\t\t\tRdfProperty aAnnotation = BeanReflectUtil.getAnnotation(getData(), RdfProperty.class);\n\t\t\t\t\t\taAccessMap.put(FACTORY.createURI(NamespaceUtils.uri(aAnnotation.value())),\n\t\t\t\t\t\t\t\t\t getData());\n\t\tString aValue = hash(BasicUtils.getRandomString(10));\n\t\t\t\taValue = Encoder.urlEncode(aValObj.toString());\n\t\t\t\tif (aValObj instanceof java.net.URI || BasicUtils.isURI(aValObj.toString())) {\n\t\t\tNamespaceUtils.addNamespace(aPrefix, aURI);\n\t\t\tResourceBuilder aRes = aBuilder.instance(aBuilder.getValueFactory().createURI(NamespaceUtils.uri(aClass.value())),\n\t\t\t\t\t\t\t\t? aBuilder.getValueFactory().createURI(NamespaceUtils.uri(aPropertyAnnotation.value()))\n\t\t\treturn CollectionUtil.list(CollectionUtil.transform(theCollection, new AsValueFunction(theAccess)));\n\t\treturn BasicUtils.hex(BasicUtils.md5(theObj.toString()));\n\t\t\tif (!find(aList, CONTAINS_RESOURCES)) {\n\t\t\t\t\tCollection<Value> aLangFiltered = filter(aList, new Predicate<Value>() { public boolean accept(final Value theValue) { return ((Literal)theValue).getLanguage() == null;",
"signature": "void execute()"
},
{
"arguments": [
"final Resource theValue"
],
"filename": "core/src/com/clarkparsia/empire/codegen/BeanGenerator.java",
"implementation": "for (BindingSet aBinding : OpenRdfUtil.iterable(aResults)) {\n\t\t\t\tCollection aCollection = set(theGraph.getValues( (Resource) aBinding.getValue(\"s\"), theProp));\n\t\t\taLabel = NamespaceUtils.getLocalName(theClass.toString());\n\t\tCollection<Resource> aClasses = transform(new MultiIterator<Statement>(AdunaIterations.iterator(aRepository.getStatements(null, RDF.TYPE, RDFS.CLASS)),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t AdunaIterations.iterator(aRepository.getStatements(null, RDF.TYPE, OWL.CLASS))),\n\t\t\t\t\t\t\t\t\t\t\t\t new StatementToSubject());\n\t\taClasses = filter(aClasses, new Predicate<Resource>() { public boolean accept(Resource theRes) { return theRes instanceof URI;",
"signature": "boolean accept(final Resource theValue)"
},
{
"arguments": [
"aStmts",
"\n\t\t\t\t\t\t new Function<com.hp.hpl.jena.rdf.model.Statement",
" Statement>"
],
"filename": "jena/src/com/clarkparsia/empire/jena/JenaDataSource.java",
"implementation": "public Statement apply(com.hp.hpl.jena.rdf.model.Statement theStatement) {\n\t\t\t\t\t\t\t\t return JenaSesameUtils.asSesameStatement(theStatement);",
"signature": "return transform(aStmts,\n\t\t\t\t\t\t new Function<com.hp.hpl.jena.rdf.model.Statement, Statement>()"
}
] |
11b000ab845d13381efc6af447362e0c0a68d12e | [
{
"arguments": [],
"filename": "retrofit/src/test/java/retrofit/RxSupportTest.java",
"implementation": "@Override public ResponseWrapper invoke(RequestInterceptor requestInterceptor) {\n private RequestInterceptor requestInterceptor = spy(new RequestInterceptor() {\n @Override public void intercept(RequestFacade request) {",
"signature": "new Invoker()"
},
{
"arguments": [],
"filename": "retrofit/src/test/java/retrofit/RxSupportTest.java",
"implementation": "rxSupport.createRequestObservable(invoker).subscribe(subscriber);\n @Test public void observableCallsOnNextOnHttpExecutorWithSubscriber() {\n rxSupport.createRequestObservable(invoker).subscribeOn(test).subscribe(subscriber);\n @Test public void observableUnSubscribesDoesNotExecuteCallable() throws Exception {\n Subscription subscription = rxSupport.createRequestObservable(invoker).subscribe(subscriber);\n verify(invoker, never()).invoke(any(RequestInterceptor.class));\n @Test public void observableCallsOperatorsOffHttpExecutor() {\n rxSupport.createRequestObservable(invoker)\n @Test public void observableDoesNotLockExecutor() {\n rxSupport.createRequestObservable(invoker)\n rxSupport.createRequestObservable(invoker)\n @Test public void observableRespectsObserveOn() throws Exception {\n rxSupport.createRequestObservable(invoker)\n verify(invoker, times(1)).invoke(any(RequestInterceptor.class));\n @Test public void observableCallsInterceptorForEverySubscription() throws Exception {\n rxSupport.createRequestObservable(invoker).subscribe(subscriber);\n rxSupport.createRequestObservable(invoker).subscribe(subscriber);\n\n // The interceptor should have been called for each request upon subscription.\n verify(requestInterceptor, times(2)).intercept(any(RequestFacade.class));\n\n // Background execution of the requests should not touch the interceptor.\n executor.executeAll();\n verifyNoMoreInteractions(requestInterceptor);",
"signature": "void observableCallsOnNextOnHttpExecutor()"
}
] | [
{
"arguments": [
"final Callable<ResponseWrapper> request"
],
"filename": "retrofit/src/main/java/retrofit/RxSupport.java",
"implementation": "if (subscriber.isUnsubscribed()) {\n return;",
"signature": "Observable createRequestObservable(final Callable<ResponseWrapper> request)"
}
] |
15de1052ed5a4f720b8611eb64bf5d58c0bd0459 | [
{
"arguments": [
"final Resource res",
" final IFileSystemAccess access"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "{\n EList<EObject> _contents = res.getContents();\n EObject _head = IterableExtensions.<EObject>head(_contents);\n AbstractSection _mainSection = ((XdocFile) _head)==null?(AbstractSection)null:((XdocFile) _head).getMainSection();\n final AbstractSection doc = _mainSection;\n if ((doc instanceof org.eclipse.xtext.xdoc.xdoc.Document)) {\n this.generate(((Document) doc), access);\n public void generate(final Document document, final IFileSystemAccess access) {\n Map<AbstractSection,String> _computeURLs = this.eclipseNamingExtensions.computeURLs(document);\n final Map<AbstractSection,String> fileNames = _computeURLs;\n StringConcatenation _generateToc = this.tocGenerator.generateToc(document, fileNames);\n String _get = fileNames.get(document);\n StringConcatenation _generateRootDocument = this.generateRootDocument(document, fileNames);\n access.generateFile(_get, _generateRootDocument);\n this.generate(c, fileNames, access);",
"signature": "void doGenerate(final Resource res, final IFileSystemAccess access)"
},
{
"arguments": [
"final Document document",
" final Map<AbstractSection",
"String> fileNames"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "StringConcatenation _builder = new StringConcatenation();\n _builder.append(\"<html>\");\n _builder.newLine();\n _builder.append(\"<head>\");\n _builder.newLine();\n _builder.append(\"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=ISO-8859-1\\\" >\");\n _builder.newLine();\n _builder.append(\"<title>\");\n TextOrMarkup _title = document.getTitle();\n CharSequence _genPlainText = this.plainText.genPlainText(_title);\n _builder.append(_genPlainText, \"\");\n _builder.append(\"</title>\");\n _builder.newLineIfNotEmpty();\n _builder.newLine();\n _builder.append(\"<link href=\\\"book.css\\\" rel=\\\"stylesheet\\\" type=\\\"text/css\\\">\");\n _builder.newLine();\n _builder.append(\"<link href=\\\"code.css\\\" rel=\\\"stylesheet\\\" type=\\\"text/css\\\">\");\n _builder.newLine();\n _builder.append(\"<link rel=\\\"home\\\" href=\\\"\");\n String _get = fileNames.get(document);\n _builder.append(_get, \"\");\n _builder.append(\"\\\" title=\\\"\\\">\");\n _builder.newLineIfNotEmpty();\n _builder.append(\"</head>\");\n _builder.newLine();\n _builder.append(\"<body>\");\n _builder.newLine();\n _builder.append(\"<h1>\");\n TextOrMarkup _title_1 = document.getTitle();\n CharSequence _genPlainText_1 = this.plainText.genPlainText(_title_1);\n _builder.append(_genPlainText_1, \"\");\n _builder.append(\"</h1>\");\n _builder.newLineIfNotEmpty();\n {\n EList<TextOrMarkup> _contents = document.getContents();\n for(TextOrMarkup content : _contents) {\n StringConcatenation _generatePar = this.generatePar(content, fileNames);\n _builder.append(_generatePar, \"\");\n _builder.newLineIfNotEmpty();",
"signature": "StringConcatenation generateRootDocument(final Document document, final Map<AbstractSection,String> fileNames)"
},
{
"arguments": [
"final AbstractSection section",
" final Map<AbstractSection",
"String> fileNames"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "StringConcatenation _builder = new StringConcatenation();\n _builder.append(\"<li><a href=\\\"\");\n String _get = fileNames.get(section);\n _builder.append(_get, \"\");\n _builder.append(\"\\\">\");\n TextOrMarkup _title = section.getTitle();\n CharSequence _genPlainText = this.plainText.genPlainText(_title);\n _builder.append(_genPlainText, \"\");\n _builder.append(\"</a>\");\n _builder.newLineIfNotEmpty();\n {\n List<? extends AbstractSection> _sections = this.sectionExtension.sections(section);\n boolean hasAnyElements = false;\n for(AbstractSection ss : _sections) {\n if (!hasAnyElements) {\n hasAnyElements = true;\n _builder.append(\"<ol>\", \"\t\");",
"signature": "StringConcatenation generateEntryInRoot(final AbstractSection section, final Map<AbstractSection,String> fileNames)"
},
{
"arguments": [
"final Chapter chapter",
" final Map<AbstractSection",
"String> fileNames",
" final IFileSystemAccess access"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "String _get = fileNames.get(chapter);\n CharSequence _generate = this.generate(chapter, fileNames);\n access.generateFile(_get, _generate);\n protected CharSequence _generate(final Chapter chapter, final Map<AbstractSection,String> fileNames) {\n TextOrMarkup _title = chapter.getTitle();\n {\n String _labelName = this.eclipseNamingExtensions.labelName(chapter, fileNames);\n boolean _operator_notEquals = ObjectExtensions.operator_notEquals(_labelName, null);\n if (_operator_notEquals) {\n _builder.append(\"<a name=\\\"\");\n String _labelName_1 = this.eclipseNamingExtensions.labelName(chapter, fileNames);\n _builder.append(_labelName_1, \"\");\n _builder.append(\"\\\"></a>\");",
"signature": "void generate(final Chapter chapter, final Map<AbstractSection,String> fileNames, final IFileSystemAccess access)"
},
{
"arguments": [
"final AbstractSection aS",
" final Map<AbstractSection",
"String> fileNames"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "String _labelName = this.eclipseNamingExtensions.labelName(aS, fileNames);\n StringConcatenation _generatePar = this.generatePar(c, fileNames);\n List<? extends AbstractSection> _sections = this.sectionExtension.sections(aS);\n for(AbstractSection ss : _sections) {\n CharSequence _generate = this.generate(ss, fileNames);\n protected CharSequence _generate(final Section4 aS, final Map<AbstractSection,String> fileNames) {\n String _labelName = this.eclipseNamingExtensions.labelName(aS, fileNames);\n StringConcatenation _genNonParContent = this.genNonParContent(_title, fileNames);\n StringConcatenation _generatePar = this.generatePar(tom, fileNames);\n public StringConcatenation generatePar(final TextOrMarkup tom, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(c, fileNames);\n protected CharSequence _generate(final Todo todo, final Map<AbstractSection,String> fileNames) {\n protected CharSequence _generate(final Ref ref, final Map<AbstractSection,String> fileNames) {\n Object _url = this.url(_ref, fileNames);\n _builder.append(_url, \"\");\n _builder.append(\"\\\">section \");\n Identifiable _ref_2 = ref.getRef();\n Object _url_1 = this.url(_ref_2, fileNames);\n _builder.append(_url_1, \"\");\n StringConcatenation _genNonParContent = this.genNonParContent(tom, fileNames);\n protected Object _url(final Anchor anchor, final Map<AbstractSection,String> fileNames) {\n URI _xblockexpression = null;\n {\n AbstractSection _containerOfType = EcoreUtil2.<AbstractSection>getContainerOfType(anchor, org.eclipse.xtext.xdoc.xdoc.AbstractSection.class);\n final AbstractSection section = _containerOfType;\n String _get = fileNames.get(section);\n final String fileName = _get;\n boolean _operator_equals = ObjectExtensions.operator_equals(fileName, null);\n if (_operator_equals) {\n return null;",
"signature": "CharSequence _generate(final AbstractSection aS, final Map<AbstractSection,String> fileNames)"
},
{
"arguments": [
"final AbstractSection section",
" final Map<AbstractSection",
"String> fileNames"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "String _get = fileNames.get(section);\n return _get;",
"signature": "Object _url(final AbstractSection section, final Map<AbstractSection,String> fileNames)"
},
{
"arguments": [
"final TextOrMarkup tom",
" final Map<AbstractSection",
"String> fileNames"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "CharSequence _generate = this.generate(obj, fileNames);\n protected CharSequence _generate(final UnorderedList ul, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(i, fileNames);\n protected CharSequence _generate(final OrderedList ul, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(i, fileNames);\n protected CharSequence _generate(final Item i, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(tom, fileNames);\n protected CharSequence _generate(final Anchor a, final Map<AbstractSection,String> fileNames) {\n _builder.append(\"<a name=\\\"anchor-\");\n protected CharSequence _generate(final ImageRef img, final Map<AbstractSection,String> fileNames) {\n protected CharSequence _generate(final TextPart tp, final Map<AbstractSection,String> fileNames) {\n protected CharSequence _generate(final Table table, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(tr, fileNames);\n protected CharSequence _generate(final TableRow tr, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(td, fileNames);\n protected CharSequence _generate(final TableData td, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(c, fileNames);\n protected CharSequence _generate(final Emphasize em, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(c, fileNames);\n protected CharSequence _generate(final Link link, final Map<AbstractSection,String> fileNames) {\n protected CharSequence _generate(final CodeRef cRef, final Map<AbstractSection,String> fileNames) {\n protected CharSequence _generate(final CodeBlock cb, final Map<AbstractSection,String> fileNames) {\n StringConcatenation _generateCode = this.generateCode(((Code) _head), _language, fileNames);\n StringConcatenation _generateCode_1 = this.generateCode(code, _language_1, fileNames);\n protected StringConcatenation _generateCode(final Code code, final LangDef lang, final Map<AbstractSection,String> fileNames) {\n protected StringConcatenation _generateCode(final MarkupInCode code, final LangDef lang, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(code, fileNames);\n protected StringConcatenation _generateCode(final Code code, final Void v, final Map<AbstractSection,String> fileNames) {\n public StringConcatenation genNonParContent(final TextOrMarkup tom, final Map<AbstractSection,String> fileNames) {\n CharSequence _generate = this.generate(obj, fileNames);\n public CharSequence generate(final EObject chapter, final Map<AbstractSection,String> fileNames) {\n && (fileNames instanceof Map)) {\n return _generate((Chapter)chapter, (Map<AbstractSection,String>)fileNames);",
"signature": "CharSequence _generate(final TextOrMarkup tom, final Map<AbstractSection,String> fileNames)"
},
{
"arguments": [
"final Identifiable section",
" final Map<AbstractSection",
"String> fileNames"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "if ((section instanceof AbstractSection)\n && (fileNames instanceof Map)) {\n return _url((AbstractSection)section, (Map<AbstractSection,String>)fileNames);",
"signature": "Object url(final Identifiable section, final Map<AbstractSection,String> fileNames)"
},
{
"arguments": [
"final AbstractSection section",
" final Map<AbstractSection",
"String> fileNames"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "String _xblockexpression = null;\n {\n String _get = fileNames.get(section);\n final String fileName = _get;\n boolean _operator_equals = ObjectExtensions.operator_equals(fileName, null);\n if (_operator_equals) {\n return null;",
"signature": "String labelName(final AbstractSection section, final Map<AbstractSection,String> fileNames)"
},
{
"arguments": [
"final Document document",
" final String fileName",
" final String prefix",
" final int index",
" final Map<AbstractSection",
"String> result"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "{\n Resource _eResource = document.eResource();\n URI _uRI = _eResource.getURI();\n URI _trimFileExtension = _uRI.trimFileExtension();\n String _lastSegment = _trimFileExtension.lastSegment();\n String _operator_plus = StringExtensions.operator_plus(_lastSegment, \".html\");\n String name = _operator_plus;\n final Map<AbstractSection,String> typeConverted_result = (Map<AbstractSection,String>)result;\n typeConverted_result.put(document, name);\n List<? extends AbstractSection> _sections = this.sectionExtension.sections(document);\n final List<? extends AbstractSection> sections = _sections;\n int _size = sections.size();\n int _operator_minus = IntegerExtensions.operator_minus(((Integer)_size), ((Integer)1));\n Iterable<Integer> _operator_upTo = IntegerExtensions.operator_upTo(((Integer)0), ((Integer)_operator_minus));\n for (Integer i : _operator_upTo) {\n final List<? extends AbstractSection> typeConverted_sections = (List<? extends AbstractSection>)sections;\n AbstractSection _get = typeConverted_sections.get(i);\n this.computeURLs(_get, fileName, \"\", i, result);",
"signature": "void _computeURLs(final Document document, final String fileName, final String prefix, final int index, final Map<AbstractSection,String> result)"
},
{
"arguments": [
"final Chapter chapter",
" final String fileName",
" final String prefix",
" final int index",
" final Map<AbstractSection",
"String> result"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "Resource _eResource = chapter.eResource();\n URI _trimFileExtension = _uRI.trimFileExtension();\n String _lastSegment = _trimFileExtension.lastSegment();\n String name = _lastSegment;\n int _operator_minus = IntegerExtensions.operator_minus(1);\n boolean _operator_notEquals = ObjectExtensions.operator_notEquals(((Integer)index), ((Integer)_operator_minus));\n if (_operator_notEquals) {\n String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, ((Integer)index));\n name = _operator_plus_2;\n name = _operator_plus_3;\n final Map<AbstractSection,String> typeConverted_result = (Map<AbstractSection,String>)result;\n typeConverted_result.put(chapter, name);\n List<? extends AbstractSection> _sections = this.sectionExtension.sections(chapter);\n final List<? extends AbstractSection> sections = _sections;\n int _size = sections.size();\n int _operator_minus_1 = IntegerExtensions.operator_minus(((Integer)_size), ((Integer)1));\n Iterable<Integer> _operator_upTo = IntegerExtensions.operator_upTo(((Integer)0), ((Integer)_operator_minus_1));\n for (Integer i : _operator_upTo) {\n final List<? extends AbstractSection> typeConverted_sections = (List<? extends AbstractSection>)sections;\n AbstractSection _get = typeConverted_sections.get(i);\n this.computeURLs(_get, name, \"\", i, result);\n protected void _computeURLs(final ChapterRef chapterRef, final String fileName, final String prefix, final int index, final Map<AbstractSection,String> result) {\n {\n Chapter _chapter = chapterRef.getChapter();\n int _operator_minus = IntegerExtensions.operator_minus(1);\n this.computeURLs(_chapter, fileName, prefix, ((Integer)_operator_minus), result);\n final Map<AbstractSection,String> typeConverted_result = (Map<AbstractSection,String>)result;\n Chapter _chapter_1 = chapterRef.getChapter();\n String _get = result.get(_chapter_1);\n typeConverted_result.put(chapterRef, _get);",
"signature": "void _computeURLs(final Chapter chapter, final String fileName, final String prefix, final int index, final Map<AbstractSection,String> result)"
},
{
"arguments": [
"final SectionRef sectionRef",
" final String fileName",
" final String prefix",
" final int index",
" final Map<AbstractSection",
"String> result"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "Section _section = sectionRef.getSection();\n this.computeURLs(_section, fileName, prefix, ((Integer)index), result);\n final Map<AbstractSection,String> typeConverted_result = (Map<AbstractSection,String>)result;\n Section _section_1 = sectionRef.getSection();\n String _get = result.get(_section_1);\n typeConverted_result.put(sectionRef, _get);\n protected void _computeURLs(final Section2Ref sectionRef, final String fileName, final String prefix, final int index, final Map<AbstractSection,String> result) {\n Section2 _section2 = sectionRef.getSection2();\n this.computeURLs(_section2, fileName, prefix, ((Integer)index), result);\n final Map<AbstractSection,String> typeConverted_result = (Map<AbstractSection,String>)result;\n Section2 _section2_1 = sectionRef.getSection2();\n String _get = result.get(_section2_1);\n typeConverted_result.put(sectionRef, _get);\n protected void _computeURLs(final AbstractSection section, final String fileName, final String prefix, final int index, final Map<AbstractSection,String> result) {\n {\n String _operator_plus = StringExtensions.operator_plus(fileName, \"#\");\n Comparable<? extends Object> _xifexpression = null;\n boolean _isNullOrEmpty = StringExtensions.isNullOrEmpty(prefix);\n if (_isNullOrEmpty) {\n _xifexpression = index;",
"signature": "void _computeURLs(final SectionRef sectionRef, final String fileName, final String prefix, final int index, final Map<AbstractSection,String> result)"
},
{
"arguments": [
"final AbstractSection chapterRef",
" final String fileName",
" final String prefix",
" final Integer index",
" final Map<AbstractSection",
"String> result"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "if ((chapterRef instanceof ChapterRef)\n && (fileName instanceof String)\n && (prefix instanceof String)\n && (index instanceof Integer)\n && (result instanceof Map)) {\n _computeURLs((ChapterRef)chapterRef, (String)fileName, (String)prefix, (Integer)index, (Map<AbstractSection,String>)result);",
"signature": "void computeURLs(final AbstractSection chapterRef, final String fileName, final String prefix, final Integer index, final Map<AbstractSection,String> result)"
}
] | [
{
"arguments": [
"final Chapter chapter",
" final IFileSystemAccess access"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "String _fileName = this.eclipseNamingExtensions.fileName(chapter);\n String _decode = URLDecoder.decode(_fileName);\n CharSequence _generate = this.generate(chapter);\n access.generateFile(_decode, _generate);\n protected CharSequence _generate(final Chapter aS) {\n TextOrMarkup _title = aS.getTitle();\n _builder.append(\"<a name=\\\"\");\n String _labelName = this.eclipseNamingExtensions.labelName(aS);\n _builder.append(_labelName, \"\");\n _builder.append(\"\\\"></a>\");\n String _headtag = this.headtag(aS);\n TextOrMarkup _title_1 = aS.getTitle();\n String _headtag_1 = this.headtag(aS);\n EList<TextOrMarkup> _contents = aS.getContents();\n StringConcatenation _generatePar = this.generatePar(content);\n List<? extends AbstractSection> _subSection = this.utils.subSection(aS);\n for(AbstractSection ss : _subSection) {\n CharSequence _generate = this.generate(ss);\n protected CharSequence _generate(final AbstractSection aS) {\n String _labelName = this.eclipseNamingExtensions.labelName(aS);\n StringConcatenation _generatePar = this.generatePar(c);\n List<? extends AbstractSection> _subSection = this.utils.subSection(aS);\n for(AbstractSection ss : _subSection) {\n CharSequence _generate = this.generate(ss);\n protected CharSequence _generate(final Section4 aS) {\n String _labelName = this.eclipseNamingExtensions.labelName(aS);\n StringConcatenation _genNonParContent = this.genNonParContent(_title);\n StringConcatenation _generatePar = this.generatePar(tom);\n public StringConcatenation generatePar(final TextOrMarkup tom) {\n CharSequence _generate = this.generate(c);\n protected CharSequence _generate(final Todo todo) {\n protected CharSequence _generate(final Ref ref) {\n String _fileName = this.eclipseNamingExtensions.fileName(_ref);\n _builder.append(_fileName, \"\");\n _builder.append(\"#\");\n _builder.append(\"\\\">section \");\n Identifiable _ref_2 = ref.getRef();\n String _name_1 = _ref_2.getName();\n _builder.append(_name_1, \"\");\n Identifiable _ref_3 = ref.getRef();\n String _fileName_1 = this.eclipseNamingExtensions.fileName(_ref_3);\n _builder.append(_fileName_1, \"\");\n _builder.append(\"#\");\n Identifiable _ref_4 = ref.getRef();\n String _name_2 = _ref_4.getName();\n _builder.append(_name_2, \"\");\n StringConcatenation _genNonParContent = this.genNonParContent(tom);\n protected CharSequence _generate(final TextOrMarkup tom) {\n CharSequence _generate = this.generate(obj);\n protected CharSequence _generate(final UnorderedList ul) {\n CharSequence _generate = this.generate(i);\n protected CharSequence _generate(final OrderedList ul) {\n CharSequence _generate = this.generate(i);\n protected CharSequence _generate(final Item i) {\n CharSequence _generate = this.generate(tom);\n protected CharSequence _generate(final Anchor a) {\n _builder.append(\"<a name=\\\"\");\n protected CharSequence _generate(final ImageRef img) {\n protected CharSequence _generate(final TextPart tp) {\n protected CharSequence _generate(final Table table) {\n CharSequence _generate = this.generate(tr);\n protected CharSequence _generate(final TableRow tr) {\n CharSequence _generate = this.generate(td);\n protected CharSequence _generate(final TableData td) {\n CharSequence _generate = this.generate(c);\n protected CharSequence _generate(final Emphasize em) {\n CharSequence _generate = this.generate(c);\n protected CharSequence _generate(final Link link) {\n protected CharSequence _generate(final CodeRef cRef) {\n protected CharSequence _generate(final CodeBlock cb) {\n StringConcatenation _generateCode = this.generateCode(((Code) _head), _language);\n StringConcatenation _generateCode_1 = this.generateCode(code, _language_1);\n protected StringConcatenation _generateCode(final Code code, final LangDef lang) {\n protected StringConcatenation _generateCode(final MarkupInCode code, final LangDef lang) {\n CharSequence _generate = this.generate(code);\n protected StringConcatenation _generateCode(final Code code, final Void v) {\n public StringConcatenation genNonParContent(final TextOrMarkup tom) {\n CharSequence _generate = this.generate(obj);\n public void generate(final AbstractSection chapter, final IFileSystemAccess access) throws UnsupportedEncodingException {\n && (access instanceof IFileSystemAccess)) {\n _generate((Chapter)chapter, (IFileSystemAccess)access);",
"signature": "void _generate(final Chapter chapter, final IFileSystemAccess access)"
},
{
"arguments": [
"final EObject aS"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/XdocGenerator.java",
"implementation": "if ((aS instanceof Chapter)) {\n return _generate((Chapter)aS);",
"signature": "CharSequence generate(final EObject aS)"
},
{
"arguments": [
"final AbstractSection aS"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "String _xifexpression = null;\n EObject _eContainer = aS.eContainer();\n if ((_eContainer instanceof org.eclipse.xtext.xdoc.xdoc.XdocFile)) {\n _xifexpression = \"\";",
"signature": "String urlSuffix(final AbstractSection aS)"
},
{
"arguments": [
"final Object any"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "return \"\";\n protected String _fileName(final EObject obj) {\n EObject _eContainer = obj.eContainer();\n String _fileName = this.fileName(_eContainer);\n return _fileName;\n protected String _fileName(final Chapter obj) {\n String _xblockexpression = null;\n Resource _eResource = obj.eResource();\n String _lastSegment = _uRI.lastSegment();\n final String name = _lastSegment;\n String _xifexpression = null;\n EObject _eContainer = obj.eContainer();\n if ((_eContainer instanceof org.eclipse.xtext.xdoc.xdoc.Document)) {\n EObject _eContainer_1 = obj.eContainer();\n List<? extends AbstractSection> _subSection = this.utils.subSection(((Document) _eContainer_1));\n int _indexOf = _subSection.indexOf(obj);\n String _operator_plus_1 = StringExtensions.operator_plus(_operator_plus, ((Integer)_indexOf));\n _xifexpression = _operator_plus_2;\n _xifexpression = _operator_plus_3;\n _xblockexpression = (_xifexpression);",
"signature": "String _labelName(final Object any)"
},
{
"arguments": [
"final AbstractSection obj"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "String _xifexpression = null;\n EObject _eContainer = obj.eContainer();\n if ((_eContainer instanceof org.eclipse.xtext.xdoc.xdoc.XdocFile)) {\n String _xblockexpression = null;\n {\n AbstractSection _virtualContainer = this.virtualContainer(obj);\n final AbstractSection vCon = _virtualContainer;\n String _xifexpression_1 = null;\n boolean _operator_notEquals = ObjectExtensions.operator_notEquals(vCon, null);\n if (_operator_notEquals) {\n String _fileName = this.fileName(vCon);\n _xifexpression_1 = _fileName;",
"signature": "String _fileName(final AbstractSection obj)"
},
{
"arguments": [
"final ChapterRef obj"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "Chapter _chapter = obj.getChapter();\n String _fileName = this.fileName(_chapter);\n return _fileName;\n protected String _fileName(final SectionRef obj) {\n Section _section = obj.getSection();\n String _fileName = this.fileName(_section);\n return _fileName;",
"signature": "String _fileName(final ChapterRef obj)"
},
{
"arguments": [
"final Section2Ref obj"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "Section2 _section2 = obj.getSection2();\n String _fileName = this.fileName(_section2);\n return _fileName;\n protected String _labelName(final AbstractSection aS) {\n String _xblockexpression = null;\n AbstractSection _switchResult = null;\n final AbstractSection aS_1 = aS;\n boolean matched = false;\n if (!matched) {\n if (aS_1 instanceof ChapterRef) {\n final ChapterRef aS_2 = (ChapterRef) aS_1;\n matched=true;\n Chapter _chapter = aS_2.getChapter();\n _switchResult = _chapter;",
"signature": "String _fileName(final Section2Ref obj)"
},
{
"arguments": [
"final AbstractSection obj"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "AbstractSection _xblockexpression = null;\n Iterable<IResourceDescription> _allResourceDescriptions = this.index.getAllResourceDescriptions();\n final Function1<IResourceDescription,Boolean> _function = new Function1<IResourceDescription,Boolean>() {\n public Boolean apply(final IResourceDescription r) {\n Iterable<QualifiedName> _importedNames = r.getImportedNames();\n final Function1<QualifiedName,Boolean> _function_1 = new Function1<QualifiedName,Boolean>() {\n public Boolean apply(final QualifiedName e) {\n String _name = obj.getName();\n String _lowerCase = _name.toLowerCase();\n QualifiedName _create = QualifiedName.create(_lowerCase);\n boolean _operator_equals = ObjectExtensions.operator_equals(e, _create);\n return ((Boolean)_operator_equals);",
"signature": "AbstractSection virtualContainer(final AbstractSection obj)"
},
{
"arguments": [
"final IResourceDescription r_1"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "Iterable<IReferenceDescription> _referenceDescriptions = r_1.getReferenceDescriptions();\n final Function1<IReferenceDescription,Boolean> _function_3 = new Function1<IReferenceDescription,Boolean>() {\n public Boolean apply(final IReferenceDescription ref) {\n boolean _operator_or = false;\n EReference _eReference = ref.getEReference();\n EClass _eReferenceType = _eReference.getEReferenceType();\n boolean _operator_equals_1 = ObjectExtensions.operator_equals(_eReferenceType, Literals.SECTION2);\n if (_operator_equals_1) {\n _operator_or = true;",
"signature": "Boolean apply(final IResourceDescription r_1)"
},
{
"arguments": [
"final Object aS"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "if ((aS instanceof AbstractSection)) {\n return _labelName((AbstractSection)aS);",
"signature": "String labelName(final Object aS)"
},
{
"arguments": [
"final EObject obj"
],
"filename": "org.eclipse.xtext.xdoc/xtend-gen/org/eclipse/xtext/xdoc/generator/util/EclipseNamingExtensions.java",
"implementation": "if ((obj instanceof ChapterRef)) {\n return _fileName((ChapterRef)obj);",
"signature": "String fileName(final EObject obj)"
}
] |
19324b3ed89081bfa2cea984a4708aa3b8c658a8 | [
{
"arguments": [
"Class<?> clazz"
],
"filename": "core/src/main/java/com/google/common/truth/ClassSubject.java",
"implementation": "if (!clazz.isAssignableFrom(getSubject())) {\n fail(\"is assignable to\", clazz);",
"signature": "void isAssignableTo(Class<?> clazz)"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/ClassTest.java",
"implementation": "@Test public void testDeclaresField_public() {\n @Test public void testDeclaresField_nullSubject() {\n @Test public void testDeclaresField_private() {\n @Test public void testIsAssignableFrom_same() {",
"signature": "void testDeclaresField_noSuchField()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/ClassTest.java",
"implementation": "@Test public void testIsAssignableTo_same() {\n assertThat(String.class).isAssignableTo(String.class);",
"signature": "void testIsAssignableFrom_parent()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/ClassTest.java",
"implementation": "assertThat(String.class).isAssignableTo(Object.class);\n assertThat(NullPointerException.class).isAssignableTo(Exception.class);",
"signature": "void testIsAssignableTo_parent()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/ClassTest.java",
"implementation": "try {\n assertThat(Object.class).isAssignableTo(String.class);\n assert_().fail(\"Should have thrown an assertion error.\");",
"signature": "void testIsAssignableTo_reversed()"
},
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/ClassTest.java",
"implementation": "try {\n assertThat(String.class).isAssignableTo(Exception.class);\n assert_().fail(\"Should have thrown an assertion error.\");",
"signature": "void testIsAssignableTo_reversedDifferentTypes()"
}
] | [
{
"arguments": [],
"filename": "core/src/test/java/com/google/common/truth/ClassTest.java",
"implementation": "@Test public void testDeclaresField_Public() {\n @Test public void testDeclaresField_NullSubject() {\n @Test public void testDeclaresField_Private() {\n @Test public void testIsAssignableFromSame() {",
"signature": "void testDeclaresField_NoSuchField()"
}
] |
1bba31c1a67467171f58198268fa193290a48bc3 | [
{
"arguments": [
"String protocol",
" ConnectionOptions options"
],
"filename": "src/main/java/com/xebialabs/overthere/Overthere.java",
"implementation": "final Class<? extends OverthereConnectionBuilder> connectionBuilder = protocols.get().get(protocol);\n\t\t\tfinal Constructor<? extends OverthereConnectionBuilder> constructor = connectionBuilder.getConstructor(String.class, ConnectionOptions.class);\n\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\tlogger.debug(\"Opening connection with protocol \" + protocol);",
"signature": "OverthereConnection getConnection(String protocol, ConnectionOptions options)"
},
{
"arguments": [
"OverthereConnection connection"
],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "* The connection through which this file is accessible. If the connection is closed, this file may no longer be accessible.\n\tpublic final OverthereConnection getConnection() {\n\t * The full path of the file on the remote system.\n\t * @return the path of the file.\n\tpublic abstract String getPath();\n\t/**\n\t * The name of the file on the remote system.\n\t * \n\t * @return the name of the file.\n\t */\n\tpublic abstract String getName();\n\t/**\n\t * The parent file of \n\t * @return\n\t */\n\tpublic abstract OverthereFile getParentFile();\n\tpublic OverthereFile getFile(String child) {\n\t\treturn getConnection().getFile(this, child);\n\tpublic abstract long length();\n\tpublic abstract long lastModified();\n\tpublic abstract boolean exists();\n\tpublic abstract boolean isDirectory();\n\tpublic abstract boolean isHidden();\n\n\tpublic abstract boolean canRead();\n\n\tpublic abstract boolean canWrite();\n\n\tpublic abstract boolean canExecute();\n\tpublic abstract InputStream getInputStream();\n\n\tpublic abstract OutputStream getOutputStream(long length);\n\n\tpublic abstract void delete();\n\n\tpublic void deleteRecursively() throws RuntimeIOException {\n\t\t\tfor (OverthereFile each : listFiles()) {\n\t\t\t\teach.deleteRecursively();\n\t\tdelete();\n\tpublic abstract List<OverthereFile> listFiles();\n\tpublic abstract void mkdir();\n\tpublic abstract void mkdirs();\n\tpublic abstract void renameTo(OverthereFile dest);\n\n\tpublic final void copyTo(final OverthereFile dest) {\n\t\tdest.copyFrom(this);",
"signature": "protected OverthereFile(OverthereConnection connection)"
},
{
"arguments": [
"OverthereConnection connection",
" SmbFile smbFile"
],
"filename": "src/main/java/com/xebialabs/overthere/cifs/CifsOverthereFile.java",
"implementation": "super(connection);\n\tprotected SmbFile getSmbFile() {\n\tpublic OverthereFile getParentFile() {\n\t\ttry {\n\t\t\treturn new CifsOverthereFile(getConnection(), new SmbFile(smbFile.getParent()));",
"signature": "protected CifsOverthereFile(OverthereConnection connection, SmbFile smbFile)"
},
{
"arguments": [
"long length"
],
"filename": "src/main/java/com/xebialabs/overthere/cifs/CifsOverthereFile.java",
"implementation": "throw new RuntimeIOException(\"Cannot open \" + this + \" for writing: \" + exc.toString(), exc);\n\t@Override\n\tpublic boolean equals(Object that) {\n\t\tif (!(that instanceof CifsOverthereFile)) {\n\t\t\treturn false;",
"signature": "OutputStream getOutputStream(long length)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/cifs/CifsOverthereFile.java",
"implementation": "return smbFile.getPath().hashCode();",
"signature": "int hashCode()"
},
{
"arguments": [
"OverthereConnection connection",
" File file"
],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "super(connection);\n\t\tthis.file = file;",
"signature": "public LocalOverthereFile(OverthereConnection connection, File file)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file;",
"signature": "File getFile()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.getPath();",
"signature": "String getPath()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.getName();",
"signature": "String getName()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return getConnection().getFile(file.getParent());",
"signature": "OverthereFile getParentFile()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.lastModified();",
"signature": "long lastModified()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.length();",
"signature": "long length()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.exists();",
"signature": "boolean exists()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.isDirectory();",
"signature": "boolean isDirectory()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.isHidden();",
"signature": "boolean isHidden()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.canRead();",
"signature": "boolean canRead()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.canWrite();",
"signature": "boolean canWrite()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.canExecute();",
"signature": "boolean canExecute()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "if (!file.delete()) {\n\t\t\tthrow new RuntimeIOException(\"Cannot delete \" + this);",
"signature": "void delete()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "if (!file.mkdir()) {\n\t\t\tthrow new RuntimeIOException(\"Cannot mkdir \" + this);",
"signature": "void mkdir()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "if (!file.mkdirs()) {\n\t\t\tthrow new RuntimeIOException(\"Cannot mkdir \" + this);",
"signature": "void mkdirs()"
},
{
"arguments": [
"OverthereFile dest"
],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "if (!(dest instanceof LocalOverthereFile)) {\n\t\t\tthrow new RuntimeIOException(\"Destination is not a \" + LocalOverthereFile.class.getName());",
"signature": "void renameTo(OverthereFile dest)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return new FileInputStream(file);\n\tpublic OutputStream getOutputStream(long length) {\n\t\t\treturn new FileOutputStream(file);\n\t@Override\n\tpublic boolean equals(Object that) {\n\t\tif (!(that instanceof LocalOverthereFile))\n\t\t\treturn false;\n\n\t\treturn this.file.equals(((LocalOverthereFile) that).file);",
"signature": "InputStream getInputStream()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.hashCode();",
"signature": "int hashCode()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/local/LocalOverthereFile.java",
"implementation": "return file.toString();",
"signature": "String toString()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshOverthereFile.java",
"implementation": "return path;",
"signature": "String getPath()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshOverthereFile.java",
"implementation": "String fileSep = connection.getHostOperatingSystem().getFileSeparator();\n\t\tint lastFileSepPos = path.lastIndexOf(fileSep);\n\t\tif (lastFileSepPos < 0) {\n\t\t\treturn path;",
"signature": "String getName()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshOverthereFile.java",
"implementation": "String fileSep = connection.getHostOperatingSystem().getFileSeparator();\n\t\tint lastFileSepPos = path.lastIndexOf(fileSep);\n\t\tif (lastFileSepPos < 0 || path.equals(fileSep)) {\n\t\t\treturn null;",
"signature": "OverthereFile getParentFile()"
},
{
"arguments": [
"lastFileSepPos == 0"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshOverthereFile.java",
"implementation": "// the parent of something in the root directory is the root\n\t\t\t// directory itself.\n\t\t\treturn connection.getFile(fileSep);\n\t\t\treturn connection.getFile(path.substring(0, lastFileSepPos));",
"signature": "else if (lastFileSepPos == 0)"
},
{
"arguments": [
"OverthereProcessOutputHandler handler",
" CmdLine commandLine"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshOverthereFile.java",
"implementation": "return ((SshOverthereConnection) connection).execute(handler, commandLine);",
"signature": "int executeCommand(OverthereProcessOutputHandler handler, CmdLine commandLine)"
},
{
"arguments": [
"Object obj"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshOverthereFile.java",
"implementation": "if (!(obj instanceof SshOverthereFile)) {\n\t\t\treturn false;",
"signature": "boolean equals(Object obj)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshOverthereFile.java",
"implementation": "return path.hashCode();",
"signature": "int hashCode()"
},
{
"arguments": [
"SshOverthereConnection connection",
" String remotePath"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshScpOverthereFile.java",
"implementation": "@Override\n\t@Override\n\t\t// FIXME: Implement by parsing the date output of `ls -l`\n\t@Override\n\t@Override\n\t@Override\n\t@Override\n\t@Override\n\tpublic List<OverthereFile> listFiles() {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Listing directory \" + this);",
"signature": "public SshScpOverthereFile(SshOverthereConnection connection, String remotePath)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshScpOverthereFile.java",
"implementation": "mkdir(new String[0]);\n\tpublic void mkdirs() {\n\t\tmkdir(\"-p\");\n\tprotected void mkdir(String... mkdirOptions) throws RuntimeIOException {\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Creating directory \" + this + \" (with options:\" + Joiner.on(' ').join(mkdirOptions));",
"signature": "void mkdir()"
},
{
"arguments": [
"OverthereFile destFile"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshScpOverthereFile.java",
"implementation": "if (logger.isDebugEnabled()) {\n\t\t\t\t\tlogger.debug(\"Renaming \" + this + \" to \" + destFile);",
"signature": "void renameTo(OverthereFile destFile)"
},
{
"arguments": [
"SshSudoOverthereFile destFile",
" long length",
" OverthereFile tempFile"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshSudoOutputStream.java",
"implementation": "this.destFile = destFile;\n\t\ttempFileOutputStream = tempFile.getOutputStream(length);\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(\"Copying \" + tempFile + \" to \" + destFile + \" after writing\");",
"signature": "public SshSudoOutputStream(SshSudoOverthereFile destFile, long length, OverthereFile tempFile)"
},
{
"arguments": [
"SshSudoOverthereConnection connection",
" String remotePath",
" boolean isTempFile"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshSudoOverthereFile.java",
"implementation": "super(connection, remotePath);\n\tprotected int executeCommand(OverthereProcessOutputHandler handler, CmdLine commandLine) {\n\t\t\treturn ((SshSudoOverthereConnection) connection).noSudoExecute(handler, commandLine);\n\t\t\treturn super.executeCommand(handler, commandLine);\n\tpublic InputStream getInputStream() throws RuntimeIOException {\n\t\t\treturn super.getInputStream();\n\t\t\tOverthereFile tempFile = connection.getTempFile(getName());\n\t\t\treturn tempFile.getInputStream();\n\t\tif (logger.isDebugEnabled()) {",
"signature": "public SshSudoOverthereFile(SshSudoOverthereConnection connection, String remotePath, boolean isTempFile)"
}
] | [
{
"arguments": [
"String... cmdarray"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "return encodeCommandLine(false, cmdarray);",
"signature": "String encodeCommandLineForExecution(String... cmdarray)"
},
{
"arguments": [
"String... cmdarray"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "return encodeCommandLine(true, cmdarray);",
"signature": "String encodeCommandLineForLogging(String... cmdarray)"
},
{
"arguments": [
"boolean hidePassword",
" String... cmdarray"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "if (cmdarray == null)\n\t\t\tthrow new NullPointerException(\"Command line is null\");\n\t\tif (cmdarray.length == 0)\n\t\t\tthrow new IllegalArgumentException(\"Command line has length zero\");\n\n\t\tStringBuilder sb = new StringBuilder();\n\t\tboolean passwordKeywordSeen = false;\n\t\tfor (int i = 0; i < cmdarray.length; i++) {\n\t\t\tif (i != 0) {\n\t\t\t\tsb.append(' ');",
"signature": "String encodeCommandLine(boolean hidePassword, String... cmdarray)"
},
{
"arguments": [
"String argument",
" StringBuilder collector"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "collector.append(\"********\");",
"signature": "void encodePasswordArgument(String argument, StringBuilder collector)"
},
{
"arguments": [
"String argument",
" StringBuilder collector"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "if (argument.length() == 0) {\n\t\t\tencodeEmptyArgument(collector);",
"signature": "void encodeArgument(String argument, StringBuilder collector)"
},
{
"arguments": [
"StringBuilder collector"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "collector.append(\"\\\"\\\"\");",
"signature": "void encodeEmptyArgument(StringBuilder collector)"
},
{
"arguments": [
"String argument",
" StringBuilder collector"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "collector.append(argument);",
"signature": "void encodeRegularArgument(String argument, StringBuilder collector)"
},
{
"arguments": [
"String argument",
" StringBuilder collector"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "collector.append(\"\\\"\");\n\t\tfor (int j = 0; j < argument.length(); j++) {\n\t\t\tchar c = argument.charAt(j);\n\t\t\tif (c == '\\\"') {\n\t\t\t\tcollector.append(c);",
"signature": "void encodeArgumentWithSpecialCharactersForWindows(String argument, StringBuilder collector)"
},
{
"arguments": [
"String argument",
" StringBuilder collector"
],
"filename": "src/main/java/com/xebialabs/overthere/OperatingSystemFamily.java",
"implementation": "for (int j = 0; j < argument.length(); j++) {\n\t\t\tchar c = argument.charAt(j);\n\t\t\tif (SPECIAL_CHARS.indexOf(c) != -1) {\n\t\t\t\tcollector.append('\\\\');",
"signature": "void encodeArgumentWithSpecialCharactersForNonWindows(String argument, StringBuilder collector)"
},
{
"arguments": [
"HostConnection connection",
" String path"
],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "super(path);\n\t * Returns the connection this file is associated with.\n\t * \n\t * @return the connection\n\tpublic HostConnection getConnection() {\n\t * Returns a new HostFile with this file as its parent. Identical to invoking <code>this.getConnection().getFile(this, name)</code>\n\t * @param name\n\t * the name of the file in this directory\n\t * @return a reference to the file in this directory\n\tpublic OverthereFile getFile(String name) {\n\t\treturn connection.getFile(this, name);",
"signature": "protected OverthereFile(HostConnection connection, String path)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "String fileSep = connection.getHostOperatingSystem().getFileSeparator();\n\t\tint lastFileSepPos = getPath().lastIndexOf(fileSep);\n\t\tif (lastFileSepPos < 0) {\n\t\t\treturn getPath();",
"signature": "String getName()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "String fileSep = connection.getHostOperatingSystem().getFileSeparator();\n\t\tint lastFileSepPos = getPath().lastIndexOf(fileSep);\n\t\tif (lastFileSepPos < 0 || getPath().equals(fileSep)) {\n\t\t\treturn null;",
"signature": "String getParent()"
},
{
"arguments": [
"lastFileSepPos == 0"
],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "// the parent of something in the root directory is the root\n\t\t\t// directory itself.\n\t\t\treturn fileSep;",
"signature": "else if (lastFileSepPos == 0)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "String parent = getParent();\n\t\tif (parent == null || parent.length() == 0) {\n\t\t\treturn null;",
"signature": "OverthereFile getParentFile()"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "if (!exists()) {\n\t\t\treturn false;",
"signature": "boolean deleteRecursively()"
},
{
"arguments": [
"OutputStream out"
],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "try {\n\t\t\tInputStream in = get();\n\t\t\ttry {\n\t\t\t\tcopy(in, out);",
"signature": "void get(OutputStream out)"
},
{
"arguments": [
"File dest"
],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "try {\n\t\t\tOutputStream out;\n\t\t\tif (dest instanceof OverthereFile) {\n\t\t\t\tout = ((OverthereFile) dest).put(length());",
"signature": "void get(File dest)"
},
{
"arguments": [
"InputStream in",
" long length"
],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "try {\n\t\t\tOutputStream out = put(length);\n\t\t\ttry {\n\t\t\t\tcopy(in, out);",
"signature": "void put(InputStream in, long length)"
},
{
"arguments": [
"File src"
],
"filename": "src/main/java/com/xebialabs/overthere/OverthereFile.java",
"implementation": "try {\n\t\t\tInputStream in;\n\t\t\tif (src instanceof OverthereFile) {\n\t\t\t\tin = ((OverthereFile) src).get();",
"signature": "void put(File src)"
},
{
"arguments": [],
"filename": "src/main/java/com/xebialabs/overthere/cifs/CifsOverthereFile.java",
"implementation": "public String getParent() {\n\t\treturn smbFile.getParent();\n\tpublic String[] list() throws RuntimeIOException {\n\t\t\treturn smbFile.list();\n\tpublic boolean mkdir() throws RuntimeIOException {\n\t\t\treturn true;\n\tpublic boolean mkdirs() throws RuntimeIOException {\n\t\t\treturn true;\n\tpublic boolean renameTo(File dest) throws RuntimeIOException {\n\t\t\t\treturn true;\n\t\t\tthrow new RuntimeIOException(\"Cannot move/rename SMB file/directory \" + this + \" to non-SMB file/directory \" + dest);\n\tpublic boolean delete() throws RuntimeIOException {\n\t\t\tif (smbFile.exists()) {\n\t\t\t\tif (smbFile.isDirectory()) {\n\t\t\t\t\tupgradeToDirectorySmbFile();\n\t\t\t\t\tString[] files = smbFile.list();\n\t\t\t\t\tif (files.length != 0) {\n\t\t\t\t\t\tthrow new RuntimeIOException(\"Cannot delete non-empty directory \" + this);",
"signature": "SmbFile getSmbFile()"
},
{
"arguments": [
"SshHostConnection connection",
" String remotePath"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshScpOverthereFile.java",
"implementation": "public String[] list() throws RuntimeIOException {\n\t\tCapturingCommandExecutionCallbackHandler capturedOutput = new CapturingCommandExecutionCallbackHandler();\n\t\t// yes, this *is* meant to be 'el es min one'!\n\t\tint errno = executeCommand(capturedOutput, \"ls\", \"-1\", getPath());\n\t\tif (logger.isDebugEnabled())\n\t\tList<String> lsLines = capturedOutput.getOutputLines();\n\t\treturn lsLines.toArray(new String[lsLines.size()]);\n\tpublic boolean mkdir() {\n\t\treturn mkdir(new String[0]);\n\tpublic boolean mkdirs() {\n\t\treturn mkdir(new String[] { \"-p\"",
"signature": "public SshScpOverthereFile(SshHostConnection connection, String remotePath)"
},
{
"arguments": [
"SshSftpHostConnection connection",
" String path"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshSftpOverthereFile.java",
"implementation": "sshSftpHostConnection = connection;\n\t\t\tSftpATTRS attrs = sshSftpHostConnection.getSharedSftpChannel().stat(convertWindowsPathToWinSshdPath(getPath()));\n\t\t\tsshSftpHostConnection.getSharedSftpChannel().stat(convertWindowsPathToWinSshdPath(getPath()));\n\tpublic String[] list() throws RuntimeIOException {\n\t\t\tVector<LsEntry> ls = (Vector<LsEntry>) sshSftpHostConnection.getSharedSftpChannel().ls(convertWindowsPathToWinSshdPath(getPath()));\n\t\t\tList<String> filenames = new ArrayList<String>(ls.size());\n\t\t\t\tfilenames.add(filename);\n\t\t\treturn filenames.toArray(new String[filenames.size()]);\n\tpublic boolean mkdir() throws RuntimeIOException {\n\t\t\tsshSftpHostConnection.getSharedSftpChannel().mkdir(compatibleRemotePath);\n\t\t\treturn true;\n\tpublic boolean mkdirs() throws RuntimeIOException {\n\t\t\t\tif (!each.mkdir()) {\n\t\t\t\t\treturn false;",
"signature": "public SshSftpOverthereFile(SshSftpHostConnection connection, String path)"
},
{
"arguments": [
"File dest"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshSftpOverthereFile.java",
"implementation": "sshSftpHostConnection.getSharedSftpChannel().rename(getPath(), sftpDest.getPath());\n\t\t\t\t\treturn true;\n\t\t\tsshSftpHostConnection.getSharedSftpChannel().rm(convertWindowsPathToWinSshdPath(getPath()));\n\t\t\tsshSftpHostConnection.getSharedSftpChannel().rmdir(convertWindowsPathToWinSshdPath(getPath()));\n\tpublic InputStream get() throws RuntimeIOException {\n\t\t\tChannelSftp sftpChannel = sshSftpHostConnection.openSftpChannel();\n\t\t\tInputStream in = new SshSftpInputStream(sshSftpHostConnection, sftpChannel, sftpChannel.get(convertWindowsPathToWinSshdPath(getPath())));\n\tpublic void get(OutputStream out) throws RuntimeIOException {\n\t\ttry {\n\t\t\tsshSftpHostConnection.getSharedSftpChannel().get(convertWindowsPathToWinSshdPath(getPath()), out);\n\t\t\tif (logger.isDebugEnabled())\n\t\t\t\tlogger.debug(\"Wrote output stream from file \" + this);",
"signature": "boolean renameTo(File dest)"
},
{
"arguments": [
"SshSudoHostConnection session",
" String remotePath",
" boolean isTempFile"
],
"filename": "src/main/java/com/xebialabs/overthere/ssh/SshSudoOverthereFile.java",
"implementation": "super(session, remotePath);\n\t\tthis.sshSudoHostSession = session;\n\tprotected int executeCommand(CommandExecutionCallbackHandler handler, String... command) {\n\t\t\treturn sshSudoHostSession.noSudoExecute(handler, command);\n\t\t\treturn super.executeCommand(handler, command);\n\tpublic InputStream get() throws RuntimeIOException {\n\t\t\treturn super.get();\n\t\t\tOverthereFile tempFile = getTempFile(true);\n\t\t\treturn tempFile.get();\n\t\tif (logger.isDebugEnabled())\n\t\tCapturingCommandExecutionCallbackHandler capturedOutput = new CapturingCommandExecutionCallbackHandler();\n\t\tint result = connection.execute(capturedOutput, \"cp\", this.getPath(), tempFile.getPath());\n\tpublic OutputStream put(long length) throws RuntimeIOException {\n\t\t\t// XXX: this should really be returning a \"ChmoddingSudoOutputStream\"\n\t\t\treturn super.put(length);\n\t\t\t/*\n\t\t\t * XXX: this should really be returning a \"ChmoddingSudoOutputStream\" wrapped in a \"CopyOnCompletionOutputStream\"\n\t\t\t */\n\t\t\tSshSudoOutputStream out = new SshSudoOutputStream(this, length, getTempFile(false));\n\tprotected OverthereFile getTempFile(boolean useSudoForDeletion) {\n\t\tString prefix = getBaseName(getPath());\n\t\tString suffix = getExtension(getPath());\n\t\treturn sshSudoHostSession.getTempFile(prefix, suffix);\n\tpublic boolean mkdir() throws RuntimeIOException {\n\t\t\treturn super.mkdir();\n\t\t\tlogger.debug(\"Making directory world-writable (with sticky bit)\");\n\t\t\treturn mkdir(new String[] { \"-m\", \"1777\"",
"signature": "public SshSudoOverthereFile(SshSudoHostConnection session, String remotePath, boolean isTempFile)"
}
] |
1be737116afad854315a5126fbabec72182bd7a6 | [
{
"arguments": [
"Node node"
],
"filename": "src/closure/net.vtst.ow.closure.compiler/src/net/vtst/ow/closure/compiler/dev/DevUtils.java",
"implementation": "StringBuffer buffer = new StringBuffer();\n Node current = node;\n while (current != null) {\n System.out.print(buffer.toString());\n System.out.println(current);\n buffer.append(\" \");\n current = current.getParent();",
"signature": "void printNodeAndAncestors(Node node)"
},
{
"arguments": [],
"filename": "src/closure/net.vtst.ow.closure.compiler/src/net/vtst/ow/closure/compiler/util/BidiHashMap.java",
"implementation": "map.clear();\n reverseMap.clear();",
"signature": "void clear()"
},
{
"arguments": [],
"filename": "src/eclipse/net.vtst.ow.eclipse.js.closure/src/net/vtst/ow/eclipse/js/closure/builder/ClosureBuilder.java",
"implementation": "super();",
"signature": "public ClosureBuilder()"
}
] | [
{
"arguments": [
"IResource resource"
],
"filename": "src/eclipse/net.vtst.ow.eclipse.js.closure/src/net/vtst/ow/eclipse/js/closure/builder/ClosureBuilder.java",
"implementation": "checkXML(resource);\n\t\t\t//return true to continue visiting children.\n\t\t\treturn true;",
"signature": "boolean visit(IResource resource)"
},
{
"arguments": [
"IFile file"
],
"filename": "src/eclipse/net.vtst.ow.eclipse.js.closure/src/net/vtst/ow/eclipse/js/closure/builder/ClosureBuilder.java",
"implementation": "this.file = file;",
"signature": "public XMLErrorHandler(IFile file)"
},
{
"arguments": [
"SAXParseException e",
" int severity"
],
"filename": "src/eclipse/net.vtst.ow.eclipse.js.closure/src/net/vtst/ow/eclipse/js/closure/builder/ClosureBuilder.java",
"implementation": "ClosureBuilder.this.addMarker(file, e.getMessage(), e\n\t\t\t\t\t.getLineNumber(), severity);",
"signature": "void addMarker(SAXParseException e, int severity)"
},
{
"arguments": [
"IFile file",
" String message",
" int lineNumber",
"\n\t\t\tint severity"
],
"filename": "src/eclipse/net.vtst.ow.eclipse.js.closure/src/net/vtst/ow/eclipse/js/closure/builder/ClosureBuilder.java",
"implementation": "try {\n\t\t\tIMarker marker = file.createMarker(MARKER_TYPE);\n\t\t\tmarker.setAttribute(IMarker.MESSAGE, message);\n\t\t\tmarker.setAttribute(IMarker.SEVERITY, severity);\n\t\t\tif (lineNumber == -1) {\n\t\t\t\tlineNumber = 1;",
"signature": "void addMarker(IFile file, String message, int lineNumber,\n\t\t\tint severity)"
},
{
"arguments": [
"IResource resource"
],
"filename": "src/eclipse/net.vtst.ow.eclipse.js.closure/src/net/vtst/ow/eclipse/js/closure/builder/ClosureBuilder.java",
"implementation": "if (resource instanceof IFile && resource.getName().endsWith(\".xml\")) {\n\t\t\tIFile file = (IFile) resource;\n\t\t\tdeleteMarkers(file);\n\t\t\tXMLErrorHandler reporter = new XMLErrorHandler(file);\n\t\t\ttry {\n\t\t\t\tgetParser().parse(file.getContents(), reporter);",
"signature": "void checkXML(IResource resource)"
},
{
"arguments": [
"IFile file"
],
"filename": "src/eclipse/net.vtst.ow.eclipse.js.closure/src/net/vtst/ow/eclipse/js/closure/builder/ClosureBuilder.java",
"implementation": "try {\n\t\t\tfile.deleteMarkers(MARKER_TYPE, false, IResource.DEPTH_ZERO);",
"signature": "void deleteMarkers(IFile file)"
}
] |