Program: 55136
Project: 55136
Buggy source:
public static Path exportSubgraphToHDFS(GraphDatabaseService db) throws IOException, URISyntaxException {
  FileSystem fs=FileUtil.getHadoopFileSystem();
  Path pt=new Path(ConfigurationLoader.getInstance().getHadoopHdfsUri() + EDGE_LIST_RELATIVE_FILE_PATH);
  BufferedWriter br=new BufferedWriter(new OutputStreamWriter(fs.create(pt)));
  Transaction tx=db.beginTx();
  Iterable<Node> nodes=GlobalGraphOperations.at(db).getAllNodes();
  br.write("String_Node_Str" + "String_Node_Str");
  int nodeTotal=IteratorUtil.count(nodes);
  final int[] nodeCount={0};
  final int[] pathCount={0};
  int pathCountBlocks=10000;
  int size=IteratorUtil.count(nodes.iterator());
  nodes.iterator().forEachRemaining(n -> {
    Iterable<org.neo4j.graphdb.Path> nPaths=db.traversalDescription().depthFirst().relationships(withName(ConfigurationLoader.getInstance().getMazerunnerRelationshipType()),Direction.OUTGOING).evaluator(Evaluators.fromDepth(1)).evaluator(Evaluators.toDepth(1)).traverse(n);
    for (    org.neo4j.graphdb.Path path : nPaths) {
      try {
        String line=path.startNode().getId() + "String_Node_Str" + path.endNode().getId();
        br.write(line + "String_Node_Str");
        pathCount[0]++;
        if (pathCount[0] > pathCountBlocks) {
          pathCount[0]=0;
          System.out.println("String_Node_Str" + MessageFormat.format("String_Node_Str",((double)nodeCount[0] / (double)nodeTotal)));
        }
      }
 catch (      Exception ex) {
        System.out.println(ex.getMessage());
      }
    }
    nodeCount[0]++;
  }
);
  System.out.println("String_Node_Str" + MessageFormat.format("String_Node_Str",1.0));
  br.flush();
  br.close();
  tx.success();
  tx.close();
  return pt;
}

Fixed version (ground truth):
public static Path exportSubgraphToHDFS(GraphDatabaseService db) throws IOException, URISyntaxException {
  FileSystem fs=FileUtil.getHadoopFileSystem();
  Path pt=new Path(ConfigurationLoader.getInstance().getHadoopHdfsUri() + EDGE_LIST_RELATIVE_FILE_PATH.replace("String_Node_Str","String_Node_Str"));
  BufferedWriter br=new BufferedWriter(new OutputStreamWriter(fs.create(pt)));
  Transaction tx=db.beginTx();
  Iterable<Node> nodes=GlobalGraphOperations.at(db).getAllNodes();
  br.write("String_Node_Str" + "String_Node_Str");
  int nodeTotal=IteratorUtil.count(nodes);
  final int[] nodeCount={0};
  final int[] pathCount={0};
  int pathCountBlocks=10000;
  int size=IteratorUtil.count(nodes.iterator());
  nodes.iterator().forEachRemaining(n -> {
    Iterable<org.neo4j.graphdb.Path> nPaths=db.traversalDescription().depthFirst().relationships(withName(ConfigurationLoader.getInstance().getMazerunnerRelationshipType()),Direction.OUTGOING).evaluator(Evaluators.fromDepth(1)).evaluator(Evaluators.toDepth(1)).traverse(n);
    for (    org.neo4j.graphdb.Path path : nPaths) {
      try {
        String line=path.startNode().getId() + "String_Node_Str" + path.endNode().getId();
        br.write(line + "String_Node_Str");
        pathCount[0]++;
        if (pathCount[0] > pathCountBlocks) {
          pathCount[0]=0;
          System.out.println("String_Node_Str" + MessageFormat.format("String_Node_Str",((double)nodeCount[0] / (double)nodeTotal)));
        }
      }
 catch (      Exception ex) {
        System.out.println(ex.getMessage());
      }
    }
    nodeCount[0]++;
  }
);
  System.out.println("String_Node_Str" + MessageFormat.format("String_Node_Str",1.0));
  br.flush();
  br.close();
  tx.success();
  tx.close();
  return pt;
}