You can find the source code to WorldEdit on GitHub.
WorldEdit is open source. Contributions must be licensed under the GNU Lesser General Public License v3.