Bug 114891 Simple compare error in CoreUtility.java
There's a simple typo error in org.eclipse.jdt.internal.ui.util.CoreUtility in it's inner class BuildJob. The method: public boolean isCoveredBy(BuildJob other) { if (other.fProject == null) { return true; } return fProject != null && fProject.equals(fProject); } compares fProject with itself on the fifth line. It should propably be: public boolean isCoveredBy(BuildJob other) { if (other.fProject == null) { return true; } return fProject != null && fProject.equals(other.fProject); } so that you compare with other.fProject instead.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/util/CoreUtility.java
* Returns a build job
	 * @param project The project to build or <code>null</code> to build the workspace.
	 */
	public static Job getBuildJob(final IProject project) {
		Job buildJob= new BuildJob(JavaUIMessages.CoreUtility_job_title, project);
		buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
		buildJob.setUser(true);
		return buildJob;
	}
	
	/**
     * Set the autobuild to the value of the parameter and
     * return the old one.
     * 
     * @param state the value to be set for autobuilding.
     * @return the old value of the autobuild state
     */
    public static boolean enableAutoBuild(boolean state) throws CoreException {
        IWorkspace workspace= ResourcesPlugin.getWorkspace();
        IWorkspaceDescription desc= workspace.getDescription();
        boolean isAutoBuilding= desc.isAutoBuilding();
        if (isAutoBuilding != state) {
            desc.setAutoBuilding(state);
            workspace.setDescription(desc);
        }
        return isAutoBuilding;
    }
	
}