nus-yam/ex-repair huggingface dataset:
Program: 117777
Project: 117777
Buggy source:
/** 
 * Toggles showing the month item. Month mode an item in exactly one month from now.
 * @param enable True to enable, false to disable month mode.
 */
public void setShowMonthItem(boolean enable){
  PickerSpinnerAdapter adapter=(PickerSpinnerAdapter)getAdapter();
  if (enable && !showMonthItem) {
    final Calendar date=Calendar.getInstance();
    date.add(Calendar.MONTH,1);
    adapter.add(new DateItem(formatDate(date),date));
  }
 else   if (!enable && showMonthItem) {
    int monthPosition=adapter.getCount() - 2;
    if (getSelectedItemPosition() == monthPosition)     setSelection(monthPosition - 1);
    adapter.remove(adapter.getItem(monthPosition));
  }
  if (enable != showMonthItem) {
    adapter.notifyDataSetChanged();
    showMonthItem=enable;
  }
}

Fixed version (ground truth):
/** 
 * Toggles showing the month item. Month mode an item in exactly one month from now.
 * @param enable True to enable, false to disable month mode.
 */
public void setShowMonthItem(boolean enable){
  if (enable && !showMonthItem) {
    final Calendar date=Calendar.getInstance();
    date.add(Calendar.MONTH,1);
    addAdapterItem(new DateItem(formatDate(date),date));
  }
 else   if (!enable && showMonthItem) {
    removeAdapterItemAt(getLastItemPosition());
  }
  showMonthItem=enable;
}
Program: 117778
Project: 117778
Buggy source:
/** 
 * Toggles showing the past items. Past mode shows the yesterday and last weekday item.
 * @param enable True to enable, false to disable past mode.
 */
public void setShowPastItems(boolean enable){
  PickerSpinnerAdapter adapter=(PickerSpinnerAdapter)getAdapter();
  if (enable && !showPastItems) {
    final Resources res=getResources();
    final Calendar date=Calendar.getInstance();
    date.add(Calendar.DAY_OF_YEAR,-1);
    adapter.insert(new DateItem(res.getString(R.string.date_yesterday),date),0);
    date.add(Calendar.DAY_OF_YEAR,-6);
    adapter.insert(new DateItem(getWeekDay(date.get(Calendar.DAY_OF_WEEK),R.string.date_last_weekday),date),0);
    setSelection(getSelectedItemPosition() + 2);
  }
 else   if (!enable && showPastItems) {
    int selection=getSelectedItemPosition();
    if (selection >= 2)     setSelection(selection - 2);
 else     setSelection(0);
    adapter.remove(adapter.getItem(0));
    adapter.remove(adapter.getItem(0));
  }
  if (enable != showPastItems) {
    adapter.notifyDataSetChanged();
    showPastItems=enable;
  }
}

Fixed version (ground truth):
/** 
 * Toggles showing the past items. Past mode shows the yesterday and last weekday item.
 * @param enable True to enable, false to disable past mode.
 */
public void setShowPastItems(boolean enable){
  if (enable && !showPastItems) {
    final Resources res=getResources();
    final Calendar date=Calendar.getInstance();
    date.add(Calendar.DAY_OF_YEAR,-1);
    insertAdapterItem(new DateItem(res.getString(R.string.date_yesterday),date),0);
    date.add(Calendar.DAY_OF_YEAR,-6);
    insertAdapterItem(new DateItem(getWeekDay(date.get(Calendar.DAY_OF_WEEK),R.string.date_last_weekday),date),0);
  }
 else   if (!enable && showPastItems) {
    removeAdapterItemAt(0);
    removeAdapterItemAt(0);
  }
  showPastItems=enable;
}
Program: 117779
Project: 117779
Buggy source:
@Override public void setSelection(int position){
  if (position == getCount() - 1)   onFooterClick();
 else {
    ((PickerSpinnerAdapter)getAdapter()).selectTemporary(null);
    super.setSelection(position);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void setSelection(int position){
  if (position == getCount() - 1 && ((PickerSpinnerAdapter)getAdapter()).hasFooter())   onFooterClick();
 else {
    ((PickerSpinnerAdapter)getAdapter()).selectTemporary(null);
    super.setSelection(position);
  }
}
Program: 117780
Project: 117780
Buggy source:
/** 
 * Push an item to be selected, but not shown in the dropdown menu. This is similar to calling setText(item.toString()) if a Spinner had such a method.
 * @param item The item to select, or null to remove any temporary selection.
 */
public void selectTemporary(TwinTextItem item){
  ((PickerSpinnerAdapter)getAdapter()).selectTemporary(item);
  final int tempItemPosition=getCount();
  if (getSelectedItemPosition() == tempItemPosition) {
    interceptNextSelectionCallback=true;
    super.setSelection(0,false);
  }
  super.setSelection(tempItemPosition);
}

Fixed version (ground truth):
/** 
 * Push an item to be selected, but not shown in the dropdown menu. This is similar to calling setText(item.toString()) if a Spinner had such a method.
 * @param item The item to select, or null to remove any temporary selection.
 */
public void selectTemporary(TwinTextItem item){
  if (item == null) {
    setSelection(getLastItemPosition());
    return;
  }
  ((PickerSpinnerAdapter)getAdapter()).selectTemporary(item);
  final int tempItemPosition=getCount();
  if (getSelectedItemPosition() == tempItemPosition) {
    setSelectionQuietly(0);
  }
  super.setSelection(tempItemPosition);
}
Program: 117781
Project: 117781
Buggy source:
/** 
 * Toggles showing the past items. Past mode shows the yesterday and last weekday item.
 * @param enable True to enable, false to disable past mode.
 */
public void setShowPastItems(boolean enable){
  if (enable && !showPastItems) {
    final Resources res=getResources();
    final Calendar date=Calendar.getInstance();
    date.add(Calendar.DAY_OF_YEAR,-1);
    insertAdapterItem(new DateItem(res.getString(R.string.date_yesterday),date),0);
    date.add(Calendar.DAY_OF_YEAR,-6);
    insertAdapterItem(new DateItem(getWeekDay(date.get(Calendar.DAY_OF_WEEK),R.string.date_last_weekday),date),0);
  }
 else   if (!enable && showPastItems) {
    if (getSelectedItemPosition() == getCount())     setSelection(2);
    removeAdapterItemAt(0);
    removeAdapterItemAt(0);
  }
  showPastItems=enable;
}

Fixed version (ground truth):
/** 
 * Toggles showing the past items. Past mode shows the yesterday and last weekday item.
 * @param enable True to enable, false to disable past mode.
 */
public void setShowPastItems(boolean enable){
  if (enable && !showPastItems) {
    final Resources res=getResources();
    final Calendar date=Calendar.getInstance();
    date.add(Calendar.DAY_OF_YEAR,-1);
    insertAdapterItem(new DateItem(res.getString(R.string.date_yesterday),date),0);
    date.add(Calendar.DAY_OF_YEAR,-6);
    insertAdapterItem(new DateItem(getWeekDay(date.get(Calendar.DAY_OF_WEEK),R.string.date_last_weekday),date),0);
  }
 else   if (!enable && showPastItems) {
    removeAdapterItemAt(1);
    removeAdapterItemAt(0);
  }
  showPastItems=enable;
}
Program: 117782
Project: 117782
Buggy source:
@Override public void setOnItemSelectedListener(final OnItemSelectedListener listener){
  super.setOnItemSelectedListener(new OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if (!interceptNextSelectionCallback)       listener.onItemSelected(parent,view,position,id);
      interceptNextSelectionCallback=false;
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
      listener.onNothingSelected(parent);
    }
  }
);
}

Fixed version (ground truth):
@Override public void setOnItemSelectedListener(final OnItemSelectedListener listener){
  super.setOnItemSelectedListener(new OnItemSelectedListener(){
    @Override public void onItemSelected(    AdapterView<?> parent,    View view,    int position,    long id){
      if (interceptNextSelectionCallbacks > 0) {
        interceptNextSelectionCallbacks--;
        if (reselectTemporaryItem) {
          if (position != getAdapter().getCount())           setSelectionQuietly(getAdapter().getCount());
          reselectTemporaryItem=false;
        }
      }
 else       listener.onItemSelected(parent,view,position,id);
    }
    @Override public void onNothingSelected(    AdapterView<?> parent){
      listener.onNothingSelected(parent);
    }
  }
);
}
Program: 117783
Project: 117783
Buggy source:
/** 
 * Removes the specified item from the adapter and takes care of handling selection changes. Always call this method instead of getAdapter().remove().
 * @param index The index of the item to be removed.
 */
public void removeAdapterItemAt(int index){
  PickerSpinnerAdapter adapter=(PickerSpinnerAdapter)getAdapter();
  int count=adapter.getCount();
  int selection=getSelectedItemPosition();
  if (index == count)   selectTemporary(null);
 else   if (index == count - 1 && adapter.hasFooter()) {
    if (selection == count)     setSelectionQuietly(selection - 1);
    adapter.setFooter(null);
  }
 else {
    if (index == selection) {
      if (index == getLastItemPosition())       setSelection(selection - 1);
 else       setSelection(selection);
    }
 else     if (index < selection && selection != count)     setSelectionQuietly(selection - 1);
    adapter.remove(adapter.getItem(index));
    if (selection == count)     setSelectionQuietly(selection - 1);
  }
}

Fixed version (ground truth):
/** 
 * Removes the specified item from the adapter and takes care of handling selection changes. Always call this method instead of getAdapter().remove().
 * @param index The index of the item to be removed.
 */
public void removeAdapterItemAt(int index){
  PickerSpinnerAdapter adapter=(PickerSpinnerAdapter)getAdapter();
  int count=adapter.getCount();
  int selection=getSelectedItemPosition();
  if (index == count)   selectTemporary(null);
 else   if (index == count - 1 && adapter.hasFooter()) {
    if (selection == count)     setSelectionQuietly(selection - 1);
    adapter.setFooter(null);
  }
 else {
    if (index == selection) {
      if (index == getLastItemPosition())       setSelection(selection - 1);
 else {
        setSelectionQuietly(index == 0 && count > 1 ? 1 : 0);
        setSelection(selection);
      }
    }
 else     if (index < selection && selection != count)     setSelectionQuietly(selection - 1);
    adapter.remove(adapter.getItem(index));
    if (selection == count) {
      reselectTemporaryItem=true;
      setSelectionQuietly(selection - 1);
    }
  }
}
Program: 117784
Project: 117784
Buggy source:
/** 
 * Equivalent to   {@link #setSelection(int)}, but without calling any onItemSelectedListeners or checking for footer clicks.
 */
private void setSelectionQuietly(int position){
  interceptNextSelectionCallback=true;
  super.setSelection(position,false);
  interceptNextSelectionCallback=true;
  super.setSelection(position);
}

Fixed version (ground truth):
/** 
 * Equivalent to   {@link #setSelection(int)}, but without calling any onItemSelectedListeners or checking for footer clicks.
 */
private void setSelectionQuietly(int position){
  interceptNextSelectionCallbacks++;
  super.setSelection(position,false);
  super.setSelection(position);
}
Program: 117785
Project: 117785
Buggy source:
@Override public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  if (!interceptNextSelectionCallback)   listener.onItemSelected(parent,view,position,id);
  interceptNextSelectionCallback=false;
}

Fixed version (ground truth):
@Override public void onItemSelected(AdapterView<?> parent,View view,int position,long id){
  if (interceptNextSelectionCallbacks > 0) {
    interceptNextSelectionCallbacks--;
    if (reselectTemporaryItem) {
      if (position != getAdapter().getCount())       setSelectionQuietly(getAdapter().getCount());
      reselectTemporaryItem=false;
    }
  }
 else   listener.onItemSelected(parent,view,position,id);
}
Program: 117786
Project: 117786
Buggy source:
/** 
 * {@inheritDoc}
 */
@Override public void setSelection(int position){
  if (position == getCount() - 1 && ((PickerSpinnerAdapter)getAdapter()).hasFooter())   onFooterClick();
 else {
    ((PickerSpinnerAdapter)getAdapter()).selectTemporary(null);
    super.setSelection(position);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc}
 */
@Override public void setSelection(int position){
  if (position == getCount() - 1 && ((PickerSpinnerAdapter)getAdapter()).hasFooter())   onFooterClick();
 else {
    ((PickerSpinnerAdapter)getAdapter()).selectTemporary(null);
    interceptNextSelectionCallbacks=0;
    super.setSelection(position);
    super.setSelection(position,false);
  }
}
Program: 117787
Project: 117787
Buggy source:
/** 
 * Toggles showing more time items. If enabled, a noon and a late night time item are shown.
 * @param enable True to enable, false to disable more time items.
 */
public void setShowMoreTimeItems(boolean enable){
  if (enable && !showMoreTimeItems) {
    final Resources res=getResources();
    insertAdapterItem(new TimeItem(res.getString(R.string.time_afternoon_2),14,0),2);
    removeAdapterItemAt(1);
    insertAdapterItem(new TimeItem(res.getString(R.string.time_noon),12,0),1);
    addAdapterItem(new TimeItem(res.getString(R.string.time_late_night),23,0));
  }
 else   if (!enable && showMoreTimeItems) {
    removeAdapterItemAt(1);
    removeAdapterItemAt(getLastItemPosition());
    if (getCount() == getSelectedItemPosition())     setSelection(0);
    insertAdapterItem(new TimeItem(getResources().getString(R.string.time_afternoon),13,0),2);
    removeAdapterItemAt(1);
  }
  showMoreTimeItems=enable;
}

Fixed version (ground truth):
/** 
 * Toggles showing more time items. If enabled, a noon and a late night time item are shown.
 * @param enable True to enable, false to disable more time items.
 */
public void setShowMoreTimeItems(boolean enable){
  if (enable && !showMoreTimeItems) {
    final Resources res=getResources();
    insertAdapterItem(new TimeItem(res.getString(R.string.time_afternoon_2),14,0),2);
    removeAdapterItemAt(1);
    insertAdapterItem(new TimeItem(res.getString(R.string.time_noon),12,0),1);
    addAdapterItem(new TimeItem(res.getString(R.string.time_late_night),23,0));
  }
 else   if (!enable && showMoreTimeItems) {
    insertAdapterItem(new TimeItem(getResources().getString(R.string.time_afternoon),13,0),3);
    removeAdapterItemAt(2);
    removeAdapterItemAt(1);
    removeAdapterItemAt(getLastItemPosition());
  }
  showMoreTimeItems=enable;
}
Program: 117788
Project: 117788
Buggy source:
/** 
 * Invokes the super implemntation of a method like "super.foo(o)".
 * @param overridenMethod the method to generate the super impl invocation of.
 * @return the super implemntation of a method like "super.foo(o)".
 * @throws NotFoundException if a type is not found (like parameter types).
 */
public String invokeSuper(CtMethod method) throws NotFoundException {
  return "String_Node_Str" + method.getName() + "String_Node_Str"+ extractParameters(method)+ "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Invokes the super implemntation of a method like "super.foo(o)".
 * @param method the method to generate the super impl invocation of.
 * @return the super implemntation of a method like "super.foo(o)".
 * @throws NotFoundException if a type is not found (like parameter types).
 */
public String invokeSuper(CtMethod method) throws NotFoundException {
  return "String_Node_Str" + method.getName() + "String_Node_Str"+ extractParameters(method)+ "String_Node_Str";
}
Program: 117789
Project: 117789
Buggy source:
private void doInsertBodyInFullMethod(){
  if (fullMethod != null) {
    fullMethod=fullMethod.replace(InsertableMethod.BODY_TAG,body);
  }
}

Fixed version (ground truth):
private void doInsertBodyInFullMethod(){
  if (fullMethod != null) {
    if (!fullMethod.contains(InsertableMethod.BODY_TAG)) {
      log.fine("String_Node_Str" + InsertableMethod.BODY_TAG + "String_Node_Str");
    }
    fullMethod=fullMethod.replace(InsertableMethod.BODY_TAG,body);
  }
}
Program: 117790
Project: 117790
Buggy source:
@Override protected void applyTransformations(CtClass classToTransform) throws Exception {
  afterBurner.afterOverrideMethod(classToTransform,"String_Node_Str","String_Node_Str");
  InsertableMethodBuilder builder=new InsertableMethodBuilder(afterBurner);
  builder.insertIntoClass(classToTransform).inMethodIfExists("String_Node_Str").beforeACallTo("String_Node_Str").withBody("String_Node_Str").elseCreateMethodIfNotExists("String_Node_Str").doIt();
}

Fixed version (ground truth):
@Override protected void applyTransformations(CtClass classToTransform) throws Exception {
  getLogger().debug("String_Node_Str" + classToTransform.getName());
  afterBurner.afterOverrideMethod(classToTransform,"String_Node_Str","String_Node_Str");
  InsertableMethodBuilder builder=new InsertableMethodBuilder(afterBurner);
  builder.insertIntoClass(classToTransform).inMethodIfExists("String_Node_Str").beforeACallTo("String_Node_Str").withBody("String_Node_Str").elseCreateMethodIfNotExists("String_Node_Str").doIt();
}
Program: 117791
Project: 117791
Buggy source:
private static void matchContextForPrperties(Properties properties,IConnParamName param,String genericVariableName,String prefixName){
  for (  NamedThing nameThing : properties.getProperties()) {
    if (nameThing != null && nameThing instanceof Property) {
      Property property=(Property)nameThing;
      Object paramValue=property.getStoredValue();
      if (GenericTypeUtils.isListStringType(property) && paramValue != null) {
        String propertyValue=ContextParameterUtils.getNewScriptCode(prefixName + ConnectionContextHelper.LINE + ContextParameterUtils.getValidParameterName(property.getName()),LanguageManager.getCurrentLanguage());
        property.setTaggedValue(IGenericConstants.IS_CONTEXT_MODE,true);
        List<String> driverList=new ArrayList<String>();
        driverList.add(propertyValue);
        property.setValue(driverList);
      }
    }
  }
}

Fixed version (ground truth):
private static void matchContextForPrperties(Properties properties,IConnParamName param,String genericVariableName,String prefixName){
  for (  NamedThing nameThing : properties.getProperties()) {
    if (nameThing != null && nameThing instanceof Property) {
      Property property=(Property)nameThing;
      Object paramValue=property.getStoredValue();
      if (GenericTypeUtils.isListStringType(property) && paramValue != null) {
        String propertyValue=ContextParameterUtils.getNewScriptCode(genericVariableName,ECodeLanguage.JAVA);
        property.setTaggedValue(IGenericConstants.IS_CONTEXT_MODE,true);
        List<String> driverList=new ArrayList<String>();
        driverList.add(propertyValue);
        property.setValue(driverList);
      }
    }
  }
}
Program: 117792
Project: 117792
Buggy source:
public static void setPropertiesForContextMode(String prefixName,Connection connection,Set<IConnParamName> paramSet){
  if (connection == null) {
    return;
  }
  ComponentProperties componentProperties=getComponentProperties(connection);
  String originalVariableName=prefixName + ConnectionContextHelper.LINE;
  String genericVariableName=null;
  for (  IConnParamName param : paramSet) {
    if (param instanceof GenericConnParamName) {
      GenericConnParamName genericParam=(GenericConnParamName)param;
      String paramVarName=genericParam.getContextVar();
      genericVariableName=originalVariableName + paramVarName;
      matchContextForAttribues(componentProperties,genericParam,genericVariableName,prefixName);
    }
  }
  updateComponentProperties(connection,componentProperties);
}

Fixed version (ground truth):
public static void setPropertiesForContextMode(String prefixName,Connection connection,Set<IConnParamName> paramSet){
  if (connection == null) {
    return;
  }
  ComponentProperties componentProperties=getComponentProperties(connection);
  String originalVariableName=prefixName + ConnectionContextHelper.LINE;
  String genericVariableName=null;
  for (  IConnParamName param : paramSet) {
    if (param instanceof GenericConnParamName) {
      GenericConnParamName genericParam=(GenericConnParamName)param;
      String paramVarName=genericParam.getContextVar();
      genericVariableName=originalVariableName + paramVarName;
      matchContextForAttribues(componentProperties,genericParam,genericVariableName,prefixName,false);
    }
  }
  updateComponentProperties(connection,componentProperties);
}
Program: 117793
Project: 117793
Buggy source:
public static void setPropertiesForExistContextMode(Connection connection,Set<IConnParamName> paramSet,Map<ContextItem,List<ConectionAdaptContextVariableModel>> adaptMap){
  if (connection == null) {
    return;
  }
  ComponentProperties componentProperties=getComponentProperties(connection);
  ContextItem currentContext=null;
  for (  IConnParamName param : paramSet) {
    if (param instanceof GenericConnParamName) {
      String genericVariableName=null;
      GenericConnParamName genericParam=(GenericConnParamName)param;
      if (adaptMap != null && adaptMap.size() > 0) {
        for (        Map.Entry<ContextItem,List<ConectionAdaptContextVariableModel>> entry : adaptMap.entrySet()) {
          currentContext=entry.getKey();
          List<ConectionAdaptContextVariableModel> modelList=entry.getValue();
          for (          ConectionAdaptContextVariableModel model : modelList) {
            if (model.getValue().equals(genericParam.getName())) {
              genericVariableName=model.getName();
              break;
            }
          }
        }
      }
      if (genericVariableName != null) {
        genericVariableName=getCorrectVariableName(currentContext,genericVariableName,genericParam);
        matchContextForAttribues(componentProperties,genericParam,genericVariableName,currentContext.getProperty().getLabel());
      }
    }
  }
  updateComponentProperties(connection,componentProperties);
}

Fixed version (ground truth):
public static void setPropertiesForExistContextMode(Connection connection,Set<IConnParamName> paramSet,Map<ContextItem,List<ConectionAdaptContextVariableModel>> adaptMap){
  if (connection == null) {
    return;
  }
  ComponentProperties componentProperties=getComponentProperties(connection);
  ContextItem currentContext=null;
  for (  IConnParamName param : paramSet) {
    if (param instanceof GenericConnParamName) {
      String genericVariableName=null;
      GenericConnParamName genericParam=(GenericConnParamName)param;
      if (adaptMap != null && adaptMap.size() > 0) {
        for (        Map.Entry<ContextItem,List<ConectionAdaptContextVariableModel>> entry : adaptMap.entrySet()) {
          currentContext=entry.getKey();
          List<ConectionAdaptContextVariableModel> modelList=entry.getValue();
          for (          ConectionAdaptContextVariableModel model : modelList) {
            if (model.getValue().equals(genericParam.getName())) {
              genericVariableName=model.getName();
              break;
            }
          }
        }
      }
      if (genericVariableName != null) {
        genericVariableName=getCorrectVariableName(currentContext,genericVariableName,genericParam);
        matchContextForAttribues(componentProperties,genericParam,genericVariableName,currentContext.getProperty().getLabel(),true);
      }
    }
  }
  updateComponentProperties(connection,componentProperties);
}
Program: 117794
Project: 117794
Buggy source:
private static void matchContextForAttribues(ComponentProperties componentProperties,IConnParamName param,String genericVariableName,String prefixName){
  GenericConnParamName genericParam=(GenericConnParamName)param;
  String paramName=genericParam.getName();
  Properties properties=componentProperties.getProperties(paramName);
  if (properties == null) {
    String paramValue=ContextParameterUtils.getNewScriptCode(genericVariableName,ECodeLanguage.JAVA);
    setPropertyValue(componentProperties,paramName,paramValue,true);
  }
 else {
    matchContextForPrperties(properties,param,genericVariableName,prefixName);
  }
}

Fixed version (ground truth):
private static void matchContextForAttribues(ComponentProperties componentProperties,IConnParamName param,String genericVariableName,String prefixName,boolean isReuse){
  GenericConnParamName genericParam=(GenericConnParamName)param;
  String paramName=genericParam.getName();
  Properties properties=componentProperties.getProperties(paramName);
  if (properties == null) {
    String paramValue=ContextParameterUtils.getNewScriptCode(genericVariableName,ECodeLanguage.JAVA);
    setPropertyValue(componentProperties,paramName,paramValue,true);
  }
 else {
    matchContextForPrperties(properties,param,genericVariableName,prefixName,isReuse);
  }
}
Program: 117795
Project: 117795
Buggy source:
private static void matchContextForPrperties(Properties properties,IConnParamName param,String genericVariableName,String prefixName){
  for (  NamedThing nameThing : properties.getProperties()) {
    if (nameThing != null && nameThing instanceof Property) {
      Property property=(Property)nameThing;
      Object paramValue=property.getStoredValue();
      if (GenericTypeUtils.isListStringType(property) && paramValue != null) {
        String propertyValue=ContextParameterUtils.getNewScriptCode(genericVariableName,ECodeLanguage.JAVA);
        property.setTaggedValue(IGenericConstants.IS_CONTEXT_MODE,true);
        List<String> driverList=new ArrayList<String>();
        driverList.add(propertyValue);
        property.setValue(driverList);
      }
    }
  }
}

Fixed version (ground truth):
private static void matchContextForPrperties(Properties properties,IConnParamName param,String genericVariableName,String prefixName,boolean isReuse){
  for (  NamedThing nameThing : properties.getProperties()) {
    if (nameThing != null && nameThing instanceof Property) {
      Property property=(Property)nameThing;
      Object paramValue=property.getStoredValue();
      if (GenericTypeUtils.isListStringType(property) && paramValue != null) {
        String propertyValue="String_Node_Str";
        if (isReuse) {
          propertyValue=ContextParameterUtils.getNewScriptCode(genericVariableName,ECodeLanguage.JAVA);
        }
 else {
          propertyValue=ContextParameterUtils.getNewScriptCode(prefixName + ConnectionContextHelper.LINE + ContextParameterUtils.getValidParameterName(property.getName()),LanguageManager.getCurrentLanguage());
        }
        property.setTaggedValue(IGenericConstants.IS_CONTEXT_MODE,true);
        List<String> driverList=new ArrayList<String>();
        driverList.add(propertyValue);
        property.setValue(driverList);
      }
    }
  }
}
Program: 117796
Project: 117796
Buggy source:
@Override public void syncAllRoutinesForLogOn() throws SystemException {
  syncRoutineItems(getRoutines(needSyncRefProject()),true);
}

Fixed version (ground truth):
@Override public void syncAllRoutinesForLogOn() throws SystemException {
  syncRoutineItems(getRoutines(true),true);
}
Program: 117797
Project: 117797
Buggy source:
@Override public void syncAllPigudfForLogOn() throws SystemException {
  syncRoutineItems(getAllPigudf(needSyncRefProject()),true);
}

Fixed version (ground truth):
@Override public void syncAllPigudfForLogOn() throws SystemException {
  syncRoutineItems(getAllPigudf(true),true);
}
Program: 117798
Project: 117798
Buggy source:
private static void syncModule(Project project,File[] modules) throws SystemException {
  IRunProcessService service=CodeGeneratorActivator.getDefault().getRunProcessService();
  ITalendProcessJavaProject talenCodeJavaProject=service.getTalendCodeJavaProject(ERepositoryObjectType.ROUTINES,project);
  if (talenCodeJavaProject == null) {
    return;
  }
  final IFolder systemFolder=talenCodeJavaProject.getSrcSubFolder(null,JavaUtils.JAVA_ROUTINES_DIRECTORY + '/' + JavaUtils.JAVA_SYSTEM_DIRECTORY);
  syncModules(modules,systemFolder);
}

Fixed version (ground truth):
private static void syncModule(Project project,File[] modules) throws SystemException {
  IRunProcessService service=CodeGeneratorActivator.getDefault().getRunProcessService();
  ITalendProcessJavaProject talenCodeJavaProject=service.getTalendCodeJavaProject(ERepositoryObjectType.ROUTINES,project.getTechnicalLabel());
  if (talenCodeJavaProject == null) {
    return;
  }
  final IFolder systemFolder=talenCodeJavaProject.getSrcSubFolder(null,JavaUtils.JAVA_ROUTINES_DIRECTORY + '/' + JavaUtils.JAVA_SYSTEM_DIRECTORY);
  syncModules(modules,systemFolder);
}
Program: 117799
Project: 117799
Buggy source:
@Override public ITalendProcessJavaProject getTalendCodeJavaProject(ERepositoryObjectType type,Project project){
  return TalendJavaProjectManager.getTalendCodeJavaProject(type,project);
}

Fixed version (ground truth):
@Override public ITalendProcessJavaProject getTalendCodeJavaProject(ERepositoryObjectType type,String projectTechName){
  return TalendJavaProjectManager.getTalendCodeJavaProject(type,projectTechName);
}
Program: 117800
Project: 117800
Buggy source:
private void installRefCodeProject(ERepositoryObjectType codeType,AggregatorPomsHelper refHelper,Map<String,Object> argumentsMap,IProgressMonitor monitor) throws Exception, CoreException {
  if (!refHelper.getProjectRootPom().exists()) {
    return;
  }
  String projectTechName=refHelper.getProjectTechName();
  ITalendProcessJavaProject codeProject=TalendJavaProjectManager.getExistingTalendCodeProject(codeType,projectTechName);
  if (codeProject != null) {
    codeProject.buildModules(monitor,null,argumentsMap);
    codeProject.getProject().delete(false,true,monitor);
    TalendJavaProjectManager.removeFromCodeJavaProjects(codeType,projectTechName);
  }
 else {
    IFile pomFile=refHelper.getCodeFolder(codeType).getFile(TalendMavenConstants.POM_FILE_NAME);
    MavenPomCommandLauncher launcher=new MavenPomCommandLauncher(pomFile,TalendMavenConstants.GOAL_INSTALL);
    launcher.execute(monitor);
  }
}

Fixed version (ground truth):
private void installRefCodeProject(ERepositoryObjectType codeType,AggregatorPomsHelper refHelper,IProgressMonitor monitor) throws Exception, CoreException {
  if (!refHelper.getProjectRootPom().exists()) {
    return;
  }
  String projectTechName=refHelper.getProjectTechName();
  ITalendProcessJavaProject codeProject=TalendJavaProjectManager.getExistingTalendCodeProject(codeType,projectTechName);
  if (codeProject != null) {
    codeProject.buildWholeCodeProject();
    Map<String,Object> argumentsMap=new HashMap<>();
    argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_INSTALL);
    argumentsMap.put(TalendProcessArgumentConstant.ARG_PROGRAM_ARGUMENTS,TalendMavenConstants.ARG_MAIN_SKIP);
    codeProject.buildModules(monitor,null,argumentsMap);
    codeProject.getProject().delete(false,true,monitor);
    TalendJavaProjectManager.removeFromCodeJavaProjects(codeType,projectTechName);
  }
}
Program: 117801
Project: 117801
Buggy source:
private void initRefPoms(Project refProject) throws Exception {
  for (  ProjectReference ref : refProject.getProjectReferenceList(true)) {
    initRefPoms(new Project(ref.getReferencedProject()));
  }
  AggregatorPomsHelper refHelper=new AggregatorPomsHelper(refProject.getTechnicalLabel());
  refHelper.installRootPom(true);
  Map<String,Object> argumentsMap=new HashMap<>();
  argumentsMap.put(TalendProcessArgumentConstant.ARG_GOAL,TalendMavenConstants.GOAL_INSTALL);
  IProgressMonitor monitor=new NullProgressMonitor();
  installRefCodeProject(ERepositoryObjectType.ROUTINES,refHelper,argumentsMap,monitor);
  if (ProcessUtils.isRequiredPigUDFs(null,refProject)) {
    installRefCodeProject(ERepositoryObjectType.PIG_UDF,refHelper,argumentsMap,monitor);
  }
  if (ProcessUtils.isRequiredBeans(null,refProject)) {
    installRefCodeProject(ERepositoryObjectType.valueOf("String_Node_Str"),refHelper,argumentsMap,monitor);
  }
}

Fixed version (ground truth):
private void initRefPoms(Project refProject) throws Exception {
  for (  ProjectReference ref : refProject.getProjectReferenceList(true)) {
    initRefPoms(new Project(ref.getReferencedProject()));
  }
  AggregatorPomsHelper refHelper=new AggregatorPomsHelper(refProject.getTechnicalLabel());
  refHelper.installRootPom(true);
  IProgressMonitor monitor=new NullProgressMonitor();
  installRefCodeProject(ERepositoryObjectType.ROUTINES,refHelper,monitor);
  if (ProcessUtils.isRequiredPigUDFs(null,refProject)) {
    installRefCodeProject(ERepositoryObjectType.PIG_UDF,refHelper,monitor);
  }
  if (ProcessUtils.isRequiredBeans(null,refProject)) {
    installRefCodeProject(ERepositoryObjectType.valueOf("String_Node_Str"),refHelper,monitor);
  }
}
Program: 117802
Project: 117802
Buggy source:
@Override public ITalendProcessJavaProject getTalendCodeJavaProject(ERepositoryObjectType type,Project project){
  return delegateService.getTalendCodeJavaProject(type,project);
}

Fixed version (ground truth):
@Override public ITalendProcessJavaProject getTalendCodeJavaProject(ERepositoryObjectType type,String projectTechName){
  return delegateService.getTalendCodeJavaProject(type,projectTechName);
}
Program: 117804
Project: 117804
Buggy source:
private String getValueType(final String key) throws Exception {
  return getConfigTypeNode().getProperties().stream().map(SimplePropertyDefinition::getPath).filter(key::equals).findFirst().orElseThrow(() -> new IllegalArgumentException("String_Node_Str" + key));
}

Fixed version (ground truth):
private String getValueType(final ConfigTypeNode typeNode,final String key) throws Exception {
  return typeNode.getProperties().stream().filter(propertyDefinition -> TaCoKitUtil.equals(key,propertyDefinition.getPath())).map(SimplePropertyDefinition::getType).findFirst().orElseThrow(() -> new IllegalArgumentException("String_Node_Str" + key));
}
Program: 117805
Project: 117805
Buggy source:
private void refreshUi(final Map<String,String> result){
  Display.getDefault().asyncExec(() -> {
    final String dialogTitle=Messages.getString("String_Node_Str");
    if (OK.equals(result.get(STATUS))) {
      MessageDialog.openInformation(new Shell(),dialogTitle,result.get(MESSAGE));
    }
 else {
      MessageDialog.openError(new Shell(),dialogTitle,result.get(MESSAGE));
    }
  }
);
}

Fixed version (ground truth):
private void refreshUi(final Map<String,String> result){
  Display.getDefault().asyncExec(() -> {
    final String dialogTitle=Messages.getString("String_Node_Str");
    if (OK.equals(result.get(STATUS))) {
      MessageDialog.openInformation(DisplayUtils.getDefaultShell(),dialogTitle,result.get(MESSAGE));
    }
 else {
      MessageDialog.openError(DisplayUtils.getDefaultShell(),dialogTitle,result.get(MESSAGE));
    }
  }
);
}
Program: 117807
Project: 117807
Buggy source:
/** 
 * DOC ggu Comment method "checkQueryOK".
 * @param node
 * @param sql
 * @return
 */
public static boolean checkQueryOK(Node node,String sql){
  if (sql == null) {
    return false;
  }
  if (sql.contains("String_Node_Str") || sql.contains("String_Node_Str")) {
    sql=sql.replaceAll(COMMENT_REGX_PATTERN,"String_Node_Str");
  }
  sql=sql.replaceAll("String_Node_Str","String_Node_Str");
  sql=sql.replaceAll("String_Node_Str","String_Node_Str");
  sql=sql.trim();
  if ("String_Node_Str".equals(sql)) {
    return false;
  }
  java.util.regex.Pattern sqlRegex=java.util.regex.Pattern.compile(SQL_REGX,REGX_FLAG);
  Matcher matcher=sqlRegex.matcher(sql);
  if (!matcher.find()) {
    return true;
  }
  matcher.lookingAt();
  String columns=matcher.group(4).trim();
  if ("String_Node_Str".equals(columns)) {
    return false;
  }
  if ("String_Node_Str".equals(columns)) {
    return true;
  }
  boolean match=apacheRegexMatch(SQL_FUNC_REGX,REGX_FLAG,columns);
  if (!match) {
    return compareNodeTableColumnsNoFunc(node,columns);
  }
 else {
    return compareNodeTableColumnsWithFunc(node,columns);
  }
}

Fixed version (ground truth):
/** 
 * DOC ggu Comment method "checkQueryOK".
 * @param node
 * @param sql
 * @return
 */
public static boolean checkQueryOK(Node node,String sql){
  setNeedMatchQuery(false);
  if (sql == null) {
    return false;
  }
  sql=sql.replaceAll("String_Node_Str","String_Node_Str");
  sql=sql.replaceAll("String_Node_Str","String_Node_Str");
  sql=sql.trim();
  if ("String_Node_Str".equals(sql)) {
    return false;
  }
  java.util.regex.Pattern sqlRegex=java.util.regex.Pattern.compile(SQL_REGX,REGX_FLAG);
  Matcher matcher=sqlRegex.matcher(sql);
  if (!matcher.find()) {
    return true;
  }
  matcher.lookingAt();
  String columns=matcher.group(4).trim();
  if ("String_Node_Str".equals(columns)) {
    return false;
  }
  if ("String_Node_Str".equals(columns)) {
    return true;
  }
  boolean result=compareNodeTableColumns(node,columns);
  if (!result) {
    setNeedMatchQuery(!result);
  }
  return result;
}
Program: 117808
Project: 117808
Buggy source:
TableItem retrieveTableItem(ITableEntry dataMapTableEntry){
  DataMapTableView dataMapTableView=this.mapperManager.retrieveIDataMapTableView(dataMapTableEntry.getParent());
  TableItem[] tableItems=new TableItem[0];
  if (dataMapTableEntry instanceof IColumnEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForColumns().getTable().getItems();
  }
 else   if (dataMapTableEntry instanceof FilterTableEntry) {
    if (FilterTableEntry.OTHER_FILTER.equals(((FilterTableEntry)dataMapTableEntry).getFilterKind())) {
      tableItems=dataMapTableView.getTableViewerCreatorForOtherFilters().getTable().getItems();
    }
 else {
      tableItems=dataMapTableView.getTableViewerCreatorForWhereFilters().getTable().getItems();
    }
  }
 else {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  TableItem tableItem=null;
  for (  TableItem tableItem2 : tableItems) {
    if (tableItem2.getData() == dataMapTableEntry) {
      tableItem=tableItem2;
      break;
    }
  }
  getTableEntryProperties(dataMapTableEntry).setTableItem(tableItem);
  return tableItem;
}

Fixed version (ground truth):
TableItem retrieveTableItem(ITableEntry dataMapTableEntry){
  DataMapTableView dataMapTableView=this.mapperManager.retrieveIDataMapTableView(dataMapTableEntry.getParent());
  TableItem[] tableItems=new TableItem[0];
  List inputList=null;
  if (dataMapTableEntry instanceof IColumnEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForColumns().getTable().getItems();
    inputList=dataMapTableView.getTableViewerCreatorForColumns().getInputList();
  }
 else   if (dataMapTableEntry instanceof FilterTableEntry) {
    if (FilterTableEntry.OTHER_FILTER.equals(((FilterTableEntry)dataMapTableEntry).getFilterKind())) {
      tableItems=dataMapTableView.getTableViewerCreatorForOtherFilters().getTable().getItems();
      inputList=dataMapTableView.getTableViewerCreatorForOtherFilters().getInputList();
    }
 else {
      tableItems=dataMapTableView.getTableViewerCreatorForWhereFilters().getTable().getItems();
      inputList=dataMapTableView.getTableViewerCreatorForWhereFilters().getInputList();
    }
  }
 else {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  TableItem tableItem=null;
  if (inputList != null) {
    int index=inputList.indexOf(dataMapTableEntry);
    if (0 <= index && index < tableItems.length) {
      tableItem=tableItems[index];
    }
  }
  if (tableItem == null) {
    for (    TableItem tableItem2 : tableItems) {
      if (tableItem2.getData() == dataMapTableEntry) {
        tableItem=tableItem2;
        break;
      }
    }
  }
  getTableEntryProperties(dataMapTableEntry).setTableItem(tableItem);
  return tableItem;
}
Program: 117809
Project: 117809
Buggy source:
TableItem retrieveTableItem(ITableEntry dataMapTableEntry){
  DataMapTableView dataMapTableView=this.mapperManager.retrieveAbstractDataMapTableView(dataMapTableEntry.getParent());
  TableItem[] tableItems=new TableItem[0];
  if (dataMapTableEntry instanceof IColumnEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForColumns().getTable().getItems();
  }
 else   if (dataMapTableEntry instanceof FilterTableEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForFilters().getTable().getItems();
  }
 else   if (dataMapTableEntry instanceof GlobalMapEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForGlobalMap().getTable().getItems();
  }
 else   if (dataMapTableEntry instanceof ExpressionFilterEntry) {
    return null;
  }
 else {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  TableItem tableItem=null;
  for (int i=0; i < tableItems.length; i++) {
    if (tableItems[i].getData() == dataMapTableEntry) {
      tableItem=tableItems[i];
      break;
    }
  }
  getTableEntryProperties(dataMapTableEntry).setTableItem(tableItem);
  return tableItem;
}

Fixed version (ground truth):
TableItem retrieveTableItem(ITableEntry dataMapTableEntry){
  DataMapTableView dataMapTableView=this.mapperManager.retrieveAbstractDataMapTableView(dataMapTableEntry.getParent());
  TableItem[] tableItems=new TableItem[0];
  List inputList=null;
  if (dataMapTableEntry instanceof IColumnEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForColumns().getTable().getItems();
    inputList=dataMapTableView.getTableViewerCreatorForColumns().getInputList();
  }
 else   if (dataMapTableEntry instanceof FilterTableEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForFilters().getTable().getItems();
    inputList=dataMapTableView.getTableViewerCreatorForFilters().getInputList();
  }
 else   if (dataMapTableEntry instanceof GlobalMapEntry) {
    tableItems=dataMapTableView.getTableViewerCreatorForGlobalMap().getTable().getItems();
    inputList=dataMapTableView.getTableViewerCreatorForGlobalMap().getInputList();
  }
 else   if (dataMapTableEntry instanceof ExpressionFilterEntry) {
    return null;
  }
 else {
    throw new IllegalArgumentException(Messages.getString("String_Node_Str"));
  }
  TableItem tableItem=null;
  if (inputList != null) {
    int index=inputList.indexOf(dataMapTableEntry);
    if (0 <= index && index < tableItems.length) {
      tableItem=tableItems[index];
    }
  }
  if (tableItem == null) {
    for (int i=0; i < tableItems.length; i++) {
      if (tableItems[i].getData() == dataMapTableEntry) {
        tableItem=tableItems[i];
        break;
      }
    }
  }
  getTableEntryProperties(dataMapTableEntry).setTableItem(tableItem);
  return tableItem;
}
Program: 117810
Project: 117810
Buggy source:
@Override public void refresh(IElementParameter param,boolean checkErrorsWhenViewRefreshed){
  Text labelText=(Text)hashCurControls.get(param.getName());
  Object value=param.getValue();
  if (labelText == null || labelText.isDisposed()) {
    return;
  }
  boolean valueChanged=false;
  if (value == null) {
    labelText.setText("String_Node_Str");
  }
 else {
    if (!value.equals(labelText.getText())) {
      labelText.setText((String)value);
      valueChanged=true;
    }
  }
  if (checkErrorsWhenViewRefreshed || valueChanged) {
    checkErrorsForPropertiesOnly(labelText);
  }
}

Fixed version (ground truth):
@Override public void refresh(IElementParameter param,boolean checkErrorsWhenViewRefreshed){
  Text labelText=(Text)hashCurControls.get(param.getName());
  Object value=param.getValue();
  if (labelText == null || labelText.isDisposed() || !param.isNoCheck()) {
    return;
  }
  boolean valueChanged=false;
  if (value == null) {
    labelText.setText("String_Node_Str");
  }
 else {
    if (!value.equals(labelText.getText())) {
      labelText.setText((String)value);
      valueChanged=true;
    }
  }
  if (checkErrorsWhenViewRefreshed || valueChanged) {
    checkErrorsForPropertiesOnly(labelText);
  }
}
Program: 117814
Project: 117814
Buggy source:
@Override public void initializeRootPoms(){
  try {
    AggregatorPomsHelper helper=new AggregatorPomsHelper();
    helper.installRootPom(true);
    List<ProjectReference> references=ProjectManager.getInstance().getCurrentProject().getProjectReferenceList(true);
    for (    ProjectReference ref : references) {
      initRefPoms(new Project(ref.getReferencedProject()));
    }
    AggregatorPomsHelper.updateRefProjectModules(references);
    helper.updateCodeProjects(new NullProgressMonitor(),true);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}

Fixed version (ground truth):
@Override public void initializeRootPoms(){
  IProgressMonitor monitor=new NullProgressMonitor();
  try {
    AggregatorPomsHelper helper=new AggregatorPomsHelper();
    helper.installRootPom(true);
    AggregatorPomsHelper.updateAllCodesProjectNeededModules(monitor);
    List<ProjectReference> references=ProjectManager.getInstance().getCurrentProject().getProjectReferenceList(true);
    for (    ProjectReference ref : references) {
      initRefPoms(new Project(ref.getReferencedProject()));
    }
    AggregatorPomsHelper.updateRefProjectModules(references);
    helper.updateCodeProjects(monitor,true);
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
}
Program: 117815
Project: 117815
Buggy source:
public void switchComponent(INode node,IComponent delegateComponent,String oldEmfComponent,List<? extends IElementParameter> oldParms);

Fixed version (ground truth):
public void switchComponent(INode node,IComponent delegateComponent,String oldEmfComponent,List<? extends IElementParameter> oldParms,List<IMetadataTable> oldMetadataTables,List<INodeConnector> oldConnectors);
Program: 117818
Project: 117818
Buggy source:
public static void switchComponent(INode node,IComponent delegateComponent,String oldEmfComponent,List<? extends IElementParameter> oldParms){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IUnifiedComponentService.class)) {
    IUnifiedComponentService service=(IUnifiedComponentService)GlobalServiceRegister.getDefault().getService(IUnifiedComponentService.class);
    service.switchComponent(node,delegateComponent,oldEmfComponent,oldParms);
  }
}

Fixed version (ground truth):
public static void switchComponent(INode node,IComponent delegateComponent,String oldEmfComponent,List<? extends IElementParameter> oldParms,List<IMetadataTable> oldMetadataTables,List<INodeConnector> oldConnectors){
  if (GlobalServiceRegister.getDefault().isServiceRegistered(IUnifiedComponentService.class)) {
    IUnifiedComponentService service=(IUnifiedComponentService)GlobalServiceRegister.getDefault().getService(IUnifiedComponentService.class);
    service.switchComponent(node,delegateComponent,oldEmfComponent,oldParms,oldMetadataTables,oldConnectors);
  }
}
Program: 117820
Project: 117820
Buggy source:
public static void generatePom(Item item,int option){
  ProcessorUtilities.setGeneratePomOnly(true);
  option|=TalendProcessOptionConstants.GENERATE_POM_ONLY;
  option|=TalendProcessOptionConstants.GENERATE_IS_MAINJOB;
  try {
    IDesignerCoreService service=CorePlugin.getDefault().getDesignerCoreService();
    IProcess process=service.getProcessFromItem(item);
    IContext context=process.getContextManager().getDefaultContext();
    IProcessor processor=ProcessorUtilities.getProcessor(process,item.getProperty(),context);
    if (processor instanceof MavenJavaProcessor) {
      LastGenerationInfo.getInstance().clearModulesNeededWithSubjobPerJob();
      ((MavenJavaProcessor)processor).generatePom(option);
    }
    AggregatorPomsHelper.addToParentModules(AggregatorPomsHelper.getItemPomFolder(item.getProperty()).getFile(TalendMavenConstants.POM_FILE_NAME),item.getProperty());
  }
 catch (  Exception e) {
    ExceptionHandler.process(e);
  }
 finally {
    ProcessorUtilities.setGeneratePomOnly(false);
  }
}

Fixed version (ground truth):
public static void generatePom(Item item,int option){
  ProcessorUtilities.setGeneratePomOnly(true);
  option|=TalendProcessOptionConstants.GENERATE_POM_ONLY;
  option|=TalendProcessOptionConstants.GENERATE_IS_MAINJOB;
  try {
    IDesignerCoreService service=CorePlugin.getDefault().getDesignerCoreService();
    IProcess process=service.getProcessFromItem(item);
    IContext context=process.getContextManager().getDefaultContext();
    IProcessor processor=ProcessorUtilities.getProcessor(process,item.getProperty(),context);
    if (processor instanceof MavenJavaProcessor) {
      LastGenerationInfo.getInstance().clearModulesNeededWithSubjobPerJob();
      ((MavenJavaProcessor)processor).generatePom(option);
    }
    AggregatorPomsHelper.addToParentModules(AggregatorPomsHelper.getItemPomFolder(item.getProperty()).getFile(TalendMavenConstants.POM_FILE_NAME),item.getProperty());
  }
 catch (  Exception e) {
    String errorMsg="String_Node_Str" + item.getProperty().getLabel() + "String_Node_Str"+ item.getProperty().getVersion()+ "String_Node_Str";
    Exception exception=new Exception(errorMsg,e);
    ExceptionHandler.process(exception);
  }
 finally {
    ProcessorUtilities.setGeneratePomOnly(false);
  }
}