Program: 180333
Project: 180333
Buggy source:
public InitialSampling getObject(Node source) throws XMLFormatException {
  if (!source.getNodeName().equals(INITIAL_SAMPLING_NAME)) {
    throw new XMLFormatException("String_Node_Str" + INITIAL_SAMPLING_NAME + "String_Node_Str"+ source.getNodeName()+ "String_Node_Str");
  }
  Map<String,Integer> varSampling=new HashMap<>();
  Map<String,Integer> paramSampling=new HashMap<>();
  Collection<Expression> toRelease=new ArrayList<>();
  NodeList children=source.getChildNodes();
  for (int i=0; i < children.getLength(); i++) {
    Node child=children.item(i);
switch (child.getNodeName()) {
case VARIABLE_NAME:
{
        int s=Integer.parseInt(child.getAttributes().getNamedItem(ATTRIBUTE_SAMPLING).getTextContent());
        String name=child.getAttributes().getNamedItem(ATTRIBUTE_NAME).getTextContent();
        varSampling.put(name,s);
        break;
      }
case PARAMETER_NAME:
{
      int s=Integer.parseInt(child.getAttributes().getNamedItem(ATTRIBUTE_SAMPLING).getTextContent());
      String name=child.getAttributes().getNamedItem(ATTRIBUTE_NAME).getTextContent();
      paramSampling.put(name,s);
      toRelease.add(odeSystem.getAvailableParameters().get(name));
      break;
    }
default :
  throw new XMLFormatException("String_Node_Str" + child.getNodeName());
}
}
OdeSystem releasedOdeSystem=odeSystem.release(toRelease);
int[] sampling=new int[releasedOdeSystem.dimension()];
for (int dim=0; dim < odeSystem.dimension(); dim++) {
if (odeSystem.isVariable(dim)) {
Variable var=odeSystem.getVariable(dim);
sampling[dim]=varSampling.containsKey(var.getName()) ? varSampling.get(var.getName()) : 1;
}
 else {
Parameter param=odeSystem.getParameter(dim);
sampling[dim]=paramSampling.containsKey(param.getName()) ? paramSampling.get(param.getName()) : 1;
}
}
return new ArrayInitialSampling(releasedOdeSystem,sampling);
}

Fixed version (ground truth):
@Override public InitialSampling getObject(Node source) throws XMLFormatException {
  if (!source.getNodeName().equals(INITIAL_SAMPLING_NAME)) {
    throw new XMLFormatException("String_Node_Str" + INITIAL_SAMPLING_NAME + "String_Node_Str"+ source.getNodeName()+ "String_Node_Str");
  }
  Map<String,Integer> varSampling=new HashMap<>();
  Map<String,Integer> paramSampling=new HashMap<>();
  Collection<Expression> toRelease=new ArrayList<>();
  NodeList children=source.getChildNodes();
  for (int i=0; i < children.getLength(); i++) {
    Node child=children.item(i);
switch (child.getNodeName()) {
case VARIABLE_NAME:
{
        int s=Integer.parseInt(child.getAttributes().getNamedItem(ATTRIBUTE_SAMPLING).getTextContent());
        String name=child.getAttributes().getNamedItem(ATTRIBUTE_NAME).getTextContent();
        varSampling.put(name,s);
        break;
      }
case PARAMETER_NAME:
{
      int s=Integer.parseInt(child.getAttributes().getNamedItem(ATTRIBUTE_SAMPLING).getTextContent());
      String name=child.getAttributes().getNamedItem(ATTRIBUTE_NAME).getTextContent();
      paramSampling.put(name,s);
      toRelease.add(odeSystem.getAvailableParameters().get(name));
      break;
    }
default :
  throw new XMLFormatException("String_Node_Str" + child.getNodeName());
}
}
OdeSystem releasedOdeSystem=odeSystem.release(toRelease);
int[] sampling=new int[releasedOdeSystem.dimension()];
for (int dim=0; dim < odeSystem.dimension(); dim++) {
if (odeSystem.isVariable(dim)) {
Variable var=odeSystem.getVariable(dim);
sampling[dim]=varSampling.containsKey(var.getName()) ? varSampling.get(var.getName()) : 1;
}
 else {
Parameter param=odeSystem.getParameter(dim);
sampling[dim]=paramSampling.containsKey(param.getName()) ? paramSampling.get(param.getName()) : 1;
}
}
return new ArrayInitialSampling(releasedOdeSystem,sampling);
}