Code Duplication    Length = 3-7 lines in 2 locations

_inc/lib/core-api/class.jetpack-core-api-module-endpoints.php 2 locations

@@ 873-875 (lines=3) @@
870
			return new WP_Error( 'not_installed', esc_html__( 'Please install Akismet.', 'jetpack' ), array( 'status' => 400 ) );
871
		}
872
873
		if ( ! class_exists( 'Akismet' ) ) {
874
			return new WP_Error( 'not_active', esc_html__( 'Please activate Akismet.', 'jetpack' ), array( 'status' => 400 ) );
875
		}
876
877
		// What about if Akismet is put in a sub-directory or maybe in mu-plugins?
878
		require_once WP_PLUGIN_DIR . '/akismet/class.akismet.php';
@@ 1066-1072 (lines=7) @@
1063
	 * @return mixed|WP_Error VaultPress site data. Otherwise, a WP_Error instance with the corresponding error.
1064
	 */
1065
	public function get_vaultpress_data() {
1066
		if ( ! class_exists( 'VaultPress' ) ) {
1067
			return new WP_Error(
1068
				'not_active',
1069
				esc_html__( 'The requested Jetpack module is not active.', 'jetpack' ),
1070
				array( 'status' => 404 )
1071
			);
1072
		}
1073
1074
		$vaultpress = new VaultPress();
1075
		if ( ! $vaultpress->is_registered() ) {