id
stringlengths
7
14
test_class
dict
test_case
dict
focal_class
dict
focal_method
dict
repository
dict
2316136_57
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateCalculatedMemberWithSomeAnnotations() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n // remove some existing annotations\n No...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_16
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/JoinRelationshipModelTest.java", "identifier": "JoinRelationshipModelTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetName() throws Exception {\n JoinRelationshipModel relModel = new JoinRelationshipModel();\n relModel.setLeftKeyFieldModel( createFieldModel( \"field1\", \"pt1\" ) );\n relModel.setRightKeyFieldModel( createFieldModel( \"field2\", \"pt2\" ) );\n\n assertEquals( \"pt1....
{ "fields": [ { "declarator": "serialVersionUID = -1365363591444333452L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -1365363591444333452L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "lef...
{ "body": "@Bindable\n public String getName() {\n String innerJoinLabel = ModelerMessagesHolder.getMessages().getString( \"multitable.INNER_JOIN\" );\n String leftTable = this.leftKeyFieldModel.getParentTable().getName();\n String rightTable = this.rightKeyFieldModel.getParentTable().getName();\n String...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_41
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testShowHideMeasureFormattedMeasure() throws ModelerException {\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDocument );\n boolean result = mondrianSchemaHandler.showHideMeasure( TEST_CUBE_NAME, TEST_EXISTING_MEASURE_DIMENSION_STRING, Boolean....
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean showHideMeasure( final String cubeName, final String measureName, final boolean visible ) throws ModelerException {\n Element measureNode = (Element) getMeasureNode( cubeName, measureName );\n if ( measureNode == null ) {\n measureNode = getCalculatedMeasureNode( cubeName, measure...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_82
{ "fields": [ { "declarator": "metaStore", "modifier": "private", "original_string": "private IMetaStore metaStore;", "type": "IMetaStore", "var_name": "metaStore" } ], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationTest.java", "id...
{ "body": "@Test\n public void testMeasure() {\n\n CreateMeasure createMeasure = new CreateMeasure();\n\n List<ModelAnnotation<?>> list = new ArrayList<ModelAnnotation<?>>();\n list.add( new ModelAnnotation<CreateMeasure>( createMeasure ) );\n\n ModelAnnotation<?> md = list.get( 0 ); // don't know the ty...
{ "fields": [ { "declarator": "serialVersionUID = 5742135911581602697L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5742135911581602697L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "CREAT...
{ "body": "public org.pentaho.agilebi.modeler.models.annotations.ModelAnnotation.Type getType() {\n if ( annotation != null ) {\n return annotation.getType();\n }\n\n return null;\n }", "class_method_signature": "ModelAnnotation.getType()", "constructor": false, "full_signature": "public org.pent...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_0
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/geo/LatLngRoleTest.java", "identifier": "LatLngRoleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEval() {\n LatLngRole role = new LatLngRole( \"latitude\", \"lat,latitude\" );\n\n assertTrue( role.eval( \"lat\", \"lat\" ) );\n assertEquals( \"\", role.getPrefix() );\n\n assertTrue( role.eval( \"customer_lat\", \"lat\" ) );\n assertEquals( \"customer\", role.getP...
{ "fields": [ { "declarator": "serialVersionUID = 3443044732976689019L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 3443044732976689019L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "prefi...
{ "body": "@Override\n protected boolean eval( String fieldName, String alias ) {\n if ( super.eval( fieldName, alias ) ) {\n return true;\n } else if ( fieldName.endsWith( getMatchSeparator() + alias ) ) {\n prefix = fieldName.substring( 0, fieldName.indexOf( getMatchSeparator() + alias ) );\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_36
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testAddCalculatedMemberInline() {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDocument );\n\n try {\n mo...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public void addCalculatedMember( String cubeName, MondrianDef.CalculatedMember calculatedMember ) throws ModelerException {\n try {\n XPathFactory xPathFactory = XPathFactory.newInstance();\n XPath xPath = xPathFactory.newXPath();\n StringBuilder xPathExpr = new StringBuilder();\n\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_61
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testIsCalculatedMeasure() throws Exception {\n Document schemaDocument = AnnotationUtil.getMondrianDoc( \"src/test/resources/products.with.calc.measures.mondrian.xml\" );\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDocument );\n Assert.asse...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean isCalculatedMeasure( String cubeName, String measureName ) throws ModelerException {\n return getCalculatedMeasureElement( cubeName, measureName ) != null;\n }", "class_method_signature": "MondrianSchemaHandler.isCalculatedMeasure( String cubeName, String measureName )", "constructor...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_77
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReaderTest.java", "identifier": "ModelAnnotationGroupXmlReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetXmlWithDataProviders() throws Exception {\n // mock data\n\n String xml = \" <annotations>\"\n + \" <sharedDimension>Y</sharedDimension>\"\n + \" <description/>\"\n + \" <data-providers>\"\n + \" <data-provider>\"\n + \" ...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReader.java", "identifier": "ModelAnnotationGroupXmlReader", "interfaces": "", "methods": [ { "class_method_signature": "ModelAnnotationGroupXmlReader.readModelAnnotationGroup( Node step...
{ "body": "public ModelAnnotationGroup readModelAnnotationGroup( Node step ) throws KettleXMLException {\n\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n Node annotations = XMLHandler.getSubNode( step, \"annotations\" );\n int annotationsCount = XMLHandler.countNodes( annotations...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_20
{ "fields": [ { "declarator": "metaStore", "modifier": "private", "original_string": "private IMetaStore metaStore;", "type": "IMetaStore", "var_name": "metaStore" }, { "declarator": "PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\"", "modifier": "private st...
{ "body": "@Test\n public void testValidate() {\n // Valid\n UpdateMeasure updateMeasure = new UpdateMeasure();\n updateMeasure.setMeasure( INIT_MEASURE_FORMULA );\n updateMeasure.setName( NEW_BUYPRICE_NAME );\n try {\n updateMeasure.validate();\n } catch ( Exception e ) {\n fail( \"Shoul...
{ "fields": [ { "declarator": "serialVersionUID = -8365062607663928537L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8365062607663928537L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "log...
{ "body": "@Override\n public void validate() throws ModelerException {\n if ( StringUtils.isBlank( measure ) ) {\n throw new ModelerException( BaseMessages.getString( MSG_CLASS,\n \"ModelAnnotation.UpdateMeasure.validation.MEASURE_NAME_REQUIRED\" ) );\n }\n }", "class_method_signature": "Update...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_21
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/data/DataProviderConnectionTest.java", "identifier": "DataProviderConnectionTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEquals() throws Exception {\n DataProviderConnection dpc1 = createDPC();\n DataProviderConnection dpc2 = createDPC();\n assertTrue( dpc1.equals( dpc2 ) );\n List<NameValueProperty> aList = Collections.singletonList( new NameValueProperty( \"name2\", \"value2\" ) );\n ...
{ "fields": [ { "declarator": "name", "modifier": "@MetaStoreAttribute\n private", "original_string": "@MetaStoreAttribute\n private String name;", "type": "String", "var_name": "name" }, { "declarator": "displayName", "modifier": "@MetaStoreAttribute\n private...
{ "body": "@Override\n public boolean equals( Object obj ) {\n\n try {\n if ( !EqualsBuilder.reflectionEquals( this, obj ) ) {\n return false;\n }\n\n // manually check columnMappings\n DataProviderConnection toCompare = (DataProviderConnection) obj;\n List<NameValueProperty> thisA...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_76
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReaderTest.java", "identifier": "ModelAnnotationGroupXmlReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetXmlWithAnnotations() throws Exception {\n\n String xml = \"<annotations>\"\n + \"<annotation>\"\n + \"<name>myName</name>\"\n + \"<field>col1</field>\"\n + \"<type>CREATE_MEASURE</type>\"\n + \"<properties>\"\n + \"<property><name>for...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReader.java", "identifier": "ModelAnnotationGroupXmlReader", "interfaces": "", "methods": [ { "class_method_signature": "ModelAnnotationGroupXmlReader.readModelAnnotationGroup( Node step...
{ "body": "public ModelAnnotationGroup readModelAnnotationGroup( Node step ) throws KettleXMLException {\n\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n Node annotations = XMLHandler.getSubNode( step, \"annotations\" );\n int annotationsCount = XMLHandler.countNodes( annotations...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_60
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testRemovingFormattingForALevelThatDoesnotExistReturnsFalse() throws Exception {\n Document schemaDocument = AnnotationUtil.getMondrianDoc( \"src/test/resources/updateattribute.mondrian.xml\" );\n\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDo...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean removeFormatting( final String cube, final String dimension, final String hierarchy,\n final String level ) throws ModelerException {\n Element levelNode = getLevelNode( cube, dimension, hierarchy, level );\n if ( levelNode != null ) {\n levelNode...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_37
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testAddCalculatedMemberWithoutMemberProperties() {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n calculatedMember.memberProperties = null;\n\n MondrianSchemaHandler mondrianSchemaHandler = new...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public void addCalculatedMember( String cubeName, MondrianDef.CalculatedMember calculatedMember ) throws ModelerException {\n try {\n XPathFactory xPathFactory = XPathFactory.newInstance();\n XPath xPath = xPathFactory.newXPath();\n StringBuilder xPathExpr = new StringBuilder();\n\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_1
{ "fields": [ { "declarator": "GEO_ROLE_KEY = \"geo.roles\"", "modifier": "private static final", "original_string": "private static final String GEO_ROLE_KEY = \"geo.roles\";", "type": "String", "var_name": "GEO_ROLE_KEY" }, { "declarator": "props = null", "modif...
{ "body": "@Test\n public void testCreateWithProps() throws Exception {\n Properties myprops = (Properties) props.clone();\n myprops.setProperty( \"geo.country.aliases\", \"country, ctry\" );\n config = new GeoContextPropertiesProvider( myprops );\n\n GeoContext geo = GeoContextFactory.create( config );\...
{ "fields": [ { "declarator": "LATITUDE = \"latitude\"", "modifier": "private static final", "original_string": "private static final String LATITUDE = \"latitude\";", "type": "String", "var_name": "LATITUDE" }, { "declarator": "LONGITUDE = \"longitude\"", "modifi...
{ "body": "public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException {\n GeoContext geo = new GeoContext();\n\n if ( configProvider == null ) {\n throw new IllegalArgumentException( \"GeoContextConfigProvider cannot be null\" );\n }\n\n String dimName = config...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_83
{ "fields": [ { "declarator": "metaStore", "modifier": "private", "original_string": "private IMetaStore metaStore;", "type": "IMetaStore", "var_name": "metaStore" } ], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationTest.java", "id...
{ "body": "@Test\n public void testAttribute() {\n\n CreateAttribute createAttribute = new CreateAttribute();\n\n List<ModelAnnotation<?>> list = new ArrayList<ModelAnnotation<?>>();\n list.add( new ModelAnnotation<CreateAttribute>( createAttribute ) );\n\n ModelAnnotation<?> md = list.get( 0 ); // don't...
{ "fields": [ { "declarator": "serialVersionUID = 5742135911581602697L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5742135911581602697L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "CREAT...
{ "body": "public org.pentaho.agilebi.modeler.models.annotations.ModelAnnotation.Type getType() {\n if ( annotation != null ) {\n return annotation.getType();\n }\n\n return null;\n }", "class_method_signature": "ModelAnnotation.getType()", "constructor": false, "full_signature": "public org.pent...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_40
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testShowHideMeasureNullMeasure() throws ModelerException {\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDocument );\n boolean result = mondrianSchemaHandler.showHideMeasure( TEST_CUBE_NAME, null, Boolean.FALSE );\n\n Assert.assertFalse( re...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean showHideMeasure( final String cubeName, final String measureName, final boolean visible ) throws ModelerException {\n Element measureNode = (Element) getMeasureNode( cubeName, measureName );\n if ( measureNode == null ) {\n measureNode = getCalculatedMeasureNode( cubeName, measure...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_17
{ "fields": [ { "declarator": "updateCalculatedMemberAnnotation = new UpdateCalculatedMember()", "modifier": "private", "original_string": "private UpdateCalculatedMember updateCalculatedMemberAnnotation = new UpdateCalculatedMember();", "type": "UpdateCalculatedMember", "var_name": ...
{ "body": "@Test\n public void testApplyMondrian() throws Exception {\n\n\n File mondrianSchemaXmlFile = new File( MONDRIAN_TEST_FILE_PATH );\n\n Document mondrianSchemaXmlDoc =\n DocumentBuilderFactory\n .newInstance()\n .newDocumentBuilder()\n .parse( mondrianSchemaXmlFile );\n\n ...
{ "fields": [ { "declarator": "serialVersionUID = 5169827225345800226L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5169827225345800226L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "logge...
{ "body": "@SuppressWarnings( \"unchecked\" ) @Override\n public boolean apply( ModelerWorkspace workspace, IMetaStore metaStore ) throws ModelerException {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "UpdateCalculatedMember.apply( ModelerWorkspace workspace, IMetaStore metaSto...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_56
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateCalculatedMemberWithoutExistingAnnotations() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n NodeList annotationsNodes = schemaDo...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_2
{ "fields": [ { "declarator": "GEO_ROLE_KEY = \"geo.roles\"", "modifier": "private static final", "original_string": "private static final String GEO_ROLE_KEY = \"geo.roles\";", "type": "String", "var_name": "GEO_ROLE_KEY" }, { "declarator": "props = null", "modif...
{ "body": "@Test( expected = ModelerException.class )\n public void testCreateWithProps_NoRoles() throws Exception {\n Properties myprops = (Properties) props.clone();\n myprops.setProperty( GEO_ROLE_KEY, \"\" );\n config = new GeoContextPropertiesProvider( myprops );\n GeoContext geo = GeoContextFactory...
{ "fields": [ { "declarator": "LATITUDE = \"latitude\"", "modifier": "private static final", "original_string": "private static final String LATITUDE = \"latitude\";", "type": "String", "var_name": "LATITUDE" }, { "declarator": "LONGITUDE = \"longitude\"", "modifi...
{ "body": "public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException {\n GeoContext geo = new GeoContext();\n\n if ( configProvider == null ) {\n throw new IllegalArgumentException( \"GeoContextConfigProvider cannot be null\" );\n }\n\n String dimName = config...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_79
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReaderTest.java", "identifier": "ModelAnnotationGroupXmlReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWriteReadsUpdateCalcMeasureAnnotations() throws Exception {\n UpdateCalculatedMember doubleSales = new UpdateCalculatedMember();\n doubleSales.setCalculateSubtotals( Boolean.FALSE );\n doubleSales.setFormatCategory( \"Default\" );\n doubleSales.setInline( Boolean.TRUE )...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReader.java", "identifier": "ModelAnnotationGroupXmlReader", "interfaces": "", "methods": [ { "class_method_signature": "ModelAnnotationGroupXmlReader.readModelAnnotationGroup( Node step...
{ "body": "public ModelAnnotationGroup readModelAnnotationGroup( Node step ) throws KettleXMLException {\n\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n Node annotations = XMLHandler.getSubNode( step, \"annotations\" );\n int annotationsCount = XMLHandler.countNodes( annotations...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_80
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReaderTest.java", "identifier": "ModelAnnotationGroupXmlReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWriteReadsHideAnnotations() throws Exception {\n ShowHideMeasure hidePrice = new ShowHideMeasure();\n hidePrice.setName( \"Price\" );\n hidePrice.setCube( \"Sales\" );\n ModelAnnotation<ShowHideMeasure> priceAnnotation = new ModelAnnotation<>( hidePrice );\n\n ShowHi...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReader.java", "identifier": "ModelAnnotationGroupXmlReader", "interfaces": "", "methods": [ { "class_method_signature": "ModelAnnotationGroupXmlReader.readModelAnnotationGroup( Node step...
{ "body": "public ModelAnnotationGroup readModelAnnotationGroup( Node step ) throws KettleXMLException {\n\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n Node annotations = XMLHandler.getSubNode( step, \"annotations\" );\n int annotationsCount = XMLHandler.countNodes( annotations...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_38
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testAddCalculatedMemberWithoutAnnotations() {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n calculatedMember.annotations = null;\n\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianS...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public void addCalculatedMember( String cubeName, MondrianDef.CalculatedMember calculatedMember ) throws ModelerException {\n try {\n XPathFactory xPathFactory = XPathFactory.newInstance();\n XPath xPath = xPathFactory.newXPath();\n StringBuilder xPathExpr = new StringBuilder();\n\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_43
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test( expected = ModelerException.class )\n public void testUpdateMeasureInvalidMeasureName() throws ModelerException {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_MEASURE_NAME;\n measure.aggregator = TEST_A...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateMeasure( String cubeName, String measureName, MondrianDef.Measure measure ) throws ModelerException {\n if ( StringUtils.isBlank( measureName ) ) {\n throw new ModelerException(\n BaseMessages.getString( MSG_CLASS, \"MondrianSchemaHelper.updateMeasure.UNABLE_TO_FIND_MEAS...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_14
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/ModelerConversionUtilTest.java", "identifier": "ModelerConversionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDuplicateModelForOlap() throws Exception {\n // go get an xmi that needs upgraded\n XmiParser parser = new XmiParser();\n FileInputStream input = new FileInputStream( new File( \"src/test/resources/sql-model-1.0.xmi\" ) );\n Domain d = parser.parseXmi( input );\n\n L...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/ModelerConversionUtil.java", "identifier": "ModelerConversionUtil", "interfaces": "", "methods": [ { "class_method_signature": "ModelerConversionUtil.upConvertDomain( Domain domain )", "constructor": false, "full_sig...
{ "body": "public static LogicalModel duplicateModelForOlap( LogicalModel logicalModel ) {\n\n LogicalModel olapModel = new LogicalModel();\n duplicateProperties( logicalModel, olapModel );\n\n olapModel.setId( logicalModel.getId() + BaseModelerWorkspaceHelper.OLAP_SUFFIX );\n olapModel.setName( appendOla...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_55
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateCalculatedMemberWithNullAnnotations() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n calculatedMember.annotations.array = null;\...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_22
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/data/InlineFormatAnnotationTest.java", "identifier": "InlineFormatAnnotationTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testSavesOlapAnnotationToLevel() throws Exception {\n InlineFormatAnnotation memberAnnotation = new InlineFormatAnnotation( \"mm-dd-yyyy\" );\n OlapHierarchyLevel level = new OlapHierarchyLevel();\n memberAnnotation.saveAnnotations( level );\n assertLevelFormatString( level...
{ "fields": [ { "declarator": "INLINE_MEMBER_FORMAT_STRING = \"InlineMemberFormatString\"", "modifier": "public static final", "original_string": "public static final String INLINE_MEMBER_FORMAT_STRING = \"InlineMemberFormatString\";", "type": "String", "var_name": "INLINE_MEMBER_FOR...
{ "body": "@Override public void saveAnnotations( final OlapHierarchyLevel level ) {\n level.setFormatter( \"org.pentaho.platform.plugin.action.mondrian.formatter.InlineMemberFormatter\" );\n level.getAnnotations().removeIf( olapAnnotation -> INLINE_MEMBER_FORMAT_STRING.equals( olapAnnotation.getName() ) );\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_75
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReaderTest.java", "identifier": "ModelAnnotationGroupXmlReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetXmlNoAnnotations() throws Exception {\n\n String xml = \"<annotations><sharedDimension>N</sharedDimension><description>descr</description></annotations>\";\n Document doc = XMLHandler.loadXMLString( xml );\n ModelAnnotationGroupXmlReader mar = new ModelAnnotationGroupXm...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReader.java", "identifier": "ModelAnnotationGroupXmlReader", "interfaces": "", "methods": [ { "class_method_signature": "ModelAnnotationGroupXmlReader.readModelAnnotationGroup( Node step...
{ "body": "public ModelAnnotationGroup readModelAnnotationGroup( Node step ) throws KettleXMLException {\n\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n Node annotations = XMLHandler.getSubNode( step, \"annotations\" );\n int annotationsCount = XMLHandler.countNodes( annotations...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_63
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/SharedDimensionImportStrategyTest.java", "identifier": "SharedDimensionImportStrategyTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testDefaultsToValueMetaName() throws Exception {\n DataProvider dataProvider = new DataProvider();\n ArrayList<ColumnMapping> columnMappings = new ArrayList<ColumnMapping>();\n dataProvider.setColumnMappings( columnMappings );\n SharedDimensionImportStrategy importStrategy ...
{ "fields": [ { "declarator": "dataProvider", "modifier": "private", "original_string": "private DataProvider dataProvider;", "type": "DataProvider", "var_name": "dataProvider" } ], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/SharedDimensionImpo...
{ "body": "@Override public String displayName( ValueMetaInterface valueMeta ) {\n List<ColumnMapping> columnMappings = dataProvider.getColumnMappings();\n for ( ColumnMapping columnMapping : columnMappings ) {\n if ( columnMapping.getColumnName().equalsIgnoreCase( valueMeta.getName() ) ) {\n return...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_34
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testAddCalculatedMember() {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDocument );\n\n try {\n mondrian...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public void addCalculatedMember( String cubeName, MondrianDef.CalculatedMember calculatedMember ) throws ModelerException {\n try {\n XPathFactory xPathFactory = XPathFactory.newInstance();\n XPath xPath = xPathFactory.newXPath();\n StringBuilder xPathExpr = new StringBuilder();\n\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_18
{ "fields": [ { "declarator": "updateCalculatedMemberAnnotation = new UpdateCalculatedMember()", "modifier": "private", "original_string": "private UpdateCalculatedMember updateCalculatedMemberAnnotation = new UpdateCalculatedMember();", "type": "UpdateCalculatedMember", "var_name": ...
{ "body": "@Test( expected = UnsupportedOperationException.class )\n public void testApplyMetadata() throws Exception {\n ModelerWorkspace modelerWorkspace =\n new ModelerWorkspace( new ModelerWorkspaceHelper( \"\" ) );\n modelerWorkspace.setDomain( new XmiParser().parseXmi( new FileInputStream( METADATA_...
{ "fields": [ { "declarator": "serialVersionUID = 5169827225345800226L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5169827225345800226L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "logge...
{ "body": "@SuppressWarnings( \"unchecked\" ) @Override\n public boolean apply( ModelerWorkspace workspace, IMetaStore metaStore ) throws ModelerException {\n throw new UnsupportedOperationException();\n }", "class_method_signature": "UpdateCalculatedMember.apply( ModelerWorkspace workspace, IMetaStore metaSto...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_59
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdatingMeasureToExistingReturnsFalse() throws Exception {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_EXISTING_MEASURE_STRING;\n measure.aggregator = TEST_AVERAGE_AGG_TYPE;\n measu...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateMeasure( String cubeName, String measureName, MondrianDef.Measure measure ) throws ModelerException {\n if ( StringUtils.isBlank( measureName ) ) {\n throw new ModelerException(\n BaseMessages.getString( MSG_CLASS, \"MondrianSchemaHelper.updateMeasure.UNABLE_TO_FIND_MEAS...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_58
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdatingMeasureNotFoundReturnsFalse() throws Exception {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_MEASURE_NAME;\n measure.aggregator = TEST_AVERAGE_AGG_TYPE;\n measure.formatStri...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateMeasure( String cubeName, String measureName, MondrianDef.Measure measure ) throws ModelerException {\n if ( StringUtils.isBlank( measureName ) ) {\n throw new ModelerException(\n BaseMessages.getString( MSG_CLASS, \"MondrianSchemaHelper.updateMeasure.UNABLE_TO_FIND_MEAS...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_19
{ "fields": [ { "declarator": "updateCalculatedMemberAnnotation = new UpdateCalculatedMember()", "modifier": "private", "original_string": "private UpdateCalculatedMember updateCalculatedMemberAnnotation = new UpdateCalculatedMember();", "type": "UpdateCalculatedMember", "var_name": ...
{ "body": "@Test\n public void testValidate() throws Exception {\n updateCalculatedMemberAnnotation.validate();\n }", "class_method_signature": "UpdateCalculatedMemberTest.testValidate()", "constructor": false, "full_signature": "@Test public void testValidate()", "identifier": "testValidate", "invocat...
{ "fields": [ { "declarator": "serialVersionUID = 5169827225345800226L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5169827225345800226L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "logge...
{ "body": "@Override\n public void validate() throws ModelerException {\n if ( StringUtils.isBlank( getName() ) ) {\n if ( this.pdiContext ) {\n throw new ModelerException(\n BaseMessages.getString(\n MSG_CLASS,\n \"ModelAnnotation.UpdateCalculatedMember.validation.MEASU...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_35
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test( expected = ModelerException.class )\n public void testAddCalculatedMemberInvalidCubeName() throws ModelerException {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n MondrianSchemaHandler mondrianSchemaHandler...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public void addCalculatedMember( String cubeName, MondrianDef.CalculatedMember calculatedMember ) throws ModelerException {\n try {\n XPathFactory xPathFactory = XPathFactory.newInstance();\n XPath xPath = xPathFactory.newXPath();\n StringBuilder xPathExpr = new StringBuilder();\n\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_62
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testAddFormattingForALevelThatDoesnotExistReturnsFalse() throws Exception {\n Document schemaDocument = AnnotationUtil.getMondrianDoc( \"src/test/resources/updateattribute.mondrian.xml\" );\n\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDocumen...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean formatLevel( final String cube, final String dimension, final String hierarchy, final String level,\n final String formatString ) throws ModelerException {\n\n // remove any existing format element first\n removeFormatting( cube, dimension, hierarchy, level...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_74
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlWriterTest.java", "identifier": "ModelAnnotationGroupXmlWriterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetXmlWithDataProviders() throws Exception {\n // mock data\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n modelAnnotationGroup.setSharedDimension( true );\n\n DataProvider dp1 = new DataProvider();\n dp1.setName( \"dp1Name\" );\n\n Da...
{ "fields": [ { "declarator": "modelAnnotations", "modifier": "private", "original_string": "private ModelAnnotationGroup modelAnnotations;", "type": "ModelAnnotationGroup", "var_name": "modelAnnotations" } ], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/ann...
{ "body": "public String getXML() {\n try {\n return XMLUtil.prettyPrint( getModelAnnotationsXml() );\n } catch ( Exception e ) {\n return getModelAnnotationsXml();\n }\n }", "class_method_signature": "ModelAnnotationGroupXmlWriter.getXML()", "constructor": false, "full_signature": "public S...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_23
{ "fields": [ { "declarator": "PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\"", "modifier": "private static", "original_string": "private static String PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\";", "type": "String", "var_name": "PRODUCT_XMI_FILE" } ], "fil...
{ "body": "@Test\n public void testDescribe() {\n\n CreateMeasure createMeasure = new CreateMeasure();\n createMeasure.setAggregateType( AggregationType.AVERAGE );\n createMeasure.setFormatString( \"SSSS\" );\n createMeasure.setName( \"avg\" );\n createMeasure.setDescription( null );\n\n assertTrue...
{ "fields": [ { "declarator": "OLAP_CUBES_PROPERTY = \"olap_cubes\"", "modifier": "protected static final", "original_string": "protected static final String OLAP_CUBES_PROPERTY = \"olap_cubes\";", "type": "String", "var_name": "OLAP_CUBES_PROPERTY" }, { "declarator": "...
{ "body": "public Map<String, Serializable> describe() {\n Map<String, Serializable> map = new HashMap<String, Serializable>();\n\n List<String> ids = getModelPropertyIds();\n for ( String id : ids ) {\n try {\n Object value = getModelPropertyValueById( id );\n if ( value != null && isSeri...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_54
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateCalculatedMemberWithoutAnnotations() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n calculatedMember.annotations.array = new Mon...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_15
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/ModelerConversionUtilTest.java", "identifier": "ModelerConversionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUpConvertDomain_v1_sql() throws Exception {\n // go get an xmi that needs upgraded\n XmiParser parser = new XmiParser();\n FileInputStream input = new FileInputStream( new File( \"src/test/resources/sql-model-1.0.xmi\" ) );\n Domain domain = parser.parseXmi( input );\n\...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/ModelerConversionUtil.java", "identifier": "ModelerConversionUtil", "interfaces": "", "methods": [ { "class_method_signature": "ModelerConversionUtil.upConvertDomain( Domain domain )", "constructor": false, "full_sig...
{ "body": "public static double upConvertDomain( Domain domain ) {\n int modelCount = domain.getLogicalModels().size();\n LogicalModel model = domain.getLogicalModels().get( 0 );\n String versionString = (String) model.getProperty( \"AGILE_BI_VERSION\" );\n String isAgileBiGenerated = (String) model.getPr...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_42
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateMeasure() throws ModelerException {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_MEASURE_NAME;\n measure.aggregator = TEST_AVERAGE_AGG_TYPE;\n measure.formatString = TEST_NUM_D...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateMeasure( String cubeName, String measureName, MondrianDef.Measure measure ) throws ModelerException {\n if ( StringUtils.isBlank( measureName ) ) {\n throw new ModelerException(\n BaseMessages.getString( MSG_CLASS, \"MondrianSchemaHelper.updateMeasure.UNABLE_TO_FIND_MEAS...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_39
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testShowHideMeasure() throws ModelerException {\n MondrianSchemaHandler mondrianSchemaHandler = new MondrianSchemaHandler( schemaDocument );\n boolean result = mondrianSchemaHandler.showHideMeasure( TEST_CUBE_NAME, TEST_EXISTING_MEASURE_STRING, Boolean.FALSE );\n\n Assert.as...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean showHideMeasure( final String cubeName, final String measureName, final boolean visible ) throws ModelerException {\n Element measureNode = (Element) getMeasureNode( cubeName, measureName );\n if ( measureNode == null ) {\n measureNode = getCalculatedMeasureNode( cubeName, measure...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_81
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReaderTest.java", "identifier": "ModelAnnotationGroupXmlReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWriteReadsUpdateAttributeAnnotations() throws Exception {\n UpdateAttribute family = new UpdateAttribute();\n family.setName( \"Family\" );\n family.setCube( \"Sales\" );\n family.setDimension( \"Product\" );\n family.setHierarchy( \"Products\" );\n family.setLeve...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReader.java", "identifier": "ModelAnnotationGroupXmlReader", "interfaces": "", "methods": [ { "class_method_signature": "ModelAnnotationGroupXmlReader.readModelAnnotationGroup( Node step...
{ "body": "public ModelAnnotationGroup readModelAnnotationGroup( Node step ) throws KettleXMLException {\n\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n Node annotations = XMLHandler.getSubNode( step, \"annotations\" );\n int annotationsCount = XMLHandler.countNodes( annotations...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_78
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReaderTest.java", "identifier": "ModelAnnotationGroupXmlReaderTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testWriteReadsUpdateMeasureAnnotations() throws Exception {\n UpdateMeasure avgSales = new UpdateMeasure();\n avgSales.setMeasure( \"[Measures].[Sales]\" );\n avgSales.setCube( \"Sales2\" );\n avgSales.setAggregationType( AggregationType.AVERAGE );\n avgSales.setName( \"...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlReader.java", "identifier": "ModelAnnotationGroupXmlReader", "interfaces": "", "methods": [ { "class_method_signature": "ModelAnnotationGroupXmlReader.readModelAnnotationGroup( Node step...
{ "body": "public ModelAnnotationGroup readModelAnnotationGroup( Node step ) throws KettleXMLException {\n\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n Node annotations = XMLHandler.getSubNode( step, \"annotations\" );\n int annotationsCount = XMLHandler.countNodes( annotations...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_3
{ "fields": [ { "declarator": "GEO_ROLE_KEY = \"geo.roles\"", "modifier": "private static final", "original_string": "private static final String GEO_ROLE_KEY = \"geo.roles\";", "type": "String", "var_name": "GEO_ROLE_KEY" }, { "declarator": "props = null", "modif...
{ "body": "@Test( expected = ModelerException.class )\n public void testCreateWithProps_NoAliasesForRole() throws Exception {\n Properties myprops = (Properties) props.clone();\n myprops.setProperty( \"geo.country.aliases\", \"\" );\n config = new GeoContextPropertiesProvider( myprops );\n GeoContext geo...
{ "fields": [ { "declarator": "LATITUDE = \"latitude\"", "modifier": "private static final", "original_string": "private static final String LATITUDE = \"latitude\";", "type": "String", "var_name": "LATITUDE" }, { "declarator": "LONGITUDE = \"longitude\"", "modifi...
{ "body": "public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException {\n GeoContext geo = new GeoContext();\n\n if ( configProvider == null ) {\n throw new IllegalArgumentException( \"GeoContextConfigProvider cannot be null\" );\n }\n\n String dimName = config...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_8
{ "fields": [ { "declarator": "latRole", "modifier": "private", "original_string": "private LatLngRole latRole;", "type": "LatLngRole", "var_name": "latRole" }, { "declarator": "longRole", "modifier": "private", "original_string": "private LatLngRole longRol...
{ "body": "@Test\n public void testEvaluatePrefixedFields() {\n LocationRole role = new LocationRole( latRole, longRole );\n\n assertTrue( role.evaluate( \"customer_lat\" ) );\n assertTrue( role.evaluate( \"customer_latitude\" ) );\n assertTrue( role.evaluate( \"customer_lng\" ) );\n assertTrue( role....
{ "fields": [ { "declarator": "serialVersionUID = 308145806472677473L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 308145806472677473L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "LOCATIO...
{ "body": "@Override\n public boolean evaluate( String fieldName ) {\n boolean result = false;\n\n if ( latitudeRole != null ) {\n result = latitudeRole.evaluate( fieldName );\n if ( result ) {\n return result;\n }\n }\n if ( longitudeRole != null ) {\n return result || longitu...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_24
{ "fields": [ { "declarator": "PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\"", "modifier": "private static", "original_string": "private static String PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\";", "type": "String", "var_name": "PRODUCT_XMI_FILE" } ], "fil...
{ "body": "@Test\n public void testPopulate() {\n\n Map<String, Serializable> properties = new HashMap<String, Serializable>();\n properties.put( null, null );\n properties.put( \"name\", \"NameTest\" );\n properties.put( \"localizedName\", 12 ); // type doesn't match, not saved\n properties.put( \"ge...
{ "fields": [ { "declarator": "OLAP_CUBES_PROPERTY = \"olap_cubes\"", "modifier": "protected static final", "original_string": "protected static final String OLAP_CUBES_PROPERTY = \"olap_cubes\";", "type": "String", "var_name": "OLAP_CUBES_PROPERTY" }, { "declarator": "...
{ "body": "public void populate( final Map<String, Serializable> propertiesMap ) {\n\n if ( propertiesMap != null && propertiesMap.keySet() != null ) {\n\n Iterator<String> itr = propertiesMap.keySet().iterator();\n while ( itr.hasNext() ) {\n String id = itr.next();\n try {\n setM...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_73
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlWriterTest.java", "identifier": "ModelAnnotationGroupXmlWriterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetXmlWithAnnotations() throws Exception {\n // mock data\n ModelAnnotationGroup modelAnnotationGroup = new ModelAnnotationGroup();\n ModelAnnotation<CreateMeasure>\n measure = new ModelAnnotation<CreateMeasure>();\n measure.setName( \"myName\" );\n CreateMeas...
{ "fields": [ { "declarator": "modelAnnotations", "modifier": "private", "original_string": "private ModelAnnotationGroup modelAnnotations;", "type": "ModelAnnotationGroup", "var_name": "modelAnnotations" } ], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/ann...
{ "body": "public String getXML() {\n try {\n return XMLUtil.prettyPrint( getModelAnnotationsXml() );\n } catch ( Exception e ) {\n return getModelAnnotationsXml();\n }\n }", "class_method_signature": "ModelAnnotationGroupXmlWriter.getXML()", "constructor": false, "full_signature": "public S...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_65
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/CreateAttributeTest.java", "identifier": "CreateAttributeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void equalsLogically_differentName() throws Exception {\n CreateAttribute left = buildCreateAttributeAnnotations( \"total\", \"sales\", \"sales\", null, null, false );\n CreateAttribute right = buildCreateAttributeAnnotations( \"Sales\", \"Sales\", \"Sales\", null, null, false );\n\n ...
{ "fields": [ { "declarator": "serialVersionUID = 5169827225345800226L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5169827225345800226L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "MDI_G...
{ "body": "@Override\n public boolean equalsLogically( AnnotationType obj ) {\n if ( obj == null || obj.getClass() != getClass() ) {\n return false;\n }\n CreateAttribute that = (CreateAttribute) obj;\n\n EqualsBuilder eq = new EqualsBuilder();\n\n // by default just see if the name is the same\n...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_32
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test ( expected = org.pentaho.agilebi.modeler.ModelerException.class )\n public void testAddMeasureInvalidCubeName() throws ModelerException {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_MEASURE_NAME;\n meas...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public void addMeasure( String cubeName, MondrianDef.Measure measure ) throws ModelerException {\n try {\n XPathFactory xPathFactory = XPathFactory.newInstance();\n XPath xPath = xPathFactory.newXPath();\n StringBuffer xPathExpr = new StringBuffer();\n\n String cubeXPathPart = CUBE_X...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_49
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateCalculatedMemberWithoutExistingMemberProperties() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n // calculatedMember.memberPropert...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_4
{ "fields": [ { "declarator": "GEO_ROLE_KEY = \"geo.roles\"", "modifier": "private static final", "original_string": "private static final String GEO_ROLE_KEY = \"geo.roles\";", "type": "String", "var_name": "GEO_ROLE_KEY" }, { "declarator": "props = null", "modif...
{ "body": "@Test( expected = IllegalArgumentException.class )\n public void testCreateWithProps_NullProps() throws Exception {\n GeoContext geo = GeoContextFactory.create( null );\n }", "class_method_signature": "GeoContextFactoryTest.testCreateWithProps_NullProps()", "constructor": false, "full_signature"...
{ "fields": [ { "declarator": "LATITUDE = \"latitude\"", "modifier": "private static final", "original_string": "private static final String LATITUDE = \"latitude\";", "type": "String", "var_name": "LATITUDE" }, { "declarator": "LONGITUDE = \"longitude\"", "modifi...
{ "body": "public static GeoContext create( GeoContextConfigProvider configProvider ) throws ModelerException {\n GeoContext geo = new GeoContext();\n\n if ( configProvider == null ) {\n throw new IllegalArgumentException( \"GeoContextConfigProvider cannot be null\" );\n }\n\n String dimName = config...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_28
{ "fields": [ { "declarator": "PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\"", "modifier": "private static", "original_string": "private static String PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\";", "type": "String", "var_name": "PRODUCT_XMI_FILE" } ], "fil...
{ "body": "@Test\n public void testResolveFieldFromLevel() throws Exception {\n IMetaStore metaStore = new MemoryMetaStore();\n ModelerWorkspace model =\n new ModelerWorkspace( new ModelerWorkspaceHelper( \"\" ) );\n model.setDomain( new XmiParser().parseXmi( new FileInputStream( PRODUCT_XMI_FILE ) )...
{ "fields": [ { "declarator": "OLAP_CUBES_PROPERTY = \"olap_cubes\"", "modifier": "protected static final", "original_string": "protected static final String OLAP_CUBES_PROPERTY = \"olap_cubes\";", "type": "String", "var_name": "OLAP_CUBES_PROPERTY" }, { "declarator": "...
{ "body": "protected String resolveFieldFromLevel( final ModelerWorkspace modelerWorkspace,\n final String levelName,\n final String cubeName ) throws ModelerException {\n if ( StringUtils.isBlank( levelName ) || StringUtils.isBlank( cubeName ) || modelerWorkspace == null ) {\n throw new ModelerExce...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_86
{ "fields": [ { "declarator": "PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\"", "modifier": "private static", "original_string": "private static String PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\";", "type": "String", "var_name": "PRODUCT_XMI_FILE" }, { ...
{ "body": "@Test\n public void testDefaultAggregationTypIsSum() throws Exception {\n CreateMeasure createMeasure = new CreateMeasure();\n assertEquals( AggregationType.SUM, createMeasure.getAggregateType() );\n }", "class_method_signature": "CreateMeasureTest.testDefaultAggregationTypIsSum()", "constructo...
{ "fields": [ { "declarator": "serialVersionUID = -2487305952482463126L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -2487305952482463126L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "NAM...
{ "body": "public AggregationType getAggregateType() {\n return aggregateType;\n }", "class_method_signature": "CreateMeasure.getAggregateType()", "constructor": false, "full_signature": "public AggregationType getAggregateType()", "identifier": "getAggregateType", "invocations": [], "modifiers": "pub...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_69
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelingSchemaAnnotatorTest.java", "identifier": "ModelingSchemaAnnotatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testExceptionsThrowRepositoryException() throws Exception {\n ModelingSchemaAnnotator annotator = new ModelingSchemaAnnotator();\n InputStream schemaInput = getClass().getResourceAsStream( \"resources/simple.mondrian.xml\" );\n InputStream annotationsInput = getClass().getReso...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelingSchemaAnnotator.java", "identifier": "ModelingSchemaAnnotator", "interfaces": "implements MondrianSchemaAnnotator", "methods": [ { "class_method_signature": "ModelingSchemaAnnotator.getInputStream(\n ...
{ "body": "@Override public InputStream getInputStream(\n final InputStream schemaInputStream, final InputStream annotationsInputStream ) {\n ModelAnnotationGroupXmlReader reader = new ModelAnnotationGroupXmlReader();\n try {\n Document annotationsDoc = XMLHandler.loadXMLFile( annotationsInputStream )...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_45
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test( expected = ModelerException.class )\n public void testUpdateMeasureInvalidCubeName() throws ModelerException {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_MEASURE_NAME;\n measure.aggregator = TEST_AVER...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateMeasure( String cubeName, String measureName, MondrianDef.Measure measure ) throws ModelerException {\n if ( StringUtils.isBlank( measureName ) ) {\n throw new ModelerException(\n BaseMessages.getString( MSG_CLASS, \"MondrianSchemaHelper.updateMeasure.UNABLE_TO_FIND_MEAS...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_12
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/ModelerConversionUtilTest.java", "identifier": "ModelerConversionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUpgradeAndSplitCombinedModel() throws Exception {\n\n // go get an xmi that needs upgraded\n XmiParser parser = new XmiParser();\n FileInputStream input = new FileInputStream( new File( \"src/test/resources/multi-table-model-2.0.xmi\" ) );\n Domain domain = parser.parse...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/ModelerConversionUtil.java", "identifier": "ModelerConversionUtil", "interfaces": "", "methods": [ { "class_method_signature": "ModelerConversionUtil.upConvertDomain( Domain domain )", "constructor": false, "full_sig...
{ "body": "protected static LogicalModel upgradeAndSplitCombinedModel( LogicalModel combinedModel ) {\n\n // create the new OLAP model\n LogicalModel olapModel = new LogicalModel();\n duplicateProperties( combinedModel, olapModel );\n\n olapModel.setName( appendOlap( combinedModel.getName() ) );\n olap...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_53
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateCalculatedMemberMissingCalculatedMemberSource() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n\n MondrianSchemaHandler mondrianSch...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_52
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test( expected = ModelerException.class )\n public void testUpdateCalculatedMemberBlankCalculatedMemberSourceName() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_13
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/ModelerConversionUtilTest.java", "identifier": "ModelerConversionUtilTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testUpConvertDomain_v2_multiTable() throws Exception {\n // go get an xmi that needs upgraded\n XmiParser parser = new XmiParser();\n FileInputStream input = new FileInputStream( new File( \"src/test/resources/multi-table-model-2.0.xmi\" ) );\n Domain domain = parser.parseX...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/ModelerConversionUtil.java", "identifier": "ModelerConversionUtil", "interfaces": "", "methods": [ { "class_method_signature": "ModelerConversionUtil.upConvertDomain( Domain domain )", "constructor": false, "full_sig...
{ "body": "public static double upConvertDomain( Domain domain ) {\n int modelCount = domain.getLogicalModels().size();\n LogicalModel model = domain.getLogicalModels().get( 0 );\n String versionString = (String) model.getProperty( \"AGILE_BI_VERSION\" );\n String isAgileBiGenerated = (String) model.getPr...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_44
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test( expected = ModelerException.class )\n public void testUpdateMeasureBlankMeasureName() throws ModelerException {\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_MEASURE_NAME;\n measure.aggregator = TEST_AVE...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateMeasure( String cubeName, String measureName, MondrianDef.Measure measure ) throws ModelerException {\n if ( StringUtils.isBlank( measureName ) ) {\n throw new ModelerException(\n BaseMessages.getString( MSG_CLASS, \"MondrianSchemaHelper.updateMeasure.UNABLE_TO_FIND_MEAS...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_87
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/JoinTableModelTest.java", "identifier": "JoinTableModelTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testProcessTableFields() throws Exception {\n JoinTableModel model = new JoinTableModel();\n model.setName( \"m1\" );\n List<JoinFieldModel> joinFieldModels = model.processTableFields( Arrays.asList( \"field1\", \"field2\", \"field3\" ) );\n assertEquals( 3, joinFieldModels...
{ "fields": [ { "declarator": "serialVersionUID = -8964972286672462570L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = -8964972286672462570L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "nam...
{ "body": "public List<JoinFieldModel> processTableFields( List<String> fields ) {\n\n List<JoinFieldModel> fieldModels = new ArrayList<JoinFieldModel>();\n for ( String field : fields ) {\n JoinFieldModel fieldModel = new JoinFieldModel();\n fieldModel.setName( field );\n fieldModel.setParentTab...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_68
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelingSchemaAnnotatorTest.java", "identifier": "ModelingSchemaAnnotatorTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testAppliesAnnotationsFromAFile() throws Exception {\n ModelingSchemaAnnotator annotator = new ModelingSchemaAnnotator();\n InputStream schemaInput = getClass().getResourceAsStream( \"resources/simple.mondrian.xml\" );\n InputStream annotationsInput = getClass().getResourceAsS...
{ "fields": [], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/annotations/ModelingSchemaAnnotator.java", "identifier": "ModelingSchemaAnnotator", "interfaces": "implements MondrianSchemaAnnotator", "methods": [ { "class_method_signature": "ModelingSchemaAnnotator.getInputStream(\n ...
{ "body": "@Override public InputStream getInputStream(\n final InputStream schemaInputStream, final InputStream annotationsInputStream ) {\n ModelAnnotationGroupXmlReader reader = new ModelAnnotationGroupXmlReader();\n try {\n Document annotationsDoc = XMLHandler.loadXMLFile( annotationsInputStream )...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_5
{ "fields": [ { "declarator": "props = null", "modifier": "private static", "original_string": "private static Properties props = null;", "type": "Properties", "var_name": "props" }, { "declarator": "LOCALE = \"en_US\"", "modifier": "private static final", "...
{ "body": "@Test\n public void addGeoRole() {\n GeoContext geo = new GeoContext();\n assertEquals( 0, geo.size() );\n geo.addGeoRole( new GeoRole( \"country\", Arrays.asList( new String[] { \"country, ctry\" } ) ) );\n geo.addGeoRole( new GeoRole( \"state\", Arrays.asList( new String[] { \"state, st, pro...
{ "fields": [ { "declarator": "serialVersionUID = 7328118800436710452L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7328118800436710452L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "GEO_P...
{ "body": "public void addGeoRole( GeoRole geoRole ) {\n if ( geoRole != null ) {\n children.add( geoRole );\n }\n }", "class_method_signature": "GeoContext.addGeoRole( GeoRole geoRole )", "constructor": false, "full_signature": "public void addGeoRole( GeoRole geoRole )", "identifier": "addGeoRol...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_29
{ "fields": [ { "declarator": "PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\"", "modifier": "private static", "original_string": "private static String PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\";", "type": "String", "var_name": "PRODUCT_XMI_FILE" } ], "fil...
{ "body": "@Test\n public void testResolveFieldFromMeasure() throws Exception {\n IMetaStore metaStore = new MemoryMetaStore();\n ModelerWorkspace model =\n new ModelerWorkspace( new ModelerWorkspaceHelper( \"\" ) );\n model.setDomain( new XmiParser().parseXmi( new FileInputStream( PRODUCT_XMI_FILE )...
{ "fields": [ { "declarator": "OLAP_CUBES_PROPERTY = \"olap_cubes\"", "modifier": "protected static final", "original_string": "protected static final String OLAP_CUBES_PROPERTY = \"olap_cubes\";", "type": "String", "var_name": "OLAP_CUBES_PROPERTY" }, { "declarator": "...
{ "body": "protected String resolveFieldFromMeasure( final ModelerWorkspace modelerWorkspace,\n final String measureName,\n final String cubeName ) throws ModelerException {\n if ( StringUtils.isBlank( measureName ) || StringUtils.isBlank( cubeName ) || modelerWorkspace == null ) {\n throw new Model...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_48
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testUpdateCalculatedMemberNullMemberProperties() throws ModelerException {\n boolean result = true;\n\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.CalculatedMember calculatedMember = getMockCalculatedMember();\n // calculatedMember.memberProperties = null;...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public boolean updateCalculatedMember( String cubeName, String calculatedMemberName,\n MondrianDef.CalculatedMember updatedCalculatedMember ) throws ModelerException {\n if ( StringUtils.isBlank( calculatedMemberName ) ) {\n throw new ModelerException(\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_33
{ "fields": [ { "declarator": "TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\"", "modifier": "private static final", "original_string": "private static final String TEST_FILE_PATH = \"src/test/resources/products.with.calc.measures.mondrian.xml\";", "type": ...
{ "body": "@Test\n public void testAddMeasureWithoutExistingCalculatedMeasures() throws Exception {\n schemaDocument = getDocument( TEST_FILE_PATH_WITHOUT_CALC_MEASURES );\n Assert.assertTrue( schemaDocument != null );\n\n MondrianDef.Measure measure = new MondrianDef.Measure();\n measure.name = TEST_MEA...
{ "fields": [ { "declarator": "MSG_CLASS = MondrianSchemaHandler.class", "modifier": "protected static final", "original_string": "protected static final Class<?> MSG_CLASS = MondrianSchemaHandler.class;", "type": "Class<?>", "var_name": "MSG_CLASS" }, { "declarator": "...
{ "body": "public void addMeasure( String cubeName, MondrianDef.Measure measure ) throws ModelerException {\n try {\n XPathFactory xPathFactory = XPathFactory.newInstance();\n XPath xPath = xPathFactory.newXPath();\n StringBuffer xPathExpr = new StringBuffer();\n\n String cubeXPathPart = CUBE_X...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_64
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/CreateAttributeTest.java", "identifier": "CreateAttributeTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void equalsLogically_caseInsensitive() throws Exception {\n CreateAttribute left = buildCreateAttributeAnnotations( \"sales\", \"sales\", \"sales\", null, null, false );\n CreateAttribute right = buildCreateAttributeAnnotations( \"Sales\", \"Sales\", \"Sales\", \"ignore\", \"ignore\",...
{ "fields": [ { "declarator": "serialVersionUID = 5169827225345800226L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 5169827225345800226L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "MDI_G...
{ "body": "@Override\n public boolean equalsLogically( AnnotationType obj ) {\n if ( obj == null || obj.getClass() != getClass() ) {\n return false;\n }\n CreateAttribute that = (CreateAttribute) obj;\n\n EqualsBuilder eq = new EqualsBuilder();\n\n // by default just see if the name is the same\n...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_72
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/models/annotations/ModelAnnotationGroupXmlWriterTest.java", "identifier": "ModelAnnotationGroupXmlWriterTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testGetXmlNoAnnotations() throws Exception {\n\n ModelAnnotationGroup group = new ModelAnnotationGroup();\n\n ModelAnnotationGroupXmlWriter xmlWriter = new ModelAnnotationGroupXmlWriter( group );\n\n String xml = xmlWriter.getXML();\n Assert.assertEquals( \"<annotations><sh...
{ "fields": [ { "declarator": "modelAnnotations", "modifier": "private", "original_string": "private ModelAnnotationGroup modelAnnotations;", "type": "ModelAnnotationGroup", "var_name": "modelAnnotations" } ], "file": "core/src/main/java/org/pentaho/agilebi/modeler/models/ann...
{ "body": "public String getXML() {\n try {\n return XMLUtil.prettyPrint( getModelAnnotationsXml() );\n } catch ( Exception e ) {\n return getModelAnnotationsXml();\n }\n }", "class_method_signature": "ModelAnnotationGroupXmlWriter.getXML()", "constructor": false, "full_signature": "public S...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_9
{ "fields": [], "file": "core/src/test/java/org/pentaho/agilebi/modeler/geo/GeoRoleTest.java", "identifier": "GeoRoleTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testEvaluation() {\n String[] aliases = { \"st\", \"state\", \"province\", \"stateProvince\", \"postal code\" };\n GeoRole state = new GeoRole( \"State\", Arrays.asList( aliases ) );\n assertTrue( state.evaluate( \"STATE\" ) );\n assertTrue( state.evaluate( \"province\" ) )...
{ "fields": [ { "declarator": "serialVersionUID = 815135675387559794L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 815135675387559794L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "ANNOTAT...
{ "body": "public boolean evaluate( String fieldName ) {\n if ( commonAliases == null || fieldName == null || fieldName.length() == 0 ) {\n return false;\n }\n\n for ( String alias : commonAliases ) {\n String testName = fieldName.toLowerCase();\n String testAlias = alias.toLowerCase();\n\n ...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
2316136_25
{ "fields": [ { "declarator": "PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\"", "modifier": "private static", "original_string": "private static String PRODUCT_XMI_FILE = \"src/test/resources/products.xmi\";", "type": "String", "var_name": "PRODUCT_XMI_FILE" } ], "fil...
{ "body": "@Test\n public void testIterateProperties() {\n\n Map<String, Serializable> properties = new HashMap<String, Serializable>();\n properties.put( null, null );\n properties.put( \"name\", \"NameTest\" );\n properties.put( \"localizedName\", 12 ); // type doesn't match, not saved\n properties....
{ "fields": [ { "declarator": "OLAP_CUBES_PROPERTY = \"olap_cubes\"", "modifier": "protected static final", "original_string": "protected static final String OLAP_CUBES_PROPERTY = \"olap_cubes\";", "type": "String", "var_name": "OLAP_CUBES_PROPERTY" }, { "declarator": "...
{ "body": "public void iterateProperties( KeyValueClosure closure ) {\n\n Map<String, Serializable> properties = describe();\n if ( closure == null || properties == null || properties.keySet() == null ) {\n return;\n }\n\n Iterator<String> itr = properties.keySet().iterator();\n while ( itr.hasNex...
{ "created": null, "fork": null, "fork_count": 87, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 2316136, "size": 3720, "stargazer_count": 38, "stars": null, "updates": null, "url": "https://github.com/pentaho/modeler" }
73552352_0
{ "fields": [], "file": "app/src/test/java/id/co/flipbox/mvvmstarter/data/DataManagerTest.java", "identifier": "DataManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void login () throws Exception\n {\n\n }", "class_method_signature": "DataManagerTest.login()", "constructor": false, "full_signature": "@Test public void login()", "identifier": "login", "invocations": [], "modifiers": "@Test public", "parameters": "()", "return": "...
{ "fields": [ { "declarator": "dm", "modifier": "private static", "original_string": "private static DataManager dm;", "type": "DataManager", "var_name": "dm" }, { "declarator": "sAuthAPI = new AuthAPI()", "modifier": "private static", "original_string":...
{ "body": "@Override\n public Maybe<JsonObject> login (String id, String password)\n {\n return sAuthAPI.login(id, password);\n }", "class_method_signature": "DataManager.login(String id, String password)", "constructor": false, "full_signature": "@Override public Maybe<JsonObject> login(String ...
{ "created": null, "fork": null, "fork_count": 29, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 73552352, "size": 1235, "stargazer_count": 82, "stars": null, "updates": null, "url": "https://github.com/flipboxstudio/mvvm-starter" }
43098270_1
{ "fields": [ { "declarator": "clientCredentialsResource", "modifier": "protected", "original_string": "protected ClientCredentialsResourceDetails clientCredentialsResource;", "type": "ClientCredentialsResourceDetails", "var_name": "clientCredentialsResource" }, { "decl...
{ "body": "@Test\n\tpublic void testPostRead() throws Exception {\n\n\t\tString dataConnectorReadUrl = environment.getProperty(\"ref_postgres_data_connector_read_url\");\n\t\tString analyticReadDataRequestJSON = IOUtils.toString(getClass().getClassLoader().getResourceAsStream(\"analytic-read-data-request.json\"));\n\...
{ "fields": [ { "declarator": "customDataResourceManager", "modifier": "@Autowired\n\tprivate", "original_string": "@Autowired\n\tprivate CustomDataResourceManager customDataResourceManager;", "type": "CustomDataResourceManager", "var_name": "customDataResourceManager" } ], "...
{ "body": "@POST\n\t@Consumes(\"application/json\")\n\t@Produces(\"application/json\")\n\t@Path(\"/read\")\n\tpublic Response postRead(AnalyticReadDataRequest analyticReadDataRequest, @Context HttpHeaders httpHeaders, @Context UriInfo uriInfo) {\n\t\tAnalyticReadDataResponse analyticReadDataResponse = customDataResou...
{ "created": "9/24/2015 11:22:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 43098270, "size": null, "stargazer_count": null, "stars": 23, "updates": "2019-05-14T03:47:28+00:00", "url": "https://github.com/PredixDev/predix...
43098270_0
{ "fields": [], "file": "analytics/miners-rule/src/test/java/com/ge/predix/analytics/demo/java/TestMinersRule.java", "identifier": "TestMinersRule", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void TestMinersRule() {\n String inputStr = null;\n try {\n inputStr = getFileAsString(\"src/test/resources/minersRuleIn.json\");\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail();\n }\n\n byte[] model = nu...
{ "fields": [ { "declarator": "STRESS_LIMITS_MODEL_NAME = \"Stress Limits\"", "modifier": "public static final", "original_string": "public static final String STRESS_LIMITS_MODEL_NAME = \"Stress Limits\";", "type": "String", "var_name": "STRESS_LIMITS_MODEL_NAME" }, { ...
{ "body": "public String computeCDM(String jsonStr, Map<String, byte[]> inputModels) throws Exception {\n\n Input input = null;\n try {\n input = mapper.readValue(jsonStr, Input.class);\n } catch (Exception e) {\n throw new Exception(\"Trying to read the json input:\"+jsonSt...
{ "created": "9/24/2015 11:22:02 PM +00:00", "fork": "False", "fork_count": null, "is_fork": null, "language": null, "license": "licensed", "repo_id": 43098270, "size": null, "stargazer_count": null, "stars": 23, "updates": "2019-05-14T03:47:28+00:00", "url": "https://github.com/PredixDev/predix...
112975556_10
{ "fields": [ { "declarator": "extrasHandler", "modifier": "private", "original_string": "private ExtrasHandler extrasHandler;", "type": "ExtrasHandler", "var_name": "extrasHandler" }, { "declarator": "random = new Random(1)", "modifier": "private", "origina...
{ "body": "@Test\n public void testAddToExtras() throws NoSuchFieldException, IllegalAccessException {\n\n int startingSize = extrasHandler.remainingExtras();\n\n Person p = new Person();\n p.setRelationshipStatus(RelationshipStatus.RELATIVE);\n p.setAgeRange(AgeRange.A25_39);\n ...
{ "fields": [ { "declarator": "random", "modifier": "final", "original_string": "final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "indRecords", "modifier": "private final", "original_string": "private final List<IndRecord> ind...
{ "body": "void addToExtras(List<Person> persons) {\n persons.forEach(p -> {\n p.setRelationshipStatus(null);\n p.clearFamilyID();\n });\n this.extras.addAll(persons);\n persons.clear();\n }", "class_method_signature": "ExtrasHandler.addToExtras(List<Person> pers...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_6
{ "fields": [ { "declarator": "indRecords = null", "modifier": "private", "original_string": "private List<IndRecord> indRecords = null;", "type": "List<IndRecord>", "var_name": "indRecords" }, { "declarator": "hhRecords = null", "modifier": "private", "orig...
{ "body": "@Test\n public void testCompleteHouseholdsWithChildren() {\n\n setup();\n hf.addNonPrimaryFamiliesToHouseholds(households,\n couples,\n oneParentFamilies,\n c...
{ "fields": [ { "declarator": "random", "modifier": "private final", "original_string": "private final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "extrasHandler", "modifier": "private final", "original_string": "private final ...
{ "body": "void completeHouseholdsWithChildren(List<Household> households,\n List<Person> knownChildren) {\n\n Log.info(\"Adding all known children to households\");\n Log.debug(\"Total known Children from data: \" + knownChildren.size());\n knownChildren.so...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_7
{ "fields": [ { "declarator": "indRecords = null", "modifier": "private", "original_string": "private List<IndRecord> indRecords = null;", "type": "List<IndRecord>", "var_name": "indRecords" }, { "declarator": "hhRecords = null", "modifier": "private", "orig...
{ "body": "@Test\n public void testAddExtrasAsChildrenAndRelatives() {\n setup();\n hf.addNonPrimaryFamiliesToHouseholds(households,\n couples,\n oneParentFamilies,\n ch...
{ "fields": [ { "declarator": "random", "modifier": "private final", "original_string": "private final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "extrasHandler", "modifier": "private final", "original_string": "private final ...
{ "body": "void addExtrasAsChildrenAndRelatives(List<Household> households,\n List<IndRecord> indRecs,\n List<Person> marriedMales,\n List<Person> marriedFemales,\n ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_11
{ "fields": [ { "declarator": "extrasHandler", "modifier": "private", "original_string": "private ExtrasHandler extrasHandler;", "type": "ExtrasHandler", "var_name": "extrasHandler" }, { "declarator": "random = new Random(1)", "modifier": "private", "origina...
{ "body": "@Test\n public void testGetPersonsFromExtras() throws NoSuchFieldException, IllegalAccessException {\n int startExtrasCount = extrasHandler.remainingExtras();\n List<Person> pl = extrasHandler.getPersonsFromExtras(RelationshipStatus.LONE_PARENT, Sex.Female, AgeRange.A40_54, 1);\n As...
{ "fields": [ { "declarator": "random", "modifier": "final", "original_string": "final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "indRecords", "modifier": "private final", "original_string": "private final List<IndRecord> ind...
{ "body": "List<Person> getPersonsFromExtras(RelationshipStatus relStatus, Sex sex, AgeRange ageRange, int count) {\n return getPersonsFromExtras(relStatus == null ? null : Collections.singletonList(relStatus),\n sex == null ? null : Collections.singletonList(sex),\n ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_0
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "population...
{ "body": "@Test\n public void testReadPersonRecords() throws IOException {\n //Expected\n //Armadale\tMarried\tMale\t0-14 years\t0\n //Armadale\tMarried\tMale\t70-84 years\t238\n //Armadale\tStudent\tFemale\t0-14 years\t0\n //Armadale\tGroupHhold\tFemale\t55-69 years\t9\n ...
{ "fields": [], "file": "populationbuilder/synthesis/src/main/java/io/github/agentsoz/syntheticpop/synthesis/DataReader.java", "identifier": "DataReader", "interfaces": "", "methods": [ { "class_method_signature": "DataReader.readHouseholdRecords(Path hhFileInfo)", "constructor": false, ...
{ "body": "public static Map<String, List<IndRecord>> readPersonRecords(Path indFileInfo) throws IOException {\n int titleRow = 0;\n Map<String, List<IndRecord>> indData = new LinkedHashMap<>();\n try (CSVParser parser = new CSVParser(new InputStreamReader(new GZIPInputStream(new BufferedInputStr...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_1
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "population...
{ "body": "@Test\n public void testReadHouseholdRecords() throws IOException, ClassNotFoundException {\n\n //Expected\n //Armadale\tOne person\tOne family household: Couple family with no children\t0\n //Armadale\tOne person\tLone person household\t1347\n //Armadale\tFour persons\tOne f...
{ "fields": [], "file": "populationbuilder/synthesis/src/main/java/io/github/agentsoz/syntheticpop/synthesis/DataReader.java", "identifier": "DataReader", "interfaces": "", "methods": [ { "class_method_signature": "DataReader.readHouseholdRecords(Path hhFileInfo)", "constructor": false, ...
{ "body": "public static Map<String, List<HhRecord>> readHouseholdRecords(Path hhFileInfo) throws IOException {\n\n int titleRow = 0;\n Map<String, List<HhRecord>> hhData = new LinkedHashMap<>();\n // Even though GZIPInputStream has a buffer it reads individual bytes when processing the header, b...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_2
{ "fields": [ { "declarator": "exception = ExpectedException.none()", "modifier": "@Rule\n public", "original_string": "@Rule\n public ExpectedException exception = ExpectedException.none();", "type": "ExpectedException", "var_name": "exception" } ], "file": "population...
{ "body": "@Test\n public void testReadAgeDistribution() throws IOException {\n Map<String, String> paramsMap = new HashMap<>(4, 1);\n ClassLoader classLoader = getClass().getClassLoader();\n\n paramsMap.put(\"FileName\", \"Persons_percentage_by_age_2016_Greater_Melbourne_SA2s.txt\");\n ...
{ "fields": [], "file": "populationbuilder/synthesis/src/main/java/io/github/agentsoz/syntheticpop/synthesis/DataReader.java", "identifier": "DataReader", "interfaces": "", "methods": [ { "class_method_signature": "DataReader.readHouseholdRecords(Path hhFileInfo)", "constructor": false, ...
{ "body": "public static Map<String, List<Double>> readAgeDistribution(Map<String, String> params) throws IOException {\n\n Map<String, List<Double>> ageDistBySA2 = new HashMap<>();\n\n //Read the data file\n Path file = Paths.get(params.get(\"FileName\"));\n Reader reader;\n switch...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_3
{ "fields": [ { "declarator": "indRecords = null", "modifier": "private", "original_string": "private List<IndRecord> indRecords = null;", "type": "List<IndRecord>", "var_name": "indRecords" }, { "declarator": "hhRecords = null", "modifier": "private", "orig...
{ "body": "@Test\n public void testFormAllFamilyHouseholdsWithPrimaryFamilies() {\n setup();\n\n Assert.assertEquals(\"Number of Couple With no Children family households\",\n households.stream().filter(h -> h.getPrimaryFamilyType() == FamilyType.COUPLE_ONLY).count(),\n ...
{ "fields": [ { "declarator": "random", "modifier": "private final", "original_string": "private final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "extrasHandler", "modifier": "private final", "original_string": "private final ...
{ "body": "List<Household> formAllFamilyHouseholdsWithPrimaryFamilies(List<Family> coupleOnlyBasic,\n List<Family> coupleWithChildrenBasic,\n List<Family> oneParentBasicFamilies,\n ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_4
{ "fields": [ { "declarator": "indRecords = null", "modifier": "private", "original_string": "private List<IndRecord> indRecords = null;", "type": "List<IndRecord>", "var_name": "indRecords" }, { "declarator": "hhRecords = null", "modifier": "private", "orig...
{ "body": "@Test\n public void testAssignOneParentUnitsAsNonPrimaryFamilies() throws NoSuchMethodException, InvocationTargetException,\n IllegalAccessException {\n setup();\n Assert.assertTrue(\"One parent families are not empty\", !oneParentFamilies.isEmpty());\n int startOneParent...
{ "fields": [ { "declarator": "random", "modifier": "private final", "original_string": "private final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "extrasHandler", "modifier": "private final", "original_string": "private final ...
{ "body": "private void assignOneParentUnitsAsNonPrimaryFamilies(List<Household> households,\n List<Family> basicUnits) {\n\n Log.info(\"Adding \" + FamilyType.ONE_PARENT + \" as non primary\");\n Log.debug(FamilyType.ONE_PARENT + \": available fa...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_8
{ "fields": [ { "declarator": "indRecords = null", "modifier": "private", "original_string": "private List<IndRecord> indRecords = null;", "type": "List<IndRecord>", "var_name": "indRecords" }, { "declarator": "hhRecords = null", "modifier": "private", "orig...
{ "body": "@Test\n public void testcompleteHouseholdsWithRelatives(){\n setup();\n hf.addNonPrimaryFamiliesToHouseholds(households,\n couples,\n oneParentFamilies,\n ch...
{ "fields": [ { "declarator": "random", "modifier": "private final", "original_string": "private final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "extrasHandler", "modifier": "private final", "original_string": "private final ...
{ "body": "void completeHouseholdsWithRelatives(List<Household> households,\n List<Person> relatives,\n FamilyHouseholdType familyHouseholdType) {\n Log.info(\"Fill \" + ((familyHouseholdType == null) ? \"All\" : familyHouseholdTyp...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_9
{ "fields": [ { "declarator": "extrasHandler", "modifier": "private", "original_string": "private ExtrasHandler extrasHandler;", "type": "ExtrasHandler", "var_name": "extrasHandler" }, { "declarator": "random = new Random(1)", "modifier": "private", "origina...
{ "body": "@Test\n public void testFormingExtras() {\n Assert.assertNotNull(extrasHandler);\n Assert.assertEquals(\"Number of extras\", extrasHandler.remainingExtras(), 145);\n }", "class_method_signature": "ExtrasHandlerTest.testFormingExtras()", "constructor": false, "full_signature": "@Te...
{ "fields": [ { "declarator": "random", "modifier": "final", "original_string": "final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "indRecords", "modifier": "private final", "original_string": "private final List<IndRecord> ind...
{ "body": "int remainingExtras() {\n return extras.size();\n }", "class_method_signature": "ExtrasHandler.remainingExtras()", "constructor": false, "full_signature": " int remainingExtras()", "identifier": "remainingExtras", "invocations": [ "size" ], "modifiers": "", "parameters": "()",...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
112975556_5
{ "fields": [ { "declarator": "indRecords = null", "modifier": "private", "original_string": "private List<IndRecord> indRecords = null;", "type": "List<IndRecord>", "var_name": "indRecords" }, { "declarator": "hhRecords = null", "modifier": "private", "orig...
{ "body": "@Test\n public void testAddNonPrimaryFamiliesToHouseholds() {\n\n setup();\n Assert.assertTrue(\"One parent families are not empty\", !oneParentFamilies.isEmpty());\n int childCount = children.size();\n int oneParentFamilyCount = oneParentFamilies.size();\n int lonePar...
{ "fields": [ { "declarator": "random", "modifier": "private final", "original_string": "private final Random random;", "type": "Random", "var_name": "random" }, { "declarator": "extrasHandler", "modifier": "private final", "original_string": "private final ...
{ "body": "void addNonPrimaryFamiliesToHouseholds(List<Household> households,\n List<Family> unusedCouples,\n List<Family> unusedBasicOneParentFamilies,\n List<Person> children,\n ...
{ "created": null, "fork": null, "fork_count": 1, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 112975556, "size": 618195, "stargazer_count": 5, "stars": null, "updates": null, "url": "https://github.com/agentsoz/synthetic-population" }
207726223_0
{ "fields": [], "file": "tubemq-client/src/test/java/com/tencent/tubemq/client/factory/TubeMultiSessionFactoryTest.java", "identifier": "TubeMultiSessionFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTubeMultiSessionFactory() throws Exception {\n TubeClientConfig config = mock(TubeClientConfig.class);\n when(config.getRpcConnProcesserCnt()).thenReturn(1);\n when(config.getRpcRspCallBackThreadCnt()).thenReturn(1);\n when(config.getMasterInfo()).then...
{ "fields": [ { "declarator": "logger =\n LoggerFactory.getLogger(TubeMultiSessionFactory.class)", "modifier": "private static final", "original_string": "private static final Logger logger =\n LoggerFactory.getLogger(TubeMultiSessionFactory.class);", "type": "Logger"...
{ "body": "public TubeMultiSessionFactory(final TubeClientConfig tubeClientConfig) throws TubeClientException {\n RpcConfig config = TubeClientConfigUtils.getRpcConfigByClientConfig(tubeClientConfig, false);\n clientFactory.configure(config);\n baseSessionFactory = new TubeBaseSessionFactory(clie...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_13
{ "fields": [], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker/msgstore/mem/MsgMemStoreTest.java", "identifier": "MsgMemStoreTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void appendMsg() {\n int maxCacheSize = 2 * 1024 * 1024;\n int maxMsgCount = 10000;\n MsgMemStore msgMemStore = new MsgMemStore(maxCacheSize, maxMsgCount, null);\n MsgMemStatisInfo msgMemStatisInfo = new MsgMemStatisInfo();\n ByteBuffer bf = ByteBuffer.a...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(MsgMemStore.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(MsgMemStore.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "public boolean appendMsg(final MsgMemStatisInfo msgMemStatisInfo,\n final int partitionId, final int keyCode,\n final long timeRecv, final int entryLength,\n final ByteBuffer entry) {\n int alignedSize = (entryLength...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_12
{ "fields": [], "file": "tubemq-core/src/test/java/com/tencent/tubemq/corebase/policies/TestFlowCtrlRuleHandler.java", "identifier": "TestFlowCtrlRuleHandler", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testFlowCtrlRuleHandler() {\n try {\n FlowCtrlRuleHandler handler = new FlowCtrlRuleHandler(true);\n handler.updateDefFlowCtrlInfo(1001, 2, 10, mockFlowCtrlInfo());\n TimeZone timeZone = TimeZone.getTimeZone(\"GMT+8:00\");\n Calendar...
{ "fields": [ { "declarator": "isDefaultHandler", "modifier": "private final", "original_string": "private final boolean isDefaultHandler;", "type": "boolean", "var_name": "isDefaultHandler" }, { "declarator": "flowCtrlName", "modifier": "private final", "or...
{ "body": "public FlowCtrlRuleHandler(boolean isDefault) {\n this.isDefaultHandler = isDefault;\n if (this.isDefaultHandler) {\n flowCtrlName = \"Default_FlowCtrl\";\n } else {\n flowCtrlName = \"Group_FlowCtrl\";\n }\n\n }", "class_method_signature": "FlowCtrlRu...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_1
{ "fields": [], "file": "tubemq-client/src/test/java/com/tencent/tubemq/client/factory/TubeSingleSessionFactoryTest.java", "identifier": "TubeSingleSessionFactoryTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testTubeSingleSessionFactory() throws Exception {\n TubeClientConfig config = mock(TubeClientConfig.class);\n when(config.getRpcConnProcesserCnt()).thenReturn(1);\n when(config.getRpcRspCallBackThreadCnt()).thenReturn(1);\n when(config.getMasterInfo()).the...
{ "fields": [ { "declarator": "logger =\n LoggerFactory.getLogger(TubeSingleSessionFactory.class)", "modifier": "private static final", "original_string": "private static final Logger logger =\n LoggerFactory.getLogger(TubeSingleSessionFactory.class);", "type": "Logge...
{ "body": "public TubeSingleSessionFactory(final TubeClientConfig tubeClientConfig) throws TubeClientException {\n if (referenceCounter.incrementAndGet() == 1) {\n RpcConfig config = TubeClientConfigUtils.getRpcConfigByClientConfig(tubeClientConfig, true);\n clientFactory.configure(config...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_15
{ "fields": [], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker/msgstore/disk/FileReadViewTest.java", "identifier": "FileReadViewTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void read() {\n File file = new File(\"src/test/resource/testdata\");\n if (file.exists()) {\n file.delete();\n }\n try {\n file.createNewFile();\n // create file segment\n Segment segment = new FileSegment(0, file, t...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(FileReadView.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(FileReadView.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "@Override\n public void read(final ByteBuffer bf, final long offset) throws IOException {\n if (segment.isExpired()) {\n //Todo: conduct file closed and expired cases.\n }\n int size = 0;\n while (bf.hasRemaining()) {\n final int l = this.segment.getFile...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_6
{ "fields": [], "file": "tubemq-client/src/test/java/com/tencent/tubemq/client/consumer/RmtDataCacheTest.java", "identifier": "RmtDataCacheTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testRmtDataCache() {\n FlowCtrlRuleHandler groupFlowCtrlRuleHandler = new FlowCtrlRuleHandler(false);\n FlowCtrlRuleHandler defFlowCtrlRuleHandler = new FlowCtrlRuleHandler(true);\n List<Partition> partitions = new ArrayList<>();\n BrokerInfo brokerInfo = ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(RmtDataCache.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(RmtDataCache.class);", "type": "Logger", "var_name": "logger" }, { ...
{ "body": "public RmtDataCache(final FlowCtrlRuleHandler defFlowCtrlRuleHandler,\n final FlowCtrlRuleHandler groupFlowCtrlRuleHandler,\n List<Partition> partitionList) {\n if (refCont.incrementAndGet() == 1) {\n timer = new HashedWheelTimer();\n }...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_19
{ "fields": [ { "declarator": "brokerMetadataManage", "modifier": "", "original_string": "BrokerMetadataManage brokerMetadataManage;", "type": "BrokerMetadataManage", "var_name": "brokerMetadataManage" } ], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker...
{ "body": "@Test\n public void updateBrokerRemoveTopicMap() {\n brokerMetadataManage = new BrokerMetadataManage();\n String newBrokerDefMetaConfInfo = \"1:true:true:1000:10000:0,0,6:delete,168h:1:1000:1024:1000:1000\";\n List<String> newTopicMetaConfInfoList = new LinkedList<>();\n // a...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(BrokerMetadataManage.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(BrokerMetadataManage.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public boolean updateBrokerRemoveTopicMap(boolean isTakeRemoveTopics,\n List<String> rmvTopicMetaConfInfoLst,\n final StringBuilder sb) {\n // 该部分根据Master上的指示进行对应Topic的删除操作\n boolean needP...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_18
{ "fields": [ { "declarator": "brokerMetadataManage", "modifier": "", "original_string": "BrokerMetadataManage brokerMetadataManage;", "type": "BrokerMetadataManage", "var_name": "brokerMetadataManage" } ], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker...
{ "body": "@Test\n public void updateBrokerTopicConfigMap() {\n brokerMetadataManage = new BrokerMetadataManage();\n // topic default config\n String newBrokerDefMetaConfInfo = \"1:true:true:1000:10000:0,0,6:delete,168h:1:1000:1024:1000:1000\";\n List<String> newTopicMetaConfInfoList = ...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(BrokerMetadataManage.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(BrokerMetadataManage.class);", "type": "Logger", "var_name": "logger" ...
{ "body": "@Override\n public void updateBrokerTopicConfigMap(long newBrokerMetaConfId,\n int newConfCheckSumId,\n String newBrokerDefMetaConfInfo,\n List<String> newTopicMetaConfInfoLst,\n...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_22
{ "fields": [], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/master/MasterConfigTest.java", "identifier": "MasterConfigTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void loadFileSectAttributes() {\n\n }", "class_method_signature": "MasterConfigTest.loadFileSectAttributes()", "constructor": false, "full_signature": "@Test public void loadFileSectAttributes()", "identifier": "loadFileSectAttributes", "invocations": [], "modifiers": "@Tes...
{ "fields": [ { "declarator": "hostName", "modifier": "private", "original_string": "private String hostName;", "type": "String", "var_name": "hostName" }, { "declarator": "port", "modifier": "private", "original_string": "private int port;", "type": "...
{ "body": "@Override\n protected void loadFileSectAttributes(final Ini iniConf) {\n this.loadSystemConf(iniConf);\n this.loadBdbStoreSectConf(iniConf);\n this.tlsConfig = this.loadTlsSectConf(iniConf,\n TBaseConstants.META_DEFAULT_MASTER_TLS_PORT);\n this.zkConfig = loadZ...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_7
{ "fields": [], "file": "tubemq-client/src/test/java/com/tencent/tubemq/client/consumer/MessageFetchManagerTest.java", "identifier": "MessageFetchManagerTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testMessageFetchManager() throws Exception {\n TubeClientConfig clientConfig = mock(TubeClientConfig.class);\n PowerMockito.mockStatic(AddressUtils.class);\n PowerMockito.when(AddressUtils.getLocalAddress()).thenReturn(\"127.0.0.1\");\n\n when(clientConfig...
{ "fields": [ { "declarator": "logger =\n LoggerFactory.getLogger(MessageFetchManager.class)", "modifier": "private static final", "original_string": "private static final Logger logger =\n LoggerFactory.getLogger(MessageFetchManager.class);", "type": "Logger", ...
{ "body": "public MessageFetchManager(final ConsumerConfig consumerConfig,\n final SimplePushMessageConsumer pushConsumer) {\n this.consumerConfig = consumerConfig;\n this.pushConsumer = pushConsumer;\n }", "class_method_signature": "MessageFetchManager.MessageFetchMan...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_14
{ "fields": [], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker/msgstore/mem/MsgMemStoreTest.java", "identifier": "MsgMemStoreTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void getMessages() {\n int maxCacheSize = 2 * 1024 * 1024;\n int maxMsgCount = 10000;\n MsgMemStore msgMemStore = new MsgMemStore(maxCacheSize, maxMsgCount, null);\n MsgMemStatisInfo msgMemStatisInfo = new MsgMemStatisInfo();\n ByteBuffer bf = ByteBuffer...
{ "fields": [ { "declarator": "logger = LoggerFactory.getLogger(MsgMemStore.class)", "modifier": "private static final", "original_string": "private static final Logger logger = LoggerFactory.getLogger(MsgMemStore.class);", "type": "Logger", "var_name": "logger" }, { "d...
{ "body": "public GetCacheMsgResult getMessages(final long lastRdOffset, final long lastOffset,\n final int maxReadSize, final int maxReadCount,\n final int partitionId, final boolean isSecond,\n fi...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_17
{ "fields": [ { "declarator": "fileSegmentList", "modifier": "", "original_string": "FileSegmentList fileSegmentList;", "type": "FileSegmentList", "var_name": "fileSegmentList" } ], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker/msgstore/disk/FileSegmen...
{ "body": "@Test\n public void append() {\n File dir = new File(\"src/test/resource/data\");\n if (dir.exists()) {\n File[] files = dir.listFiles();\n for (File file : files) {\n file.delete();\n }\n dir.delete();\n }\n dir.mkdi...
{ "fields": [ { "declarator": "logger =\n LoggerFactory.getLogger(FileSegmentList.class)", "modifier": "private static final", "original_string": "private static final Logger logger =\n LoggerFactory.getLogger(FileSegmentList.class);", "type": "Logger", "var_nam...
{ "body": "@Override\n public void append(final Segment segment) {\n while (true) {\n List<Segment> currList = segmentList.get();\n List<Segment> updateList = new ArrayList<Segment>(currList);\n updateList.add(segment);\n if (segmentList.compareAndSet(currList, up...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_8
{ "fields": [], "file": "tubemq-client/src/test/java/com/tencent/tubemq/client/producer/qltystats/DefaultBrokerRcvQltyStatsTest.java", "identifier": "DefaultBrokerRcvQltyStatsTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testStartBrokerStatistic() throws Exception {\n RpcServiceFactory rpcServiceFactory = mock(RpcServiceFactory.class);\n when(rpcServiceFactory.getForbiddenAddrMap()).thenReturn(new ConcurrentHashMap<String, Long>());\n when(rpcServiceFactory.getUnavilableBrokerMap...
{ "fields": [ { "declarator": "logger =\n LoggerFactory.getLogger(DefaultBrokerRcvQltyStats.class)", "modifier": "private static final", "original_string": "private static final Logger logger =\n LoggerFactory.getLogger(DefaultBrokerRcvQltyStats.class);", "type": "Log...
{ "body": "public void startBrokerStatistic() {\n if (this.statusId.compareAndSet(-1, 0)) {\n this.statisticThread.start();\n }\n }", "class_method_signature": "DefaultBrokerRcvQltyStats.startBrokerStatistic()", "constructor": false, "full_signature": "public void startBrokerStatisti...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_21
{ "fields": [], "file": "tubemq-server/src/test/java/com/tencent/tubemq/server/broker/stats/GroupCountServiceTest.java", "identifier": "GroupCountServiceTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void add() {\n GroupCountService groupCountService = new GroupCountService(\"PutCounterGroup\", \"Producer\", 60 * 1000);\n groupCountService.add(\"key\", 1L, 100);\n Map<String, CountItem> items = new HashMap<>();\n items.put(\"key1\", new CountItem(1L, 1024))...
{ "fields": [ { "declarator": "logger", "modifier": "private final", "original_string": "private final Logger logger;", "type": "Logger", "var_name": "logger" }, { "declarator": "cntHdr", "modifier": "private final", "original_string": "private final String ...
{ "body": "@Override\n public void add(Map<String, CountItem> counterGroup) {\n CountSet countSet = countSets[index.get()];\n countSet.refCnt.incrementAndGet();\n ConcurrentHashMap<String, CountItem> counters = countSet.counterItem;\n for (Entry<String, CountItem> entry : counterGroup.e...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }
207726223_4
{ "fields": [], "file": "tubemq-client/src/test/java/com/tencent/tubemq/client/consumer/PartitionExtTest.java", "identifier": "PartitionExtTest", "interfaces": "", "superclass": "" }
{ "body": "@Test\n public void testPartitionExtSuccess() {\n FlowCtrlRuleHandler groupFlowCtrlRuleHandler = new FlowCtrlRuleHandler(false);\n FlowCtrlRuleHandler defFlowCtrlRuleHandler = new FlowCtrlRuleHandler(true);\n PartitionExt partition = new PartitionExt(\n groupFlowCtrlR...
{ "fields": [ { "declarator": "serialVersionUID = 7587342323917872253L", "modifier": "private static final", "original_string": "private static final long serialVersionUID = 7587342323917872253L;", "type": "long", "var_name": "serialVersionUID" }, { "declarator": "group...
{ "body": "public void setPullTempData(int reqProcType, int errCode,\n boolean isEscLimit, int msgSize,\n long limitDlt, long curDataDlt,\n boolean isRequireSlow) {\n this.lastRptTIme = System.currentTimeMillis();\n ...
{ "created": null, "fork": null, "fork_count": 385, "is_fork": false, "language": "Java", "license": "licensed", "repo_id": 207726223, "size": 15756, "stargazer_count": 1952, "stars": null, "updates": null, "url": "https://github.com/Tencent/TubeMQ" }