Buggy code:
public class BuildPipelineTrigger extends Notifier implements DependecyDeclarer { private static final Logger LOGGER = Logger . getLogger ( BuildPipelineTrigger . class . getName ( ) ) ; private final List < AbstractBuildParameters > configs ; private String downstreamProjectNames ; public String getDownstreamProjectNames ( ) { } public void setDownstreamProjectNames ( final String downstreamProjectNames ) { } public List < AbstractBuildParameters > getConfigs ( ) { } @ DataBoundConstructor public BuildPipelineTrigger ( final String downstreamProjectNames , final List < AbstractBuildParameters > configs ) { } @ Override @ SuppressWarnings ( "rawtypes" ) public void buildDependencyGraph ( final AbstractProject owner , final DependencyGraph graph ) { } private DownstreamDependency createDownstreamDependency ( final AbstractProject < ? , ? > owner , final AbstractProject < ? , ? > downstream ) { } @ Override public boolean needsToRunAfterFinalized ( ) { } @ Override public BuildStepMonitor getRequiredMonitorService ( ) { } @ Override public boolean perform ( final AbstractBuild < ? , ? > build , final Launcher launcher , final BuildListener listener ) throws IOException , InterruptedException { } public boolean onDownstreamProjectRenamed ( final String oldName , final String newName ) { } public boolean onDownstreamProjectDeleted ( final String oldName ) { } public void removeDownstreamTrigger ( final BuildPipelineTrigger bpTrigger , final AbstractProject < ? , ? > ownerProject , final String downstreamProjectName ) { } @ Extension public static class DescriptorImpl extends BuildStepDescriptor < Publisher > { public boolean canAddParameters ( ) { } @ Override public boolean isApplicable ( @ SuppressWarnings ( "rawtypes" ) final Class < ? extends AbstractProject > jobType ) { } @ Override public String getDisplayName ( ) { } @ Override public String getHelpFile ( ) { } public FormValidation doCheckDownstreamProjectNames ( @ AncestorInPath AbstractProject project , @ QueryParameter ( "downstreamProjectNames" ) final String value ) { final StringTokenizer tokens = new StringTokenizer ( Util . fixNull ( value ) , "," ) ; boolean some = false ; while ( tokens . hasMoreTokens ( ) ) { final String projectName = tokens . nextToken ( ) . trim ( ) ; if ( "" . equals ( projectName ) ) { continue ; } some = true ; <START_BUG> final Item item = Jenkins . getInstance ( ) . getItem ( projectName , project , Item . class ) ; <END_BUG> if ( item == null ) { return FormValidation . error ( Messages . BuildTrigger_NoSuchProject ( projectName , AbstractProject . findNearest ( projectName , project . getParent ( ) ) . getRelativeNameFrom ( project ) ) ) ; } if ( ! ( item instanceof AbstractProject ) ) { return FormValidation . error ( Messages . BuildTrigger_NotBuildable ( projectName ) ) ; } } if ( ! some ) { return FormValidation . error ( Messages . BuildTrigger_NoProjectSpecified ( ) ) ; } return FormValidation . ok ( ) ; } public List < Descriptor < AbstractBuildParameters > > getBuilderConfigDescriptors ( ) { } @ Extension public static final class ItemListenerImpl extends ItemListener { @ Override public void onRenamed ( final Item item , final String oldName , final String newName ) { } @ Override public void onDeleted ( final Item item ) { } } } }

Fix:
final Item item = Jenkins . getInstance ( ) . getItemByFullName ( projectName ) ;