nus-yam/ex-repair huggingface dataset:
Program: 185025
Project: 185025
Buggy source:
public View getView(int position,View convertView,ViewGroup parent){
  View view;
  TextView title;
  TextView subtitle;
  ImageView icon;
  if (convertView == null) {
    view=mInflater.inflate(mResource,parent,false);
  }
 else {
    view=convertView;
  }
  title=(TextView)view.findViewById(R.id.title);
  subtitle=(TextView)view.findViewById(R.id.subtitle);
  icon=(ImageView)view.findViewById(R.id.icon);
  if (mCurrentSite == null) {
    Site site=getItem(position);
    title.setText(site.getPrettyTitle());
    subtitle.setText(site.getPrettyOrigin());
    icon.setVisibility(View.VISIBLE);
    Bitmap bmp=site.getIcon();
    if (bmp == null) {
      bmp=mDefaultIcon;
    }
    icon.setImageBitmap(bmp);
    view.setTag(site);
  }
 else {
    icon.setVisibility(View.GONE);
    String origin=mCurrentSite.getOrigin();
switch (mCurrentSite.getFeatureByIndex(position)) {
case Site.FEATURE_WEB_STORAGE:
      long usageValue=WebStorage.getInstance().getUsageForOrigin(origin);
    String usage=sizeValueToString(usageValue) + "String_Node_Str" + sMBStored;
  title.setText(R.string.webstorage_clear_data_title);
subtitle.setText(usage);
break;
case Site.FEATURE_GEOLOCATION:
title.setText(R.string.geolocation_settings_page_title);
boolean allowed=GeolocationPermissions.getInstance().getAllowed(origin);
subtitle.setText(allowed ? R.string.geolocation_settings_page_summary_allowed : R.string.geolocation_settings_page_summary_not_allowed);
break;
}
}
return view;
}

Fixed version (ground truth):
public View getView(int position,View convertView,ViewGroup parent){
  View view;
  TextView title;
  TextView subtitle;
  ImageView icon;
  if (convertView == null) {
    view=mInflater.inflate(mResource,parent,false);
  }
 else {
    view=convertView;
  }
  title=(TextView)view.findViewById(R.id.title);
  subtitle=(TextView)view.findViewById(R.id.subtitle);
  icon=(ImageView)view.findViewById(R.id.icon);
  if (mCurrentSite == null) {
    setTitle(getString(R.string.pref_extras_website_settings));
    Site site=getItem(position);
    title.setText(site.getPrettyTitle());
    subtitle.setText(site.getPrettyOrigin());
    icon.setVisibility(View.VISIBLE);
    Bitmap bmp=site.getIcon();
    if (bmp == null) {
      bmp=mDefaultIcon;
    }
    icon.setImageBitmap(bmp);
    view.setTag(site);
  }
 else {
    setTitle(mCurrentSite.getPrettyTitle());
    icon.setVisibility(View.GONE);
    String origin=mCurrentSite.getOrigin();
switch (mCurrentSite.getFeatureByIndex(position)) {
case Site.FEATURE_WEB_STORAGE:
      long usageValue=WebStorage.getInstance().getUsageForOrigin(origin);
    String usage=sizeValueToString(usageValue) + "String_Node_Str" + sMBStored;
  title.setText(R.string.webstorage_clear_data_title);
subtitle.setText(usage);
break;
case Site.FEATURE_GEOLOCATION:
title.setText(R.string.geolocation_settings_page_title);
boolean allowed=GeolocationPermissions.getInstance().getAllowed(origin);
subtitle.setText(allowed ? R.string.geolocation_settings_page_summary_allowed : R.string.geolocation_settings_page_summary_not_allowed);
break;
}
}
return view;
}
Program: 185030
Project: 185030
Buggy source:
@Override public String getString(int columnIndex){
  if ((mPos != -1 && mHistoryCursor != null)) {
switch (columnIndex) {
case SUGGEST_COLUMN_INTENT_ACTION_ID:
      if (mHistoryCount > mPos) {
        return Intent.ACTION_VIEW;
      }
 else {
        return Intent.ACTION_SEARCH;
      }
case SUGGEST_COLUMN_INTENT_DATA_ID:
    if (mHistoryCount > mPos) {
      return mHistoryCursor.getString(1);
    }
 else {
      return null;
    }
case SUGGEST_COLUMN_TEXT_1_ID:
  if (mHistoryCount > mPos) {
    return getHistoryTitle();
  }
 else   if (!mBeyondCursor) {
    return mSuggestCursor.getString(1);
  }
 else {
    return mString;
  }
case SUGGEST_COLUMN_TEXT_2_ID:
if (mHistoryCount > mPos) {
  return getHistorySubtitle();
}
 else if (!mBeyondCursor) {
  return mSuggestCursor.getString(2);
}
 else {
  return getContext().getString(R.string.search_the_web);
}
case SUGGEST_COLUMN_ICON_1_ID:
if (mHistoryCount > mPos) {
if (mHistoryCursor.getInt(3) == 1) {
  return new Integer(R.drawable.ic_search_category_bookmark).toString();
}
 else {
  return new Integer(R.drawable.ic_search_category_history).toString();
}
}
 else {
return new Integer(R.drawable.ic_search_category_suggest).toString();
}
case SUGGEST_COLUMN_ICON_2_ID:
return new String("String_Node_Str");
case SUGGEST_COLUMN_QUERY_ID:
if (mHistoryCount > mPos) {
return null;
}
 else if (!mBeyondCursor) {
return mSuggestCursor.getString(3);
}
 else {
return mString;
}
case SUGGEST_COLUMN_FORMAT:
return "String_Node_Str";
}
}
return null;
}

Fixed version (ground truth):
@Override public String getString(int columnIndex){
  if ((mPos != -1 && mHistoryCursor != null)) {
switch (columnIndex) {
case SUGGEST_COLUMN_INTENT_ACTION_ID:
      if (mHistoryCount > mPos) {
        return Intent.ACTION_VIEW;
      }
 else {
        return Intent.ACTION_SEARCH;
      }
case SUGGEST_COLUMN_INTENT_DATA_ID:
    if (mHistoryCount > mPos) {
      return mHistoryCursor.getString(1);
    }
 else {
      return null;
    }
case SUGGEST_COLUMN_TEXT_1_ID:
  if (mHistoryCount > mPos) {
    return getHistoryTitle();
  }
 else   if (!mBeyondCursor) {
    return mSuggestCursor.getString(1);
  }
 else {
    return mString;
  }
case SUGGEST_COLUMN_TEXT_2_ID:
if (mHistoryCount > mPos) {
  return getHistorySubtitle();
}
 else if (!mBeyondCursor) {
  return mSuggestCursor.getString(2);
}
 else {
  return getContext().getString(R.string.search_the_web);
}
case SUGGEST_COLUMN_ICON_1_ID:
if (mHistoryCount > mPos) {
if (mHistoryCursor.getInt(3) == 1) {
  return Integer.valueOf(R.drawable.ic_search_category_bookmark).toString();
}
 else {
  return Integer.valueOf(R.drawable.ic_search_category_history).toString();
}
}
 else {
return Integer.valueOf(R.drawable.ic_search_category_suggest).toString();
}
case SUGGEST_COLUMN_ICON_2_ID:
return "String_Node_Str";
case SUGGEST_COLUMN_QUERY_ID:
if (mHistoryCount > mPos) {
return null;
}
 else if (!mBeyondCursor) {
return mSuggestCursor.getString(3);
}
 else {
return mString;
}
case SUGGEST_COLUMN_FORMAT:
return "String_Node_Str";
}
}
return null;
}
Program: 185033
Project: 185033
Buggy source:
@SuppressWarnings("String_Node_Str") public <T>Optional<T> getCachedValue(Class<T> objectType){
  T result=null;
  try {
    if (Integer.class.equals(objectType)) {
      result=(T)integerValue.getValue();
    }
 else     if (String.class.equals(objectType)) {
      result=(T)cachedStringValue.getValue();
    }
 else     if (Boolean.class.equals(objectType)) {
      result=(T)booleanValue.getValue();
    }
 else     if (Float.class.equals(objectType)) {
      result=(T)floatValue.getValue();
    }
 else     if (Double.class.equals(objectType)) {
      result=(T)doubleValue.getValue();
    }
 else     if (Long.class.equals(objectType)) {
      result=(T)longValue.getValue();
    }
 else     if (Class.class.equals(objectType)) {
      result=(T)classValue.getValue();
    }
  }
 catch (  Exception e) {
  }
  if (result == null) {
    return Optional.absent();
  }
 else {
    return Optional.of(result);
  }
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public <T>Optional<T> getCachedValue(Class<T> objectType){
  T result=null;
  try {
    if (Integer.class.equals(objectType)) {
      result=(T)integerValue.getValue();
    }
 else     if (String.class.equals(objectType)) {
      result=(T)cachedStringValue.getValue();
    }
 else     if (Boolean.class.equals(objectType)) {
      result=(T)booleanValue.getValue();
    }
 else     if (Float.class.equals(objectType)) {
      result=(T)floatValue.getValue();
    }
 else     if (Double.class.equals(objectType)) {
      result=(T)doubleValue.getValue();
    }
 else     if (Long.class.equals(objectType)) {
      result=(T)longValue.getValue();
    }
 else     if (Class.class.equals(objectType)) {
      result=(T)classValue.getValue();
    }
  }
 catch (  Exception e) {
    logger.warn("String_Node_Str",e);
  }
  if (result == null) {
    return Optional.absent();
  }
 else {
    return Optional.of(result);
  }
}
Program: 185034
Project: 185034
Buggy source:
synchronized void deleteZkProperty(String key) throws Exception {
  final String path=configRootPath + "String_Node_Str" + key;
  try {
    client.delete().forPath(path);
  }
 catch (  NoNodeException exc) {
  }
}

Fixed version (ground truth):
synchronized void deleteZkProperty(String key) throws Exception {
  final String path=configRootPath + "String_Node_Str" + key;
  try {
    client.delete().forPath(path);
  }
 catch (  NoNodeException exc) {
    logger.warn("String_Node_Str",exc);
  }
}
Program: 185035
Project: 185035
Buggy source:
public final Map<String,Collection<String>> getDimensions(){
  return dimensions;
}

Fixed version (ground truth):
@JsonProperty("String_Node_Str") public final Map<String,Collection<String>> getDimensions(){
  return dimensions;
}
Program: 185036
Project: 185036
Buggy source:
public final void setDimensions(Map<String,Collection<String>> dimensions){
  this.dimensions=dimensions;
}

Fixed version (ground truth):
@JsonProperty("String_Node_Str") public final void setDimensions(Map<String,Collection<String>> dimensions){
  this.dimensions=dimensions;
}
Program: 185037
Project: 185037
Buggy source:
/** 
 * Load properties from the specified configuration into system wide configuration
 */
public static void loadPropertiesFromConfiguration(AbstractConfiguration config){
  if (instance instanceof AggregatedConfiguration) {
    ((AggregatedConfiguration)instance).addConfiguration(config);
  }
 else {
    Properties props=ConfigurationUtils.getProperties(config);
    ConfigurationUtils.loadProperties(props,instance);
  }
}

Fixed version (ground truth):
/** 
 * Load properties from the specified configuration into system wide configuration
 */
public static void loadPropertiesFromConfiguration(AbstractConfiguration config){
  if (instance == null) {
    instance=getConfigInstance();
  }
  if (instance instanceof AggregatedConfiguration) {
    ((AggregatedConfiguration)instance).addConfiguration(config);
  }
 else {
    Properties props=ConfigurationUtils.getProperties(config);
    ConfigurationUtils.loadProperties(props,instance);
  }
}
Program: 185038
Project: 185038
Buggy source:
/** 
 * Load the specified properties into system wide configuration
 */
public static void loadProperties(Properties properties){
  ConfigurationUtils.loadProperties(properties,instance);
}

Fixed version (ground truth):
/** 
 * Load the specified properties into system wide configuration
 */
public static void loadProperties(Properties properties){
  if (instance == null) {
    instance=getConfigInstance();
  }
  ConfigurationUtils.loadProperties(properties,instance);
}
Program: 185039
Project: 185039
Buggy source:
private boolean updateValue(Object newValue){
  String nv=(newValue == null) ? null : newValue.toString();
synchronized (lock) {
    if ((nv == null && stringValue == null) || (nv != null && nv.equals(stringValue))) {
      return false;
    }
    stringValue=nv;
    cachedStringValue.flush();
    booleanValue.flush();
    integerValue.flush();
    floatValue.flush();
    classValue.flush();
    doubleValue.flush();
    longValue.flush();
    changedTime=System.currentTimeMillis();
    return true;
  }
}

Fixed version (ground truth):
boolean updateValue(Object newValue){
  String nv=(newValue == null) ? null : newValue.toString();
synchronized (lock) {
    if ((nv == null && stringValue == null) || (nv != null && nv.equals(stringValue))) {
      return false;
    }
    stringValue=nv;
    cachedStringValue.flush();
    booleanValue.flush();
    integerValue.flush();
    floatValue.flush();
    classValue.flush();
    doubleValue.flush();
    longValue.flush();
    changedTime=System.currentTimeMillis();
    return true;
  }
}
Program: 185040
Project: 185040
Buggy source:
protected PropertyWrapper(String propName,V defaultValue){
  this.prop=DynamicProperty.getInstance(propName);
  this.defaultValue=defaultValue;
  Class c=getClass();
  if (!SUBCLASSES_WITH_NO_CALLBACK.containsKey(c)) {
    this.prop.addCallback(new Runnable(){
      public void run(){
        propertyChanged();
      }
    }
);
    this.prop.addValidator(new PropertyChangeValidator(){
      @Override public void validate(      String newValue){
        PropertyWrapper.this.validate(newValue);
      }
    }
);
  }
}

Fixed version (ground truth):
protected PropertyWrapper(String propName,V defaultValue){
  this.prop=DynamicProperty.getInstance(propName);
  this.defaultValue=defaultValue;
  Class c=getClass();
  if (!SUBCLASSES_WITH_NO_CALLBACK.containsKey(c)) {
    this.prop.addCallback(new Runnable(){
      public void run(){
        propertyChanged();
      }
    }
);
    this.prop.addValidator(new PropertyChangeValidator(){
      @Override public void validate(      String newValue){
        PropertyWrapper.this.validate(newValue);
      }
    }
);
    try {
      if (this.prop.getString() != null) {
        this.validate(this.prop.getString());
      }
    }
 catch (    ValidationException e) {
      logger.warn("String_Node_Str",e);
      prop.updateValue(defaultValue);
    }
  }
}
Program: 185041
Project: 185041
Buggy source:
static File createConfigFile(String prefix) throws Exception {
  configFile=File.createTempFile(prefix,"String_Node_Str");
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(configFile),"String_Node_Str"));
  writer.write("String_Node_Str");
  writer.newLine();
  writer.write("String_Node_Str");
  writer.newLine();
  writer.close();
  System.err.println(configFile.getPath() + "String_Node_Str");
  return configFile;
}

Fixed version (ground truth):
static File createConfigFile(String prefix) throws Exception {
  configFile=File.createTempFile(prefix,"String_Node_Str");
  BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(configFile),"String_Node_Str"));
  writer.write("String_Node_Str");
  writer.newLine();
  writer.write("String_Node_Str");
  writer.newLine();
  writer.write("String_Node_Str");
  writer.newLine();
  writer.close();
  System.err.println(configFile.getPath() + "String_Node_Str");
  return configFile;
}
Program: 185042
Project: 185042
Buggy source:
/** 
 * Start polling the configuration source with the specified scheduler.
 * @param source PolledConfigurationSource to poll
 * @param scheduler AbstractPollingScheduler whose {@link AbstractPollingScheduler#schedule(Runnable)} will beused to determine the polling schedule
 */
public void startPolling(PolledConfigurationSource source,AbstractPollingScheduler scheduler){
  this.scheduler=scheduler;
  this.source=source;
  init(source,scheduler);
  scheduler.startPolling(source,this);
}

Fixed version (ground truth):
/** 
 * Start polling the configuration source with the specified scheduler.
 * @param source PolledConfigurationSource to poll
 * @param scheduler AbstractPollingScheduler whose {@link AbstractPollingScheduler#schedule(Runnable)} will beused to determine the polling schedule
 */
public synchronized void startPolling(PolledConfigurationSource source,AbstractPollingScheduler scheduler){
  this.scheduler=scheduler;
  this.source=source;
  init(source,scheduler);
  scheduler.startPolling(source,this);
}
Program: 185043
Project: 185043
Buggy source:
protected DynamicBooleanProperty(String propName,boolean defaultValue){
  super(propName,Boolean.valueOf(defaultValue));
}

Fixed version (ground truth):
public DynamicBooleanProperty(String propName,boolean defaultValue){
  super(propName,Boolean.valueOf(defaultValue));
}
Program: 185044
Project: 185044
Buggy source:
protected DynamicDoubleProperty(String propName,double defaultValue){
  super(propName,Double.valueOf(defaultValue));
}

Fixed version (ground truth):
public DynamicDoubleProperty(String propName,double defaultValue){
  super(propName,Double.valueOf(defaultValue));
}
Program: 185045
Project: 185045
Buggy source:
protected DynamicFloatProperty(String propName,float defaultValue){
  super(propName,Float.valueOf(defaultValue));
}

Fixed version (ground truth):
public DynamicFloatProperty(String propName,float defaultValue){
  super(propName,Float.valueOf(defaultValue));
}
Program: 185046
Project: 185046
Buggy source:
protected DynamicIntProperty(String propName,int defaultValue){
  super(propName,Integer.valueOf(defaultValue));
}

Fixed version (ground truth):
public DynamicIntProperty(String propName,int defaultValue){
  super(propName,Integer.valueOf(defaultValue));
}
Program: 185047
Project: 185047
Buggy source:
protected void propertyChanged(){
}

Fixed version (ground truth):
/** 
 * A method invoked when the underlying string property is changed. Default implementation does nothing.  Subclass can override this method  to receive callback. 
 */
protected void propertyChanged(){
}
Program: 185048
Project: 185048
Buggy source:
protected void load(){
  if (delegate.get() == null) {
    return;
  }
  final List<String> strings=Arrays.asList(delegate.get().split(delimiter));
  List<T> list=new ArrayList<T>(strings.size());
  for (  String s : strings) {
    list.add(from(s));
  }
  values=Collections.unmodifiableList(list);
}

Fixed version (ground truth):
protected void load(){
  if (delegate.get() == null) {
    values=defaultValues;
  }
 else {
    values=transform(split(delegate.get()));
  }
}
Program: 185049
Project: 185049
Buggy source:
public List<T> get(){
  return values;
}

Fixed version (ground truth):
/** 
 * Get the list type from the underlying dynamic string property. If the property is undefined, this method returns the default list value.   
 */
public List<T> get(){
  return values;
}
Program: 185050
Project: 185050
Buggy source:
public DynamicListProperty(String propName,List<T> defaultValue,String delimiterRegex){
  this(propName,(String)null,delimiterRegex);
  if (values == null && defaultValue != null) {
    values=Collections.unmodifiableList(defaultValue);
  }
}

Fixed version (ground truth):
/** 
 * Create the dynamic list property using the splitter and default list value passed in  from the arguments.
 */
public DynamicListProperty(String propName,List<T> defaultValue,Splitter splitter){
  setup(propName,defaultValue,splitter);
}
Program: 185051
Project: 185051
Buggy source:
protected abstract T from(String value);

Fixed version (ground truth):
/** 
 * Construct the generic type from string.
 */
protected abstract T from(String value);
Program: 185052
Project: 185052
Buggy source:
/** 
 * Add the callback to be triggered when the value of the property is changed
 * @param callback
 */
public void addCallback(Runnable callback){
  if (callback != null)   delegate.addCallback(callback);
}

Fixed version (ground truth):
/** 
 * Add the callback to be triggered when the value of the property is changed
 */
public void addCallback(Runnable callback){
  if (callback != null)   delegate.addCallback(callback);
}
Program: 185053
Project: 185053
Buggy source:
protected DynamicLongProperty(String propName,long defaultValue){
  super(propName,Long.valueOf(defaultValue));
}

Fixed version (ground truth):
public DynamicLongProperty(String propName,long defaultValue){
  super(propName,Long.valueOf(defaultValue));
}
Program: 185054
Project: 185054
Buggy source:
private static String getNextLoad(Configuration propConfig,String... nextLoadPropertyKeys){
  String nextLoadKeyToUse=null;
  for (  String key : nextLoadPropertyKeys) {
    if (propConfig.getProperty(key) != null) {
      nextLoadKeyToUse=key;
      break;
    }
  }
  if (nextLoadKeyToUse == null) {
    return null;
  }
  ConcurrentMapConfiguration config=new ConcurrentMapConfiguration();
  config.setDelimiterParsingDisabled(true);
  copyProperties(ConfigurationManager.getConfigInstance(),config);
  copyProperties(propConfig,config);
  String nextLoad=config.getString(nextLoadKeyToUse);
  propConfig.clearProperty(nextLoadKeyToUse);
  return nextLoad;
}

Fixed version (ground truth):
private static String getNextLoad(Configuration propConfig,String... nextLoadPropertyKeys){
  String nextLoadKeyToUse=null;
  for (  String key : nextLoadPropertyKeys) {
    if (propConfig.getProperty(key) != null) {
      nextLoadKeyToUse=key;
      break;
    }
  }
  if (nextLoadKeyToUse == null) {
    return null;
  }
  ConcurrentMapConfiguration config=new ConcurrentMapConfiguration();
  copyProperties(ConfigurationManager.getConfigInstance(),config);
  copyProperties(propConfig,config);
  List<Object> list=config.getList(nextLoadKeyToUse);
  StringBuilder sb=new StringBuilder();
  for (  Object value : list) {
    sb.append(value).append("String_Node_Str");
  }
  String nextLoad=sb.toString();
  propConfig.clearProperty(nextLoadKeyToUse);
  return nextLoad;
}
Program: 185055
Project: 185055
Buggy source:
@Override public String toString(){
  return "String_Node_Str" + prop.getName() + "String_Node_Str"+ prop.getString(defaultValue.toString())+ "String_Node_Str";
}

Fixed version (ground truth):
@Override public String toString(){
  return "String_Node_Str" + prop.getName() + "String_Node_Str"+ prop.getString(String.valueOf(defaultValue))+ "String_Node_Str";
}
Program: 185056
Project: 185056
Buggy source:
/** 
 * Adds a callback to the DynamicProperty to run when the value of the propety is updated.
 */
public void addCallback(Runnable r){
  callbacks.add(r);
}

Fixed version (ground truth):
/** 
 * Adds a callback to the DynamicProperty to run when the value of the propety is updated.
 */
public void addCallback(Runnable r){
  if (r == null) {
    throw new NullPointerException("String_Node_Str");
  }
  callbacks.add(r);
}
Program: 185057
Project: 185057
Buggy source:
public DynamoDbConfigurationSource(AmazonDynamoDB dbClient){
  this.dbClient=dbClient;
  String table=tableName.get();
  Map<String,Object> map=load(table,keyAttributeName.get(),valueAttributeName.get());
  log.info("String_Node_Str" + table);
}

Fixed version (ground truth):
public DynamoDbConfigurationSource(AmazonDynamoDB dbClient){
  this.dbClient=dbClient;
  String table=tableName.get();
  load(table,keyAttributeName.get(),valueAttributeName.get());
  log.info("String_Node_Str" + table);
}
Program: 185058
Project: 185058
Buggy source:
static void updateValues(AmazonDynamoDB dbClient,String tableName){
  Map<String,AttributeValueUpdate> item1=new HashMap<String,AttributeValueUpdate>(1);
  item1.put(DynamoDbConfigurationSource.defaultValueAttribute,new AttributeValueUpdate().withAction(AttributeAction.PUT).withValue(new AttributeValue().withS("String_Node_Str")));
  dbClient.updateItem(new UpdateItemRequest().withTableName(tableName).withKey(new Key().withHashKeyElement(new AttributeValue().withS("String_Node_Str"))).withAttributeUpdates(item1));
  HashMap<String,AttributeValue> item2=new HashMap<String,AttributeValue>(1);
  item1.put(DynamoDbConfigurationSource.defaultValueAttribute,new AttributeValueUpdate().withAction(AttributeAction.PUT).withValue(new AttributeValue().withS("String_Node_Str")));
  dbClient.updateItem(new UpdateItemRequest().withTableName(tableName).withKey(new Key().withHashKeyElement(new AttributeValue().withS("String_Node_Str"))).withAttributeUpdates(item1));
  HashMap<String,AttributeValue> item3=new HashMap<String,AttributeValue>(1);
  item1.put(DynamoDbConfigurationSource.defaultValueAttribute,new AttributeValueUpdate().withAction(AttributeAction.PUT).withValue(new AttributeValue().withS("String_Node_Str")));
  dbClient.updateItem(new UpdateItemRequest().withTableName(tableName).withKey(new Key().withHashKeyElement(new AttributeValue().withS("String_Node_Str"))).withAttributeUpdates(item1));
}

Fixed version (ground truth):
static void updateValues(AmazonDynamoDB dbClient,String tableName){
  Map<String,AttributeValueUpdate> item1=new HashMap<String,AttributeValueUpdate>(1);
  item1.put(DynamoDbConfigurationSource.defaultValueAttribute,new AttributeValueUpdate().withAction(AttributeAction.PUT).withValue(new AttributeValue().withS("String_Node_Str")));
  dbClient.updateItem(new UpdateItemRequest().withTableName(tableName).withKey(new Key().withHashKeyElement(new AttributeValue().withS("String_Node_Str"))).withAttributeUpdates(item1));
  HashMap<String,AttributeValueUpdate> item2=new HashMap<String,AttributeValueUpdate>(1);
  item2.put(DynamoDbConfigurationSource.defaultValueAttribute,new AttributeValueUpdate().withAction(AttributeAction.PUT).withValue(new AttributeValue().withS("String_Node_Str")));
  dbClient.updateItem(new UpdateItemRequest().withTableName(tableName).withKey(new Key().withHashKeyElement(new AttributeValue().withS("String_Node_Str"))).withAttributeUpdates(item2));
  HashMap<String,AttributeValueUpdate> item3=new HashMap<String,AttributeValueUpdate>(1);
  item3.put(DynamoDbConfigurationSource.defaultValueAttribute,new AttributeValueUpdate().withAction(AttributeAction.PUT).withValue(new AttributeValue().withS("String_Node_Str")));
  dbClient.updateItem(new UpdateItemRequest().withTableName(tableName).withKey(new Key().withHashKeyElement(new AttributeValue().withS("String_Node_Str"))).withAttributeUpdates(item3));
}
Program: 185064
Project: 185064
Buggy source:
@Override protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper){
  boolean needW14=false;
  if (this.jaxbElement.getDocId14() != null) {
    needW14=true;
  }
 else   if (this.jaxbElement.getConflictMode() != null) {
    needW14=true;
  }
 else   if (this.jaxbElement.getDiscardImageEditingData() != null) {
    needW14=true;
  }
 else   if (this.jaxbElement.getDefaultImageDpi() != null) {
    needW14=true;
  }
  boolean needW15=false;
  if (this.jaxbElement.getChartTrackingRefBased() != null) {
    needW15=true;
  }
 else   if (this.jaxbElement.getDocId15() != null) {
    needW15=true;
  }
  String mceIgnorableVal="String_Node_Str";
  if (needW14) {
    mceIgnorableVal="String_Node_Str";
  }
  if (needW15) {
    mceIgnorableVal+="String_Node_Str";
  }
  log.debug(mceIgnorableVal);
  this.jaxbElement.setIgnorable(mceIgnorableVal);
}

Fixed version (ground truth):
@Override protected void setMceIgnorable(McIgnorableNamespaceDeclarator namespacePrefixMapper){
  boolean needW14=false;
  if (this.jaxbElement.getDocId14() != null) {
    needW14=true;
  }
 else   if (this.jaxbElement.getConflictMode() != null) {
    needW14=true;
  }
 else   if (this.jaxbElement.getDiscardImageEditingData() != null) {
    needW14=true;
  }
 else   if (this.jaxbElement.getDefaultImageDpi() != null) {
    needW14=true;
  }
  boolean needW15=false;
  if (this.jaxbElement.getChartTrackingRefBased() != null) {
    needW15=true;
  }
 else   if (this.jaxbElement.getDocId15() != null) {
    needW15=true;
  }
  String mceIgnorableVal="String_Node_Str";
  if (needW14) {
    mceIgnorableVal="String_Node_Str";
  }
  if (needW15) {
    mceIgnorableVal+="String_Node_Str";
  }
  log.debug(mceIgnorableVal);
  namespacePrefixMapper.setMcIgnorable(mceIgnorableVal);
  this.jaxbElement.setIgnorable(mceIgnorableVal);
}
Program: 185065
Project: 185065
Buggy source:
/** 
 * Example of setting mc:Ignorable="w15", which you must do if you add eg w15:collapsed and want Word <=14 to be happy.
 * @throws InvalidFormatException
 * @throws JAXBException
 */
@Test public void testIgnorableSet() throws InvalidFormatException, JAXBException {
  Document document=new Document();
  Body body=new Body();
  document.setBody(body);
  P p=new P();
  PPr ppr=new PPr();
  p.setPPr(ppr);
  body.getContent().add(p);
  ppr.setCollapsed(new BooleanDefaultTrue());
  document.setIgnorable("String_Node_Str");
  MainDocumentPart mdp=new MainDocumentPart();
  mdp.setJaxbElement(document);
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  mdp.marshal(baos);
  String result=(new String(baos.toByteArray()));
  assertTrue(result.contains("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Example of setting mc:Ignorable="w15", which you must do if you add eg w15:collapsed and want Word <=14 to be happy.
 * @throws InvalidFormatException
 * @throws JAXBException
 */
@Test public void testIgnorableSet() throws InvalidFormatException, JAXBException {
  Document document=new Document();
  Body body=new Body();
  document.setBody(body);
  P p=new P();
  PPr ppr=new PPr();
  p.setPPr(ppr);
  body.getContent().add(p);
  ppr.setCollapsed(new BooleanDefaultTrue());
  document.setIgnorable("String_Node_Str");
  MainDocumentPart mdp=new MainDocumentPart();
  mdp.setJaxbElement(document);
  ByteArrayOutputStream baos=new ByteArrayOutputStream();
  mdp.marshal(baos);
  String result=(new String(baos.toByteArray()));
  System.out.println(result);
  assertTrue(result.contains("String_Node_Str"));
  int startPos=result.indexOf("String_Node_Str");
  String startTag=result.substring(startPos,result.indexOf("String_Node_Str",startPos));
  assertTrue(startTag.contains("String_Node_Str"));
}
Program: 185067
Project: 185067
Buggy source:
/** 
 * Clone this JAXB object
 * @param value
 * @param jc
 * @return
 */
public static <T>T deepCopy(T value,JAXBContext jc){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  try {
    @SuppressWarnings("String_Node_Str") Class<T> clazz=(Class<T>)value.getClass();
    JAXBElement<T> contentObject=new JAXBElement<T>(new QName(clazz.getSimpleName()),clazz,value);
    JAXBSource source=new JAXBSource(jc,contentObject);
    JAXBElement<T> elem=jc.createUnmarshaller().unmarshal(source,clazz);
    T res;
    if (value instanceof JAXBElement<?>) {
      @SuppressWarnings("String_Node_Str") T resT=(T)elem;
      res=resT;
    }
 else {
      @SuppressWarnings("String_Node_Str") T resT=(T)elem.getValue();
      res=resT;
    }
    return res;
  }
 catch (  JAXBException ex) {
    throw new IllegalArgumentException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Clone this JAXB object
 * @param value
 * @param jc
 * @return
 */
public static <T>T deepCopy(T value,JAXBContext jc){
  if (value == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  JAXBElement<T> elem;
  try {
    if (value instanceof JAXBElement<?>) {
      Object wrapped=((JAXBElement)value).getValue();
      @SuppressWarnings("String_Node_Str") Class clazz=wrapped.getClass();
      JAXBElement contentObject=new JAXBElement(new QName(clazz.getSimpleName()),clazz,wrapped);
      JAXBSource source=new JAXBSource(jc,contentObject);
      elem=jc.createUnmarshaller().unmarshal(source,clazz);
    }
 else {
      @SuppressWarnings("String_Node_Str") Class<T> clazz=(Class<T>)value.getClass();
      JAXBElement<T> contentObject=new JAXBElement<T>(new QName(clazz.getSimpleName()),clazz,value);
      JAXBSource source=new JAXBSource(jc,contentObject);
      elem=jc.createUnmarshaller().unmarshal(source,clazz);
    }
    T res;
    if (value instanceof JAXBElement<?>) {
      @SuppressWarnings("String_Node_Str") T resT=(T)elem;
      res=resT;
    }
 else {
      @SuppressWarnings("String_Node_Str") T resT=(T)elem.getValue();
      res=resT;
    }
    return res;
  }
 catch (  JAXBException ex) {
    throw new IllegalArgumentException(ex);
  }
}
Program: 185070
Project: 185070
Buggy source:
/** 
 * Marshal the content tree rooted at <tt>jaxbElement</tt> into an output stream
 * @param os XML will be added to this stream.
 * @param namespacePrefixMapper namespacePrefixMapper
 * @throws JAXBException If any unexpected problem occurs during the marshalling.
 */
public void marshal(java.io.OutputStream os,Object namespacePrefixMapper) throws JAXBException {
  try {
    Marshaller marshaller=jc.createMarshaller();
    if (Docx4jProperties.getProperty("String_Node_Str",true)) {
      marshaller.setProperty("String_Node_Str",true);
    }
    NamespacePrefixMapperUtils.setProperty(marshaller,namespacePrefixMapper);
    log.debug("String_Node_Str" + this.getClass().getName());
    getContents();
    setMceIgnorable((McIgnorableNamespaceDeclarator)namespacePrefixMapper);
    if (false) {
      Document doc=XmlUtils.marshaltoW3CDomDocument(jaxbElement,jc);
      log.debug("String_Node_Str" + XmlUtils.w3CDomNodeToString(doc));
      Init.init();
      Canonicalizer c=Canonicalizer.getInstance(CanonicalizationMethod.EXCLUSIVE);
      byte[] bytes=c.canonicalizeSubtree(doc,this.getMceIgnorable());
      IOUtils.write(bytes,os);
    }
 else {
      marshaller.marshal(jaxbElement,os);
    }
  }
 catch (  Docx4JException e) {
    log.error(e.getMessage(),e);
    throw new JAXBException(e);
  }
catch (  JAXBException e) {
    log.error(e.getMessage(),e);
    throw e;
  }
catch (  Exception e) {
    log.error(e.getMessage(),e);
    throw new JAXBException(e);
  }
}

Fixed version (ground truth):
/** 
 * Marshal the content tree rooted at <tt>jaxbElement</tt> into an output stream
 * @param os XML will be added to this stream.
 * @param namespacePrefixMapper namespacePrefixMapper
 * @throws JAXBException If any unexpected problem occurs during the marshalling.
 */
public void marshal(java.io.OutputStream os,Object namespacePrefixMapper) throws JAXBException {
  try {
    Marshaller marshaller=jc.createMarshaller();
    if (Docx4jProperties.getProperty("String_Node_Str",true)) {
      marshaller.setProperty("String_Node_Str",true);
    }
    NamespacePrefixMapperUtils.setProperty(marshaller,namespacePrefixMapper);
    log.debug("String_Node_Str" + this.getClass().getName());
    getContents();
    setMceIgnorable((McIgnorableNamespaceDeclarator)namespacePrefixMapper);
    if (false) {
      Document doc=XmlUtils.marshaltoW3CDomDocument(jaxbElement,jc);
      log.debug("String_Node_Str" + XmlUtils.w3CDomNodeToString(doc));
      Init.init();
      Canonicalizer c=Canonicalizer.getInstance(CanonicalizationMethod.EXCLUSIVE);
      byte[] bytes=c.canonicalizeSubtree(doc,this.getMceIgnorable());
      IOUtils.write(bytes,os);
    }
 else {
      marshaller.marshal(jaxbElement,os);
    }
    ((McIgnorableNamespaceDeclarator)namespacePrefixMapper).setMcIgnorable(null);
  }
 catch (  Docx4JException e) {
    log.error(e.getMessage(),e);
    throw new JAXBException(e);
  }
catch (  JAXBException e) {
    log.error(e.getMessage(),e);
    throw e;
  }
catch (  Exception e) {
    log.error(e.getMessage(),e);
    throw new JAXBException(e);
  }
}
Program: 185071
Project: 185071
Buggy source:
public static String getPreferredPrefix(String namespaceUri){
  return NamespacePrefixMappings.getPreferredPrefixStatic(namespaceUri,null,false);
}

Fixed version (ground truth):
/** 
 * Returns a preferred prefix for the given namespace URI. This method is intended to be overrided by a derived class.
 * @param namespaceUri The namespace URI for which the prefix needs to be found. Never be null. "" is used to denote the default namespace.
 * @param suggestion When the content tree has a suggestion for the prefix to the given namespaceUri, that suggestion is passed as a parameter. Typically this value comes from QName.getPrefix() to show the preference of the content tree. This parameter may be null, and this parameter may represent an already occupied prefix. 
 * @param requirePrefix If this method is expected to return non-empty prefix. When this flag is true, it means that the given namespace URI cannot be set as the default namespace.
 * @return null if there's no preferred prefix for the namespace URI. In this case, the system will generate a prefix for you. Otherwise the system will try to use the returned prefix, but generally there's no guarantee if the prefix will be actually used or not. return "" to map this namespace URI to the default namespace. Again, there's no guarantee that this preference will be honored. If this method returns "" when requirePrefix=true, the return value will be ignored and the system will generate one.
 */
public String getPreferredPrefix(String namespaceUri,String suggestion,boolean requirePrefix){
  return NamespacePrefixMappings.getPreferredPrefixStatic(namespaceUri,suggestion,requirePrefix);
}
Program: 185073
Project: 185073
Buggy source:
/** 
 * Marshal the content tree rooted at <tt>jaxbElement</tt> into an output stream
 * @param os XML will be added to this stream.
 * @param namespacePrefixMapper namespacePrefixMapper
 * @throws JAXBException If any unexpected problem occurs during the marshalling.
 */
@Override public void marshal(java.io.OutputStream os,Object namespacePrefixMapper) throws JAXBException {
  String xmlString=this.getXML();
  int pos=xmlString.indexOf("String_Node_Str");
  xmlString=xmlString.substring(0,pos + 5) + "String_Node_Str" + xmlString.substring(pos + 5);
  try {
    IOUtils.write(xmlString,os);
  }
 catch (  IOException e) {
    throw new JAXBException(e.getMessage(),e);
  }
}

Fixed version (ground truth):
/** 
 * Marshal the content tree rooted at <tt>jaxbElement</tt> into an output stream
 * @param os XML will be added to this stream.
 * @param namespacePrefixMapper namespacePrefixMapper
 * @throws JAXBException If any unexpected problem occurs during the marshalling.
 */
@Override public void marshal(java.io.OutputStream os,Object namespacePrefixMapper) throws JAXBException {
  String xmlString=XmlUtils.marshaltoString(getJaxbElement(),false,true,jc);
  int pos=xmlString.indexOf("String_Node_Str");
  xmlString=xmlString.substring(0,pos + 5) + "String_Node_Str" + xmlString.substring(pos + 5);
  try {
    IOUtils.write(xmlString,os,"String_Node_Str");
  }
 catch (  IOException e) {
    throw new JAXBException(e.getMessage(),e);
  }
}
Program: 185075
Project: 185075
Buggy source:
public Element createElement(Document document){
  Element el=null;
  if (outputType == RunFontActionType.DISCOVERY) {
    return null;
  }
 else   if (outputType == RunFontActionType.XHTML) {
    el=document.createElement("String_Node_Str");
  }
 else   if (outputType == RunFontActionType.XSL_FO) {
    el=document.createElementNS("String_Node_Str","String_Node_Str");
  }
  document.appendChild(el);
  return el;
}

Fixed version (ground truth):
public Element createElement(Document document){
  Element el=null;
  if (outputType == RunFontActionType.DISCOVERY) {
    return null;
  }
 else   if (outputType == RunFontActionType.XHTML) {
    el=document.createElement("String_Node_Str");
  }
 else   if (outputType == RunFontActionType.XSL_FO) {
    el=document.createElementNS("String_Node_Str","String_Node_Str");
  }
  return el;
}
Program: 185077
Project: 185077
Buggy source:
private DocumentFragment nullRPr(Document document,String text){
  if (outputType == RunFontActionType.DISCOVERY) {
    vis.fontAction(getDefaultFont());
    return null;
  }
  Element span=createElement(document);
  this.setAttribute(span,getDefaultFont());
  span.setTextContent(text);
  return result(document);
}

Fixed version (ground truth):
private DocumentFragment nullRPr(Document document,String text){
  if (outputType == RunFontActionType.DISCOVERY) {
    vis.fontAction(getDefaultFont());
    return null;
  }
  Element span=createElement(document);
  document.appendChild(span);
  this.setAttribute(span,getDefaultFont());
  span.setTextContent(text);
  return result(document);
}
Program: 185078
Project: 185078
Buggy source:
@Override protected Document getSourceDocument(AbstractConversionSettings conversionSettings,AbstractWmlConversionContext conversionContext) throws Docx4JException {
  ConversionSectionWrappers conversionSectionWrappers=conversionContext.getSections();
  Document ret=XmlUtils.marshaltoW3CDomDocument(conversionSectionWrappers.createSections(),Context.jcSectionModel);
  return ret;
}

Fixed version (ground truth):
@Override protected Document getSourceDocument(CS conversionSettings,CC conversionContext) throws Docx4JException {
  ConversionSectionWrappers conversionSectionWrappers=conversionContext.getSections();
  Document ret=XmlUtils.marshaltoW3CDomDocument(conversionSectionWrappers.createSections(),Context.jcSectionModel);
  return ret;
}
Program: 185080
Project: 185080
Buggy source:
private String getDefaultFont(){
  if (defaultFont == null) {
    PropertyResolver propertyResolver=wordMLPackage.getMainDocumentPart().getPropertyResolver();
    org.docx4j.wml.RFonts rFonts=propertyResolver.getDocumentDefaultRPr().getRFonts();
    if (rFonts == null) {
      log.info("String_Node_Str");
      defaultFont="String_Node_Str";
    }
 else {
      if (rFonts.getAsciiTheme() == null) {
        if (rFonts.getAscii() == null) {
          log.error("String_Node_Str");
          defaultFont="String_Node_Str";
        }
 else {
          log.info("String_Node_Str" + rFonts.getAscii());
          defaultFont=rFonts.getAscii();
        }
      }
 else {
        if (getThemePart() == null) {
          log.info("String_Node_Str");
          defaultFont="String_Node_Str";
        }
 else {
          String font=getThemePart().getFont(rFonts.getAsciiTheme(),themeFontLang);
          if (font != null) {
            defaultFont=font;
          }
 else {
            log.info("String_Node_Str");
            defaultFont="String_Node_Str";
          }
        }
      }
    }
  }
  System.out.println("String_Node_Str" + defaultFont);
  return defaultFont;
}

Fixed version (ground truth):
private String getDefaultFont(){
  if (defaultFont == null) {
    PropertyResolver propertyResolver=wordMLPackage.getMainDocumentPart().getPropertyResolver();
    org.docx4j.wml.RFonts rFonts=propertyResolver.getDocumentDefaultRPr().getRFonts();
    if (rFonts == null) {
      log.info("String_Node_Str");
      defaultFont="String_Node_Str";
    }
 else {
      if (rFonts.getAsciiTheme() == null) {
        if (rFonts.getAscii() == null) {
          log.error("String_Node_Str");
          defaultFont="String_Node_Str";
        }
 else {
          log.info("String_Node_Str" + rFonts.getAscii());
          defaultFont=rFonts.getAscii();
        }
      }
 else {
        if (getThemePart() == null) {
          log.info("String_Node_Str");
          defaultFont="String_Node_Str";
        }
 else {
          String font=getThemePart().getFont(rFonts.getAsciiTheme(),themeFontLang);
          if (font != null) {
            defaultFont=font;
          }
 else {
            log.info("String_Node_Str");
            defaultFont="String_Node_Str";
          }
        }
      }
    }
  }
  return defaultFont;
}
Program: 185081
Project: 185081
Buggy source:
private void handleContent(List<Object> objects,ContentAccessor attachmentPoint){
  for (  Object o : objects) {
    if (o instanceof R) {
      R existingRun=(R)o;
      handleRun(existingRun,attachmentPoint);
    }
 else     if (o instanceof ProofErr) {
    }
 else {
      log.debug(XmlUtils.unwrap(o));
      if (newR.getContent().size() > 0) {
        attachmentPoint.getContent().add(newR);
        newR=Context.getWmlObjectFactory().createR();
      }
      attachmentPoint.getContent().add(o);
    }
  }
}

Fixed version (ground truth):
private void handleContent(List<Object> objects,ContentAccessor attachmentPoint){
  for (  Object o : objects) {
    if (o instanceof R) {
      R existingRun=(R)o;
      handleRun(existingRun,attachmentPoint);
    }
 else     if (o instanceof ProofErr) {
    }
 else {
      log.debug(XmlUtils.unwrap(o));
      attachmentPoint.getContent().add(o);
      newR=Context.getWmlObjectFactory().createR();
    }
  }
}
Program: 185082
Project: 185082
Buggy source:
/** 
 * nested tables XHTML renderer seems to construct a tree: table/table instead of table/tr/td/table? TODO fix this upstream. TestCase is http://en.wikipedia.org/wiki/Office_Open_XML
 * @param contentContext
 * @param parent
 * @return
 */
private List<Object> nestedTableHierarchyFix(List<Object> contentContext,Box parent){
  if (parent instanceof TableBox || parent.getElement().getNodeName().equals("String_Node_Str")) {
    log.warn("String_Node_Str");
    Tr tr=Context.getWmlObjectFactory().createTr();
    contentContext.add(tr);
    contentContext=tr.getContent();
    Tc tc=Context.getWmlObjectFactory().createTc();
    contentContext.add(tc);
    contentContext=tc.getContent();
  }
  return contentContext;
}

Fixed version (ground truth):
/** 
 * nested tables XHTML renderer seems to construct a tree: table/table instead of table/tr/td/table? TODO fix this upstream. TestCase is http://en.wikipedia.org/wiki/Office_Open_XML
 * @param contentContext
 * @param parent
 * @return
 */
private List<Object> nestedTableHierarchyFix(List<Object> contentContext,Box parent){
  if (parent instanceof TableBox || parent.getElement().getNodeName().equals("String_Node_Str")) {
    log.warn("String_Node_Str");
    P captionP=null;
    Iterator<Object> contentIterator=contentContext.iterator();
    Object next;
    while (contentIterator.hasNext()) {
      next=contentIterator.next();
      if (next instanceof P) {
        captionP=(P)XmlUtils.deepCopy((P)next);
        contentIterator.remove();
        break;
      }
    }
    TblPr tblPr=Context.getWmlObjectFactory().createTblPr();
    TblStyle tblStyle=Context.getWmlObjectFactory().createCTTblPrBaseTblStyle();
    tblStyle.setVal("String_Node_Str");
    tblPr.setTblStyle(tblStyle);
    contentContext.add(tblPr);
    Tr tr=Context.getWmlObjectFactory().createTr();
    contentContext.add(tr);
    contentContext=tr.getContent();
    Tc tc=Context.getWmlObjectFactory().createTc();
    contentContext.add(tc);
    contentContext=tc.getContent();
    if (captionP != null) {
      contentContext.add(captionP);
    }
  }
  return contentContext;
}
Program: 185084
Project: 185084
Buggy source:
private P canonicaliseInstance(P p){
  P newP=Context.getWmlObjectFactory().createP();
  newP.setPPr(p.getPPr());
  depth=0;
  newR=Context.getWmlObjectFactory().createR();
  fieldRPr=null;
  currentField=null;
  seenSeparate=false;
  handleContent(p.getContent(),newP);
  return newP;
}

Fixed version (ground truth):
private P canonicaliseInstance(P p){
  P newP=Context.getWmlObjectFactory().createP();
  newP.setPPr(p.getPPr());
  depth=0;
  newR=Context.getWmlObjectFactory().createR();
  currentField=null;
  seenSeparate=false;
  handleContent(p.getContent(),newP);
  return newP;
}
Program: 185085
Project: 185085
Buggy source:
@Override public void setXslFO(Element foElement){
  if (((Color)this.getObject()).getVal() != null) {
    foElement.setAttribute(FO_NAME,"String_Node_Str" + ((Color)this.getObject()).getVal());
  }
 else {
  }
}

Fixed version (ground truth):
@Override public void setXslFO(Element foElement){
  if (((Color)this.getObject()).getVal() != null) {
    if (((Color)this.getObject()).getVal().equals("String_Node_Str")) {
      foElement.setAttribute(FO_NAME,"String_Node_Str");
    }
 else {
      foElement.setAttribute(FO_NAME,"String_Node_Str" + ((Color)this.getObject()).getVal());
    }
  }
 else {
  }
}
Program: 185086
Project: 185086
Buggy source:
public void setInstrText(JAXBElement<Text> instrText){
  this.instrText=instrText;
}

Fixed version (ground truth):
public void setInstrText(JAXBElement<Text> instrTextIn){
  if (this.instrText == null) {
    this.instrText=instrTextIn;
  }
 else {
    String text=this.getInstr() + instrTextIn.getValue().getValue();
    this.instrText.getValue().setValue(text);
  }
}
Program: 185090
Project: 185090
Buggy source:
private void handleRow(NodeList cellContents,Tr tr,int r){
  log.debug("String_Node_Str" + r);
  if (borderConflictResolutionRequired && tr.getTblPrEx() != null && tr.getTblPrEx().getTblCellSpacing() != null) {
    borderConflictResolutionRequired=false;
  }
  TcFinder tcFinder=new TcFinder();
  new TraversalUtil(tr,tcFinder);
  int c=0;
  log.debug("String_Node_Str" + c);
  for (  Tc tc : tcFinder.tcList) {
    Node wtrNode=cellContents.item(r);
    if (wtrNode == null) {
      log.warn("String_Node_Str" + r);
    }
    addCell(tc,getTc(wtrNode,c,new IntRef(0)));
    c++;
  }
}

Fixed version (ground truth):
private void handleRow(NodeList cellContents,Tr tr,int r){
  log.debug("String_Node_Str" + r);
  if (borderConflictResolutionRequired && tr.getTblPrEx() != null && tr.getTblPrEx().getTblCellSpacing() != null) {
    borderConflictResolutionRequired=false;
  }
  TcFinder tcFinder=new TcFinder();
  new TraversalUtil(tr,tcFinder);
  int c=0;
  log.debug("String_Node_Str" + c);
  for (  Tc tc : tcFinder.tcList) {
    Node wtrNode=cellContents.item(r);
    if (wtrNode == null) {
      log.error("String_Node_Str" + r);
      return;
    }
    addCell(tc,getTc(wtrNode,c,new IntRef(0)));
    c++;
  }
}