Program: 99085
Project: 99085
Buggy source:
private void genGraph(){
  AttributeModel attributeModel=Lookup.getDefault().lookup(AttributeController.class).getModel();
  PreviewModel model=Lookup.getDefault().lookup(PreviewController.class).getModel();
  FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
  RankingController rankingController=Lookup.getDefault().lookup(RankingController.class);
  System.out.println("String_Node_Str" + undirectedGraph.getNodeCount());
  System.out.println("String_Node_Str" + undirectedGraph.getEdgeCount());
  Degree degree=new Degree();
  degree.execute(graphModel,attributeModel);
  System.out.println("String_Node_Str" + degree.getAverageDegree());
  AttributeColumn degreeColumn=attributeModel.getNodeTable().getColumn("String_Node_Str");
  int[] degreeArray;
  degreeArray=new int[undirectedGraph.getNodeCount()];
  int i1=0;
  for (  Node n : graphModel.getGraph().getNodes()) {
    int val=Integer.valueOf(n.getNodeData().getAttributes().getValue(Ranking.DEGREE_RANKING).toString());
    degreeArray[i1++]=val;
  }
  reportStatistics(degreeArray);
  System.out.println("String_Node_Str");
  DegreeRangeFilter degreeFilter=new DegreeRangeFilter();
  degreeFilter.init(undirectedGraph);
  degreeFilter.setRange(new Range(4,Integer.MAX_VALUE));
  Query query=filterController.createQuery(degreeFilter);
  GraphView view=filterController.filter(query);
  graphModel.setVisibleView(view);
  UndirectedGraph graphVisible=graphModel.getUndirectedGraphVisible();
  System.out.println("String_Node_Str" + graphVisible.getNodeCount());
  System.out.println("String_Node_Str" + graphVisible.getEdgeCount() + "String_Node_Str");
  GraphView tview=graphModel.newView();
  UndirectedGraph tgraph=graphModel.getUndirectedGraph(tview);
  KCoreBuilder.KCoreFilter kCoreFilter=new KCoreBuilder.KCoreFilter();
  int k=1;
  while (tgraph.getNodeCount() > 0) {
    kCoreFilter.setK(k);
    kCoreFilter.filter(tgraph);
    System.out.println("String_Node_Str" + k + "String_Node_Str"+ tgraph.getNodeCount());
    System.out.println("String_Node_Str" + tgraph.getEdgeCount());
    k++;
  }
  int kCore=k - 1;
  BasicDBObject mongo_query_kcore=new BasicDBObject("String_Node_Str",this.fb_profile.get("String_Node_Str"));
  BasicDBObject updateCmd=new BasicDBObject("String_Node_Str",new BasicDBObject("String_Node_Str",kCore));
  this.fb_profiles.update(mongo_query_kcore,updateCmd);
  graphModel.setVisibleView(view);
  ForceAtlas2 fa2Layout=new ForceAtlas2(new ForceAtlas2Builder());
  fa2Layout.setGraphModel(graphModel);
  fa2Layout.resetPropertiesValues();
  fa2Layout.setEdgeWeightInfluence(1.0);
  fa2Layout.setGravity(1.0);
  fa2Layout.setScalingRatio(2.0);
  fa2Layout.setBarnesHutTheta(1.2);
  fa2Layout.setJitterTolerance(0.1);
  fa2Layout.initAlgo();
  int cnt=0;
  for (int i=0; i < 250 && fa2Layout.canAlgo(); i++) {
    fa2Layout.goAlgo();
    cnt++;
  }
  System.out.println("String_Node_Str" + cnt + "String_Node_Str");
  fa2Layout.endAlgo();
  GraphDistance distance=new GraphDistance();
  distance.setDirected(false);
  distance.execute(graphModel,attributeModel);
  System.out.println("String_Node_Str");
  AttributeColumn centralityColumn=attributeModel.getNodeTable().getColumn(GraphDistance.BETWEENNESS);
  double maxVal=0;
  double secondMax=0;
  double thirdMax=0;
  double extremVal=0;
  Node nMax=null;
  Node nSecond=null;
  int numNode=graphModel.getGraph().getNodeCount();
  for (  Node n : graphModel.getGraph().getNodes()) {
    double val=Double.valueOf(n.getNodeData().getAttributes().getValue(GraphDistance.BETWEENNESS).toString());
    if (val > maxVal) {
      thirdMax=secondMax;
      secondMax=maxVal;
      nSecond=nMax;
      maxVal=val;
      nMax=n;
    }
 else     if (val > secondMax) {
      thirdMax=secondMax;
      secondMax=val;
      nSecond=n;
    }
 else     if (val > thirdMax) {
      thirdMax=val;
    }
  }
  System.out.println(numNode + "String_Node_Str" + maxVal+ "String_Node_Str"+ secondMax+ "String_Node_Str"+ thirdMax);
  nMax.getNodeData().getAttributes().setValue(GraphDistance.BETWEENNESS,thirdMax * 1.5);
  nSecond.getNodeData().getAttributes().setValue(GraphDistance.BETWEENNESS,thirdMax * 1.2);
  Ranking centralityRanking=rankingController.getModel().getRanking(Ranking.NODE_ELEMENT,centralityColumn.getId());
  AbstractSizeTransformer sizeTransformer=(AbstractSizeTransformer)rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT,Transformer.RENDERABLE_SIZE);
  sizeTransformer.setMinSize(6);
  sizeTransformer.setMaxSize(30);
  rankingController.transform(centralityRanking,sizeTransformer);
  System.out.println("String_Node_Str");
  model.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS,Boolean.TRUE);
  model.getProperties().putValue(PreviewProperty.EDGE_COLOR,new EdgeColor(Color.GRAY));
  model.getProperties().putValue(PreviewProperty.EDGE_THICKNESS,new Float(0.1f));
  model.getProperties().putValue(PreviewProperty.NODE_LABEL_FONT,model.getProperties().getFontValue(PreviewProperty.NODE_LABEL_FONT).deriveFont(8));
  PartitionController partitionController=Lookup.getDefault().lookup(PartitionController.class);
  Modularity modularity=new Modularity();
  modularity.execute(graphModel,attributeModel);
  AttributeColumn modColumn=attributeModel.getNodeTable().getColumn(Modularity.MODULARITY_CLASS);
  Partition p2=partitionController.buildPartition(modColumn,undirectedGraph);
  System.out.println(p2.getPartsCount() + "String_Node_Str");
  NodeColorTransformer nodeColorTransformer2=new NodeColorTransformer();
  int i=0;
  Map<Object,Color> color_map=nodeColorTransformer2.getMap();
  ArrayList<BasicDBObject> colors_for_mongo=new ArrayList<BasicDBObject>();
  for (  Part p : p2.getParts()) {
    Color color=Palette.colors[i];
    color_map.put(p.getValue(),color);
    BasicDBObject color_hash=new BasicDBObject();
    color_hash.put("String_Node_Str",color.getRed());
    color_hash.put("String_Node_Str",color.getGreen());
    color_hash.put("String_Node_Str",color.getBlue());
    colors_for_mongo.add(color_hash);
    ++i;
  }
  BasicDBObject mongo_query=new BasicDBObject("String_Node_Str",this.fb_profile.get("String_Node_Str"));
  BasicDBObject updateCmd=new BasicDBObject("String_Node_Str",new BasicDBObject("String_Node_Str",colors_for_mongo));
  this.fb_profiles.update(mongo_query,updateCmd);
  partitionController.transform(p2,nodeColorTransformer2);
}

Fixed version (ground truth):
private void genGraph(){
  AttributeModel attributeModel=Lookup.getDefault().lookup(AttributeController.class).getModel();
  PreviewModel model=Lookup.getDefault().lookup(PreviewController.class).getModel();
  FilterController filterController=Lookup.getDefault().lookup(FilterController.class);
  RankingController rankingController=Lookup.getDefault().lookup(RankingController.class);
  System.out.println("String_Node_Str" + undirectedGraph.getNodeCount());
  System.out.println("String_Node_Str" + undirectedGraph.getEdgeCount());
  Degree degree=new Degree();
  degree.execute(graphModel,attributeModel);
  System.out.println("String_Node_Str" + degree.getAverageDegree());
  AttributeColumn degreeColumn=attributeModel.getNodeTable().getColumn("String_Node_Str");
  int[] degreeArray;
  degreeArray=new int[undirectedGraph.getNodeCount()];
  int i1=0;
  for (  Node n : graphModel.getGraph().getNodes()) {
    int val=Integer.valueOf(n.getNodeData().getAttributes().getValue(Ranking.DEGREE_RANKING).toString());
    degreeArray[i1++]=val;
  }
  reportStatistics(degreeArray);
  System.out.println("String_Node_Str");
  DegreeRangeFilter degreeFilter=new DegreeRangeFilter();
  degreeFilter.init(undirectedGraph);
  degreeFilter.setRange(new Range(4,Integer.MAX_VALUE));
  Query query=filterController.createQuery(degreeFilter);
  GraphView view=filterController.filter(query);
  graphModel.setVisibleView(view);
  UndirectedGraph graphVisible=graphModel.getUndirectedGraphVisible();
  System.out.println("String_Node_Str" + graphVisible.getNodeCount());
  System.out.println("String_Node_Str" + graphVisible.getEdgeCount() + "String_Node_Str");
  GraphView tview=graphModel.newView();
  UndirectedGraph tgraph=graphModel.getUndirectedGraph(tview);
  KCoreBuilder.KCoreFilter kCoreFilter=new KCoreBuilder.KCoreFilter();
  int k=1;
  while (tgraph.getNodeCount() > 0) {
    kCoreFilter.setK(k);
    kCoreFilter.filter(tgraph);
    System.out.println("String_Node_Str" + k + "String_Node_Str"+ tgraph.getNodeCount());
    System.out.println("String_Node_Str" + tgraph.getEdgeCount());
    k++;
  }
  int kCore=k - 1;
  BasicDBObject mongo_query_kcore=new BasicDBObject("String_Node_Str",this.fb_profile.get("String_Node_Str"));
  BasicDBObject updateCmd=new BasicDBObject("String_Node_Str",new BasicDBObject("String_Node_Str",kCore));
  this.fb_profiles.update(mongo_query_kcore,updateCmd);
  graphModel.setVisibleView(view);
  ForceAtlas2 fa2Layout=new ForceAtlas2(new ForceAtlas2Builder());
  fa2Layout.setGraphModel(graphModel);
  fa2Layout.resetPropertiesValues();
  fa2Layout.setEdgeWeightInfluence(1.0);
  fa2Layout.setGravity(1.0);
  fa2Layout.setScalingRatio(2.0);
  fa2Layout.setBarnesHutTheta(1.2);
  fa2Layout.setJitterTolerance(0.1);
  fa2Layout.initAlgo();
  int cnt=0;
  for (int i=0; i < 250 && fa2Layout.canAlgo(); i++) {
    fa2Layout.goAlgo();
    cnt++;
  }
  System.out.println("String_Node_Str" + cnt + "String_Node_Str");
  fa2Layout.endAlgo();
  GraphDistance distance=new GraphDistance();
  distance.setDirected(false);
  distance.execute(graphModel,attributeModel);
  System.out.println("String_Node_Str");
  AttributeColumn centralityColumn=attributeModel.getNodeTable().getColumn(GraphDistance.BETWEENNESS);
  double maxVal=0;
  double secondMax=0;
  double thirdMax=0;
  double extremVal=0;
  Node nMax=null;
  Node nSecond=null;
  int numNode=graphModel.getGraph().getNodeCount();
  for (  Node n : graphModel.getGraph().getNodes()) {
    double val=Double.valueOf(n.getNodeData().getAttributes().getValue(GraphDistance.BETWEENNESS).toString());
    if (val > maxVal) {
      thirdMax=secondMax;
      secondMax=maxVal;
      nSecond=nMax;
      maxVal=val;
      nMax=n;
    }
 else     if (val > secondMax) {
      thirdMax=secondMax;
      secondMax=val;
      nSecond=n;
    }
 else     if (val > thirdMax) {
      thirdMax=val;
    }
  }
  System.out.println(numNode + "String_Node_Str" + maxVal+ "String_Node_Str"+ secondMax+ "String_Node_Str"+ thirdMax);
  nMax.getNodeData().getAttributes().setValue(GraphDistance.BETWEENNESS,thirdMax * 1.5);
  nSecond.getNodeData().getAttributes().setValue(GraphDistance.BETWEENNESS,thirdMax * 1.2);
  Ranking centralityRanking=rankingController.getModel().getRanking(Ranking.NODE_ELEMENT,centralityColumn.getId());
  AbstractSizeTransformer sizeTransformer=(AbstractSizeTransformer)rankingController.getModel().getTransformer(Ranking.NODE_ELEMENT,Transformer.RENDERABLE_SIZE);
  sizeTransformer.setMinSize(6);
  sizeTransformer.setMaxSize(30);
  rankingController.transform(centralityRanking,sizeTransformer);
  System.out.println("String_Node_Str");
  model.getProperties().putValue(PreviewProperty.SHOW_NODE_LABELS,Boolean.TRUE);
  model.getProperties().putValue(PreviewProperty.EDGE_COLOR,new EdgeColor(Color.GRAY));
  model.getProperties().putValue(PreviewProperty.EDGE_THICKNESS,new Float(0.1f));
  model.getProperties().putValue(PreviewProperty.NODE_LABEL_FONT,model.getProperties().getFontValue(PreviewProperty.NODE_LABEL_FONT).deriveFont(8));
  PartitionController partitionController=Lookup.getDefault().lookup(PartitionController.class);
  Modularity modularity=new Modularity();
  modularity.execute(graphModel,attributeModel);
  AttributeColumn modColumn=attributeModel.getNodeTable().getColumn(Modularity.MODULARITY_CLASS);
  Partition p2=partitionController.buildPartition(modColumn,undirectedGraph);
  System.out.println(p2.getPartsCount() + "String_Node_Str");
  NodeColorTransformer nodeColorTransformer2=new NodeColorTransformer();
  int i=0;
  Map<Object,Color> color_map=nodeColorTransformer2.getMap();
  ArrayList<BasicDBObject> colors_for_mongo=new ArrayList<BasicDBObject>();
  for (  Part p : p2.getParts()) {
    Color color=Palette.colors[i];
    color_map.put(p.getValue(),color);
    BasicDBObject color_hash=new BasicDBObject();
    color_hash.put("String_Node_Str",color.getRed());
    color_hash.put("String_Node_Str",color.getGreen());
    color_hash.put("String_Node_Str",color.getBlue());
    colors_for_mongo.add(color_hash);
    ++i;
  }
  BasicDBObject mongo_query=new BasicDBObject("String_Node_Str",this.fb_profile.get("String_Node_Str"));
  updateCmd=new BasicDBObject("String_Node_Str",new BasicDBObject("String_Node_Str",colors_for_mongo));
  this.fb_profiles.update(mongo_query,updateCmd);
  partitionController.transform(p2,nodeColorTransformer2);
}