nus-yam/ex-repair huggingface dataset:
Program: 53434
Project: 53434
Buggy source:
public static Duo<TypeName,Integer> fetchFromInternalName(String internal) throws AndrolibException {
  String origInternal=internal;
  int array=0;
  boolean isArray=false;
  do {
    if (internal.isEmpty()) {
      throw new AndrolibException("String_Node_Str" + origInternal);
    }
    isArray=internal.charAt(0) == '[';
    if (isArray) {
      array++;
      internal=internal.substring(1);
    }
  }
 while (isArray);
  int length=array + 1;
  String package_=null;
  String type=null;
  String innerType=null;
switch (internal.charAt(0)) {
case 'B':
    type="String_Node_Str";
  break;
case 'C':
type="String_Node_Str";
break;
case 'D':
type="String_Node_Str";
break;
case 'F':
type="String_Node_Str";
break;
case 'I':
type="String_Node_Str";
break;
case 'J':
type="String_Node_Str";
break;
case 'S':
type="String_Node_Str";
break;
case 'Z':
type="String_Node_Str";
break;
case 'V':
type="String_Node_Str";
break;
case 'L':
int pos=internal.indexOf(';');
if (pos == -1) {
throw new AndrolibException("String_Node_Str" + origInternal);
}
length+=pos;
internal=internal.substring(1,pos);
pos=internal.lastIndexOf('/');
package_=internal.substring(0,pos).replace('/','.');
type=internal.substring(pos + 1);
pos=type.indexOf('$');
if (pos != -1) {
innerType=type.substring(pos + 1);
type=type.substring(0,pos);
}
break;
default :
throw new AndrolibException("String_Node_Str" + origInternal);
}
return new Duo<TypeName,Integer>(new TypeName(package_,type,innerType,array),length);
}

Fixed version (ground truth):
public static Duo<TypeName,Integer> fetchFromInternalName(String internal) throws AndrolibException {
  String origInternal=internal;
  int array=0;
  boolean isArray=false;
  do {
    if (internal.isEmpty()) {
      throw new AndrolibException("String_Node_Str" + origInternal);
    }
    isArray=internal.charAt(0) == '[';
    if (isArray) {
      array++;
      internal=internal.substring(1);
    }
  }
 while (isArray);
  int length=array + 1;
  String package_=null;
  String type=null;
  String innerType=null;
switch (internal.charAt(0)) {
case 'B':
    type="String_Node_Str";
  break;
case 'C':
type="String_Node_Str";
break;
case 'D':
type="String_Node_Str";
break;
case 'F':
type="String_Node_Str";
break;
case 'I':
type="String_Node_Str";
break;
case 'J':
type="String_Node_Str";
break;
case 'S':
type="String_Node_Str";
break;
case 'Z':
type="String_Node_Str";
break;
case 'V':
type="String_Node_Str";
break;
case 'L':
int pos=internal.indexOf(';');
if (pos == -1) {
throw new AndrolibException("String_Node_Str" + origInternal);
}
length+=pos;
internal=internal.substring(1,pos);
pos=internal.lastIndexOf('/');
if (pos == -1) {
package_="String_Node_Str";
type=internal;
}
 else {
package_=internal.substring(0,pos).replace('/','.');
type=internal.substring(pos + 1);
}
pos=type.indexOf('$');
if (pos != -1) {
innerType=type.substring(pos + 1);
type=type.substring(0,pos);
}
break;
default :
throw new AndrolibException("String_Node_Str" + origInternal);
}
return new Duo<TypeName,Integer>(new TypeName(package_,type,innerType,array),length);
}
Program: 53435
Project: 53435
Buggy source:
public static String escapeForResXml(String value){
  value=value.replace("String_Node_Str","String_Node_Str");
  value=value.replace("String_Node_Str","String_Node_Str");
  char c=value.charAt(0);
  if (c == '@' || c == '#' || c == '?') {
    return '\\' + value;
  }
  return value;
}

Fixed version (ground truth):
public static String escapeForResXml(String value){
  if (value.isEmpty()) {
    return value;
  }
  value=value.replace("String_Node_Str","String_Node_Str");
  value=value.replace("String_Node_Str","String_Node_Str");
  char c=value.charAt(0);
  if (c == '@' || c == '#' || c == '?') {
    return '\\' + value;
  }
  return value;
}
Program: 53436
Project: 53436
Buggy source:
@Override public void setProperty(String name,Object value) throws IllegalArgumentException, IllegalStateException {
  if (PROPERTY_DEFAULT_ENCODING.equals(name)) {
    mDefaultEncoding=(String)value;
  }
  super.setProperty(name,value);
}

Fixed version (ground truth):
@Override public void setProperty(String name,Object value) throws IllegalArgumentException, IllegalStateException {
  if (PROPERTY_DEFAULT_ENCODING.equals(name)) {
    mDefaultEncoding=(String)value;
  }
 else {
    super.setProperty(name,value);
  }
}
Program: 53437
Project: 53437
Buggy source:
public void smali(String dir,String dexFile) throws AndrolibException {
  main.main(new String[]{"String_Node_Str",dir,"String_Node_Str",dexFile});
}

Fixed version (ground truth):
public void smali(String dir,String dexFile) throws AndrolibException {
  main.main(new String[]{dir,"String_Node_Str",dexFile});
}
Program: 53438
Project: 53438
Buggy source:
@Override public Class<?> findClass(String name) throws ClassNotFoundException {
  if (classes.containsKey(name)) {
    return nodeToClass(classes.get(name));
  }
 else {
    return super.loadClass(name);
  }
}

Fixed version (ground truth):
@Override public Class<?> findClass(String name) throws ClassNotFoundException {
  if (classes.containsKey(name)) {
    return nodeToClass(classes.get(name));
  }
 else {
    return super.findClass(name);
  }
}
Program: 53439
Project: 53439
Buggy source:
public static void pingback(){
  JOptionPane pane=new JOptionPane("String_Node_Str");
  Object[] options=new String[]{"String_Node_Str","String_Node_Str"};
  pane.setOptions(options);
  JDialog dialog=pane.createDialog(BytecodeViewer.viewer,"String_Node_Str");
  dialog.setVisible(true);
  Object obj=pane.getValue();
  int result=-1;
  for (int k=0; k < options.length; k++)   if (options[k].equals(obj))   result=k;
  if (result == 0) {
    try {
      PingBack.start();
    }
 catch (    Exception e) {
      new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
    }
  }
}

Fixed version (ground truth):
public static void pingback(){
  JOptionPane pane=new JOptionPane("String_Node_Str");
  Object[] options=new String[]{"String_Node_Str","String_Node_Str"};
  pane.setOptions(options);
  JDialog dialog=pane.createDialog(BytecodeViewer.viewer,"String_Node_Str");
  dialog.setVisible(true);
  Object obj=pane.getValue();
  int result=-1;
  for (int k=0; k < options.length; k++)   if (options[k].equals(obj))   result=k;
  if (result == 0) {
    try {
      if (!PingBack.isAlive())       PingBack.start();
    }
 catch (    Exception e) {
      new the.bytecode.club.bytecodeviewer.api.ExceptionUI(e);
    }
  }
}
Program: 53440
Project: 53440
Buggy source:
protected String printInvokeDynamicInsNode(InvokeDynamicInsnNode idin){
  StringBuilder sb=new StringBuilder();
  sb.append(nameOpcode(idin.opcode()) + "String_Node_Str" + idin.name+ "String_Node_Str");
  String desc=idin.desc;
  String partedDesc=idin.desc.substring(2);
  try {
    if (Type.getType(partedDesc) != null)     desc=Type.getType(partedDesc).getClassName();
    if (desc == null || desc.equals("String_Node_Str"))     desc=idin.desc;
  }
 catch (  java.lang.ArrayIndexOutOfBoundsException e) {
  }
  sb.append(desc);
  sb.append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
protected String printInvokeDynamicInsNode(InvokeDynamicInsnNode idin){
  StringBuilder sb=new StringBuilder();
  sb.append(nameOpcode(idin.opcode()) + "String_Node_Str" + idin.bsm.getName()+ "String_Node_Str");
  String desc=idin.desc;
  String partedDesc=idin.desc.substring(2);
  try {
    if (Type.getType(partedDesc) != null)     desc=Type.getType(partedDesc).getClassName();
    if (desc == null || desc.equals("String_Node_Str"))     desc=idin.desc;
  }
 catch (  java.lang.ArrayIndexOutOfBoundsException e) {
  }
  sb.append(desc);
  sb.append("String_Node_Str");
  return sb.toString();
}
Program: 53441
Project: 53441
Buggy source:
@Override public void keyTyped(KeyEvent arg0){
}

Fixed version (ground truth):
@Override public void keyTyped(KeyEvent e){
  quickSearch.grabFocus();
  quickSearch.setText("String_Node_Str" + e.getKeyChar());
  cancel=true;
}
Program: 53442
Project: 53442
Buggy source:
@Override public void keyReleased(KeyEvent arg0){
  if (arg0.getKeyCode() == KeyEvent.VK_ENTER) {
    if (arg0.getSource() instanceof MyTree) {
      MyTree tree=(MyTree)arg0.getSource();
      openPath(tree.getSelectionPath());
    }
  }
}

Fixed version (ground truth):
@Override public void keyReleased(KeyEvent arg0){
  if (arg0.getKeyCode() == KeyEvent.VK_ENTER) {
    if (arg0.getSource() instanceof MyTree) {
      MyTree tree=(MyTree)arg0.getSource();
      openPath(tree.getSelectionPath());
    }
  }
 else {
    cancel=true;
  }
}
Program: 53443
Project: 53443
Buggy source:
@Override public void keyPressed(KeyEvent arg0){
}

Fixed version (ground truth):
@Override public void keyPressed(KeyEvent e){
  quickSearch.grabFocus();
  quickSearch.setText("String_Node_Str" + e.getKeyChar());
  cancel=true;
}
Program: 53444
Project: 53444
Buggy source:
@Override public void valueChanged(final TreeSelectionEvent arg0){
  openPath(arg0.getPath());
}

Fixed version (ground truth):
@Override public void valueChanged(final TreeSelectionEvent arg0){
  if (cancel) {
    cancel=false;
    return;
  }
  openPath(arg0.getPath());
}
Program: 53446
Project: 53446
Buggy source:
@Override public String toString(){
  final StringBuilder sb=new StringBuilder();
  sb.append(ID).append('\t').append(LEMMA).append('\t').append(LEMMA).append('\t').append(CPOSTAG).append('\t').append(POSTAG).append('\t').append('_').append('\t').append(HEAD.ID).append('\t').append(DEPREL).append('\t').append('_').append('\t').append('_');
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  final StringBuilder sb=new StringBuilder();
  if (ID != 0 && ID != -1) {
    sb.append(ID).append('\t').append(LEMMA).append('\t').append(LEMMA).append('\t').append(CPOSTAG).append('\t').append(POSTAG).append('\t').append('_').append('\t').append(HEAD.ID).append('\t').append(DEPREL).append('\t').append('_').append('\t').append('_');
  }
 else {
    sb.append(ID).append('\t').append(LEMMA).append('\t').append(LEMMA).append('\t').append(CPOSTAG).append('\t').append(POSTAG).append('\t').append('_').append('\t').append('_').append('\t').append(DEPREL).append('\t').append('_').append('\t').append('_');
  }
  return sb.toString();
}
Program: 53447
Project: 53447
Buggy source:
@Override public String toString(){
  final StringBuilder sb=new StringBuilder();
  sb.append(ID).append('\t').append(LEMMA).append('\t').append(LEMMA).append('\t').append(CPOSTAG).append('\t').append(POSTAG).append('\t').append('_').append('\t').append(HEAD.ID).append('\t').append(DEPREL).append('\t').append('_').append('\t').append('_');
  return sb.toString();
}

Fixed version (ground truth):
@Override public String toString(){
  final StringBuilder sb=new StringBuilder();
  if (HEAD.ID != 0 && HEAD.ID != -1) {
    sb.append(ID).append('\t').append(LEMMA).append('\t').append(LEMMA).append('\t').append(CPOSTAG).append('\t').append(POSTAG).append('\t').append('_').append('\t').append(HEAD.ID).append('\t').append(DEPREL).append('\t').append('_').append('\t').append('_');
  }
 else {
    sb.append(ID).append('\t').append(LEMMA).append('\t').append(LEMMA).append('\t').append(CPOSTAG).append('\t').append(POSTAG).append('\t').append('_').append('\t').append('_').append('\t').append(DEPREL).append('\t').append('_').append('\t').append('_');
  }
  return sb.toString();
}
Program: 53448
Project: 53448
Buggy source:
/** 
 * 合并数字
 * @param termList
 */
protected void mergeNumberQuantifier(List<Vertex> termList,WordNet wordNetAll,Config config){
  if (termList.size() < 4)   return;
  StringBuilder sbQuantifier=new StringBuilder();
  ListIterator<Vertex> iterator=termList.listIterator();
  iterator.next();
  int line=1;
  while (iterator.hasNext()) {
    Vertex pre=iterator.next();
    if (pre.hasNature(Nature.m)) {
      sbQuantifier.append(pre.realWord);
      Vertex cur=null;
      while (iterator.hasNext() && (cur=iterator.next()).hasNature(Nature.m)) {
        sbQuantifier.append(cur.realWord);
        iterator.remove();
      }
      if (cur != null && (cur.hasNature(Nature.q) || cur.hasNature(Nature.qv) || cur.hasNature(Nature.qt))) {
        if (config.indexMode) {
          wordNetAll.add(line,new Vertex(sbQuantifier.toString(),new CoreDictionary.Attribute(Nature.m)));
        }
        sbQuantifier.append(cur.realWord);
        pre.attribute=new CoreDictionary.Attribute(Nature.mq);
        iterator.remove();
      }
      if (sbQuantifier.length() != pre.realWord.length()) {
        pre.realWord=sbQuantifier.toString();
        sbQuantifier.setLength(0);
      }
    }
    sbQuantifier.setLength(0);
    line+=pre.realWord.length();
  }
}

Fixed version (ground truth):
/** 
 * 合并数字
 * @param termList
 */
protected void mergeNumberQuantifier(List<Vertex> termList,WordNet wordNetAll,Config config){
  if (termList.size() < 4)   return;
  StringBuilder sbQuantifier=new StringBuilder();
  ListIterator<Vertex> iterator=termList.listIterator();
  iterator.next();
  int line=1;
  while (iterator.hasNext()) {
    Vertex pre=iterator.next();
    if (pre.hasNature(Nature.m)) {
      sbQuantifier.append(pre.realWord);
      Vertex cur=null;
      while (iterator.hasNext() && (cur=iterator.next()).hasNature(Nature.m)) {
        sbQuantifier.append(cur.realWord);
        iterator.remove();
      }
      if (cur != null && (cur.hasNature(Nature.q) || cur.hasNature(Nature.qv) || cur.hasNature(Nature.qt))) {
        if (config.indexMode) {
          wordNetAll.add(line,new Vertex(sbQuantifier.toString(),new CoreDictionary.Attribute(Nature.m)));
        }
        sbQuantifier.append(cur.realWord);
        pre.attribute=new CoreDictionary.Attribute(Nature.mq);
        pre.wordID=-1;
        iterator.remove();
      }
      if (sbQuantifier.length() != pre.realWord.length()) {
        pre.realWord=sbQuantifier.toString();
        sbQuantifier.setLength(0);
      }
    }
    sbQuantifier.setLength(0);
    line+=pre.realWord.length();
  }
}
Program: 53449
Project: 53449
Buggy source:
public boolean next(){
  if (i == arrayLength) {
    ++begin;
    i=begin;
    last=base[0];
  }
  int b=last;
  int n;
  int p;
  for (; i < arrayLength; ++i) {
    p=b + (int)(charArray[i]) + 1;
    if (b == check[p])     b=base[p];
 else {
      i=begin;
      ++begin;
      b=base[0];
      continue;
    }
    p=b;
    n=base[p];
    if (b == check[p] && n < 0) {
      length=i - begin + 1;
      index=-n - 1;
      value=v[index];
      last=b;
      ++i;
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean next(){
  int b=last;
  int n;
  int p;
  for (; ; ++i) {
    if (i == arrayLength) {
      ++begin;
      if (begin == arrayLength)       break;
      i=begin;
      b=base[0];
    }
    p=b + (int)(charArray[i]) + 1;
    if (b == check[p])     b=base[p];
 else {
      i=begin;
      ++begin;
      if (begin == arrayLength)       break;
      b=base[0];
      continue;
    }
    p=b;
    n=base[p];
    if (b == check[p] && n < 0) {
      length=i - begin + 1;
      index=-n - 1;
      value=v[index];
      last=b;
      ++i;
      return true;
    }
  }
  return false;
}
Program: 53450
Project: 53450
Buggy source:
public static List<EnumItem<NT>> roleTag(List<Vertex> vertexList,WordNet wordNetAll){
  List<EnumItem<NT>> tagList=new LinkedList<EnumItem<NT>>();
  for (  Vertex vertex : vertexList) {
    Nature nature=vertex.guessNature();
switch (nature) {
case nz:
{
        if (vertex.getAttribute().totalFrequency <= 1000) {
          tagList.add(new EnumItem<NT>(NT.F,1000));
        }
      }
    continue;
case ni:
case nic:
case nis:
case nit:
{
    EnumItem<NT> ntEnumItem=new EnumItem<NT>(NT.K,1000);
    ntEnumItem.addLabel(NT.D,1000);
    tagList.add(ntEnumItem);
  }
continue;
case m:
{
EnumItem<NT> ntEnumItem=new EnumItem<NT>(NT.M,1000);
tagList.add(ntEnumItem);
}
continue;
}
EnumItem<NT> NTEnumItem=OrganizationDictionary.dictionary.get(vertex.word);
if (NTEnumItem == null) {
NTEnumItem=new EnumItem<NT>(NT.Z,OrganizationDictionary.transformMatrixDictionary.getTotalFrequency(NT.Z));
}
tagList.add(NTEnumItem);
}
return tagList;
}

Fixed version (ground truth):
public static List<EnumItem<NT>> roleTag(List<Vertex> vertexList,WordNet wordNetAll){
  List<EnumItem<NT>> tagList=new LinkedList<EnumItem<NT>>();
  for (  Vertex vertex : vertexList) {
    Nature nature=vertex.guessNature();
switch (nature) {
case nz:
{
        if (vertex.getAttribute().totalFrequency <= 1000) {
          tagList.add(new EnumItem<NT>(NT.F,1000));
        }
 else         break;
      }
    continue;
case ni:
case nic:
case nis:
case nit:
{
    EnumItem<NT> ntEnumItem=new EnumItem<NT>(NT.K,1000);
    ntEnumItem.addLabel(NT.D,1000);
    tagList.add(ntEnumItem);
  }
continue;
case m:
{
EnumItem<NT> ntEnumItem=new EnumItem<NT>(NT.M,1000);
tagList.add(ntEnumItem);
}
continue;
}
EnumItem<NT> NTEnumItem=OrganizationDictionary.dictionary.get(vertex.word);
if (NTEnumItem == null) {
NTEnumItem=new EnumItem<NT>(NT.Z,OrganizationDictionary.transformMatrixDictionary.getTotalFrequency(NT.Z));
}
tagList.add(NTEnumItem);
}
return tagList;
}
Program: 53452
Project: 53452
Buggy source:
@Override public int compare(Map.Entry<String,Float> o1,Map.Entry<String,Float> o2){
  return (o1.getValue() - o2.getValue() > 0 ? -1 : 1);
}

Fixed version (ground truth):
@Override public int compare(Map.Entry<String,Float> o1,Map.Entry<String,Float> o2){
  return o2.getValue().compareTo(o1.getValue());
}
Program: 53453
Project: 53453
Buggy source:
/** 
 * 用省内存的方式读取大文件
 * @param path
 * @return
 */
public static LinkedList<String> readLineListWithLessMemory(String path){
  LinkedList<String> result=new LinkedList<String>();
  String line=null;
  try {
    BufferedReader bw=new BufferedReader(new InputStreamReader(new FileInputStream(path)));
    while ((line=bw.readLine()) != null) {
      result.add(line);
    }
    bw.close();
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str" + path + "String_Node_Str"+ e);
  }
  return result;
}

Fixed version (ground truth):
/** 
 * 用省内存的方式读取大文件
 * @param path
 * @return
 */
public static LinkedList<String> readLineListWithLessMemory(String path){
  LinkedList<String> result=new LinkedList<String>();
  String line=null;
  try {
    BufferedReader bw=new BufferedReader(new InputStreamReader(new FileInputStream(path),"String_Node_Str"));
    while ((line=bw.readLine()) != null) {
      result.add(line);
    }
    bw.close();
  }
 catch (  Exception e) {
    logger.warning("String_Node_Str" + path + "String_Node_Str"+ e);
  }
  return result;
}
Program: 53455
Project: 53455
Buggy source:
@Override public void before(Object target,Object[] args){
  if (isDebug) {
    logger.beforeInterceptor(target,args);
  }
  Trace trace=traceContext.currentRawTraceObject();
  if (trace == null) {
    trace=createTrace(target,args);
    if (trace == null) {
      return;
    }
    try {
      final SpanRecorder recorder=trace.getSpanRecorder();
      doInBeforeTrace(recorder,target,args);
    }
 catch (    Throwable th) {
      if (logger.isWarnEnabled()) {
        logger.warn("String_Node_Str",th.getMessage(),th);
      }
    }
    return;
  }
  if (isDebug) {
    logger.debug("String_Node_Str",trace,trace.canSampled());
  }
  trace.addScope(SCOPE_NAME);
  if (!trace.canSampled()) {
    return;
  }
  RpcInvocation invocation=(RpcInvocation)args[0];
  SpanEventRecorder recorder=trace.traceBlockBegin();
  recorder.recordServiceType(DubboConstants.DUBBO_PROVIDER_SERVICE_NO_STATISTICS_TYPE);
  recorder.recordApi(methodDescriptor);
  recorder.recordAttribute(DubboConstants.DUBBO_RPC_ANNOTATION_KEY,invocation.getInvoker().getInterface().getSimpleName() + "String_Node_Str" + invocation.getMethodName());
}

Fixed version (ground truth):
@Override public void before(Object target,Object[] args){
  if (isDebug) {
    logger.beforeInterceptor(target,args);
  }
  Trace trace=traceContext.currentRawTraceObject();
  if (trace == null) {
    trace=createTrace(target,args);
    if (trace == null) {
      return;
    }
    if (!trace.canSampled()) {
      return;
    }
    try {
      final SpanRecorder recorder=trace.getSpanRecorder();
      doInBeforeTrace(recorder,target,args);
    }
 catch (    Throwable th) {
      if (logger.isWarnEnabled()) {
        logger.warn("String_Node_Str",th.getMessage(),th);
      }
    }
    return;
  }
  if (isDebug) {
    logger.debug("String_Node_Str",trace,trace.canSampled());
  }
  trace.addScope(SCOPE_NAME);
  if (!trace.canSampled()) {
    return;
  }
  RpcInvocation invocation=(RpcInvocation)args[0];
  SpanEventRecorder recorder=trace.traceBlockBegin();
  recorder.recordServiceType(DubboConstants.DUBBO_PROVIDER_SERVICE_NO_STATISTICS_TYPE);
  recorder.recordApi(methodDescriptor);
  recorder.recordAttribute(DubboConstants.DUBBO_RPC_ANNOTATION_KEY,invocation.getInvoker().getInterface().getSimpleName() + "String_Node_Str" + invocation.getMethodName());
}
Program: 53456
Project: 53456
Buggy source:
@Test public void testConsumer() throws NoSuchMethodException {
  Exception expected=null;
  abstractClusterInvoker=new FailoverClusterInvoker(directory);
  when(abstractClusterInvoker.getInterface()).thenReturn(String.class);
  try {
    abstractClusterInvoker.invoke(rpcInvocation);
  }
 catch (  RpcException e) {
    expected=e;
  }
  PluginTestVerifier verifier=PluginTestVerifierHolder.getInstance();
  verifier.printCache();
  Method invoke=AbstractClusterInvoker.class.getMethod("String_Node_Str",Invocation.class);
  verifier.verifyTrace(Expectations.event("String_Node_Str",invoke,expected));
  verifier.verifyTraceCount(0);
}

Fixed version (ground truth):
@Test public void testConsumer() throws NoSuchMethodException {
  abstractClusterInvoker=new MockInvoker<Demo>(Demo.class,url);
  try {
    abstractClusterInvoker.invoke(rpcInvocation);
  }
 catch (  RpcException e) {
  }
  PluginTestVerifier verifier=PluginTestVerifierHolder.getInstance();
  verifier.printCache();
  Method invoke=AbstractInvoker.class.getMethod("String_Node_Str",Invocation.class);
  verifier.verifyTraceCount(1);
}
Program: 53457
Project: 53457
Buggy source:
@Test public void testConsumerMonitor(){
  abstractClusterInvoker=new FailoverClusterInvoker(directory);
  when(abstractClusterInvoker.getInterface()).thenReturn(MonitorService.class);
  try {
    abstractClusterInvoker.invoke(rpcInvocation);
  }
 catch (  RpcException ignore) {
  }
  PluginTestVerifier verifier=PluginTestVerifierHolder.getInstance();
  verifier.printCache();
  verifier.verifyTraceCount(0);
}

Fixed version (ground truth):
@Test public void testConsumerMonitor(){
  abstractClusterInvoker=mock(AbstractInvoker.class);
  when(abstractClusterInvoker.getInterface()).thenReturn(MonitorService.class);
  try {
    abstractClusterInvoker.invoke(rpcInvocation);
  }
 catch (  RpcException ignore) {
  }
  PluginTestVerifier verifier=PluginTestVerifierHolder.getInstance();
  verifier.printCache();
  verifier.verifyTraceCount(0);
}
Program: 53458
Project: 53458
Buggy source:
@Before public void setUp(){
  url=new URL("String_Node_Str","String_Node_Str",5678);
  MockitoAnnotations.initMocks(this);
  when(directory.getUrl()).thenReturn(url);
}

Fixed version (ground truth):
@Before public void setUp(){
  url=new URL("String_Node_Str","String_Node_Str",5678);
  MockitoAnnotations.initMocks(this);
}
Program: 53459
Project: 53459
Buggy source:
@Test public void testProvider() throws NoSuchMethodException {
  AbstractProxyInvoker abstractProxyInvoker=new AbstractProxyInvoker(new String(),String.class,url){
    @Override protected Object doInvoke(    Object proxy,    String methodName,    Class[] parameterTypes,    Object[] arguments) throws Throwable {
      Method method=proxy.getClass().getMethod(methodName,parameterTypes);
      return method.invoke(proxy,arguments);
    }
  }
;
  try {
    abstractProxyInvoker.invoke(rpcInvocation);
  }
 catch (  RpcException ignore) {
    ignore.printStackTrace();
  }
  PluginTestVerifier verifier=PluginTestVerifierHolder.getInstance();
  verifier.printCache();
  verifier.verifyTraceCount(1);
}

Fixed version (ground truth):
@Test public void testProvider() throws NoSuchMethodException {
  AbstractProxyInvoker abstractProxyInvoker=new AbstractProxyInvoker(new String(),String.class,url){
    @Override protected Object doInvoke(    Object proxy,    String methodName,    Class[] parameterTypes,    Object[] arguments) throws Throwable {
      Method method=proxy.getClass().getMethod(methodName,parameterTypes);
      return method.invoke(proxy,arguments);
    }
  }
;
  try {
    abstractProxyInvoker.invoke(rpcInvocation);
  }
 catch (  RpcException ignore) {
    ignore.printStackTrace();
  }
  PluginTestVerifier verifier=PluginTestVerifierHolder.getInstance();
  verifier.printCache();
  verifier.verifyTraceCount(2);
}
Program: 53460
Project: 53460
Buggy source:
private <T>Plugin<T> newPlugin(T plugin){
  URL pluginURL=CodeSourceUtils.getCodeLocation(plugin.getClass());
  final File file=new File(pluginURL.getFile());
  if (file.isDirectory()) {
    return new DirClassPathPlugin<T>(pluginURL,Collections.singletonList(plugin),Collections.<String>emptyList());
  }
  if (file.getName().endsWith("String_Node_Str")) {
    JarFile jarFile=toJarFile(file);
    return new JarPlugin<T>(pluginURL,jarFile,Collections.singletonList(plugin),Collections.<String>emptyList());
  }
  throw new IllegalArgumentException("String_Node_Str" + pluginURL);
}

Fixed version (ground truth):
private <T>Plugin<T> newPlugin(T plugin){
  final URL pluginURL=CodeSourceUtils.getCodeLocation(plugin.getClass());
  if (pluginURL == null) {
    throw new IllegalStateException("String_Node_Str" + plugin.getClass());
  }
  final File file=new File(pluginURL.getFile());
  if (file.isDirectory()) {
    return new DirClassPathPlugin<T>(pluginURL,Collections.singletonList(plugin),Collections.<String>emptyList());
  }
  if (file.getName().endsWith("String_Node_Str")) {
    JarFile jarFile=toJarFile(file);
    return new JarPlugin<T>(pluginURL,jarFile,Collections.singletonList(plugin),Collections.<String>emptyList());
  }
  throw new IllegalArgumentException("String_Node_Str" + pluginURL);
}
Program: 53461
Project: 53461
Buggy source:
protected TBase<?,?> deserialize(HeaderTBaseDeserializer deserializer,ResponseMessage responseMessage){
  byte[] message=responseMessage.getMessage();
  Message<TBase<?,?>> deserialize=SerializationUtils.deserialize(message,deserializer,null);
  return deserialize.getData();
}

Fixed version (ground truth):
protected TBase<?,?> deserialize(HeaderTBaseDeserializer deserializer,ResponseMessage responseMessage){
  final byte[] message=responseMessage.getMessage();
  final Message<TBase<?,?>> deserialize=SerializationUtils.deserialize(message,deserializer,null);
  if (deserialize == null) {
    return null;
  }
  return deserialize.getData();
}
Program: 53462
Project: 53462
Buggy source:
@Override public void handleSimple(ServerRequest serverRequest){
  if (serverRequest instanceof ThriftRequest) {
    handleSimple(((ThriftRequest)serverRequest).getData());
  }
  throw new UnSupportedServerRequestTypeException(serverRequest.getClass() + "String_Node_Str" + serverRequest);
}

Fixed version (ground truth):
@Override public void handleSimple(ServerRequest serverRequest){
  if (serverRequest instanceof ThriftRequest) {
    handleSimple(((ThriftRequest)serverRequest).getData());
  }
 else {
    throw new UnSupportedServerRequestTypeException(serverRequest.getClass() + "String_Node_Str" + serverRequest);
  }
}
Program: 53463
Project: 53463
Buggy source:
private static boolean isSimpleType(Object arg){
  Class<?> find=SIMPLE_TYPE.get(arg.getClass());
  if (find == null) {
    return false;
  }
  return true;
}

Fixed version (ground truth):
static boolean isSimpleType(Object arg){
  Class<?> find=SIMPLE_TYPE.get(arg.getClass());
  if (find == null) {
    return false;
  }
  return true;
}
Program: 53464
Project: 53464
Buggy source:
private static String normalizedParameter(Object arg){
  if (arg == null) {
    return "String_Node_Str";
  }
 else {
    if (isSimpleType(arg)) {
      return arg.toString();
    }
 else {
      return arg.getClass().getSimpleName();
    }
  }
}

Fixed version (ground truth):
private static String normalizedParameter(Object arg){
  if (arg == null) {
    return "String_Node_Str";
  }
 else {
    if (isSimpleType(arg)) {
      return arg.toString();
    }
 else {
      return getSimpleName(arg.getClass());
    }
  }
}
Program: 53465
Project: 53465
Buggy source:
private static String getSocketAddress(SocketAddress socketAddress){
  String address=socketAddress.toString();
  int addressLength=address.length();
  if (addressLength > 0) {
    if (address.startsWith("String_Node_Str")) {
      return address.substring(1);
    }
 else {
      final int delimeterIndex=address.indexOf('/');
      if (delimeterIndex != -1 && delimeterIndex < addressLength) {
        return address.substring(address.indexOf('/') + 1);
      }
    }
  }
  return address;
}

Fixed version (ground truth):
private static String getSocketAddress(SocketAddress socketAddress){
  String address=socketAddress.toString();
  int addressLength=address.length();
  if (addressLength > 0) {
    if (address.startsWith("String_Node_Str")) {
      return address.substring(1);
    }
 else {
      final int delimiterIndex=address.indexOf('/');
      if (delimiterIndex != -1 && delimiterIndex < addressLength) {
        return address.substring(address.indexOf('/') + 1);
      }
    }
  }
  return address;
}
Program: 53466
Project: 53466
Buggy source:
private boolean needFlush(SpanStreamSendData spanStreamSendData,int length,int delemeterBufferSize){
  if (!spanStreamSendData.isAvailableBufferCapacity(length + delemeterBufferSize)) {
    return true;
  }
  int availableComponentsCount=1;
  if (delemeterBufferSize > 0) {
    availableComponentsCount++;
  }
  if (!spanStreamSendData.isAvailableComponentsCount(availableComponentsCount)) {
    return true;
  }
  return false;
}

Fixed version (ground truth):
private boolean needFlush(SpanStreamSendData spanStreamSendData,int length,int delimiterBufferSize){
  if (!spanStreamSendData.isAvailableBufferCapacity(length + delimiterBufferSize)) {
    return true;
  }
  int availableComponentsCount=1;
  if (delimiterBufferSize > 0) {
    availableComponentsCount++;
  }
  if (!spanStreamSendData.isAvailableComponentsCount(availableComponentsCount)) {
    return true;
  }
  return false;
}
Program: 53467
Project: 53467
Buggy source:
private String getConstructorInfo(Constructor<?> constructor){
  Class<?>[] parameterTypes=constructor.getParameterTypes();
  String[] parameterTypeNames=JavaAssistUtils.getParameterType(parameterTypes);
  final String constructorSimpleName=MethodDescriptionUtils.getConstructorSimpleName(constructor);
  return MethodDescriptionUtils.toJavaMethodDescriptor(constructor.getDeclaringClass().getName(),constructorSimpleName,parameterTypeNames);
}

Fixed version (ground truth):
private String getConstructorInfo(Constructor<?> constructor){
  Class<?>[] parameterTypes=constructor.getParameterTypes();
  String[] parameterTypeNames=JavaAssistUtils.toPinpointParameterType(parameterTypes);
  final String constructorSimpleName=MethodDescriptionUtils.getConstructorSimpleName(constructor);
  return MethodDescriptionUtils.toJavaMethodDescriptor(constructor.getDeclaringClass().getName(),constructorSimpleName,parameterTypeNames);
}
Program: 53468
Project: 53468
Buggy source:
public static List<String> getHostIpList(){
  List<String> result=new ArrayList<String>();
  Enumeration<NetworkInterface> interfaces=null;
  try {
    interfaces=NetworkInterface.getNetworkInterfaces();
  }
 catch (  SocketException ignore) {
  }
  if (interfaces == null) {
    return Collections.EMPTY_LIST;
  }
  while (interfaces.hasMoreElements()) {
    NetworkInterface current=interfaces.nextElement();
    if (isSkipNetworkInterface(current)) {
      continue;
    }
    Enumeration<InetAddress> addresses=current.getInetAddresses();
    while (addresses.hasMoreElements()) {
      InetAddress address=addresses.nextElement();
      if (address.isLoopbackAddress()) {
        continue;
      }
      String hostAddress=address.getHostAddress();
      if (!isLoopbackAddress(hostAddress)) {
        result.add(address.getHostAddress());
      }
    }
  }
  return result;
}

Fixed version (ground truth):
public static List<String> getHostIpList(){
  List<String> result=new ArrayList<String>();
  Enumeration<NetworkInterface> interfaces=null;
  try {
    interfaces=NetworkInterface.getNetworkInterfaces();
  }
 catch (  SocketException ignore) {
  }
  if (interfaces == null) {
    return Collections.emptyList();
  }
  while (interfaces.hasMoreElements()) {
    NetworkInterface current=interfaces.nextElement();
    if (isSkipNetworkInterface(current)) {
      continue;
    }
    Enumeration<InetAddress> addresses=current.getInetAddresses();
    while (addresses.hasMoreElements()) {
      InetAddress address=addresses.nextElement();
      if (address.isLoopbackAddress()) {
        continue;
      }
      String hostAddress=address.getHostAddress();
      if (!isLoopbackAddress(hostAddress)) {
        result.add(address.getHostAddress());
      }
    }
  }
  return result;
}
Program: 53469
Project: 53469
Buggy source:
public List<ASMClassNodeAdapter> getInnerClasses(){
  if (this.classNode.innerClasses == null) {
    return Collections.EMPTY_LIST;
  }
  final List<ASMClassNodeAdapter> innerClasses=new ArrayList<ASMClassNodeAdapter>();
  final List<InnerClassNode> innerClassNodes=this.classNode.innerClasses;
  for (  InnerClassNode node : innerClassNodes) {
    if (node.name == null) {
      continue;
    }
    ASMClassNodeAdapter adapter=get(this.pluginContext,this.classLoader,node.name,true);
    if (adapter != null) {
      innerClasses.add(adapter);
    }
  }
  return innerClasses;
}

Fixed version (ground truth):
public List<ASMClassNodeAdapter> getInnerClasses(){
  if (this.classNode.innerClasses == null) {
    return Collections.emptyList();
  }
  final List<ASMClassNodeAdapter> innerClasses=new ArrayList<ASMClassNodeAdapter>();
  final List<InnerClassNode> innerClassNodes=this.classNode.innerClasses;
  for (  InnerClassNode node : innerClassNodes) {
    if (node.name == null) {
      continue;
    }
    ASMClassNodeAdapter adapter=get(this.pluginContext,this.classLoader,node.name,true);
    if (adapter != null) {
      innerClasses.add(adapter);
    }
  }
  return innerClasses;
}
Program: 53470
Project: 53470
Buggy source:
public DefaultInternalClassMetadata(final String classInternalName,final String superClassInternalName,final List<String> interfaceInternalNames,final List<String> annotationInternalNames,final boolean isInterface,final boolean isAnnotation,final boolean isSynthetic,final boolean isInnerClass){
  this.classInternalName=classInternalName;
  this.superClassInternalName=superClassInternalName;
  if (interfaceInternalNames == null) {
    this.interfaceInternalNames=Collections.EMPTY_LIST;
  }
 else {
    this.interfaceInternalNames=Collections.unmodifiableList(interfaceInternalNames);
  }
  if (annotationInternalNames == null) {
    this.annotationInternalNames=Collections.EMPTY_LIST;
  }
 else {
    this.annotationInternalNames=Collections.unmodifiableList(annotationInternalNames);
  }
  this.isInterface=isInterface;
  this.isAnnotation=isAnnotation;
  this.isSynthetic=isSynthetic;
  this.isInnerClass=isInnerClass;
}

Fixed version (ground truth):
public DefaultInternalClassMetadata(final String classInternalName,final String superClassInternalName,final List<String> interfaceInternalNames,final List<String> annotationInternalNames,final boolean isInterface,final boolean isAnnotation,final boolean isSynthetic,final boolean isInnerClass){
  this.classInternalName=classInternalName;
  this.superClassInternalName=superClassInternalName;
  this.interfaceInternalNames=defaultInterfaceName(interfaceInternalNames);
  this.annotationInternalNames=defaultAnnotationName(annotationInternalNames);
  this.isInterface=isInterface;
  this.isAnnotation=isAnnotation;
  this.isSynthetic=isSynthetic;
  this.isInnerClass=isInnerClass;
}
Program: 53471
Project: 53471
Buggy source:
public DefaultSimpleClassMetadata(final int version,final int accessFlag,final String classInternalName,final String superClassInternalName,final List<String> interfaceInternalNames,final byte[] classBinary){
  this.version=version;
  this.accessFlag=accessFlag;
  this.className=JavaAssistUtils.jvmNameToJavaName(classInternalName);
  if (superClassInternalName == null) {
    this.superClassName=null;
  }
 else {
    this.superClassName=JavaAssistUtils.jvmNameToJavaName(superClassInternalName);
  }
  if (interfaceInternalNames == null) {
    this.interfaceNames=Collections.EMPTY_LIST;
  }
 else {
    this.interfaceNames=Collections.unmodifiableList(JavaAssistUtils.jvmNameToJavaName(interfaceInternalNames));
  }
  this.classBinary=classBinary;
}

Fixed version (ground truth):
public DefaultSimpleClassMetadata(final int version,final int accessFlag,final String classInternalName,final String superClassInternalName,final List<String> interfaceInternalNames,final byte[] classBinary){
  this.version=version;
  this.accessFlag=accessFlag;
  this.className=JavaAssistUtils.jvmNameToJavaName(classInternalName);
  this.superClassName=defaultSuperClassName(superClassInternalName);
  this.interfaceNames=defaultInterfaceName(interfaceInternalNames);
  this.classBinary=classBinary;
}
Program: 53472
Project: 53472
Buggy source:
private TSpanChunk copySpanChunkWithoutSpanEvent(TSpanChunk spanChunk){
  TSpanChunk copiedSpanChunk=spanChunk.deepCopy();
  copiedSpanChunk.setSpanEventList(Collections.EMPTY_LIST);
  return copiedSpanChunk;
}

Fixed version (ground truth):
private TSpanChunk copySpanChunkWithoutSpanEvent(TSpanChunk spanChunk){
  TSpanChunk copiedSpanChunk=spanChunk.deepCopy();
  copiedSpanChunk.setSpanEventList(Collections.<TSpanEvent>emptyList());
  return copiedSpanChunk;
}
Program: 53473
Project: 53473
Buggy source:
private TSpan copySpanWithoutSpanEvent(TSpan span){
  TSpan copiedSpan=span.deepCopy();
  copiedSpan.setSpanEventList(Collections.EMPTY_LIST);
  return copiedSpan;
}

Fixed version (ground truth):
private TSpan copySpanWithoutSpanEvent(TSpan span){
  TSpan copiedSpan=span.deepCopy();
  copiedSpan.setSpanEventList(Collections.<TSpanEvent>emptyList());
  return copiedSpan;
}
Program: 53474
Project: 53474
Buggy source:
private TSpanChunk toSpanChunk(TSpan span){
  final TSpanChunk spanChunk=new TSpanChunk();
  spanChunk.setSpanEventList(Collections.EMPTY_LIST);
  spanChunk.setSpanEventListIsSet(true);
  spanChunk.setAgentId(span.getAgentId());
  spanChunk.setAgentIdIsSet(true);
  spanChunk.setApplicationName(span.getApplicationName());
  spanChunk.setApplicationNameIsSet(true);
  spanChunk.setAgentStartTime(span.getStartTime());
  spanChunk.setAgentStartTimeIsSet(true);
  spanChunk.setTransactionId(span.getTransactionId());
  spanChunk.setTransactionIdIsSet(true);
  spanChunk.setSpanId(span.getSpanId());
  spanChunk.setSpanIdIsSet(true);
  spanChunk.setEndPoint(span.getEndPoint());
  spanChunk.setEndPointIsSet(true);
  return spanChunk;
}

Fixed version (ground truth):
private TSpanChunk toSpanChunk(TSpan span){
  final TSpanChunk spanChunk=new TSpanChunk();
  spanChunk.setSpanEventList(Collections.<TSpanEvent>emptyList());
  spanChunk.setSpanEventListIsSet(true);
  spanChunk.setAgentId(span.getAgentId());
  spanChunk.setAgentIdIsSet(true);
  spanChunk.setApplicationName(span.getApplicationName());
  spanChunk.setApplicationNameIsSet(true);
  spanChunk.setAgentStartTime(span.getStartTime());
  spanChunk.setAgentStartTimeIsSet(true);
  spanChunk.setTransactionId(span.getTransactionId());
  spanChunk.setTransactionIdIsSet(true);
  spanChunk.setSpanId(span.getSpanId());
  spanChunk.setSpanIdIsSet(true);
  spanChunk.setEndPoint(span.getEndPoint());
  spanChunk.setEndPointIsSet(true);
  return spanChunk;
}
Program: 53475
Project: 53475
Buggy source:
@Test public void interfaceNamesNull() throws Exception {
  DefaultInternalClassMetadata classMetadata=new DefaultInternalClassMetadata("String_Node_Str","String_Node_Str",null,Collections.EMPTY_LIST,false,false,false,false);
  assertEquals(0,classMetadata.getInterfaceInternalNames().size());
}

Fixed version (ground truth):
@Test public void interfaceNamesNull() throws Exception {
  DefaultInternalClassMetadata classMetadata=new DefaultInternalClassMetadata("String_Node_Str","String_Node_Str",null,Collections.<String>emptyList(),false,false,false,false);
  assertEquals(0,classMetadata.getInterfaceInternalNames().size());
}
Program: 53476
Project: 53476
Buggy source:
@Test public void base() throws Exception {
  DefaultInternalClassMetadata classMetadata=new DefaultInternalClassMetadata("String_Node_Str","String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str"),Collections.EMPTY_LIST,false,false,false,false);
  assertEquals("String_Node_Str",classMetadata.getClassInternalName());
  assertEquals("String_Node_Str",classMetadata.getSuperClassInternalName());
  assertTrue(classMetadata.getInterfaceInternalNames().contains("String_Node_Str"));
  assertTrue(classMetadata.getInterfaceInternalNames().contains("String_Node_Str"));
  assertEquals(0,classMetadata.getAnnotationInternalNames().size());
}

Fixed version (ground truth):
@Test public void base() throws Exception {
  DefaultInternalClassMetadata classMetadata=new DefaultInternalClassMetadata("String_Node_Str","String_Node_Str",Arrays.asList("String_Node_Str","String_Node_Str"),Collections.<String>emptyList(),false,false,false,false);
  assertEquals("String_Node_Str",classMetadata.getClassInternalName());
  assertEquals("String_Node_Str",classMetadata.getSuperClassInternalName());
  assertTrue(classMetadata.getInterfaceInternalNames().contains("String_Node_Str"));
  assertTrue(classMetadata.getInterfaceInternalNames().contains("String_Node_Str"));
  assertEquals(0,classMetadata.getAnnotationInternalNames().size());
}
Program: 53477
Project: 53477
Buggy source:
Map<String,byte[]> getCollectorData(ZookeeperClient client,String path){
  try {
    List<String> collectorList=client.getChildren(path,true);
    if (collectorList == Collections.EMPTY_LIST) {
      return Collections.emptyMap();
    }
    Map<String,byte[]> map=new HashMap<>();
    for (    String collector : collectorList) {
      String node=bindingPathAndZNode(path,collector);
      byte[] data=client.getData(node,true);
      map.put(node,data);
    }
    return map;
  }
 catch (  Exception e) {
    logger.warn(e.getMessage(),e);
  }
  return Collections.emptyMap();
}

Fixed version (ground truth):
Map<String,byte[]> getCollectorData(ZookeeperClient client,String path){
  try {
    List<String> collectorList=client.getChildren(path,true);
    if (CollectionUtils.isEmpty(collectorList)) {
      return Collections.emptyMap();
    }
    Map<String,byte[]> map=new HashMap<>();
    for (    String collector : collectorList) {
      String node=bindingPathAndZNode(path,collector);
      byte[] data=client.getData(node,true);
      map.put(node,data);
    }
    return map;
  }
 catch (  Exception e) {
    logger.warn(e.getMessage(),e);
  }
  return Collections.emptyMap();
}
Program: 53478
Project: 53478
Buggy source:
private static List<Link> filterSpan(final List<Link> linkList,final SpanBo span){
  if (linkList == null || linkList.isEmpty()) {
    return Collections.EMPTY_LIST;
  }
  final List<Link> result=new ArrayList<>();
  for (  Link link : linkList) {
    if (span.getParentSpanId() == link.parentSpanId && span.getSpanId() == link.spanId) {
      continue;
    }
    if (link.nextSpanId == span.getParentSpanId()) {
      result.add(link);
    }
  }
  return result;
}

Fixed version (ground truth):
private static List<Link> filterSpan(final List<Link> linkList,final SpanBo span){
  if (CollectionUtils.isEmpty(linkList)) {
    return Collections.emptyList();
  }
  final List<Link> result=new ArrayList<>();
  for (  Link link : linkList) {
    if (span.getParentSpanId() == link.parentSpanId && span.getSpanId() == link.spanId) {
      continue;
    }
    if (link.nextSpanId == span.getParentSpanId()) {
      result.add(link);
    }
  }
  return result;
}
Program: 53479
Project: 53479
Buggy source:
private void fill(){
  final List<Node> unlinkedNodeList=NodeList.filterUnlinked(this.sortedNodeList);
  for (  Node node : unlinkedNodeList) {
    if (node.linked || node.span.isRoot()) {
      continue;
    }
    final List<Link> targetLinkList=LinkList.filterSpan(this.linkList,node.span);
    if (targetLinkList != null && !targetLinkList.isEmpty()) {
      final Link matchedLink=LinkList.matchSpan(targetLinkList,node.span);
      if (matchedLink != null) {
        if (isDebug) {
          logger.debug("String_Node_Str",matchedLink,node);
        }
        final CallTree unknownSpanCallTree=this.metaSpanCallTreeFactory.unknown(node.span.getStartTime());
        unknownSpanCallTree.add(node.spanCallTree);
        node.linked=true;
        matchedLink.linkedCallTree.update(unknownSpanCallTree);
        matchedLink.linked=true;
        this.linkList.remove(matchedLink);
        updateMatchType(PROGRESS_MATCH);
      }
    }
  }
}

Fixed version (ground truth):
private void fill(){
  final List<Node> unlinkedNodeList=NodeList.filterUnlinked(this.sortedNodeList);
  for (  Node node : unlinkedNodeList) {
    if (node.linked || node.span.isRoot()) {
      continue;
    }
    final List<Link> targetLinkList=LinkList.filterSpan(this.linkList,node.span);
    if (CollectionUtils.hasLength(targetLinkList)) {
      final Link matchedLink=LinkList.matchSpan(targetLinkList,node.span);
      if (matchedLink != null) {
        if (isDebug) {
          logger.debug("String_Node_Str",matchedLink,node);
        }
        final CallTree unknownSpanCallTree=this.metaSpanCallTreeFactory.unknown(node.span.getStartTime());
        unknownSpanCallTree.add(node.spanCallTree);
        node.linked=true;
        matchedLink.linkedCallTree.update(unknownSpanCallTree);
        matchedLink.linked=true;
        this.linkList.remove(matchedLink);
        updateMatchType(PROGRESS_MATCH);
      }
    }
  }
}
Program: 53480
Project: 53480
Buggy source:
private static Link matchSpan(final List<Link> linkList,final SpanBo span){
  if (linkList == null || linkList.isEmpty()) {
    return null;
  }
  linkList.sort(new Comparator<Link>(){
    @Override public int compare(    Link first,    Link second){
      return (int)(first.startTimeMillis - second.startTimeMillis);
    }
  }
);
  for (  Link link : linkList) {
    if (link.startTimeMillis <= span.getStartTime()) {
      return link;
    }
  }
  return null;
}

Fixed version (ground truth):
private static Link matchSpan(final List<Link> linkList,final SpanBo span){
  if (CollectionUtils.isEmpty(linkList)) {
    return null;
  }
  linkList.sort(new Comparator<Link>(){
    @Override public int compare(    Link first,    Link second){
      return (int)(first.startTimeMillis - second.startTimeMillis);
    }
  }
);
  for (  Link link : linkList) {
    if (link.startTimeMillis <= span.getStartTime()) {
      return link;
    }
  }
  return null;
}