Program: 119469
Project: 119469
Buggy source:
private List<UpdateResult> checkJobSettingsParameters(EComponentCategory category,EUpdateItemType type,boolean onlySimpleShow){
  List<UpdateResult> jobSettingsResults=new ArrayList<UpdateResult>();
  final IElementParameter propertyTypeParam=getProcess().getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE,category);
  if (propertyTypeParam != null && propertyTypeParam.isShow(getProcess().getElementParameters())) {
    final Map<String,IElementParameter> childParameters=propertyTypeParam.getChildParameters();
    if (childParameters == null) {
      return Collections.emptyList();
    }
    List<IProcess2> openedProcesses=UpdateManagerUtils.getOpenedProcess();
    IElementParameter elementParameter=childParameters.get(EParameterName.PROPERTY_TYPE.getName());
    if (elementParameter != null && EmfComponent.REPOSITORY.equals(elementParameter.getValue())) {
      IElementParameter repositoryParam=childParameters.get(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());
      if (repositoryParam != null) {
        Connection repositoryConnection=null;
        String source=null;
        IRepositoryViewObject lastVersion=UpdateRepositoryUtils.getRepositoryObjectById((String)repositoryParam.getValue());
        if (lastVersion != null) {
          final Item item=lastVersion.getProperty().getItem();
          if (item != null && item instanceof ConnectionItem) {
            source=UpdateRepositoryUtils.getRepositorySourceName(item);
            repositoryConnection=((ConnectionItem)item).getConnection();
          }
        }
        UpdateCheckResult result=null;
        if (repositoryConnection != null) {
          boolean sameValues=true;
          for (          IElementParameter param : getProcess().getElementParameters()) {
            if (param.getCategory() == category) {
              String repositoryValue=param.getRepositoryValue();
              if (param.isShow(getProcess().getElementParameters()) && (repositoryValue != null) && !param.getName().equals(EParameterName.PROPERTY_TYPE.getName())) {
                Object repValue=RepositoryToComponentProperty.getValue(repositoryConnection,repositoryValue,null);
                if (repValue == null) {
                  continue;
                }
                if (repositoryValue.equals(UpdatesConstants.TYPE)) {
                  boolean found=false;
                  String[] list=param.getListRepositoryItems();
                  for (int i=0; (i < list.length) && (!found); i++) {
                    if (repValue.equals(list[i])) {
                      found=true;
                    }
                  }
                  if (!found) {
                    sameValues=false;
                  }
                }
 else {
                  if (!param.getValue().equals(repValue)) {
                    sameValues=false;
                  }
                }
              }
            }
          }
          if (onlySimpleShow || !sameValues) {
            result=new UpdateCheckResult(getProcess());
            result.setResult(type,EUpdateResult.UPDATE,repositoryConnection,source);
          }
          for (          IElementParameter param : getProcess().getElementParameters()) {
            String repositoryValue=param.getRepositoryValue();
            if (param.isShow(getProcess().getElementParameters()) && (repositoryValue != null) && (!param.getName().equals(EParameterName.PROPERTY_TYPE.getName()))&& param.getCategory() == category) {
              param.setRepositoryValueUsed(true);
              param.setReadOnly(true);
            }
          }
          List<UpdateResult> contextResults=checkParameterContextMode(getProcess().getElementParameters(),(ConnectionItem)lastVersion.getProperty().getItem(),category);
          if (contextResults != null) {
            jobSettingsResults.addAll(contextResults);
          }
        }
 else {
          result=new UpdateCheckResult(getProcess());
          result.setResult(type,EUpdateResult.BUIL_IN);
        }
        if (result != null) {
          if (!openedProcesses.contains(getProcess())) {
            result.setFromItem(true);
          }
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          jobSettingsResults.add(result);
        }
      }
    }
  }
  return jobSettingsResults;
}

Fixed version (ground truth):
private List<UpdateResult> checkJobSettingsParameters(EComponentCategory category,EUpdateItemType type,boolean onlySimpleShow){
  List<UpdateResult> jobSettingsResults=new ArrayList<UpdateResult>();
  final IElementParameter propertyTypeParam=getProcess().getElementParameterFromField(EParameterFieldType.PROPERTY_TYPE,category);
  if (propertyTypeParam != null && propertyTypeParam.isShow(getProcess().getElementParameters())) {
    final Map<String,IElementParameter> childParameters=propertyTypeParam.getChildParameters();
    if (childParameters == null) {
      return Collections.emptyList();
    }
    List<IProcess2> openedProcesses=UpdateManagerUtils.getOpenedProcess();
    IElementParameter elementParameter=childParameters.get(EParameterName.PROPERTY_TYPE.getName());
    if (elementParameter != null && EmfComponent.REPOSITORY.equals(elementParameter.getValue())) {
      IElementParameter repositoryParam=childParameters.get(EParameterName.REPOSITORY_PROPERTY_TYPE.getName());
      if (repositoryParam != null) {
        Connection repositoryConnection=null;
        String source=null;
        IRepositoryViewObject lastVersion=UpdateRepositoryUtils.getRepositoryObjectById((String)repositoryParam.getValue());
        if (lastVersion != null) {
          final Item item=lastVersion.getProperty().getItem();
          if (item != null && item instanceof ConnectionItem) {
            source=UpdateRepositoryUtils.getRepositorySourceName(item);
            repositoryConnection=((ConnectionItem)item).getConnection();
          }
        }
        UpdateCheckResult result=null;
        if (repositoryConnection != null) {
          boolean sameValues=true;
          for (          IElementParameter param : getProcess().getElementParameters()) {
            if (param.getCategory() == category) {
              String repositoryValue=param.getRepositoryValue();
              if (param.isShow(getProcess().getElementParameters()) && (repositoryValue != null) && !param.getName().equals(EParameterName.PROPERTY_TYPE.getName())) {
                Object repValue=RepositoryToComponentProperty.getValue(repositoryConnection,repositoryValue,null);
                if (repValue == null) {
                  continue;
                }
                if (repositoryValue.equals(UpdatesConstants.TYPE)) {
                  boolean found=false;
                  String[] list=param.getListRepositoryItems();
                  for (int i=0; (i < list.length) && (!found); i++) {
                    if (repValue.equals(list[i])) {
                      found=true;
                    }
                  }
                  if (!found) {
                    sameValues=false;
                  }
                }
 else {
                  if (param.getName().equals("String_Node_Str")) {
                    if (param.getValue() instanceof List && repValue instanceof List) {
                      List repoHadoopPros=(List)repValue;
                      List<Map<String,Object>> jobHadoopPros=(List<Map<String,Object>>)param.getValue();
                      List<Map<String,Object>> filterBuildInList=collectHadoopPropertiesList(jobHadoopPros);
                      if (repoHadoopPros.size() != filterBuildInList.size()) {
                        sameValues=false;
                      }
 else {
                        for (int i=0; i < filterBuildInList.size(); i++) {
                          Map<String,Object> oldMap=filterBuildInList.get(i);
                          Map<String,Object> objectMap=(Map<String,Object>)repoHadoopPros.get(i);
                          if (oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str")) && oldMap.get("String_Node_Str").equals(objectMap.get("String_Node_Str"))) {
                            sameValues=true;
                          }
 else {
                            sameValues=false;
                            break;
                          }
                        }
                      }
                    }
                  }
 else                   if (!param.getValue().equals(repValue)) {
                    sameValues=false;
                  }
                }
              }
              if (!sameValues) {
                break;
              }
            }
          }
          if (onlySimpleShow || !sameValues) {
            result=new UpdateCheckResult(getProcess());
            result.setResult(type,EUpdateResult.UPDATE,repositoryConnection,source);
          }
          for (          IElementParameter param : getProcess().getElementParameters()) {
            String repositoryValue=param.getRepositoryValue();
            if (param.isShow(getProcess().getElementParameters()) && (repositoryValue != null) && (!param.getName().equals(EParameterName.PROPERTY_TYPE.getName()))&& param.getCategory() == category) {
              param.setRepositoryValueUsed(true);
              param.setReadOnly(true);
            }
          }
          List<UpdateResult> contextResults=checkParameterContextMode(getProcess().getElementParameters(),(ConnectionItem)lastVersion.getProperty().getItem(),category);
          if (contextResults != null) {
            jobSettingsResults.addAll(contextResults);
          }
        }
 else {
          result=new UpdateCheckResult(getProcess());
          result.setResult(type,EUpdateResult.BUIL_IN);
        }
        if (result != null) {
          if (!openedProcesses.contains(getProcess())) {
            result.setFromItem(true);
          }
          result.setJob(getProcess());
          setConfigrationForReadOnlyJob(result);
          jobSettingsResults.add(result);
        }
      }
    }
  }
  return jobSettingsResults;
}