Program: 121608
Project: 121608
Buggy source:
protected int createCrtrol(int curRow,int additionalHeightSize,int heightSize,int nbInRow,Map<String,Integer> groupPosition){
  int numInRow=0;
  int maxRowSize=0;
  Control lastControl=null;
  List<? extends IElementParameter> listParam=elem.getElementParametersWithChildrens();
  for (int i=0; i < listParam.size(); i++) {
    IElementParameter curParam=listParam.get(i);
    if (curParam.getCategory() == section) {
      if (curParam.getNumRow() == curRow && (curParam.getFieldType() != EParameterFieldType.TECHNICAL)) {
        if (curParam.isShow(listParam)) {
          numInRow++;
          AbstractElementPropertySectionController controller=generator.getController(curParam.getFieldType(),this);
          if (controller == null) {
            continue;
          }
          if (controller.hasDynamicRowSize()) {
            controller.setAdditionalHeightSize(additionalHeightSize);
          }
          String groupName=curParam.getGroup();
          Composite subComposite=null;
          if (groupName != null) {
            if (!hashCurControls.containsKey(groupName)) {
              if (groupPosition.size() > 0) {
                heightSize+=DEFAULT_GROUP_HEIGHT;
              }
              new GroupController(this).createControl(composite,curParam,numInRow,nbInRow,heightSize,lastControl);
              groupPosition.put(groupName,heightSize);
            }
            subComposite=(Composite)hashCurControls.get(groupName);
            int h2=heightSize - groupPosition.get(groupName);
            lastControl=controller.createControl(subComposite,curParam,numInRow,nbInRow,h2,lastControl);
          }
 else {
            if (isCompactView()) {
              int h3=DEFAULT_GROUP_HEIGHT * (groupPosition.size() > 0 ? 1 : 0) + heightSize;
              lastControl=controller.createControl(composite,curParam,numInRow,nbInRow,h3,lastControl);
            }
 else {
              if (numInRow > 1 && nbInRow > 1) {
                heightSize+=maxRowSize;
              }
              int h3=DEFAULT_GROUP_HEIGHT * (groupPosition.size() > 0 ? 1 : 0) + heightSize;
              lastControl=controller.createControl(composite,curParam,1,1,h3,null);
            }
          }
          maxRowSize=0;
          if (curRowSize > 0) {
            maxRowSize=curRowSize;
          }
        }
      }
    }
  }
  return maxRowSize;
}

Fixed version (ground truth):
private int createCrtrol(int curRow,int additionalHeightSize,int heightSize,int nbInRow,Map<String,Integer> groupPosition){
  int numInRow=0;
  int maxRowSize=0;
  int currentHeightSize=heightSize;
  Control lastControl=null;
  List<? extends IElementParameter> listParam=elem.getElementParametersWithChildrens();
  for (int i=0; i < listParam.size(); i++) {
    IElementParameter curParam=listParam.get(i);
    updateParameter(curParam);
    if (curParam.getCategory() == section) {
      if (curParam.getNumRow() == curRow && (curParam.getFieldType() != EParameterFieldType.TECHNICAL)) {
        if (curParam.isShow(listParam) && isShouldDisParameter(curParam)) {
          numInRow++;
          AbstractElementPropertySectionController controller=generator.getController(curParam.getFieldType(),this);
          if (controller == null) {
            continue;
          }
          if (controller.hasDynamicRowSize()) {
            controller.setAdditionalHeightSize(additionalHeightSize);
          }
          String groupName=curParam.getGroup();
          Composite subComposite=null;
          if (groupName != null) {
            if (!hashCurControls.containsKey(groupName)) {
              if (groupPosition.size() > 0) {
                currentHeightSize+=DEFAULT_GROUP_HEIGHT;
              }
              new GroupController(this).createControl(composite,curParam,numInRow,nbInRow,currentHeightSize,lastControl);
              groupPosition.put(groupName,currentHeightSize);
            }
            subComposite=(Composite)hashCurControls.get(groupName);
            int h2=currentHeightSize - groupPosition.get(groupName);
            lastControl=controller.createControl(subComposite,curParam,numInRow,nbInRow,h2,lastControl);
          }
 else {
            if (isCompactView()) {
              int h3=DEFAULT_GROUP_HEIGHT * (groupPosition.size() > 0 ? 1 : 0) + currentHeightSize;
              lastControl=controller.createControl(composite,curParam,numInRow,nbInRow,h3,lastControl);
            }
 else {
              if (numInRow > 1 && nbInRow > 1) {
                currentHeightSize+=maxRowSize;
              }
              int h3=DEFAULT_GROUP_HEIGHT * (groupPosition.size() > 0 ? 1 : 0) + currentHeightSize;
              lastControl=controller.createControl(composite,curParam,1,1,h3,null);
            }
          }
          maxRowSize=0;
          if (curRowSize > 0) {
            maxRowSize=curRowSize;
          }
        }
      }
    }
  }
  return currentHeightSize - heightSize + maxRowSize;
}