Program: 133595
Project: 133595
Buggy source:
@Override public FormStatus process(String actionName){
  FormStatus retVal=null;
  if (actionName.equals(processActionName)) {
    ListComponent<Material> matList=(ListComponent<Material>)form.getComponent(matListId);
    ArrayList<Slab> slabs=new ArrayList<Slab>();
    for (    Material mat : matList) {
      Slab slab=new Slab();
      slab.thickness=mat.getProperty("String_Node_Str");
      slab.interfaceWidth=mat.getProperty("String_Node_Str");
      slab.scatteringLength=mat.getProperty(Material.SCAT_LENGTH_DENSITY);
      slab.trueAbsLength=mat.getProperty(Material.MASS_ABS_COHERENT);
      slab.incAbsLength=mat.getProperty(Material.MASS_ABS_INCOHERENT);
      slabs.add(slab);
    }
    int numRough=Integer.parseInt(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(RoughnessEntryName).getValue());
    double deltaQ0=Double.parseDouble(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(deltaQ0EntryName).getValue());
    double deltaQ1ByQ=Double.parseDouble(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(deltaQ1ByQEntryName).getValue());
    double wavelength=Double.parseDouble(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(WaveLengthEntryName).getValue());
    double[] waveVector;
    String fileName=((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(WaveEntryName).getValue();
    IFile waveInput=project.getFile(fileName);
    Form waveForm=new CSVReader().read(waveInput);
    ListComponent<String[]> waveData=(ListComponent<String[]>)waveForm.getComponent(1);
    waveVector=new double[waveData.size()];
    for (int i=0; i < waveData.size(); i++) {
      String[] dataLine=waveData.get(i);
      double dataEntry=Double.parseDouble(dataLine[0]);
      waveVector[i]=dataEntry;
    }
    ReflectivityCalculator calculator=new ReflectivityCalculator();
    ReflectivityProfile profile=calculator.getReflectivityProfile(slabs.toArray(new Slab[slabs.size()]),numRough,deltaQ0,deltaQ1ByQ,wavelength,waveVector,false);
    double[] reflectivity=profile.reflectivity;
    double[] scatDensity=profile.scatteringDensity;
    double[] depth=profile.depth;
    String reflectData="String_Node_Str";
    for (int i=0; i < reflectivity.length; i++) {
      reflectData+=Double.toString(reflectivity[i]) + "String_Node_Str" + Double.toString(waveVector[i])+ "String_Node_Str";
    }
    ByteArrayInputStream reflectStream=new ByteArrayInputStream(reflectData.getBytes());
    String scatData="String_Node_Str";
    for (int i=0; i < depth.length; i++) {
      scatData+=Double.toString(scatDensity[i]) + "String_Node_Str" + Double.toString(depth[i])+ "String_Node_Str";
    }
    ResourceComponent resComp=(ResourceComponent)form.getComponent(resourceCompId);
    ByteArrayInputStream scatStream=new ByteArrayInputStream(scatData.getBytes());
    try {
      VizResource reflectSource=(VizResource)resComp.get(0);
      IFile reflectivityFile=project.getFile(reflectSource.getContents().getName());
      reflectivityFile.setContents(new BufferedInputStream(reflectStream),true,false,null);
      VizResource scatSource=(VizResource)resComp.get(1);
      IFile scatteringFile=project.getFile(scatSource.getContents().getName());
      scatteringFile.setContents(new BufferedInputStream(scatStream),true,false,null);
    }
 catch (    CoreException|NullPointerException e) {
      e.printStackTrace();
      retVal=FormStatus.InfoError;
    }
    if (retVal == null) {
      retVal=FormStatus.Processed;
    }
  }
 else {
    retVal=super.process(actionName);
  }
  return retVal;
}

Fixed version (ground truth):
@Override public FormStatus process(String actionName){
  FormStatus retVal=null;
  if (actionName.equals(processActionName)) {
    ListComponent<Material> matList=(ListComponent<Material>)form.getComponent(matListId);
    ArrayList<Slab> slabs=new ArrayList<Slab>();
    for (    Material mat : matList) {
      Slab slab=new Slab();
      slab.thickness=mat.getProperty("String_Node_Str");
      slab.interfaceWidth=mat.getProperty("String_Node_Str");
      slab.scatteringLength=mat.getProperty(Material.SCAT_LENGTH_DENSITY);
      slab.trueAbsLength=mat.getProperty(Material.MASS_ABS_COHERENT);
      slab.incAbsLength=mat.getProperty(Material.MASS_ABS_INCOHERENT);
      slabs.add(slab);
    }
    int numRough=Integer.parseInt(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(RoughnessEntryName).getValue());
    double deltaQ0=Double.parseDouble(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(deltaQ0EntryName).getValue());
    double deltaQ1ByQ=Double.parseDouble(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(deltaQ1ByQEntryName).getValue());
    double wavelength=Double.parseDouble(((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(WaveLengthEntryName).getValue());
    String qr4Val=((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(QR4EntryName).getValue();
    boolean qr4=qr4Val.equalsIgnoreCase("String_Node_Str");
    double[] waveVector;
    String fileName=((DataComponent)form.getComponent(paramsCompId)).retrieveEntry(WaveEntryName).getValue();
    IFile waveInput=project.getFile(fileName);
    Form waveForm=new CSVReader().read(waveInput);
    ListComponent<String[]> waveData=(ListComponent<String[]>)waveForm.getComponent(1);
    waveVector=new double[waveData.size()];
    for (int i=0; i < waveData.size(); i++) {
      String[] dataLine=waveData.get(i);
      double dataEntry=Double.parseDouble(dataLine[0]);
      waveVector[i]=dataEntry;
    }
    ReflectivityCalculator calculator=new ReflectivityCalculator();
    ReflectivityProfile profile=calculator.getReflectivityProfile(slabs.toArray(new Slab[slabs.size()]),numRough,deltaQ0,deltaQ1ByQ,wavelength,waveVector,qr4);
    double[] reflectivity=profile.reflectivity;
    double[] scatDensity=profile.scatteringDensity;
    double[] depth=profile.depth;
    String reflectData="String_Node_Str";
    for (int i=0; i < reflectivity.length; i++) {
      reflectData+=Double.toString(reflectivity[i]) + "String_Node_Str" + Double.toString(waveVector[i])+ "String_Node_Str";
    }
    ByteArrayInputStream reflectStream=new ByteArrayInputStream(reflectData.getBytes());
    String scatData="String_Node_Str";
    for (int i=0; i < depth.length; i++) {
      scatData+=Double.toString(scatDensity[i]) + "String_Node_Str" + Double.toString(depth[i])+ "String_Node_Str";
    }
    ResourceComponent resComp=(ResourceComponent)form.getComponent(resourceCompId);
    ByteArrayInputStream scatStream=new ByteArrayInputStream(scatData.getBytes());
    try {
      VizResource reflectSource=(VizResource)resComp.get(0);
      IFile reflectivityFile=project.getFile(reflectSource.getContents().getName());
      reflectivityFile.setContents(new BufferedInputStream(reflectStream),true,false,null);
      VizResource scatSource=(VizResource)resComp.get(1);
      IFile scatteringFile=project.getFile(scatSource.getContents().getName());
      scatteringFile.setContents(new BufferedInputStream(scatStream),true,false,null);
    }
 catch (    CoreException|NullPointerException e) {
      e.printStackTrace();
      retVal=FormStatus.InfoError;
    }
    if (retVal == null) {
      retVal=FormStatus.Processed;
    }
  }
 else {
    retVal=super.process(actionName);
  }
  return retVal;
}