test_class.file: flink-contrib/flink-storm/src/test/java/org/apache/flink/storm/wrappers/WrapperSetupHelperTest.java
test_class.identifier: WrapperSetupHelperTest
test_class.superclass: extends AbstractTest
test_case.body: @Test
  	public void testEmptyDeclarerBolt() {
  		IComponent boltOrSpout;
  
  		if (this.r.nextBoolean()) {
  			boltOrSpout = mock(IRichSpout.class);
  		} else {
  			boltOrSpout = mock(IRichBolt.class);
  		}
  
  		Assert.assertEquals(new HashMap<String, Integer>(),
  				WrapperSetupHelper.getNumberOfAttributes(boltOrSpout, null));
  	}
test_case.class_method_signature: WrapperSetupHelperTest.testEmptyDeclarerBolt()
test_case.full_signature: @Test public void testEmptyDeclarerBolt()
test_case.identifier: testEmptyDeclarerBolt
test_case.invocations: nextBoolean mock mock assertEquals getNumberOfAttributes
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEmptyDeclarerBolt()
focal_class.declarator: TOPOLOGY_NAME = "storm.topology.name"
focal_class.modifier: final static
focal_class.original_string: final static String TOPOLOGY_NAME = "storm.topology.name";
focal_class.type: String
focal_class.var_name: TOPOLOGY_NAME
focal_class.declarator: tid
focal_class.modifier: private static
focal_class.original_string: private static int tid;
focal_class.type: int
focal_class.var_name: tid
focal_class.file: flink-contrib/flink-storm/src/main/java/org/apache/flink/storm/wrappers/WrapperSetupHelper.java
focal_class.identifier: WrapperSetupHelper
focal_class.class_method_signature: WrapperSetupHelper.getNumberOfAttributes(final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
focal_class.full_signature: static HashMap<String, Integer> getNumberOfAttributes(final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
focal_class.identifier: getNumberOfAttributes
focal_class.modifiers: static
focal_class.parameters: (final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
focal_class.return: HashMap<String, Integer>
focal_class.signature: HashMap<String, Integer> getNumberOfAttributes(final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
focal_class.class_method_signature: WrapperSetupHelper.createTopologyContext(
  			final StreamingRuntimeContext context, final IComponent spoutOrBolt,
  			final String operatorName, StormTopology stormTopology, final Map stormConfig)
focal_class.full_signature: @SuppressWarnings({ "rawtypes", "unchecked" }) static synchronized TopologyContext createTopologyContext(
  			final StreamingRuntimeContext context, final IComponent spoutOrBolt,
  			final String operatorName, StormTopology stormTopology, final Map stormConfig)
focal_class.identifier: createTopologyContext
focal_class.modifiers: @SuppressWarnings({ "rawtypes", "unchecked" }) static synchronized
focal_class.parameters: (
  			final StreamingRuntimeContext context, final IComponent spoutOrBolt,
  			final String operatorName, StormTopology stormTopology, final Map stormConfig)
focal_class.return: TopologyContext
focal_class.signature: TopologyContext createTopologyContext(
  			final StreamingRuntimeContext context, final IComponent spoutOrBolt,
  			final String operatorName, StormTopology stormTopology, final Map stormConfig)
focal_class.class_method_signature: WrapperSetupHelper.processSingleOperator(final String componentId,
  			final ComponentCommon common, final String operatorName, final int index,
  			final int dop, final Map<Integer, String> taskToComponents,
  			final Map<String, List<Integer>> componentToSortedTasks,
  			final Map<String, Map<String, Fields>> componentToStreamToFields)
focal_class.full_signature: private static Integer processSingleOperator(final String componentId,
  			final ComponentCommon common, final String operatorName, final int index,
  			final int dop, final Map<Integer, String> taskToComponents,
  			final Map<String, List<Integer>> componentToSortedTasks,
  			final Map<String, Map<String, Fields>> componentToStreamToFields)
focal_class.identifier: processSingleOperator
focal_class.modifiers: private static
focal_class.parameters: (final String componentId,
  			final ComponentCommon common, final String operatorName, final int index,
  			final int dop, final Map<Integer, String> taskToComponents,
  			final Map<String, List<Integer>> componentToSortedTasks,
  			final Map<String, Map<String, Fields>> componentToStreamToFields)
focal_class.return: Integer
focal_class.signature: Integer processSingleOperator(final String componentId,
  			final ComponentCommon common, final String operatorName, final int index,
  			final int dop, final Map<Integer, String> taskToComponents,
  			final Map<String, List<Integer>> componentToSortedTasks,
  			final Map<String, Map<String, Fields>> componentToStreamToFields)
focal_method.body: static HashMap<String, Integer> getNumberOfAttributes(final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
  					throws IllegalArgumentException {
  		final SetupOutputFieldsDeclarer declarer = new SetupOutputFieldsDeclarer();
  		spoutOrBolt.declareOutputFields(declarer);
  
  		for (Entry<String, Integer> schema : declarer.outputSchemas.entrySet()) {
  			int declaredNumberOfAttributes = schema.getValue();
  			if ((declaredNumberOfAttributes < 0) || (declaredNumberOfAttributes > 25)) {
  				throw new IllegalArgumentException(
  						"Provided bolt declares non supported number of output attributes. Must be in range [0;25] but "
  								+ "was " + declaredNumberOfAttributes);
  			}
  
  			if (rawOutputs != null && rawOutputs.contains(schema.getKey())) {
  				if (declaredNumberOfAttributes != 1) {
  					throw new IllegalArgumentException(
  							"Ouput type is requested to be raw type, but provided bolt declares more then one output "
  									+ "attribute.");
  				}
  				schema.setValue(-1);
  			}
  		}
  
  		return declarer.outputSchemas;
  	}
focal_method.class_method_signature: WrapperSetupHelper.getNumberOfAttributes(final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
focal_method.full_signature: static HashMap<String, Integer> getNumberOfAttributes(final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
focal_method.identifier: getNumberOfAttributes
focal_method.invocations: declareOutputFields entrySet getValue contains getKey setValue
focal_method.modifiers: static
focal_method.parameters: (final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)
focal_method.return: HashMap<String, Integer>
focal_method.signature: HashMap<String, Integer> getNumberOfAttributes(final IComponent spoutOrBolt,
  			final Collection<String> rawOutputs)