Buggy code:
private Server server ; private String projectId ; private String cqCryptography ; private File outputDirectory ; public EclipseIpLogUtil ( final Log log , final MavenSession mavenSession , final Settings settings , final boolean force ) { } private void appenLegalInfo ( final Xpp3Dom project , final Artifact artifact , final Model artifactPom , final Map < String , String > existingCqs , final Map < String , Xpp3Dom > existingLicenses ) { } private void collectExistingCqsAndLicenses ( final Xpp3Dom existingIpLog , final Map < String , String > existingCqs , final Map < String , Xpp3Dom > existingLicenses ) { } private void createChild ( final Xpp3Dom parent , final String name , final String value ) { } private String createCq ( final CloseableHttpClient httpclient , final Artifact artifact , final Model artifactPom , final Map < String , Xpp3Dom > existingLicenses ) throws IOException , URISyntaxException , MojoExecutionException { } public void enableSubmissionOfCqs ( final String projectId , final String cqCryptography , final Settings settings , final SettingsDecrypter settingsDecrypter , final File outputDirectory ) throws MojoExecutionException { } private String executeRequest ( final CloseableHttpClient httpclient , final HttpPost httpPost , final String responseHtmlFileName ) throws IOException , ClientProtocolException , MojoExecutionException { } public File generateIpLogXmlFile ( final Model recipePom , final SortedMap < Artifact , Model > dependencies , final File outputDirectory ) throws MojoExecutionException { } private Xpp3Dom [ ] getContact ( final Xpp3Dom existingIpLog ) { } private String getCqApacheHosted ( final Artifact artifact , final Model artifactPom ) { } private String getCqCodeAgreement ( final Artifact artifact , final Model artifactPom ) { } private String getCqCryptography ( final Artifact artifact , final Model artifactPom ) { } private String getCqDescription ( final Artifact artifact , final Model artifactPom ) { } private String getCqId ( final Xpp3Dom legal ) { } private String getCqLicense ( final Artifact artifact , final Model artifactPom , final Map < String , Xpp3Dom > existingLicenses ) throws MojoExecutionException { } private String getCqName ( final Artifact artifact , final Model artifactPom ) { } private String getCqProjectUrl ( final Artifact artifact , final Model artifactPom ) { } private String getCqSourceUrl ( final Artifact artifact , final Model artifactPom ) { } private Xpp3Dom getIpLogXml ( final Model recipePom , final SortedMap < Artifact , Model > dependencies , final Xpp3Dom existingIpLog , final Map < String , String > existingCqs , final Map < String , Xpp3Dom > existingLicenses ) { } private KnownLicense getLicense ( final Artifact artifact , final Model artifactPom , final Map < String , Xpp3Dom > existingLicenses ) { } public String getLicenseNameFromIpLogXmlFile ( final File outputDirectory ) throws MojoExecutionException { final File iplogXmlFile = new File ( outputDirectory , EclipseIpLogUtil . IP_LOG_XML ) ; final Xpp3Dom existingIpLog = readExistingIpLog ( iplogXmlFile ) ; if ( ( existingIpLog == null ) || ( ! ( iplogXmlFile . isFile ( ) ) ) ) { getLog ( ) . debug ( String . format ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>No<seq2seq4repair_space>ip_log.xml<seq2seq4repair_space>file<seq2seq4repair_space>found<seq2seq4repair_space>at<seq2seq4repair_space>'%s'" , iplogXmlFile ) ) ; return null ; } final Xpp3Dom [ ] projects = existingIpLog . getChildren ( "project" ) ; if ( ( projects == null ) || ( ( projects . length ) == 0 ) ) { getLog ( ) . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>Missing<seq2seq4repair_space>project<seq2seq4repair_space>information<seq2seq4repair_space>in<seq2seq4repair_space>ip_log.xml" ) ; return null ; } else if ( ( projects . length ) != 1 ) { getLog ( ) . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>Too<seq2seq4repair_space>many<seq2seq4repair_space>'project'<seq2seq4repair_space>elements.<seq2seq4repair_space>Only<seq2seq4repair_space>one<seq2seq4repair_space>'project'<seq2seq4repair_space>element<seq2seq4repair_space>is<seq2seq4repair_space>expected<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>ip_log.xml." ) ; return null ; } final Xpp3Dom [ ] legals = projects [ 0 ] . getChildren ( "legal" ) ; if ( ( legals == null ) || ( ( legals . length ) == 0 ) ) { getLog ( ) . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>Missing<seq2seq4repair_space>legal<seq2seq4repair_space>information<seq2seq4repair_space>in<seq2seq4repair_space>ip_log.xml" ) ; return null ; } else if ( ( legals . length ) != 1 ) { getLog ( ) . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>Too<seq2seq4repair_space>many<seq2seq4repair_space>'legal'<seq2seq4repair_space>elements.<seq2seq4repair_space>Only<seq2seq4repair_space>one<seq2seq4repair_space>'legal'<seq2seq4repair_space>element<seq2seq4repair_space>is<seq2seq4repair_space>expected<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>ip_log.xml." ) ; return null ; } final Xpp3Dom [ ] licenses = legals [ 0 ] . getChildren ( "license" ) ; if ( ( licenses == null ) || ( ( licenses . length ) == 0 ) ) { getLog ( ) . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>Incomplete<seq2seq4repair_space>legal<seq2seq4repair_space>information<seq2seq4repair_space>in<seq2seq4repair_space>ip_log.xml.<seq2seq4repair_space>Element<seq2seq4repair_space>'license'<seq2seq4repair_space>with<seq2seq4repair_space>license<seq2seq4repair_space>information<seq2seq4repair_space>is<seq2seq4repair_space>required!" ) ; return null ; } else <START_BUG> if ( ( legals . length ) != 1 ) { <END_BUG> getLog ( ) . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>Too<seq2seq4repair_space>many<seq2seq4repair_space>'license'<seq2seq4repair_space>elements.<seq2seq4repair_space>Only<seq2seq4repair_space>one<seq2seq4repair_space>'license'<seq2seq4repair_space>element<seq2seq4repair_space>is<seq2seq4repair_space>expected<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>ip_log.xml." ) ; return null ; } final Xpp3Dom name = licenses [ 0 ] . getChild ( "name" ) ; if ( ( name == null ) || ( Strings . isNullOrEmpty ( name . getValue ( ) ) ) ) { getLog ( ) . debug ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>license<seq2seq4repair_space>info:<seq2seq4repair_space>Incomplete<seq2seq4repair_space>license<seq2seq4repair_space>information<seq2seq4repair_space>in<seq2seq4repair_space>ip_log.xml.<seq2seq4repair_space>Element<seq2seq4repair_space>'name'<seq2seq4repair_space>is<seq2seq4repair_space>required<seq2seq4repair_space>and<seq2seq4repair_space>must<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>empty!" ) ; return null ; } return name . getValue ( ) ; } private Xpp3Dom getNotes ( final Xpp3Dom existingIpLog ) { } private String getPackageValue ( final Xpp3Dom legal ) { } private String getProjectAttribute ( final Xpp3Dom existingIpLog , final String name ) { } private String getProjectInfo ( final Xpp3Dom existingIpLog , final String name ) { } private String getProjectLocation ( final Model recipePom , final Xpp3Dom existingIpLog ) { } private String getProjectName ( final Model recipePom , final Xpp3Dom existingIpLog ) { } private String getProjectOrigin ( final Model recipePom , final Xpp3Dom existingIpLog ) { } private String getProjectReference ( final Model recipePom , final Xpp3Dom existingIpLog ) { } private String getProjectRepository ( final Model recipePom , final Xpp3Dom existingIpLog ) { } private String getProjectTag ( final Model recipePom , final Xpp3Dom existingIpLog ) { } private String getProjectVersion ( final Model recipePom , final Xpp3Dom existingIpLog ) { } private String getScmUrl ( final Scm scm ) { } private Server getServer ( final String serverId , final Settings settings , final SettingsDecrypter settingsDecrypter ) { } private void loginToPortal ( final CloseableHttpClient httpclient , final Server server ) throws IOException , URISyntaxException , MojoExecutionException { }

Fix:
if ( ( licenses . length ) != 1 ) {