Program: 120548
Project: 120548
Buggy source:
public void search(Map<Integer,Map<Integer,Figure>> searchMaps,String searchValue){
  if (searchValue.equals("String_Node_Str") || searchValue == null) {
    return;
  }
  List<InputXmlTree> inputTrees=mapperManager.getExternalData().getInputTrees();
  List<VarTable> varTables=mapperManager.getExternalData().getVarTables();
  List<OutputXmlTree> outputTrees=mapperManager.getExternalData().getOutputTrees();
  matcher.setPattern("String_Node_Str" + searchValue.trim() + "String_Node_Str");
  int index=-1;
  for (  InputXmlTree inputXmlTree : inputTrees) {
    if (inputXmlTree.getExpressionFilter() != null && matcher.matches(inputXmlTree.getExpressionFilter())) {
      EList<Adapter> adapter=inputXmlTree.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof InputXmlTreeEditPart) {
          InputXmlTreeEditPart inputXmlTreeEditPart=(InputXmlTreeEditPart)adapter.get(0);
          if (inputXmlTreeEditPart != null && inputXmlTreeEditPart.getFigure() != null && inputXmlTreeEditPart.getFigure() instanceof InputXmlTreeFigure) {
            InputXmlTreeFigure inputXmlTreeFigure=(InputXmlTreeFigure)inputXmlTreeEditPart.getFigure();
            Map<Integer,Figure> map=new HashMap<Integer,Figure>();
            map.put(0,inputXmlTreeFigure.getFilterContainer());
            index++;
            searchMaps.put(index,map);
          }
        }
      }
    }
    for (    TreeNode node : inputXmlTree.getNodes()) {
      if (getMatcherNodeFigure(node).size() > 0) {
        index++;
        searchMaps.put(index,getMatcherNodeFigure(node));
      }
    }
  }
  for (  VarTable varTable : varTables) {
    for (    VarNode node : varTable.getNodes()) {
      if (getMatcherNodeFigure(node).size() > 0) {
        index++;
        searchMaps.put(index,getMatcherNodeFigure(node));
      }
    }
  }
  for (  OutputXmlTree outputXmlTree : outputTrees) {
    if (outputXmlTree.getExpressionFilter() != null && matcher.matches(outputXmlTree.getExpressionFilter())) {
      EList<Adapter> adapter=outputXmlTree.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof OutputXmlTreeEditPart) {
          OutputXmlTreeEditPart outputXmlTreeEditPart=(OutputXmlTreeEditPart)adapter.get(0);
          if (outputXmlTreeEditPart != null && outputXmlTreeEditPart.getFigure() != null && outputXmlTreeEditPart.getFigure() instanceof OutputXmlTreeFigure) {
            OutputXmlTreeFigure outputXmlTreeFigure=(OutputXmlTreeFigure)outputXmlTreeEditPart.getFigure();
            Map<Integer,Figure> map=new HashMap<Integer,Figure>();
            map.put(0,outputXmlTreeFigure.getFilterContainer());
            index++;
            searchMaps.put(index,map);
          }
        }
      }
    }
    for (    OutputTreeNode node : outputXmlTree.getNodes()) {
      if (XmlMapUtil.DOCUMENT.equals(node.getType())) {
        for (        TreeNode nodeTemp : XmlMapUtil.getFlatChildrenList(node)) {
          if (getMatcherNodeFigure(nodeTemp).size() > 0) {
            index++;
            searchMaps.put(index,getMatcherNodeFigure(nodeTemp));
          }
        }
      }
 else {
        if (getMatcherNodeFigure(node).size() > 0) {
          index++;
          searchMaps.put(index,getMatcherNodeFigure(node));
        }
      }
    }
  }
}

Fixed version (ground truth):
public void search(Map<Integer,Map<Integer,Figure>> searchMaps,String searchValue){
  if (searchValue.equals("String_Node_Str") || searchValue == null) {
    return;
  }
  List<InputXmlTree> inputTrees=mapperManager.getExternalData().getInputTrees();
  List<VarTable> varTables=mapperManager.getExternalData().getVarTables();
  List<OutputXmlTree> outputTrees=mapperManager.getExternalData().getOutputTrees();
  matcher.setPattern("String_Node_Str" + searchValue.trim() + "String_Node_Str");
  int index=-1;
  for (  InputXmlTree inputXmlTree : inputTrees) {
    if (inputXmlTree.getExpressionFilter() != null && matcher.matches(inputXmlTree.getExpressionFilter())) {
      EList<Adapter> adapter=inputXmlTree.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof InputXmlTreeEditPart) {
          InputXmlTreeEditPart inputXmlTreeEditPart=(InputXmlTreeEditPart)adapter.get(0);
          if (inputXmlTreeEditPart != null && inputXmlTreeEditPart.getFigure() != null && inputXmlTreeEditPart.getFigure() instanceof InputXmlTreeFigure) {
            InputXmlTreeFigure inputXmlTreeFigure=(InputXmlTreeFigure)inputXmlTreeEditPart.getFigure();
            Map<Integer,Figure> map=new HashMap<Integer,Figure>();
            map.put(0,inputXmlTreeFigure.getFilterContainer());
            index++;
            searchMaps.put(index,map);
          }
        }
      }
    }
    for (    TreeNode node : inputXmlTree.getNodes()) {
      if (XmlMapUtil.DOCUMENT.equals(node.getType())) {
        for (        TreeNode nodeTemp : XmlMapUtil.getFlatChildrenList(node)) {
          if (getMatcherNodeFigure(nodeTemp).size() > 0) {
            index++;
            searchMaps.put(index,getMatcherNodeFigure(nodeTemp));
          }
        }
      }
      if (getMatcherNodeFigure(node).size() > 0) {
        index++;
        searchMaps.put(index,getMatcherNodeFigure(node));
      }
    }
  }
  for (  VarTable varTable : varTables) {
    for (    VarNode node : varTable.getNodes()) {
      if (getMatcherNodeFigure(node).size() > 0) {
        index++;
        searchMaps.put(index,getMatcherNodeFigure(node));
      }
    }
  }
  for (  OutputXmlTree outputXmlTree : outputTrees) {
    if (outputXmlTree.getExpressionFilter() != null && matcher.matches(outputXmlTree.getExpressionFilter())) {
      EList<Adapter> adapter=outputXmlTree.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof OutputXmlTreeEditPart) {
          OutputXmlTreeEditPart outputXmlTreeEditPart=(OutputXmlTreeEditPart)adapter.get(0);
          if (outputXmlTreeEditPart != null && outputXmlTreeEditPart.getFigure() != null && outputXmlTreeEditPart.getFigure() instanceof OutputXmlTreeFigure) {
            OutputXmlTreeFigure outputXmlTreeFigure=(OutputXmlTreeFigure)outputXmlTreeEditPart.getFigure();
            Map<Integer,Figure> map=new HashMap<Integer,Figure>();
            map.put(0,outputXmlTreeFigure.getFilterContainer());
            index++;
            searchMaps.put(index,map);
          }
        }
      }
    }
    for (    OutputTreeNode node : outputXmlTree.getNodes()) {
      if (XmlMapUtil.DOCUMENT.equals(node.getType())) {
        for (        TreeNode nodeTemp : XmlMapUtil.getFlatChildrenList(node)) {
          if (getMatcherNodeFigure(nodeTemp).size() > 0) {
            index++;
            searchMaps.put(index,getMatcherNodeFigure(nodeTemp));
          }
        }
      }
 else {
        if (getMatcherNodeFigure(node).size() > 0) {
          index++;
          searchMaps.put(index,getMatcherNodeFigure(node));
        }
      }
    }
  }
}