Program: 124935
Project: 124935
Buggy source:
public void search(Map<Integer,Figure> searchMaps,String searchValue){
  if (searchValue.equals("String_Node_Str") || searchValue == null) {
    return;
  }
  SearchPattern matcher=new SearchPattern();
  matcher.setPattern(searchValue);
  List<InputTable> inputTables=mapperManager.getExternalData().getInputTables();
  List<OutputTable> outputTables=mapperManager.getExternalData().getOutputTables();
  int index=-1;
  for (  InputTable inputTable : inputTables) {
    if (inputTable.getExpressionFilter() != null && matcher.matches(inputTable.getExpressionFilter())) {
      EList<Adapter> adapter=inputTable.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof PigMapInputTablePart) {
          PigMapInputTablePart inputTablePart=(PigMapInputTablePart)adapter.get(0);
          if (inputTablePart != null && inputTablePart.getFigure() != null && inputTablePart.getFigure() instanceof InputTableFigure) {
            InputTableFigure inputTableFigure=(InputTableFigure)inputTablePart.getFigure();
            index++;
            searchMaps.put(index,inputTableFigure.getFilterContainer());
          }
        }
      }
    }
    for (    TableNode node : inputTable.getNodes()) {
      if (node.getExpression() != null && matcher.matches(node.getExpression())) {
        EList<Adapter> adapter=node.eAdapters();
        if (adapter.size() > 0) {
          if (adapter.get(0) instanceof TableEntityPart) {
            TableEntityPart tableEntityPart=(TableEntityPart)adapter.get(0);
            if (tableEntityPart != null && tableEntityPart.getFigure() != null && tableEntityPart.getFigure() instanceof TableEntityFigure) {
              TableEntityFigure nodeFigure=(TableEntityFigure)tableEntityPart.getFigure();
              index++;
              searchMaps.put(index,nodeFigure);
            }
          }
        }
      }
    }
  }
  for (  OutputTable outputTable : outputTables) {
    if (outputTable.getExpressionFilter() != null && matcher.matches(outputTable.getExpressionFilter())) {
      EList<Adapter> adapter=outputTable.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof PigMapOutputTablePart) {
          PigMapOutputTablePart outputTablePart=(PigMapOutputTablePart)adapter.get(0);
          if (outputTablePart != null && outputTablePart.getFigure() != null && outputTablePart.getFigure() instanceof OutputTableFigure) {
            OutputTableFigure outputTableFigure=(OutputTableFigure)outputTablePart.getFigure();
            index++;
            searchMaps.put(index,outputTableFigure.getFilterContainer());
          }
        }
      }
    }
    for (    TableNode node : outputTable.getNodes()) {
      if (node.getExpression() != null && matcher.matches(node.getExpression())) {
        EList<Adapter> adapter=node.eAdapters();
        if (adapter.size() > 0) {
          if (adapter.get(0) instanceof TableEntityPart) {
            TableEntityPart tableEntityPart=(TableEntityPart)adapter.get(0);
            if (tableEntityPart != null && tableEntityPart.getFigure() != null && tableEntityPart.getFigure() instanceof TableEntityFigure) {
              TableEntityFigure nodeFigure=(TableEntityFigure)tableEntityPart.getFigure();
              index++;
              searchMaps.put(index,nodeFigure);
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
public void search(Map<Integer,Figure> searchMaps,String searchValue){
  if (searchValue.equals("String_Node_Str") || searchValue == null) {
    return;
  }
  List<InputTable> inputTables=mapperManager.getExternalData().getInputTables();
  List<OutputTable> outputTables=mapperManager.getExternalData().getOutputTables();
  matcher.setPattern(searchValue);
  int index=-1;
  for (  InputTable inputTable : inputTables) {
    if (inputTable.getExpressionFilter() != null && matcher.matches(inputTable.getExpressionFilter())) {
      EList<Adapter> adapter=inputTable.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof PigMapInputTablePart) {
          PigMapInputTablePart inputTablePart=(PigMapInputTablePart)adapter.get(0);
          if (inputTablePart != null && inputTablePart.getFigure() != null && inputTablePart.getFigure() instanceof InputTableFigure) {
            InputTableFigure inputTableFigure=(InputTableFigure)inputTablePart.getFigure();
            index++;
            searchMaps.put(index,inputTableFigure.getFilterContainer());
          }
        }
      }
    }
    for (    TableNode node : inputTable.getNodes()) {
      if (getMatcherNodeFigure(node) != null) {
        index++;
        searchMaps.put(index,getMatcherNodeFigure(node));
      }
    }
  }
  for (  OutputTable outputTable : outputTables) {
    if (outputTable.getExpressionFilter() != null && matcher.matches(outputTable.getExpressionFilter())) {
      EList<Adapter> adapter=outputTable.eAdapters();
      if (adapter.size() > 0) {
        if (adapter.get(0) instanceof PigMapOutputTablePart) {
          PigMapOutputTablePart outputTablePart=(PigMapOutputTablePart)adapter.get(0);
          if (outputTablePart != null && outputTablePart.getFigure() != null && outputTablePart.getFigure() instanceof OutputTableFigure) {
            OutputTableFigure outputTableFigure=(OutputTableFigure)outputTablePart.getFigure();
            index++;
            searchMaps.put(index,outputTableFigure.getFilterContainer());
          }
        }
      }
    }
    for (    TableNode node : outputTable.getNodes()) {
      if (getMatcherNodeFigure(node) != null) {
        index++;
        searchMaps.put(index,getMatcherNodeFigure(node));
      }
    }
  }
}