Buggy code:
public abstract class TreeBasedTask extends StarTeamTask { public static final String DEFAULT_INCLUDESETTING = "*" ; public static final String DEFAULT_EXCLUDESETTING = null ; private String rootStarteamFolder = "//" ; private String rootLocalFolder = null ; private String includes = TreeBasedTask . DEFAULT_INCLUDESETTING ; private String excludes = TreeBasedTask . DEFAULT_EXCLUDESETTING ; private String label = null ; private boolean recursive = true ; private boolean forced = false ; private Label labelInUse = null ; public void setRootStarteamFolder ( String rootStarteamFolder ) { } public String getRootStarteamFolder ( ) { } public void setRootLocalFolder ( String rootLocalFolder ) { } public String getRootLocalFolder ( ) { } public void setIncludes ( String includes ) { } public String getIncludes ( ) { } protected void logIncludes ( ) { } public void setExcludes ( String excludes ) { } public String getExcludes ( ) { } protected void logExcludes ( ) { } protected void _setLabel ( String label ) { } protected String getLabel ( ) { } public boolean isRecursive ( ) { } public void setRecursive ( boolean v ) { } public boolean isForced ( ) { } public void setForced ( boolean v ) { } protected boolean isUsingViewLabel ( ) { } protected boolean isUsingRevisionLabel ( ) { } protected Label getLabelInUse ( ) { } protected void logLabel ( ) { } protected boolean shouldProcess ( String pName ) { } protected boolean matchPatterns ( String patterns , String pName ) { } private final Folder configureRootStarteamFolder ( ) throws BuildException { } private final File getLocalRootMapping ( Folder starteamrootfolder ) { } protected abstract void logOperationDescription ( Folder starteamrootFolder , File targetrootFolder ) { } public final void execute ( ) throws BuildException { } private void findLabel ( View v ) throws BuildException { Label [ ] allLabels = v . getLabels ( ) ; for ( int i = 0 ; i < ( allLabels . length ) ; i ++ ) { Label stLabel = allLabels [ i ] ; log ( ( "checking<seq2seq4repair_space>label<seq2seq4repair_space>" + ( stLabel . getName ( ) ) ) , MSG_DEBUG ) ; <START_BUG> if ( stLabel . getName ( ) . equals ( this . label ) ) { <END_BUG> if ( ( ! ( stLabel . isRevisionLabel ( ) ) ) && ( ! ( stLabel . isViewLabel ( ) ) ) ) { throw new BuildException ( "Unexpected<seq2seq4repair_space>label<seq2seq4repair_space>type." ) ; } log ( ( "using<seq2seq4repair_space>label<seq2seq4repair_space>" + ( stLabel . getName ( ) ) ) , MSG_DEBUG ) ; this . labelInUse = stLabel ; return ; } } throw new BuildException ( ( ( ( "Error:<seq2seq4repair_space>label<seq2seq4repair_space>" + ( this . label ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist<seq2seq4repair_space>in<seq2seq4repair_space>view<seq2seq4repair_space>" ) + ( v . getFullName ( ) ) ) ) ; } protected int getLabelID ( View v ) throws BuildException { } protected int getIDofLabelInUse ( ) { } protected abstract void visit ( Folder rootStarteamFolder , File rootLocalFolder ) throws BuildException { } protected abstract void testPreconditions ( ) throws BuildException { } public static String getFullRepositoryPath ( com . starbase . starteam . File remotefile ) { } protected abstract class UnmatchedFileMap extends Hashtable { TreeBasedTask . UnmatchedFileMap init ( File localFolder , Folder remoteFolder ) { } void removeControlledItem ( File localFile ) { } abstract void processUncontrolledItems ( ) throws BuildException { } protected abstract boolean isActive ( ) { } } }

Fix:
if ( ( ( stLabel != null ) && ( ! ( stLabel . isDeleted ( ) ) ) ) && ( stLabel . getName ( ) . equals ( this . label ) ) ) {