GPL questions

I have a few questions about the GPL license.
Often there is a text at the top of every file that starts with "Foobar is free software: ...". Sometimes they don't mention the name of the software, "This program is free software: ...". If I take a file from project Foobar and put it into another project. Can I replace Foobar with the name of this other project? Do I have to state somehow that this software once was part of Foobar?
In the copyright notice there are a list of years. If a change is made to the file the current year is added. So what counts as a change? If I just change the formating I guess that is not a reason to add a year, or is it? What if I change a NULL to 0? What if I add an explicit cast instead of using an implicit cast? What if I change all int to char?
Often there is a text at the top of every file that starts with "Foobar is free software: ...". Sometimes they don't mention the name of the software, "This program is free software: ...". If I take a file from project Foobar and put it into another project. Can I replace Foobar with the name of this other project? Do I have to state somehow that this software once was part of Foobar?
In the copyright notice there are a list of years. If a change is made to the file the current year is added. So what counts as a change? If I just change the formating I guess that is not a reason to add a year, or is it? What if I change a NULL to 0? What if I add an explicit cast instead of using an implicit cast? What if I change all int to char?