Program: 102202
Project: 102202
Buggy source:
/** 
 * Calculate changes to user-generated sql
 * @param file
 * @param pathPair
 * @param textFileChange
 * @throws Exception 
 */
public static void calculateSQLChanges(IFile file,PathPair pathPair,TextFileChange textFileChange) throws Exception {
  if (!ModelUtil.isModelFile(file)) {
    return;
  }
  IPath sourcePath=new Path(pathPair.getSourcePath());
  IPath targetPath=new Path(pathPair.getTargetPath());
  String sourceName=sourcePath.removeFileExtension().lastSegment();
  String targetName=targetPath.removeFileExtension().lastSegment();
  if (sourceName.equals(targetName))   return;
  File nativeFile=file.getRawLocation().makeAbsolute().toFile();
  if (nativeFile == null || !nativeFile.exists())   throw new Exception(getString("String_Node_Str",file.getFullPath()));
  TextEdit fileChangeRootEdit=setRootEdit(textFileChange);
  BufferedReader reader=null;
  String line;
  int docOffset=0;
  char[] prefixChars={' ',',',';','\t','\n'};
  try {
    reader=new BufferedReader(new FileReader(nativeFile));
    while ((line=reader.readLine()) != null) {
      if (line.contains("String_Node_Str")) {
        for (        char prefixChar : prefixChars) {
          int lineOffset=line.indexOf(prefixChar + sourceName + '.');
          if (lineOffset < 0)           continue;
          int offset=docOffset + lineOffset + 1;
          ReplaceEdit edit=new ReplaceEdit(offset,sourceName.length(),targetName);
          fileChangeRootEdit.addChild(edit);
        }
      }
      docOffset+=line.length() + 1;
    }
  }
  finally {
    if (reader != null)     reader.close();
  }
}

Fixed version (ground truth):
/** 
 * Calculate changes to user-generated sql
 * @param file
 * @param pathPair
 * @param textFileChange
 * @throws Exception 
 */
public static void calculateSQLChanges(IFile file,PathPair pathPair,TextFileChange textFileChange) throws Exception {
  if (!ModelUtil.isModelFile(file)) {
    return;
  }
  IPath sourcePath=new Path(pathPair.getSourcePath());
  IPath targetPath=new Path(pathPair.getTargetPath());
  String sourceName=sourcePath.removeFileExtension().lastSegment();
  String targetName=targetPath.removeFileExtension().lastSegment();
  if (sourceName.equals(targetName))   return;
  File nativeFile=file.getRawLocation().makeAbsolute().toFile();
  if (nativeFile == null || !nativeFile.exists())   throw new Exception(getString("String_Node_Str",file.getFullPath()));
  TextEdit fileChangeRootEdit=setRootEdit(textFileChange);
  BufferedReader reader=null;
  String line;
  int docOffset=0;
  char[] prefixChars={' ',',',';','\t','\n'};
  try {
    reader=new BufferedReader(new FileReader(nativeFile));
    while ((line=reader.readLine()) != null) {
      if (line.contains("String_Node_Str")) {
        for (        char prefixChar : prefixChars) {
          String toReplace=prefixChar + sourceName + '.';
          for (int lineOffset=line.indexOf(toReplace); lineOffset >= 0; lineOffset=line.indexOf(toReplace,lineOffset + 1)) {
            if (lineOffset < 0)             continue;
            int offset=docOffset + lineOffset + 1;
            ReplaceEdit edit=new ReplaceEdit(offset,sourceName.length(),targetName);
            fileChangeRootEdit.addChild(edit);
          }
        }
      }
      docOffset+=line.length() + 1;
    }
  }
  finally {
    if (reader != null)     reader.close();
  }
}