test_class.declarator: wrapper = new SystemTime()
test_class.modifier: private
test_class.original_string: private AbstractWrapper wrapper = new SystemTime();
test_class.type: AbstractWrapper
test_class.var_name: wrapper
test_class.declarator: sm =  null
test_class.modifier: private static
test_class.original_string: private static StorageManager sm =  null;
test_class.type: StorageManager
test_class.var_name: sm
test_class.declarator: addressing = new AddressBean[] {new AddressBean("system-time")}
test_class.modifier: private
test_class.original_string: private AddressBean[] addressing = new AddressBean[] {new AddressBean("system-time")};
test_class.type: AddressBean[]
test_class.var_name: addressing
test_class.file: modules/x-gsn/src/main/java/org/openiot/gsn/beans/TestStreamSource.java
test_class.identifier: TestStreamSource
test_case.body: @Test
  	public void testValidate() {
  		InputStream is = new InputStream();
  		StreamSource ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("10m");
  		assertTrue(ss.validate());
  		assertFalse(ss.isStorageCountBased());
  		assertEquals(ss.getParsedStorageSize(),10*60*1000);
  		ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("10  m").setInputStream(is);
  		assertFalse(ss.isStorageCountBased());
  		assertEquals(ss.getParsedStorageSize(),10*60*1000);
  
  
  		ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("10  s").setInputStream(is);
  		assertFalse(ss.isStorageCountBased());
  		assertEquals(ss.getParsedStorageSize(),10*1000);
  		assertFalse(ss.isStorageCountBased());
  
  
  		ss = new StreamSource().setAlias("my-stream").setAddressing(addressing).setSqlQuery("select * from wrapper").setRawHistorySize("2 h").setInputStream(is);
  		assertFalse(ss.isStorageCountBased());
  		assertEquals(ss.getParsedStorageSize(),2*60*60*1000);
  	}
test_case.class_method_signature: TestStreamSource.testValidate()
test_case.full_signature: @Test public void testValidate()
test_case.identifier: testValidate
test_case.invocations: setRawHistorySize setSqlQuery setAddressing setAlias assertTrue validate assertFalse isStorageCountBased assertEquals getParsedStorageSize setInputStream setRawHistorySize setSqlQuery setAddressing setAlias assertFalse isStorageCountBased assertEquals getParsedStorageSize setInputStream setRawHistorySize setSqlQuery setAddressing setAlias assertFalse isStorageCountBased assertEquals getParsedStorageSize assertFalse isStorageCountBased setInputStream setRawHistorySize setSqlQuery setAddressing setAlias assertFalse isStorageCountBased assertEquals getParsedStorageSize
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testValidate()
focal_class.declarator: serialVersionUID = 5222853537667420098L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = 5222853537667420098L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: DEFAULT_QUERY = "select * from wrapper"
focal_class.modifier: public static final
focal_class.original_string: public static final String DEFAULT_QUERY = "select * from wrapper";
focal_class.type: String
focal_class.var_name: DEFAULT_QUERY
focal_class.declarator: logger             = Logger.getLogger( StreamSource.class )
focal_class.modifier: private static final transient
focal_class.original_string: private static final transient Logger logger             = Logger.getLogger( StreamSource.class );
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: alias
focal_class.modifier: private
focal_class.original_string: private String                        alias;
focal_class.type: String
focal_class.var_name: alias
focal_class.declarator: samplingRate
focal_class.modifier: private
focal_class.original_string: private float                        samplingRate       ;
focal_class.type: float
focal_class.var_name: samplingRate
focal_class.declarator: rawHistorySize = null
focal_class.modifier: private
focal_class.original_string: private String                        rawHistorySize = null;
focal_class.type: String
focal_class.var_name: rawHistorySize
focal_class.declarator: rawSlideValue = null
focal_class.modifier: private
focal_class.original_string: private String                        rawSlideValue = null;
focal_class.type: String
focal_class.var_name: rawSlideValue
focal_class.declarator: disconnectedBufferSize
focal_class.modifier: private
focal_class.original_string: private int                           disconnectedBufferSize;
focal_class.type: int
focal_class.var_name: disconnectedBufferSize
focal_class.declarator: sqlQuery
focal_class.modifier: private
focal_class.original_string: private String                        sqlQuery;
focal_class.type: String
focal_class.var_name: sqlQuery
focal_class.declarator: uid
focal_class.modifier: protected
focal_class.original_string: protected  int         uid        ;
focal_class.type: int
focal_class.var_name: uid
focal_class.declarator: uidS
focal_class.modifier: protected
focal_class.original_string: protected  StringBuilder         uidS    ;
focal_class.type: StringBuilder
focal_class.var_name: uidS
focal_class.declarator: dateFormats        = new String [ ] { "yyyy/MM/dd 'at' HH:mm:ss z" , "h:mm:ss a" , "h:mm a" }
focal_class.modifier: private static final
focal_class.original_string: private static final String [ ]       dateFormats        = new String [ ] { "yyyy/MM/dd 'at' HH:mm:ss z" , "h:mm:ss a" , "h:mm a" };
focal_class.type: String [ ]
focal_class.var_name: dateFormats
focal_class.declarator: startDate
focal_class.modifier: private transient
focal_class.original_string: private transient Date                startDate;
focal_class.type: Date
focal_class.var_name: startDate
focal_class.declarator: endDate
focal_class.modifier: private transient
focal_class.original_string: private transient Date                endDate;
focal_class.type: Date
focal_class.var_name: endDate
focal_class.declarator: EMPTY_ADDRESS_BEAN = new AddressBean[] {}
focal_class.modifier: public static final
focal_class.original_string: public static final AddressBean[] EMPTY_ADDRESS_BEAN = new AddressBean[] {};
focal_class.type: AddressBean[]
focal_class.var_name: EMPTY_ADDRESS_BEAN
focal_class.declarator: addressing []        = EMPTY_ADDRESS_BEAN
focal_class.modifier: private
focal_class.original_string: private AddressBean      addressing []        = EMPTY_ADDRESS_BEAN;
focal_class.type: AddressBean
focal_class.var_name: addressing
focal_class.declarator: wrapper
focal_class.modifier: private transient
focal_class.original_string: private transient AbstractWrapper      wrapper;
focal_class.type: AbstractWrapper
focal_class.var_name: wrapper
focal_class.declarator: inputStream
focal_class.modifier: private
focal_class.original_string: private InputStream inputStream ;
focal_class.type: InputStream
focal_class.var_name: inputStream
focal_class.declarator: activeAddressBean
focal_class.modifier: private
focal_class.original_string: private AddressBean activeAddressBean;
focal_class.type: AddressBean
focal_class.var_name: activeAddressBean
focal_class.declarator: queryRewriter
focal_class.modifier: private transient
focal_class.original_string: private transient QueryRewriter queryRewriter;
focal_class.type: QueryRewriter
focal_class.var_name: queryRewriter
focal_class.declarator: isStorageCountBased  = false
focal_class.modifier: private transient
focal_class.original_string: private transient boolean isStorageCountBased  = false;
focal_class.type: boolean
focal_class.var_name: isStorageCountBased
focal_class.declarator: windowingType = DEFAULT_WINDOW_TYPE
focal_class.modifier: private
focal_class.original_string: private WindowType windowingType = DEFAULT_WINDOW_TYPE;
focal_class.type: WindowType
focal_class.var_name: windowingType
focal_class.declarator: STORAGE_SIZE_NOT_SET = -1
focal_class.modifier: public static final
focal_class.original_string: public static final long   STORAGE_SIZE_NOT_SET = -1;
focal_class.type: long
focal_class.var_name: STORAGE_SIZE_NOT_SET
focal_class.declarator: DEFAULT_SLIDE_VALUE = 1
focal_class.modifier: public static final
focal_class.original_string: public static final long   DEFAULT_SLIDE_VALUE = 1;
focal_class.type: long
focal_class.var_name: DEFAULT_SLIDE_VALUE
focal_class.declarator: DEFAULT_WINDOW_TYPE = WindowType.TUPLE_BASED_SLIDE_ON_EACH_TUPLE
focal_class.modifier: public static final
focal_class.original_string: public static final WindowType   DEFAULT_WINDOW_TYPE = WindowType.TUPLE_BASED_SLIDE_ON_EACH_TUPLE;
focal_class.type: WindowType
focal_class.var_name: DEFAULT_WINDOW_TYPE
focal_class.declarator: parsedStorageSize    = STORAGE_SIZE_NOT_SET
focal_class.modifier: private transient
focal_class.original_string: private transient long     parsedStorageSize    = STORAGE_SIZE_NOT_SET;
focal_class.type: long
focal_class.var_name: parsedStorageSize
focal_class.declarator: parsedSlideValue    = DEFAULT_SLIDE_VALUE
focal_class.modifier: private transient
focal_class.original_string: private transient long     parsedSlideValue    = DEFAULT_SLIDE_VALUE;
focal_class.type: long
focal_class.var_name: parsedSlideValue
focal_class.declarator: isValidated = false
focal_class.modifier: private transient
focal_class.original_string: private transient boolean isValidated = false;
focal_class.type: boolean
focal_class.var_name: isValidated
focal_class.declarator: validationResult = false
focal_class.modifier: private transient
focal_class.original_string: private transient boolean validationResult = false;
focal_class.type: boolean
focal_class.var_name: validationResult
focal_class.declarator: cachedSqlQuery = null
focal_class.modifier: private
focal_class.original_string: private StringBuilder cachedSqlQuery = null;
focal_class.type: StringBuilder
focal_class.var_name: cachedSqlQuery
focal_class.file: modules/x-gsn/src/main/java/org/openiot/gsn/beans/StreamSource.java
focal_class.identifier: StreamSource
focal_class.interfaces: implements Serializable
focal_class.class_method_signature: StreamSource.StreamSource()
focal_class.full_signature: public  StreamSource()
focal_class.identifier: StreamSource
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.signature:  StreamSource()
focal_class.class_method_signature: StreamSource.getRawHistorySize()
focal_class.full_signature: public String getRawHistorySize()
focal_class.identifier: getRawHistorySize
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getRawHistorySize()
focal_class.class_method_signature: StreamSource.setRawHistorySize(String rawHistorySize)
focal_class.full_signature: public StreamSource setRawHistorySize(String rawHistorySize)
focal_class.identifier: setRawHistorySize
focal_class.modifiers: public
focal_class.parameters: (String rawHistorySize)
focal_class.return: StreamSource
focal_class.signature: StreamSource setRawHistorySize(String rawHistorySize)
focal_class.class_method_signature: StreamSource.setRawSlideValue(String rawSlideValue)
focal_class.full_signature: public StreamSource setRawSlideValue(String rawSlideValue)
focal_class.identifier: setRawSlideValue
focal_class.modifiers: public
focal_class.parameters: (String rawSlideValue)
focal_class.return: StreamSource
focal_class.signature: StreamSource setRawSlideValue(String rawSlideValue)
focal_class.class_method_signature: StreamSource.setAddressing(AddressBean[] addressing)
focal_class.full_signature: public StreamSource setAddressing(AddressBean[] addressing)
focal_class.identifier: setAddressing
focal_class.modifiers: public
focal_class.parameters: (AddressBean[] addressing)
focal_class.return: StreamSource
focal_class.signature: StreamSource setAddressing(AddressBean[] addressing)
focal_class.class_method_signature: StreamSource.setAlias(String alias)
focal_class.full_signature: public StreamSource setAlias(String alias)
focal_class.identifier: setAlias
focal_class.modifiers: public
focal_class.parameters: (String alias)
focal_class.return: StreamSource
focal_class.signature: StreamSource setAlias(String alias)
focal_class.class_method_signature: StreamSource.setSqlQuery(String sqlQuery)
focal_class.full_signature: public StreamSource setSqlQuery(String sqlQuery)
focal_class.identifier: setSqlQuery
focal_class.modifiers: public
focal_class.parameters: (String sqlQuery)
focal_class.return: StreamSource
focal_class.signature: StreamSource setSqlQuery(String sqlQuery)
focal_class.class_method_signature: StreamSource.getAddressing( )
focal_class.full_signature: public AddressBean [] getAddressing( )
focal_class.identifier: getAddressing
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: AddressBean []
focal_class.signature: AddressBean [] getAddressing( )
focal_class.class_method_signature: StreamSource.getAlias( )
focal_class.full_signature: public CharSequence getAlias( )
focal_class.identifier: getAlias
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: CharSequence
focal_class.signature: CharSequence getAlias( )
focal_class.class_method_signature: StreamSource.getInputStream()
focal_class.full_signature: public InputStream getInputStream()
focal_class.identifier: getInputStream
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: InputStream
focal_class.signature: InputStream getInputStream()
focal_class.class_method_signature: StreamSource.getDisconnectedBufferSize( )
focal_class.full_signature: public int getDisconnectedBufferSize( )
focal_class.identifier: getDisconnectedBufferSize
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: int
focal_class.signature: int getDisconnectedBufferSize( )
focal_class.class_method_signature: StreamSource.setDisconnectedBufferSize(int disconnectedBufferSize)
focal_class.full_signature: public void setDisconnectedBufferSize(int disconnectedBufferSize)
focal_class.identifier: setDisconnectedBufferSize
focal_class.modifiers: public
focal_class.parameters: (int disconnectedBufferSize)
focal_class.return: void
focal_class.signature: void setDisconnectedBufferSize(int disconnectedBufferSize)
focal_class.class_method_signature: StreamSource.getSamplingRate( )
focal_class.full_signature: public float getSamplingRate( )
focal_class.identifier: getSamplingRate
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: float
focal_class.signature: float getSamplingRate( )
focal_class.class_method_signature: StreamSource.setSamplingRate(float newRate )
focal_class.full_signature: public void setSamplingRate(float newRate )
focal_class.identifier: setSamplingRate
focal_class.modifiers: public
focal_class.parameters: (float newRate )
focal_class.return: void
focal_class.signature: void setSamplingRate(float newRate )
focal_class.class_method_signature: StreamSource.getStorageSize( )
focal_class.full_signature: public String getStorageSize( )
focal_class.identifier: getStorageSize
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: String
focal_class.signature: String getStorageSize( )
focal_class.class_method_signature: StreamSource.getSlideValue()
focal_class.full_signature: public String getSlideValue()
focal_class.identifier: getSlideValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getSlideValue()
focal_class.class_method_signature: StreamSource.getSqlQuery( )
focal_class.full_signature: public String getSqlQuery( )
focal_class.identifier: getSqlQuery
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: String
focal_class.signature: String getSqlQuery( )
focal_class.class_method_signature: StreamSource.setWrapper( AbstractWrapper wrapper  )
focal_class.full_signature: public void setWrapper( AbstractWrapper wrapper  )
focal_class.identifier: setWrapper
focal_class.modifiers: public
focal_class.parameters: ( AbstractWrapper wrapper  )
focal_class.return: void
focal_class.signature: void setWrapper( AbstractWrapper wrapper  )
focal_class.class_method_signature: StreamSource.getWrapper( )
focal_class.full_signature: public AbstractWrapper getWrapper( )
focal_class.identifier: getWrapper
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: AbstractWrapper
focal_class.signature: AbstractWrapper getWrapper( )
focal_class.class_method_signature: StreamSource.validate( )
focal_class.full_signature: public boolean validate( )
focal_class.identifier: validate
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: boolean
focal_class.signature: boolean validate( )
focal_class.class_method_signature: StreamSource.isStorageCountBased( )
focal_class.full_signature: public boolean isStorageCountBased( )
focal_class.identifier: isStorageCountBased
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: boolean
focal_class.signature: boolean isStorageCountBased( )
focal_class.class_method_signature: StreamSource.getParsedStorageSize( )
focal_class.full_signature: public long getParsedStorageSize( )
focal_class.identifier: getParsedStorageSize
focal_class.modifiers: public
focal_class.parameters: ( )
focal_class.return: long
focal_class.signature: long getParsedStorageSize( )
focal_class.class_method_signature: StreamSource.getWindowingType()
focal_class.full_signature: public WindowType getWindowingType()
focal_class.identifier: getWindowingType
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: WindowType
focal_class.signature: WindowType getWindowingType()
focal_class.class_method_signature: StreamSource.getParsedSlideValue()
focal_class.full_signature: public long getParsedSlideValue()
focal_class.identifier: getParsedSlideValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getParsedSlideValue()
focal_class.class_method_signature: StreamSource.windowSlided()
focal_class.full_signature: public boolean windowSlided()
focal_class.identifier: windowSlided
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean windowSlided()
focal_class.class_method_signature: StreamSource.setQueryRewriter(QueryRewriter rewriter)
focal_class.full_signature: public void setQueryRewriter(QueryRewriter rewriter)
focal_class.identifier: setQueryRewriter
focal_class.modifiers: public
focal_class.parameters: (QueryRewriter rewriter)
focal_class.return: void
focal_class.signature: void setQueryRewriter(QueryRewriter rewriter)
focal_class.class_method_signature: StreamSource.getQueryRewriter()
focal_class.full_signature: public QueryRewriter getQueryRewriter()
focal_class.identifier: getQueryRewriter
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: QueryRewriter
focal_class.signature: QueryRewriter getQueryRewriter()
focal_class.class_method_signature: StreamSource.rewrite(String query)
focal_class.full_signature: public StringBuilder rewrite(String query)
focal_class.identifier: rewrite
focal_class.modifiers: public
focal_class.parameters: (String query)
focal_class.return: StringBuilder
focal_class.signature: StringBuilder rewrite(String query)
focal_class.class_method_signature: StreamSource.getUIDStr()
focal_class.full_signature: public StringBuilder getUIDStr()
focal_class.identifier: getUIDStr
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: StringBuilder
focal_class.signature: StringBuilder getUIDStr()
focal_class.class_method_signature: StreamSource.hashCode()
focal_class.full_signature: public int hashCode()
focal_class.identifier: hashCode
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int hashCode()
focal_class.class_method_signature: StreamSource.toSql()
focal_class.full_signature: public StringBuilder toSql()
focal_class.identifier: toSql
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: StringBuilder
focal_class.signature: StringBuilder toSql()
focal_class.class_method_signature: StreamSource.setInputStream(InputStream is)
focal_class.full_signature: public StreamSource setInputStream(InputStream is)
focal_class.identifier: setInputStream
focal_class.modifiers: public
focal_class.parameters: (InputStream is)
focal_class.return: StreamSource
focal_class.signature: StreamSource setInputStream(InputStream is)
focal_class.class_method_signature: StreamSource.getActiveAddressBean()
focal_class.full_signature: public AddressBean getActiveAddressBean()
focal_class.identifier: getActiveAddressBean
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: AddressBean
focal_class.signature: AddressBean getActiveAddressBean()
focal_class.class_method_signature: StreamSource.toString()
focal_class.full_signature: public String toString()
focal_class.identifier: toString
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public boolean validate ( ) {
      if (isValidated==true)
        return validationResult;
      windowingType = DEFAULT_WINDOW_TYPE;
      isValidated=true;
      if (samplingRate <=0 ) 
        logger.warn( new StringBuilder( ).append( "The sampling rate is set to zero (or negative) which means no results. StreamSource = " )
            .append( getAlias( ) ).toString( ) );
      else if(samplingRate > 1){
      	samplingRate = 1;
      	logger.warn( new StringBuilder( ).append( "The provided sampling rate is greater than 1, resetting it to 1. StreamSource = " )
      	          .append( getAlias( ) ).toString( ) );
      }
      if (getAddressing().length==0) {
        logger.warn(new StringBuilder("Validation failed because there is no addressing predicates provided for the stream source (the addressing part of the stream source is empty)").append("stream source alias = ").append(getAlias()));
        return validationResult=false;
      }
      if ( this.rawHistorySize != null ) {
        this.rawHistorySize = this.rawHistorySize.replace( " " , "" ).trim( ).toLowerCase( );
        if ( this.rawHistorySize.equalsIgnoreCase( "" ) ) return validationResult = true;
        final int second = 1000;
        final int minute = second * 60;
        final int hour = minute * 60;
        final int mIndex = this.rawHistorySize.indexOf( "m" );
        final int hIndex = this.rawHistorySize.indexOf( "h" );
        final int sIndex = this.rawHistorySize.indexOf( "s" );
        if ( mIndex < 0 && hIndex < 0 && sIndex < 0 ) {
          try {
            this.parsedStorageSize = Long.parseLong(this.rawHistorySize );
            this.isStorageCountBased = true;
            windowingType = WindowType.TUPLE_BASED;
          } catch ( final NumberFormatException e ) {
            logger.error( new StringBuilder( ).append( "The storage size, " ).append( this.rawHistorySize ).append( ", specified for the Stream Source : " ).append( this.getAlias( ) ).append(
            " is not valid." ).toString( ) , e );
            return (validationResult= false);
          }
        } else
          try {
            final StringBuilder shs = new StringBuilder( this.rawHistorySize );
            if ( mIndex >= 0 && mIndex == shs.length() - 1) this.parsedStorageSize = Long.parseLong(shs.deleteCharAt( mIndex ).toString( ) ) * minute;
            else if ( hIndex >= 0 && hIndex == shs.length() - 1) this.parsedStorageSize = Long.parseLong( shs.deleteCharAt( hIndex ).toString( ) ) * hour;
            else if ( sIndex >= 0 && sIndex == shs.length() - 1) this.parsedStorageSize = Long.parseLong( shs.deleteCharAt( sIndex ).toString( ) ) * second;
            else Long.parseLong("");
            this.isStorageCountBased = false;
            windowingType = WindowType.TIME_BASED;
          } catch ( NumberFormatException e ) {
            logger.debug( e.getMessage( ) , e );
            logger.error( new StringBuilder( ).append( "The storage size, " ).append( this.rawHistorySize ).append( ", specified for the Stream Source : " ).append( this.getAlias( ) ).append(
            " is not valid." ).toString( ) );
            return (validationResult=false);
          }
      }
      logger.debug("validate() called");   
      //Parsing slide value
      if(this.rawSlideValue == null){
      	//If slide value was not specified by the user, consider it as 1 tuple
      	windowingType = (windowingType == WindowType.TUPLE_BASED) ? WindowType.TUPLE_BASED_SLIDE_ON_EACH_TUPLE : WindowType.TIME_BASED_SLIDE_ON_EACH_TUPLE;
      	return validationResult = true;
      } else {
      	this.rawSlideValue = this.rawSlideValue.replace( " " , "" ).trim( ).toLowerCase( );
      	//If slide value was not specified by the user, consider it as 1 tuple    	
          if ( this.rawSlideValue.equalsIgnoreCase( "" ) ){
          	windowingType = (windowingType == WindowType.TUPLE_BASED) ? WindowType.TUPLE_BASED_SLIDE_ON_EACH_TUPLE : WindowType.TIME_BASED_SLIDE_ON_EACH_TUPLE;
          	return validationResult = true;
          }
          final int second = 1000;
          final int minute = second * 60;
          final int hour = minute * 60;
          final int mIndex = this.rawSlideValue.indexOf( "m" );
          final int hIndex = this.rawSlideValue.indexOf( "h" );
          final int sIndex = this.rawSlideValue.indexOf( "s" );
          if ( mIndex < 0 && hIndex < 0 && sIndex < 0 ) {
            try {
              this.parsedSlideValue = Long.parseLong( this.rawSlideValue );
              if(parsedSlideValue == 1){//We consider this as a special case
              	windowingType = (windowingType == WindowType.TIME_BASED) ? WindowType.TIME_BASED_SLIDE_ON_EACH_TUPLE : WindowType.TUPLE_BASED_SLIDE_ON_EACH_TUPLE;
              }
              else if(windowingType == WindowType.TIME_BASED)
              	windowingType = WindowType.TIME_BASED_WIN_TUPLE_BASED_SLIDE;
            } catch ( final NumberFormatException e ) {
              logger.error( new StringBuilder( ).append( "The slide value, " ).append( this.rawSlideValue ).append( ", specified for the Stream Source : " ).append( this.getAlias( ) ).append(
              " is not valid." ).toString( ) , e );
              return (validationResult= false);
            }
          } else
            try {
              final StringBuilder shs = new StringBuilder( this.rawSlideValue );
              if ( mIndex >= 0 && mIndex == shs.length() - 1) this.parsedSlideValue = Long.parseLong( shs.deleteCharAt( mIndex ).toString( ) ) * minute;
              else if ( hIndex >= 0 && hIndex == shs.length() - 1) this.parsedSlideValue = Long.parseLong( shs.deleteCharAt( hIndex ).toString( ) ) * hour;
              else if ( sIndex >= 0 && sIndex == shs.length() - 1) this.parsedSlideValue = Long.parseLong( shs.deleteCharAt( sIndex ).toString( ) ) * second;
              else Long.parseLong("");
              if(windowingType == WindowType.TUPLE_BASED)
              	windowingType = WindowType.TUPLE_BASED_WIN_TIME_BASED_SLIDE;
            } catch ( NumberFormatException e ) {
              logger.debug( e.getMessage( ) , e );
              logger.error( new StringBuilder( ).append( "The slide value, " ).append( this.rawSlideValue ).append( ", specified for the Stream Source : " ).append( this.getAlias( ) ).append(
              " is not valid." ).toString( ) );
              return (validationResult=false);
            }
      }
      return validationResult=true;
    }
focal_method.class_method_signature: StreamSource.validate( )
focal_method.full_signature: public boolean validate( )
focal_method.identifier: validate
focal_method.invocations: warn toString append append getAlias warn toString append append getAlias getAddressing warn append append getAlias toLowerCase trim replace equalsIgnoreCase indexOf indexOf indexOf parseLong error toString append append append append append getAlias length parseLong toString deleteCharAt length parseLong toString deleteCharAt length parseLong toString deleteCharAt parseLong debug getMessage error toString append append append append append getAlias debug toLowerCase trim replace equalsIgnoreCase indexOf indexOf indexOf parseLong error toString append append append append append getAlias length parseLong toString deleteCharAt length parseLong toString deleteCharAt length parseLong toString deleteCharAt parseLong debug getMessage error toString append append append append append getAlias
focal_method.modifiers: public
focal_method.parameters: ( )
focal_method.return: boolean
focal_method.signature: boolean validate( )