Code Duplication    Length = 4-4 lines in 2 locations

json-endpoints/jetpack/class.jetpack-json-api-plugins-modify-endpoint.php 2 locations

@@ 128-131 (lines=4) @@
125
126
	protected function deactivate() {
127
		foreach ( $this->plugins as $plugin ) {
128
			if ( ! Jetpack::is_plugin_active( $plugin ) ) {
129
				$error = $this->log[ $plugin ]['error'] = __( 'The Plugin is already deactivated.', 'jetpack' );
130
				continue;
131
			}
132
133
			deactivate_plugins( $plugin, false, $this->network_wide );
134
@@ 140-143 (lines=4) @@
137
				$success &= ! is_plugin_active_for_network( $plugin );
138
			}
139
140
			if ( ! $success ) {
141
				$error = $this->log[ $plugin ]['error'] = __( 'There was an error deactivating your plugin', 'jetpack' );
142
				continue;
143
			}
144
			$this->log[ $plugin ][] = __( 'Plugin deactivated.', 'jetpack' );
145
		}
146
		if ( ! $this->bulk && isset( $error ) ) {