Code Duplication    Length = 5-5 lines in 2 locations

class.jetpack.php 2 locations

@@ 3840-3844 (lines=5) @@
3837
3838
			if ( $active_state ) {
3839
				$titles = array();
3840
				foreach ( $active_state as $mod ) {
3841
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
3842
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
3843
					}
3844
				}
3845
				if ( $titles ) {
3846
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following new modules have been activated: %l.', 'jetpack' ), $titles );
3847
				}
@@ 3852-3856 (lines=5) @@
3849
3850
			if ( $reactive_state = Jetpack::state( 'reactivated_modules' ) ) {
3851
				$titles = array();
3852
				foreach ( explode( ',',  $reactive_state ) as $mod ) {
3853
					if ( $mod_headers = Jetpack::get_module( $mod ) ) {
3854
						$titles[] = '<strong>' . preg_replace( '/\s+(?![^<>]++>)/', '&nbsp;', $mod_headers['name'] ) . '</strong>';
3855
					}
3856
				}
3857
				if ( $titles ) {
3858
					$this->message .= '<br /><br />' . wp_sprintf( __( 'The following modules have been updated: %l.', 'jetpack' ), $titles );
3859
				}