Buggy code:
@ Mojo ( name = "build" , defaultPhase = LifecyclePhase . PACKAGE , requiresDependencyCollection = ResolutionScope . RUNTIME ) public class CapsuleMojo extends AbstractMojo { public static final String LOG_PREFIX = "[Capsule]<seq2seq4repair_space>" ; public static final String CAPSULE_GROUP = "co.paralleluniverse" ; public static final String DEFAULT_CAPSULE_NAME = "Capsule" ; public static final String DEFAULT_CAPSULE_CLASS = ( CapsuleMojo . DEFAULT_CAPSULE_NAME ) + ".class" ; public static final String EXEC_PREFIX = "#!//bin//sh\n\nexec<seq2seq4repair_space>java<seq2seq4repair_space>-jar<seq2seq4repair_space>\"$0\"<seq2seq4repair_space>\"$@\"\n\n" ; public static final String EXEC_TRAMPOLINE_PREFIX = "#!//bin//sh\n\nexec<seq2seq4repair_space>java<seq2seq4repair_space>-Dcapsule.trampoline<seq2seq4repair_space>-jar<seq2seq4repair_space>\"$0\"<seq2seq4repair_space>\"$@\"\n\n" ; public static final String EXEC_PLUGIN_KEY = "org.codehaus.mojo:exec-maven-plugin" ; public static enum Type { empty , thin , fat ; } @ Parameter ( defaultValue = "${project}" , readonly = true ) private MavenProject mavenProject ; @ Component private RepositorySystem repoSystem ; @ Parameter ( defaultValue = "${repositorySystemSession}" , readonly = true ) private RepositorySystemSession repoSession ; @ Parameter ( defaultValue = "${project.remoteProjectRepositories}" , readonly = true ) private List < RemoteRepository > remoteRepos ; @ Parameter ( defaultValue = "${project.build.finalName}" , readonly = true ) private String finalName ; @ Parameter ( defaultValue = "${project.build.directory}" ) private File buildDir ; @ Parameter ( property = "capsule.appClass" ) private String appClass ; @ Parameter ( property = "capsule.version" ) private String capsuleVersion ; @ Parameter ( property = "capsule.output" , defaultValue = "${project.build.directory}" ) private File output ; @ Parameter ( property = "capsule.customDescriptorEmpty" , defaultValue = "-capsule-empty" ) private String customDescriptorEmpty ; @ Parameter ( property = "capsule.customDescriptorThin" , defaultValue = "-capsule-thin" ) private String customDescriptorThin ; @ Parameter ( property = "capsule.customDescriptorFat" , defaultValue = "-capsule-fat" ) private String customDescriptorFat ; @ Deprecated @ Parameter ( property = "capsule.buildExec" , defaultValue = "false" ) private String buildExec ; @ Parameter ( property = "capsule.chmod" , defaultValue = "false" ) private String chmod ; @ Parameter ( property = "capsule.trampoline" , defaultValue = "false" ) private String trampoline ; @ Parameter ( property = "capsule.types" ) private String types ; @ Parameter ( property = "capsule.caplets" ) private String caplets ; @ Parameter ( property = "capsule.execPluginConfig" ) private String execPluginConfig ; @ Parameter private CapsuleMojo . Pair < String , String > [ ] properties ; @ Parameter private CapsuleMojo . Pair < String , String > [ ] manifest ; @ Parameter private CapsuleMojo . Mode [ ] modes ; @ Parameter private CapsuleMojo . FileSet [ ] fileSets ; private String mainClass = CapsuleMojo . DEFAULT_CAPSULE_NAME ; private Xpp3Dom execConfig = null ; private final Map < String , File > capletFiles = new HashMap ( ) ; @ Parameter ( defaultValue = "${project.artifacts}" ) private Collection < Artifact > artifacts ; @ Override public void execute ( ) throws MojoExecutionException , MojoFailureException { } public final void buildEmpty ( ) throws IOException { } public final void buildThin ( ) throws IOException { } public final void buildFat ( ) throws IOException { } private JarOutputStream addManifest ( final JarOutputStream jar , final Map < String , String > additionalAttributes , final CapsuleMojo . Type type ) throws IOException { } private void addCompiledProjectClasses ( final JarOutputStream jarStream ) throws IOException { } private void addCapletClasses ( final JarOutputStream jarStream ) throws IOException { } private byte [ ] getCapsuleClass ( ) throws IOException { } private Map < String , byte [ ] > getAllCapsuleClasses ( ) throws IOException { } private void addFileSets ( final JarOutputStream jar ) throws IOException { } private JarOutputStream addToJar ( final String name , final InputStream input , final JarOutputStream jar ) throws IOException { } private CapsuleMojo . Pair < File , JarOutputStream > openJar ( final CapsuleMojo . Type type ) throws IOException { <START_BUG> final File file = new File ( this . output , ( ( ( this . finalName ) + ( getOutputName ( type ) ) ) + ".jar" ) ) ; <END_BUG> info ( ( "Created<seq2seq4repair_space>" + ( file . getName ( ) ) ) ) ; return new CapsuleMojo . Pair ( file , new JarOutputStream ( new FileOutputStream ( file ) ) ) ; } private File resolveCapsule ( ) throws IOException { } private ArtifactResult resolve ( final String groupId , final String artifactId , final String version ) throws ArtifactResolutionException { } private String getDependencyCoordsWithExclusions ( final Dependency dependency ) { } private String getRepoString ( ) { } private String getDependencyString ( ) { } private String getSystemPropertiesString ( ) { } private void createExecCopy ( final File jar ) throws IOException { } private void createExecCopyProcess ( final File jar , final String prefix , final String extension ) throws IOException { } private String getOutputName ( final CapsuleMojo . Type type ) { } public static class Pair < K , V > { public K key ; public V value ; public Pair ( ) { } public Pair ( final K key , final V value ) { } } private static final CapsuleMojo . Pair pull ( final CapsuleMojo . Pair [ ] pairs , final Object key ) { } public static class Mode { private String name ; private CapsuleMojo . Pair < String , String > [ ] properties ; private CapsuleMojo . Pair < String , String > [ ] manifest ; } public static class FileSet { public String directory ; public String outputDirectory ; public String [ ] includes ; } private void printManifest ( final Manifest manifest ) { } private void debug ( final String message ) { } private void info ( final String message ) { } private void warn ( final String message ) { } }

Fix:
final File file = new File ( this . output , ( ( getOutputName ( type ) ) + ".jar" ) ) ;