Code Duplication    Length = 3-3 lines in 4 locations

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

@@ 79-81 (lines=3) @@
76
			$this->log[ $theme ][] = $upgrader->skin->get_upgrade_messages();
77
		}
78
79
		if ( ! $this->bulk && ! $result ) {
80
			return new WP_Error( 'update_fail', __( 'There was an error updating your theme', 'jetpack' ), 400 );
81
		}
82
83
		return true;
84
	}
@@ 123-125 (lines=3) @@
120
			$this->log[ $theme ] = $upgrader->skin->get_upgrade_messages();
121
		}
122
123
		if ( ! $this->bulk && ! $result ) {
124
			return new WP_Error( 'update_fail', __( 'There was an error updating your theme', 'jetpack' ), 400 );
125
		}
126
127
		return true;
128
	}

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

@@ 390-392 (lines=3) @@
387
		// release auto_udpate lock.
388
		WP_Upgrader::release_lock( 'auto_updater' );
389
390
		if ( ! $this->bulk && ! $result && $update_attempted ) {
391
			return new WP_Error( 'update_fail', __( 'There was an error updating your plugin', 'jetpack' ), 400 );
392
		}
393
394
		return $this->default_action();
395
	}
@@ 444-446 (lines=3) @@
441
			$this->log[$plugin] = $upgrader->skin->get_upgrade_messages();
442
		}
443
444
		if ( ! $this->bulk && ! $result ) {
445
			return new WP_Error( 'update_fail', __( 'There was an error updating your plugin', 'jetpack' ), 400 );
446
		}
447
448
		return true;
449
	}