nus-yam/ex-repair huggingface dataset:
Program: 76639
Project: 76639
Buggy source:
/** 
 * Divide the value of this Token with the value of the argument Token. Type resolution also occurs here, with the returned Token type  chosen to achieve a lossless conversion. 
 * @param a The token to divide this Token by
 * @exception Thrown if the passed token is not of a type that can be divide this Tokens value by in a lossless fashion.
 */
public Token divide(Token a) throws IllegalActionException {
  if (a instanceof ScalarToken) {
    _value=_value / ((ScalarToken)a).doubleValue();
    return new DoubleToken(_value);
  }
 else {
    String str="String_Node_Str" + this.getClass().getName();
    str=str + "String_Node_Str" + a.getClass().getName();
    throw new IllegalActionException("String_Node_Str" + str);
  }
}

Fixed version (ground truth):
/** 
 * Divide the value of this Token with the value of the argument Token. Type resolution also occurs here, with the returned Token type  chosen to achieve a lossless conversion. 
 * @param a The token to divide this Token by
 * @exception Thrown if the passed token is not of a type that can be divide this Tokens value by in a lossless fashion.
 */
public Token divide(Token a) throws IllegalActionException {
  if (a instanceof ScalarToken) {
    double tmp=_value / ((ScalarToken)a).doubleValue();
    return new DoubleToken(tmp);
  }
 else {
    String str="String_Node_Str" + this.getClass().getName();
    str=str + "String_Node_Str" + a.getClass().getName();
    throw new IllegalActionException("String_Node_Str" + str);
  }
}
Program: 76640
Project: 76640
Buggy source:
/** 
 * Set the value in the token 
 * @param d The new value for the token public void setValue(double d) { _value = d; } /** Create a string representation of the value in the token.
 */
public String toString(){
  return Double.toString(_value);
}

Fixed version (ground truth):
/** 
 * Create a string representation of the value in the token.
 */
public String toString(){
  return Double.toString(_value);
}
Program: 76641
Project: 76641
Buggy source:
/** 
 * Multiply the value of this Token with the value of the argument Token. Type resolution also occurs here, with the returned Token type  chosen to achieve a lossless conversion. 
 * @param a The token to multiply this Token by
 * @exception Thrown if the passed token is not of a type that can be multiplied by this Tokens value in a lossless fashion.
 */
public Token multiply(Token a) throws IllegalActionException {
  if (a instanceof ScalarToken) {
    _value=_value * ((ScalarToken)a).doubleValue();
    return new DoubleToken(_value);
  }
 else {
    String str="String_Node_Str" + this.getClass().getName();
    str=str + "String_Node_Str" + a.getClass().getName();
    throw new IllegalActionException("String_Node_Str" + str);
  }
}

Fixed version (ground truth):
/** 
 * Multiply the value of this Token with the value of the argument Token. Type resolution also occurs here, with the returned Token type  chosen to achieve a lossless conversion. 
 * @param a The token to multiply this Token by
 * @exception Thrown if the passed token is not of a type that can be multiplied by this Tokens value in a lossless fashion.
 */
public Token multiply(Token a) throws IllegalActionException {
  if (a instanceof ScalarToken) {
    double tmp=_value * ((ScalarToken)a).doubleValue();
    return new DoubleToken(tmp);
  }
 else {
    String str="String_Node_Str" + this.getClass().getName();
    str=str + "String_Node_Str" + a.getClass().getName();
    throw new IllegalActionException("String_Node_Str" + str);
  }
}
Program: 76642
Project: 76642
Buggy source:
/** 
 * Divide the value of this Token with the value of the argument Token. Type resolution also occurs here, with the returned Token type  chosen to achieve a lossless conversion. 
 * @param a The token to divide this Token by
 * @exception Thrown if the passed token is not of a type that can be divide this Tokens value by in a lossless fashion.
 */
public Token modulo(Token a) throws IllegalActionException {
  if (a instanceof ScalarToken) {
    _value=_value % ((ScalarToken)a).doubleValue();
    return new DoubleToken(_value);
  }
 else {
    String str="String_Node_Str" + this.getClass().getName();
    str=str + "String_Node_Str" + a.getClass().getName();
    throw new IllegalActionException("String_Node_Str" + str);
  }
}

Fixed version (ground truth):
/** 
 * Divide the value of this Token with the value of the argument Token. Type resolution also occurs here, with the returned Token type  chosen to achieve a lossless conversion. 
 * @param a The token to divide this Token by
 * @exception Thrown if the passed token is not of a type that can be divide this Tokens value by in a lossless fashion.
 */
public Token modulo(Token a) throws IllegalActionException {
  if (a instanceof ScalarToken) {
    double tmp=_value % ((ScalarToken)a).doubleValue();
    return new DoubleToken(tmp);
  }
 else {
    String str="String_Node_Str" + this.getClass().getName();
    str=str + "String_Node_Str" + a.getClass().getName();
    throw new IllegalActionException("String_Node_Str" + str);
  }
}
Program: 76643
Project: 76643
Buggy source:
/** 
 * Add a Param. this causes the version number of the workspace to be incremented.
 * @param The param to be added
 */
public void addParam(Param p) throws NameDuplicationException, IllegalActionException {
  if (((NamedObj)p.getContainer()) != this) {
    throw new IllegalActionException("String_Node_Str");
  }
  try {
    _params.append(p);
  }
 catch (  IllegalActionException ex) {
  }
  workspace().incrVersion();
}

Fixed version (ground truth):
/** 
 * Add a Param. this causes the version number of the workspace to be incremented.
 * @param The param to be added
 */
public void addParam(Param p) throws NameDuplicationException, IllegalActionException {
  if (((NamedObj)p.getContainer()) != this) {
    throw new IllegalActionException("String_Node_Str");
  }
  try {
    if (_params == null) {
      _params=new NamedList();
    }
    _params.append(p);
  }
 catch (  IllegalActionException ex) {
  }
  workspace().incrVersion();
}
Program: 76645
Project: 76645
Buggy source:
/** 
 * @param exceptPort Do not return this port in the enumeration. 
 */
public PortEnumeration(Port exceptPort){
  _XRefEnum=_portList.elements();
  _exceptPort=exceptPort;
  _skip=true;
}

Fixed version (ground truth):
/** 
 * @param exceptPort Do not return this port in the enumeration. 
 */
public PortEnumeration(Port exceptPort){
  if (exceptPort != null) {
    CrossRefList censored=new CrossRefList(this);
    censored.duplicate(_portList);
    censored.dissociate(exceptPort);
    _XRefEnum=censored.elements();
  }
 else {
    _XRefEnum=_portList.elements();
  }
}
Program: 76646
Project: 76646
Buggy source:
/** 
 * Return the next element in the enumeration. 
 */
public Object nextElement(){
  if (!_skip)   return (Port)_XRefEnum.nextElement();
 else {
    Port nextPort=(Port)_XRefEnum.nextElement();
    if (_exceptPort == null)     return nextPort;
    if (nextPort == _exceptPort) {
      nextPort=(Port)_XRefEnum.nextElement();
    }
    return nextPort;
  }
}

Fixed version (ground truth):
/** 
 * Return the next element in the enumeration. 
 */
public Object nextElement(){
  return (Port)_XRefEnum.nextElement();
}
Program: 76651
Project: 76651
Buggy source:
/** 
 * Draw an impulse from the specified point to the y axis. If the specified point is below the y axis or outside the x range, do nothing.  If the <i>clip</i> argument is true, then do not draw above the y range.
 */
protected void _drawImpulse(Graphics graphics,long xpos,long ypos,boolean clip){
  if (_debug > 20) {
    System.out.println("String_Node_Str" + xpos + "String_Node_Str"+ ypos+ "String_Node_Str"+ clip+ "String_Node_Str");
  }
  if (clip && ypos < _uly)   ypos=_uly;
  if (ypos <= _lry && xpos <= _lrx && xpos >= _ulx) {
    double zeroypos=_lry - (long)((0 - _yMin) * _yscale);
    graphics.drawLine((int)xpos,(int)ypos,(int)xpos,(int)zeroypos);
  }
}

Fixed version (ground truth):
/** 
 * Draw an impulse from the specified point to the y axis. If the specified point is below the y axis or outside the x range, do nothing.  If the <i>clip</i> argument is true, then do not draw above the y range.
 */
protected void _drawImpulse(Graphics graphics,long xpos,long ypos,boolean clip){
  if (_debug > 20) {
    System.out.println("String_Node_Str" + xpos + "String_Node_Str"+ ypos+ "String_Node_Str"+ clip+ "String_Node_Str");
  }
  if (clip && ypos < _uly)   ypos=_uly;
  if (ypos <= _lry && xpos <= _lrx && xpos >= _ulx) {
    double zeroypos=_lry - (long)((0 - _yMin) * _yscale);
    if (_lry < zeroypos)     zeroypos=_lry;
    if (_uly > zeroypos)     zeroypos=_uly;
    graphics.drawLine((int)xpos,(int)ypos,(int)xpos,(int)zeroypos);
  }
}
Program: 76653
Project: 76653
Buggy source:
/** 
 * Process the arguments and plot the data.
 */
public void pxgraph(String args[]){
  _plotApplet=new Plot();
  _makeButtons();
  pack();
  try {
    _parseArgs(args);
    _plotApplet.parseArgs(args);
  }
 catch (  CmdLineArgException e) {
    System.err.println("String_Node_Str" + e);
    System.exit(1);
  }
  show();
  _plotApplet.init();
  _plotApplet.start();
}

Fixed version (ground truth):
/** 
 * Process the arguments and plot the data.
 */
public void pxgraph(String args[]){
  _plotApplet=new Plot();
  _makeButtons();
  pack();
  add(_plotApplet);
  try {
    _parseArgs(args);
    _plotApplet.parseArgs(args);
  }
 catch (  CmdLineArgException e) {
    System.err.println("String_Node_Str" + e);
    System.exit(1);
  }
  show();
  _plotApplet.init();
  _plotApplet.start();
}
Program: 76654
Project: 76654
Buggy source:
/** 
 * Parse the command line arguments, do any preprocessing, then plot. If you have the <code>pxgraph</code> shell script, then  type <code>pxgraph -help</code> for the complete set of arguments.
 */
public static void main(String args[]){
  int argsread=0, i;
  Pxgraph pxgraph=new Pxgraph();
  pxgraph.pxgraph(args);
  if (_test) {
    if (_debug > 4)     System.out.println("String_Node_Str");
    try {
      Thread.currentThread().sleep(2000);
    }
 catch (    InterruptedException e) {
    }
    System.exit(0);
  }
}

Fixed version (ground truth):
/** 
 * Parse the command line arguments, do any preprocessing, then plot. If you have the <code>pxgraph</code> shell script, then  type <code>pxgraph -help</code> for the complete set of arguments.
 */
public static void main(String args[]){
  Pxgraph pxgraph=new Pxgraph();
  pxgraph.pxgraph(args);
  if (_test) {
    if (_debug > 4)     System.out.println("String_Node_Str");
    try {
      Thread.currentThread().sleep(2000);
    }
 catch (    InterruptedException e) {
    }
    System.exit(0);
  }
}
Program: 76655
Project: 76655
Buggy source:
/** 
 * Copy the alias pair values from the static alias pair list.
 */
public void aliasSet(){
  String name=this.getName();
  AliasPair aliasPair=(AliasPair)aliasPairList_.get(name);
  Port innerPort=(Port)aliasPair.getInnerAlias();
  Port outerPort=(Port)aliasPair.getOuterAlias();
}

Fixed version (ground truth):
/** 
 * Copy the alias pair values from the static alias pair list.
 */
public void aliasSet(){
  String name=this.getName();
  AliasPair aliasPair=(AliasPair)aliasPairList_.get(name);
  innerAlias_=(Port)aliasPair.getInnerAlias();
  outerAlias_=(Port)aliasPair.getOuterAlias();
}
Program: 76656
Project: 76656
Buggy source:
public Action.ActionResult changeHealthPoints(int n){
  if (healthPointsCurrent <= 0) {
    return Action.ActionResult.FAIL;
  }
  healthPointsCurrent=Math.min(Math.max(healthPointsCurrent + n,0),healthPointsMax);
  return Action.ActionResult.SUCCESS;
}

Fixed version (ground truth):
public void changeHealthPoints(int delta){
  healthPointsCurrent=Math.max(0,Math.min(healthPointsCurrent + delta,healthPointsMax));
}
Program: 76657
Project: 76657
Buggy source:
public Action.ActionResult changeActionPoints(int n){
  if (actionPointsCurrent + n < 0) {
    return Action.ActionResult.FAIL;
  }
  actionPointsCurrent=Math.min(actionPointsCurrent + n,actionPointsMax);
  return Action.ActionResult.SUCCESS;
}

Fixed version (ground truth):
public void changeActionPoints(int delta){
  actionPointsCurrent=Math.max(0,Math.min(actionPointsCurrent + delta,actionPointsMax));
}
Program: 76658
Project: 76658
Buggy source:
public Action.ActionResult zeroActionPoints(){
  actionPointsCurrent=0;
  return Action.ActionResult.SUCCESS;
}

Fixed version (ground truth):
public void zeroActionPoints(){
  actionPointsCurrent=0;
}
Program: 76659
Project: 76659
Buggy source:
/** 
 * Change (increase or decrease) amount of Health Points.
 * @param n Positive or negative delta for changing Health Points
 * @return ActionResult.SUCCESS or ActionResult.FAIL
 */
Action.ActionResult changeHealthPoints(int n);

Fixed version (ground truth):
/** 
 * Change (increase or decrease) amount of Health Points.
 * @param delta Positive or negative delta for changing Health Points
 */
void changeHealthPoints(int delta);
Program: 76660
Project: 76660
Buggy source:
/** 
 * Change (increase or decrease) amount of GenericAction Points.
 * @param n Positive or negative delta for changing GenericAction Points
 * @return ActionResult.SUCCESS or ActionResult.FAIL
 */
Action.ActionResult changeActionPoints(int n);

Fixed version (ground truth):
/** 
 * Change (increase or decrease) amount of GenericAction Points.
 * @param delta Positive or negative delta for changing GenericAction Points
 */
void changeActionPoints(int delta);
Program: 76661
Project: 76661
Buggy source:
/** 
 * Resets action points to zero. Useful for attacks (just like in Sid Meier's Civilization)
 * @return Action Result
 */
Action.ActionResult zeroActionPoints();

Fixed version (ground truth):
/** 
 * Sets action points to zero. Useful for attacks (just like in Sid Meier's Civilization)
 */
void zeroActionPoints();
Program: 76662
Project: 76662
Buggy source:
abstract ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item);

Fixed version (ground truth):
abstract public ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item);
Program: 76663
Project: 76663
Buggy source:
@Nullable static Action getAction(){
  return null;
}

Fixed version (ground truth):
@Nullable private static Action getAction(){
  return null;
}
Program: 76664
Project: 76664
Buggy source:
@Override public final ActionResult perform(@NotNull IUnit thisUnit,@NotNull IUnit targetUnit,@Nullable GenericItem item){
  ActionResult retval=ActionResult.SUCCESS;
  if (thisUnit.getHealthPoints() > 0 && targetUnit.getHealthPoints() > 0) {
    targetUnit.changeHealthPoints(thisUnit.getDamagePoints());
    thisUnit.zeroActionPoints();
    if (!thisUnit.getCanIgnoreCounterAttack() && targetUnit.getHealthPoints() > 0) {
      thisUnit.changeHealthPoints(targetUnit.getDamagePoints());
    }
  }
 else {
    retval=ActionResult.FAIL;
  }
  return retval;
}

Fixed version (ground truth):
@Override public final ActionResult perform(@NotNull IUnit thisUnit,@NotNull IUnit targetUnit,@Nullable GenericItem item){
  ActionResult retval=ActionResult.SUCCESS;
  if (targetUnit.getHealthPoints() > 0) {
    targetUnit.changeHealthPoints(-thisUnit.getDamagePoints());
    thisUnit.zeroActionPoints();
    if (!thisUnit.getCanIgnoreCounterAttack() && targetUnit.getHealthPoints() > 0) {
      thisUnit.changeHealthPoints(-targetUnit.getDamagePoints());
    }
  }
 else {
    retval=ActionResult.FAIL;
  }
  return retval;
}
Program: 76665
Project: 76665
Buggy source:
@Override public ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item){
  return ActionResult.SUCCESS;
}

Fixed version (ground truth):
@Override public ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item){
  ActionResult retval=ActionResult.SUCCESS;
  thisUnit.changeActionPoints(-1);
  return retval;
}
Program: 76666
Project: 76666
Buggy source:
@Override public ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item){
  return ActionResult.SUCCESS;
}

Fixed version (ground truth):
@Override public ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item){
  ActionResult retval=ActionResult.SUCCESS;
  thisUnit.changeActionPoints(-1);
  return retval;
}
Program: 76667
Project: 76667
Buggy source:
@Override public ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item){
  return ActionResult.SUCCESS;
}

Fixed version (ground truth):
@Override public ActionResult perform(@NotNull IUnit thisUnit,@Nullable IUnit targetUnit,@Nullable GenericItem item){
  ActionResult retval=ActionResult.SUCCESS;
  thisUnit.changeActionPoints(-1);
  return retval;
}
Program: 76668
Project: 76668
Buggy source:
@Override public Action.ActionResult changeHealthPoints(int n){
  return this.decorated.changeHealthPoints(n);
}

Fixed version (ground truth):
@Override public void changeHealthPoints(int delta){
  this.decorated.changeHealthPoints(delta);
}
Program: 76669
Project: 76669
Buggy source:
@Override public Action.ActionResult changeActionPoints(int n){
  return this.decorated.changeActionPoints(n);
}

Fixed version (ground truth):
@Override public void changeActionPoints(int delta){
  this.decorated.changeActionPoints(delta);
}
Program: 76670
Project: 76670
Buggy source:
@Override public Action.ActionResult zeroActionPoints(){
  return this.decorated.zeroActionPoints();
}

Fixed version (ground truth):
@Override public void zeroActionPoints(){
  this.decorated.zeroActionPoints();
}
Program: 76671
Project: 76671
Buggy source:
public View(){
  presenter=new Presenter();
}

Fixed version (ground truth):
public View(){
  controller=new Controller();
}
Program: 76672
Project: 76672
Buggy source:
@Override public String getReadyPacket(){
}

Fixed version (ground truth):
@Override public String getReadyPacket(){
  String toSend="String_Node_Str" + name + "String_Node_Str"+ index+ "String_Node_Str";
  if (headNode != null) {
    if (headNode instanceof MISNode2D) {
      MISNode2D node2D=(MISNode2D)headNode;
      toSend+="String_Node_Str" + node2D.transform.positionX + "String_Node_Str"+ node2D.transform.positionY+ "String_Node_Str"+ node2D.transform.rotation+ "String_Node_Str"+ node2D.transform.scaleX+ "String_Node_Str"+ node2D.transform.scaleY;
    }
  }
  return toSend;
}
Program: 76675
Project: 76675
Buggy source:
/** 
 * Creates a TextView that represents a list item
 * @param pMarkdownList MarkdownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkdownList pMarkdownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkdownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkdownList.isOrdered()) {
    textView.setText(String.format(Locale.getDefault(),"String_Node_Str",pIndex + 1,pText));
  }
 else {
    Drawable bullet=mContext.getResources().getDrawable(getDrawable(pMarkdownList.getNestedLevel()));
    TopCompoundDrawable gravityDrawable=new TopCompoundDrawable(bullet,textView.getLineHeight());
    bullet.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    gravityDrawable.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    textView.setCompoundDrawables(gravityDrawable,null,null,null);
    textView.setCompoundDrawablePadding(mIndicatorSpacingPixels);
    textView.setText(pText);
  }
  return textView;
}

Fixed version (ground truth):
/** 
 * Creates a TextView that represents a list item
 * @param pMarkDownList MarkDownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkdownList pMarkDownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkdownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkDownList.isOrdered()) {
    SpannableString string=new SpannableString(pText);
    string.setSpan(new NumberSpan(mListMargin,pIndex + 1),0,string.length(),Spanned.SPAN_INCLUSIVE_INCLUSIVE);
    textView.setText(string);
  }
 else {
    final Drawable drawable=mContext.getResources().getDrawable(getDrawable(pMarkDownList.getNestedLevel()));
    SpannableString string=new SpannableString(pText);
    string.setSpan(new BulletSpan(mListMargin,drawable),0,string.length(),Spanned.SPAN_INCLUSIVE_INCLUSIVE);
    textView.setText(string);
  }
  return textView;
}
Program: 76676
Project: 76676
Buggy source:
@Override public View create(final MarkdownList pMarkdownItem,final InlineConverter<Spanned> pInlineConverter){
  return createLayout(pMarkdownItem,pInlineConverter);
}

Fixed version (ground truth):
@Override public View create(final MarkdownList pMarkDownItem,final InlineConverter<Spanned> pInlineConverter){
  return createLayout(pMarkDownItem,pInlineConverter);
}
Program: 76677
Project: 76677
Buggy source:
private LinearLayout createLayout(final MarkdownList pMarkdownItem,final InlineConverter<Spanned> pInlineConverter){
  LinearLayout layout=new LinearLayout(mContext);
  layout.setLayoutParams(new LayoutParams(MATCH_PARENT,WRAP_CONTENT));
  layout.setOrientation(LinearLayout.VERTICAL);
  final List<ListItem> items=pMarkdownItem.getListItems();
  for (int i=0; i < items.size(); i++) {
    final ListItem item=items.get(i);
    final View view=getTextView(pMarkdownItem,pInlineConverter.convert(item.getText()),i);
    layout.addView(view);
    if (item.hasChild()) {
      for (      MarkdownList list : item.getChild()) {
        final LinearLayout nestedLayout=createLayout(list,pInlineConverter);
        LayoutParams params=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
        params.setMargins(mIndentationSpacingPixels,0,0,0);
        nestedLayout.setLayoutParams(params);
        layout.addView(nestedLayout);
      }
    }
  }
  return layout;
}

Fixed version (ground truth):
private LinearLayout createLayout(final MarkdownList pMarkDownItem,final InlineConverter<Spanned> pInlineConverter){
  LinearLayout layout=new LinearLayout(mContext);
  layout.setLayoutParams(new LayoutParams(MATCH_PARENT,WRAP_CONTENT));
  layout.setOrientation(LinearLayout.VERTICAL);
  final List<ListItem> items=pMarkDownItem.getListItems();
  for (int i=0; i < items.size(); i++) {
    final ListItem item=items.get(i);
    final View view=getTextView(pMarkDownItem,pInlineConverter.convert(item.getText()),i);
    layout.addView(view);
    if (item.hasChild()) {
      for (      MarkdownList list : item.getChild()) {
        final LinearLayout nestedLayout=createLayout(list,pInlineConverter);
        nestedLayout.setPadding(mListMargin,0,0,0);
        layout.addView(nestedLayout);
      }
    }
  }
  return layout;
}
Program: 76678
Project: 76678
Buggy source:
public ListDisplayItem(final Context pContext,@DimenRes final int pIndentationSpacing,@DimenRes final int pBulletSpacing,@DrawableRes final int[] pBulletDrawables){
  mContext=pContext;
  mIndicatorSpacingPixels=mContext.getResources().getDimensionPixelSize(pBulletSpacing);
  mIndentationSpacingPixels=mContext.getResources().getDimensionPixelSize(pIndentationSpacing);
  mBulletDrawables=pBulletDrawables;
}

Fixed version (ground truth):
public ListDisplayItem(final Context pContext,@DimenRes final int pListMargin,@DrawableRes final int[] pBulletDrawables){
  mContext=pContext;
  mListMargin=mContext.getResources().getDimensionPixelSize(pListMargin);
  mBulletDrawables=pBulletDrawables;
}
Program: 76679
Project: 76679
Buggy source:
/** 
 * Creates a TextView that represents a list item
 * @param pMarkdownList MarkdownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkdownList pMarkdownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkdownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkdownList.isOrdered()) {
    textView.setText(String.format(Locale.getDefault(),"String_Node_Str",pIndex + 1,pText));
  }
 else {
    Drawable bullet=mContext.getResources().getDrawable(getDrawable(pMarkdownList.getNestedLevel()));
    TopCompoundDrawable gravityDrawable=new TopCompoundDrawable(bullet,textView.getLineHeight());
    bullet.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    gravityDrawable.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    textView.setCompoundDrawables(gravityDrawable,null,null,null);
    textView.setCompoundDrawablePadding(mIndicatorSpacingPixels);
    textView.setText(pText);
  }
  return textView;
}

Fixed version (ground truth):
/** 
 * Creates a TextView that represents a list item
 * @param pMarkDownList MarkDownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkdownList pMarkDownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkdownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkDownList.isOrdered()) {
    SpannableString string=new SpannableString(pText);
    string.setSpan(new NumberSpan(mListMargin,pIndex + 1),0,string.length(),Spanned.SPAN_INCLUSIVE_INCLUSIVE);
    textView.setText(string);
  }
 else {
    final Drawable drawable=mContext.getResources().getDrawable(getDrawable(pMarkDownList.getNestedLevel()));
    SpannableString string=new SpannableString(pText);
    string.setSpan(new BulletSpan(mListMargin,drawable),0,string.length(),Spanned.SPAN_INCLUSIVE_INCLUSIVE);
    textView.setText(string);
  }
  return textView;
}
Program: 76680
Project: 76680
Buggy source:
@Override public View create(final MarkdownList pMarkdownItem,final InlineConverter<Spanned> pInlineConverter){
  return createLayout(pMarkdownItem,pInlineConverter);
}

Fixed version (ground truth):
@Override public View create(final MarkdownList pMarkDownItem,final InlineConverter<Spanned> pInlineConverter){
  return createLayout(pMarkDownItem,pInlineConverter);
}
Program: 76681
Project: 76681
Buggy source:
private LinearLayout createLayout(final MarkdownList pMarkdownItem,final InlineConverter<Spanned> pInlineConverter){
  LinearLayout layout=new LinearLayout(mContext);
  layout.setLayoutParams(new LayoutParams(MATCH_PARENT,WRAP_CONTENT));
  layout.setOrientation(LinearLayout.VERTICAL);
  final List<ListItem> items=pMarkdownItem.getListItems();
  for (int i=0; i < items.size(); i++) {
    final ListItem item=items.get(i);
    final View view=getTextView(pMarkdownItem,pInlineConverter.convert(item.getText()),i);
    layout.addView(view);
    if (item.hasChild()) {
      for (      MarkdownList list : item.getChild()) {
        final LinearLayout nestedLayout=createLayout(list,pInlineConverter);
        LayoutParams params=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
        params.setMargins(mIndentationSpacingPixels,0,0,0);
        nestedLayout.setLayoutParams(params);
        layout.addView(nestedLayout);
      }
    }
  }
  return layout;
}

Fixed version (ground truth):
private LinearLayout createLayout(final MarkdownList pMarkDownItem,final InlineConverter<Spanned> pInlineConverter){
  LinearLayout layout=new LinearLayout(mContext);
  layout.setLayoutParams(new LayoutParams(MATCH_PARENT,WRAP_CONTENT));
  layout.setOrientation(LinearLayout.VERTICAL);
  final List<ListItem> items=pMarkDownItem.getListItems();
  for (int i=0; i < items.size(); i++) {
    final ListItem item=items.get(i);
    final View view=getTextView(pMarkDownItem,pInlineConverter.convert(item.getText()),i);
    layout.addView(view);
    if (item.hasChild()) {
      for (      MarkdownList list : item.getChild()) {
        final LinearLayout nestedLayout=createLayout(list,pInlineConverter);
        nestedLayout.setPadding(mListMargin,0,0,0);
        layout.addView(nestedLayout);
      }
    }
  }
  return layout;
}
Program: 76682
Project: 76682
Buggy source:
public ListDisplayItem(final Context pContext,@DimenRes final int pIndentationSpacing,@DimenRes final int pBulletSpacing,@DrawableRes final int[] pBulletDrawables){
  mContext=pContext;
  mIndicatorSpacingPixels=mContext.getResources().getDimensionPixelSize(pBulletSpacing);
  mIndentationSpacingPixels=mContext.getResources().getDimensionPixelSize(pIndentationSpacing);
  mBulletDrawables=pBulletDrawables;
}

Fixed version (ground truth):
public ListDisplayItem(final Context pContext,@DimenRes final int pListMargin,@DrawableRes final int[] pBulletDrawables){
  mContext=pContext;
  mListMargin=mContext.getResources().getDimensionPixelSize(pListMargin);
  mBulletDrawables=pBulletDrawables;
}
Program: 76684
Project: 76684
Buggy source:
/** 
 * Creates a TextView that represents a list item
 * @param pMarkDownList MarkDownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkDownList pMarkDownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkDownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkDownList.isOrdered()) {
    textView.setText(String.format(Locale.getDefault(),"String_Node_Str",pIndex + 1,pText));
  }
 else {
    Drawable bullet=mContext.getResources().getDrawable(getDrawable(pMarkDownList.getNestedLevel()));
    TopCompoundDrawable gravityDrawable=new TopCompoundDrawable(bullet,textView.getLineHeight());
    bullet.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    gravityDrawable.setBounds(0,0,bullet.getIntrinsicWidth(),0);
    textView.setCompoundDrawables(gravityDrawable,null,null,null);
    textView.setCompoundDrawablePadding(mIndicatorSpacingPixels);
    textView.setText(pText);
  }
  return textView;
}

Fixed version (ground truth):
/** 
 * Creates a TextView that represents a list item
 * @param pMarkDownList MarkDownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkDownList pMarkDownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkDownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkDownList.isOrdered()) {
    textView.setText(String.format(Locale.getDefault(),"String_Node_Str",pIndex + 1,pText));
  }
 else {
    Drawable bullet=mContext.getResources().getDrawable(getDrawable(pMarkDownList.getNestedLevel()));
    TopCompoundDrawable gravityDrawable=new TopCompoundDrawable(bullet,textView.getLineHeight());
    bullet.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    gravityDrawable.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    textView.setCompoundDrawables(gravityDrawable,null,null,null);
    textView.setCompoundDrawablePadding(mIndicatorSpacingPixels);
    textView.setText(pText);
  }
  return textView;
}
Program: 76685
Project: 76685
Buggy source:
/** 
 * Creates a TextView that represents a list item
 * @param pMarkDownList MarkDownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkDownList pMarkDownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkDownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkDownList.isOrdered()) {
    textView.setText(String.format(Locale.getDefault(),"String_Node_Str",pIndex + 1,pText));
  }
 else {
    Drawable bullet=mContext.getResources().getDrawable(getDrawable(pMarkDownList.getNestedLevel()));
    TopCompoundDrawable gravityDrawable=new TopCompoundDrawable(bullet,textView.getLineHeight());
    bullet.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    gravityDrawable.setBounds(0,0,bullet.getIntrinsicWidth(),0);
    textView.setCompoundDrawables(gravityDrawable,null,null,null);
    textView.setCompoundDrawablePadding(mIndicatorSpacingPixels);
    textView.setText(pText);
  }
  return textView;
}

Fixed version (ground truth):
/** 
 * Creates a TextView that represents a list item
 * @param pMarkDownList MarkDownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkDownList pMarkDownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkDownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkDownList.isOrdered()) {
    textView.setText(String.format(Locale.getDefault(),"String_Node_Str",pIndex + 1,pText));
  }
 else {
    Drawable bullet=mContext.getResources().getDrawable(getDrawable(pMarkDownList.getNestedLevel()));
    TopCompoundDrawable gravityDrawable=new TopCompoundDrawable(bullet,textView.getLineHeight());
    bullet.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    gravityDrawable.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    textView.setCompoundDrawables(gravityDrawable,null,null,null);
    textView.setCompoundDrawablePadding(mIndicatorSpacingPixels);
    textView.setText(pText);
  }
  return textView;
}
Program: 76686
Project: 76686
Buggy source:
/** 
 * Creates a TextView that represents a list item
 * @param pMarkDownList MarkDownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkdownList pMarkDownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkdownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkDownList.isOrdered()) {
    SpannableString string=new SpannableString(pText);
    string.setSpan(new NumberSpan(mListMargin,pIndex + 1),0,string.length(),Spanned.SPAN_INCLUSIVE_INCLUSIVE);
    textView.setText(string);
  }
 else {
    final Drawable drawable=mContext.getResources().getDrawable(getDrawable(pMarkDownList.getNestedLevel()));
    SpannableString string=new SpannableString(pText);
    string.setSpan(new BulletSpan(mListMargin,drawable),0,string.length(),Spanned.SPAN_INCLUSIVE_INCLUSIVE);
    textView.setText(string);
  }
  return textView;
}

Fixed version (ground truth):
/** 
 * Creates a TextView that represents a list item
 * @param pMarkdownList MarkdownList used to determine the kind of list
 * @param pText Content of the list item
 * @param pIndex Index of the item in the list
 * @return Returns a TextView
 */
private TextView getTextView(final MarkdownList pMarkdownList,final CharSequence pText,final int pIndex){
  final TextView textView=new TextView(mContext,null,R.attr.MarkdownListStyle);
  textView.setMovementMethod(LinkMovementMethod.getInstance());
  if (pMarkdownList.isOrdered()) {
    textView.setText(String.format(Locale.getDefault(),"String_Node_Str",pIndex + 1,pText));
  }
 else {
    Drawable bullet=mContext.getResources().getDrawable(getDrawable(pMarkdownList.getNestedLevel()));
    TopCompoundDrawable gravityDrawable=new TopCompoundDrawable(bullet,textView.getLineHeight());
    bullet.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    gravityDrawable.setBounds(0,0,bullet.getIntrinsicWidth(),bullet.getIntrinsicHeight());
    textView.setCompoundDrawables(gravityDrawable,null,null,null);
    textView.setCompoundDrawablePadding(mIndicatorSpacingPixels);
    textView.setText(pText);
  }
  return textView;
}
Program: 76687
Project: 76687
Buggy source:
@Override public View create(final MarkdownList pMarkDownItem,final InlineConverter<Spanned> pInlineConverter){
  return createLayout(pMarkDownItem,pInlineConverter);
}

Fixed version (ground truth):
@Override public View create(final MarkdownList pMarkdownItem,final InlineConverter<Spanned> pInlineConverter){
  return createLayout(pMarkdownItem,pInlineConverter);
}
Program: 76688
Project: 76688
Buggy source:
private LinearLayout createLayout(final MarkdownList pMarkDownItem,final InlineConverter<Spanned> pInlineConverter){
  LinearLayout layout=new LinearLayout(mContext);
  layout.setLayoutParams(new LayoutParams(MATCH_PARENT,WRAP_CONTENT));
  layout.setOrientation(LinearLayout.VERTICAL);
  final List<ListItem> items=pMarkDownItem.getListItems();
  for (int i=0; i < items.size(); i++) {
    final ListItem item=items.get(i);
    final View view=getTextView(pMarkDownItem,pInlineConverter.convert(item.getText()),i);
    layout.addView(view);
    if (item.hasChild()) {
      for (      MarkdownList list : item.getChild()) {
        final LinearLayout nestedLayout=createLayout(list,pInlineConverter);
        nestedLayout.setPadding(mListMargin,0,0,0);
        layout.addView(nestedLayout);
      }
    }
  }
  return layout;
}

Fixed version (ground truth):
private LinearLayout createLayout(final MarkdownList pMarkdownItem,final InlineConverter<Spanned> pInlineConverter){
  LinearLayout layout=new LinearLayout(mContext);
  layout.setLayoutParams(new LayoutParams(MATCH_PARENT,WRAP_CONTENT));
  layout.setOrientation(LinearLayout.VERTICAL);
  final List<ListItem> items=pMarkdownItem.getListItems();
  for (int i=0; i < items.size(); i++) {
    final ListItem item=items.get(i);
    final View view=getTextView(pMarkdownItem,pInlineConverter.convert(item.getText()),i);
    layout.addView(view);
    if (item.hasChild()) {
      for (      MarkdownList list : item.getChild()) {
        final LinearLayout nestedLayout=createLayout(list,pInlineConverter);
        LayoutParams params=new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
        params.setMargins(mIndentationSpacingPixels,0,0,0);
        nestedLayout.setLayoutParams(params);
        layout.addView(nestedLayout);
      }
    }
  }
  return layout;
}
Program: 76689
Project: 76689
Buggy source:
public ListDisplayItem(final Context pContext,@DimenRes final int pListMargin,@DrawableRes final int[] pBulletDrawables){
  mContext=pContext;
  mListMargin=mContext.getResources().getDimensionPixelSize(pListMargin);
  mBulletDrawables=pBulletDrawables;
}

Fixed version (ground truth):
public ListDisplayItem(final Context pContext,@DimenRes final int pIndentationSpacing,@DimenRes final int pBulletSpacing,@DrawableRes final int[] pBulletDrawables){
  mContext=pContext;
  mIndicatorSpacingPixels=mContext.getResources().getDimensionPixelSize(pBulletSpacing);
  mIndentationSpacingPixels=mContext.getResources().getDimensionPixelSize(pIndentationSpacing);
  mBulletDrawables=pBulletDrawables;
}
Program: 76690
Project: 76690
Buggy source:
/** 
 * Adds a user to the users table in the database.
 * @param provider The provider used to access the database.
 * @param userName The user name which will be used to create the new user.
 * @return The user.
 * @throws CouldntSaveDataException if the user could not be saved to the database.
 */
public static IUser addUser(final SQLProvider provider,final String userName) throws CouldntSaveDataException {
  Preconditions.checkNotNull(provider,"String_Node_Str");
  Preconditions.checkNotNull(userName,"String_Node_Str");
  final Connection connection=provider.getConnection().getConnection();
  final String query="String_Node_Str" + CTableNames.USER_TABLE + "String_Node_Str";
  CUser user=null;
  try (PreparedStatement statement=connection.prepareStatement(query);ResultSet resultSet=statement.executeQuery()){
    statement.setString(1,userName);
    while (resultSet.next()) {
      user=new CUser(resultSet.getInt(1),userName);
    }
  }
 catch (  final SQLException exception) {
    throw new CouldntSaveDataException(exception);
  }
  return user;
}

Fixed version (ground truth):
/** 
 * Adds a user to the users table in the database.
 * @param provider The provider used to access the database.
 * @param userName The user name which will be used to create the new user.
 * @return The user.
 * @throws CouldntSaveDataException if the user could not be saved to the database.
 */
public static IUser addUser(final SQLProvider provider,final String userName) throws CouldntSaveDataException {
  Preconditions.checkNotNull(provider,"String_Node_Str");
  Preconditions.checkNotNull(userName,"String_Node_Str");
  final Connection connection=provider.getConnection().getConnection();
  final String query="String_Node_Str" + CTableNames.USER_TABLE + "String_Node_Str";
  CUser user=null;
  try (PreparedStatement statement=connection.prepareStatement(query)){
    statement.setString(1,userName);
    ResultSet resultSet=statement.executeQuery();
    while (resultSet.next()) {
      user=new CUser(resultSet.getInt(1),userName);
    }
  }
 catch (  final SQLException exception) {
    throw new CouldntSaveDataException(exception);
  }
  return user;
}
Program: 76692
Project: 76692
Buggy source:
/** 
 * Returns the derived views of the given view.
 * @param provider Provides the connection to the database.
 * @param view The view whose derived views are returned.
 * @return The derived views.
 * @throws CouldntLoadDataException Thrown if the derived views could not be determined.
 */
public static List<INaviView> getDerivedViews(final AbstractSQLProvider provider,final INaviView view) throws CouldntLoadDataException {
  checkArguments(provider,view);
  final List<INaviView> views=new ArrayList<INaviView>();
  if (view.getConfiguration().getModule() == null) {
    return views;
  }
  final String query="String_Node_Str";
  try (PreparedStatement statement=provider.getConnection().getConnection().prepareStatement(query);ResultSet resultSet=statement.executeQuery()){
    final List<INaviView> moduleViews=view.getConfiguration().getModule().getContent().getViewContainer().getViews();
    statement.setInt(1,view.getConfiguration().getId());
    if (resultSet == null) {
      return views;
    }
    while (resultSet.next()) {
      final int viewId=resultSet.getInt(1);
      if (viewId != view.getConfiguration().getId()) {
        for (        final INaviView moduleView : moduleViews) {
          if (moduleView.getConfiguration().getId() == viewId) {
            views.add(moduleView);
            break;
          }
        }
      }
    }
    return views;
  }
 catch (  final SQLException e) {
    throw new CouldntLoadDataException(e);
  }
}

Fixed version (ground truth):
/** 
 * Returns the derived views of the given view.
 * @param provider Provides the connection to the database.
 * @param view The view whose derived views are returned.
 * @return The derived views.
 * @throws CouldntLoadDataException Thrown if the derived views could not be determined.
 */
public static List<INaviView> getDerivedViews(final AbstractSQLProvider provider,final INaviView view) throws CouldntLoadDataException {
  checkArguments(provider,view);
  final List<INaviView> views=new ArrayList<INaviView>();
  if (view.getConfiguration().getModule() == null) {
    return views;
  }
  final String query="String_Node_Str";
  try (PreparedStatement statement=provider.getConnection().getConnection().prepareStatement(query)){
    final List<INaviView> moduleViews=view.getConfiguration().getModule().getContent().getViewContainer().getViews();
    statement.setInt(1,view.getConfiguration().getId());
    final ResultSet resultSet=statement.executeQuery();
    if (resultSet == null) {
      return views;
    }
    while (resultSet.next()) {
      final int viewId=resultSet.getInt(1);
      if (viewId != view.getConfiguration().getId()) {
        for (        final INaviView moduleView : moduleViews) {
          if (moduleView.getConfiguration().getId() == viewId) {
            views.add(moduleView);
            break;
          }
        }
      }
    }
    return views;
  }
 catch (  final SQLException e) {
    throw new CouldntLoadDataException(e);
  }
}
Program: 76694
Project: 76694
Buggy source:
public void batchInsert(List<CoreDict> list){
  dictDao.insertBatch(list);
}

Fixed version (ground truth):
/** 
 * 参考：dict_mapping.xml
 * @param list
 * @return
 */
public void batchInsert(List<DictExcelImportData> list){
  int dataStartRow=3;
  final Map<Integer,DictExcelImportData> map=new HashMap<>();
  list.forEach((item) -> map.put(item.getExcelId(),item));
  for (  DictExcelImportData item : list) {
    CoreDict dict=new CoreDict();
    dict.setName(item.getName());
    dict.setRemark(item.getRemark());
    dict.setType(item.getType());
    dict.setTypeName(item.getTypeName());
    dict.setValue(item.getValue());
    CoreDict template=new CoreDict();
    template.setType(dict.getType());
    template.setValue(dict.getValue());
    CoreDict dbDict=dictDao.templateOne(template);
    if (dbDict != null) {
      int row=item.getExcelId() + dataStartRow;
      throwImporError(row,0,"String_Node_Str");
    }
    if (item.getParentExcelId() != 0) {
      DictExcelImportData parentItem=map.get(item.getParentExcelId());
      if (parentItem == null) {
        int row=item.getExcelId() + dataStartRow;
        throwImporError(row,6,"String_Node_Str");
      }
      if (parentItem.getId() == null) {
        int row=item.getExcelId() + dataStartRow;
        throwImporError(row,6,"String_Node_Str");
      }
      dict.setParent(parentItem.getId());
    }
    dict.setCreateTime(new Date());
    dictDao.insert(dict);
    item.setId(dict.getId());
  }
}
Program: 76695
Project: 76695
Buggy source:
public List<UserExcelData> queryExcel(PageQuery<CoreUser> query){
  PageQuery<CoreUser> ret=userDao.queryByCondtion(query);
  List<CoreUser> list=ret.getList();
  OrgItem orgRoot=platformService.buildOrg();
  List<UserExcelData> items=new ArrayList<>();
  for (  CoreUser user : list) {
    UserExcelData userItem=new UserExcelData();
    userItem.setCode(user.getCode());
    userItem.setId(user.getId());
    userItem.setName(user.getName());
    CoreDict dict=dictService.findCoreDict(CoreDictType.USER_STATE,user.getState());
    userItem.setStateText(dict.getName());
    if (StringUtils.isNotEmpty(user.getJobType1())) {
      dict=dictService.findCoreDict("String_Node_Str",user.getJobType1());
      userItem.setJobType1Text(dict.getName());
    }
    String orgName=orgRoot.findChild(user.getOrgId()).getName();
    userItem.setOrgText(orgName);
    items.add(userItem);
  }
  return items;
}

Fixed version (ground truth):
public List<UserExcelExportData> queryExcel(PageQuery<CoreUser> query){
  PageQuery<CoreUser> ret=userDao.queryByCondtion(query);
  List<CoreUser> list=ret.getList();
  OrgItem orgRoot=platformService.buildOrg();
  List<UserExcelExportData> items=new ArrayList<>();
  for (  CoreUser user : list) {
    UserExcelExportData userItem=new UserExcelExportData();
    userItem.setCode(user.getCode());
    userItem.setId(user.getId());
    userItem.setName(user.getName());
    CoreDict dict=dictService.findCoreDict(CoreDictType.USER_STATE,user.getState());
    userItem.setStateText(dict.getName());
    if (StringUtils.isNotEmpty(user.getJobType1())) {
      dict=dictService.findCoreDict("String_Node_Str",user.getJobType1());
      userItem.setJobType1Text(dict.getName());
    }
    String orgName=orgRoot.findChild(user.getOrgId()).getName();
    userItem.setOrgText(orgName);
    items.add(userItem);
  }
  return items;
}