Program: 161872
Project: 161872
Buggy source:
/** 
 * this methods runs hits on a graph and returns the most authoritative sources, due to HITS is very simple, it will be implemented by iterating two formulas can be written as matrix multiplication but this would be quite ineffective
 * @param k
 * @param Graph
 * @return
 * @throws InterruptedException
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void runHits(Graph g,int k) throws InterruptedException {
  if (restrictedEdges != null) {
    HashSet<Object> toBeRemoved=new HashSet<Object>();
    for (    Object edge : g.getEdges()) {
      String edgeString=(String)edge;
      for (      String restrict : restrictedEdges) {
        if (edgeString.contains(restrict)) {
          toBeRemoved.add(edge);
        }
      }
    }
    for (    Object edge : toBeRemoved) {
      g.removeEdge(edge);
    }
  }
  for (int iter=0; iter < k; iter++) {
    for (    Object o : g.getVertices()) {
      Node m=(Node)o;
      double x=0;
      for (      Object inc : g.getPredecessors(m)) {
        x+=((Node)inc).getHubWeight();
      }
      double y=0;
      for (      Object inc : g.getSuccessors(m)) {
        y+=((Node)inc).getAuthorityWeight();
      }
      m.setAuthorityWeight(x);
      m.setHubWeight(y);
    }
    double sumX=0;
    double sumY=0;
    for (    Object m : g.getVertices()) {
      Node mm=(Node)m;
      sumX+=mm.getAuthorityWeight();
      sumY+=mm.getHubWeight();
    }
    for (    Object m : g.getVertices()) {
      Node mm=(Node)m;
      mm.setAuthorityWeight(mm.getAuthorityWeight() / sumX);
      mm.setHubWeight(mm.getHubWeight() / sumY);
    }
  }
}

Fixed version (ground truth):
/** 
 * this methods runs hits on a graph and returns the most authoritative sources, due to HITS is very simple, it will be implemented by iterating two formulas can be written as matrix multiplication but this would be quite ineffective
 * @param k
 * @param Graph
 * @return
 * @throws InterruptedException
 */
@SuppressWarnings({"String_Node_Str","String_Node_Str"}) public void runHits(Graph g,int k) throws InterruptedException {
  if (restrictedEdges != null) {
    HashSet<Object> toBeRemoved=new HashSet<Object>();
    for (    Object edge : g.getEdges()) {
      String edgeString=(String)edge;
      for (      String restrict : restrictedEdges) {
        if (edgeString.contains(restrict)) {
          toBeRemoved.add(edge);
        }
      }
    }
    for (    Object edge : toBeRemoved) {
      g.removeEdge(edge);
    }
  }
  Node n;
  for (int iter=0; iter < k; iter++) {
    for (    Object o : g.getVertices()) {
      n=(Node)o;
      double x=0;
      for (      Object inc : g.getPredecessors(n)) {
        x+=((Node)inc).getHubWeight();
      }
      double y=0;
      for (      Object inc : g.getSuccessors(n)) {
        y+=((Node)inc).getAuthorityWeight();
      }
      n.setUnnormalizedAuthorityWeight(x * n.getAuthorityWeightForCalculation());
      n.setUnnormalizedHubWeight(y * n.getHubWeightForCalculation());
    }
    double sumX=0;
    double sumY=0;
    for (    Object o : g.getVertices()) {
      n=(Node)o;
      sumX+=n.getUnnormalizedAuthorityWeight();
      sumY+=n.getUnnormalizedHubWeight();
    }
    for (    Object o : g.getVertices()) {
      n=(Node)o;
      n.setAuthorityWeight(n.getUnnormalizedAuthorityWeight() / sumX);
      n.setHubWeight(n.getUnnormalizedHubWeight() / sumY);
    }
  }
}