Program: 189785
Project: 189785
Buggy source:
private void removeNodeFrom(int node,Community from){
  Community community=nodeCommunities[node];
  for (  ModEdge e : topology[node]) {
    int neighbor=e.target;
    Float edgesTo=nodeConnections[neighbor].get(community);
    if (edgesTo - e.weight <= epsilon) {
      nodeConnections[neighbor].remove(community);
    }
 else {
      nodeConnections[neighbor].put(community,edgesTo - e.weight);
    }
    Modularity.Community adjCom=nodeCommunities[neighbor];
    Float oEdgesto=adjCom.connections.get(community);
    if (oEdgesto - e.weight <= epsilon) {
      adjCom.connections.remove(community);
    }
 else {
      adjCom.connections.put(community,oEdgesto - e.weight);
    }
    if (node == neighbor) {
      continue;
    }
    if (adjCom != community) {
      Float comEdgesto=community.connections.get(adjCom);
      if (comEdgesto - e.weight <= epsilon) {
        community.connections.remove(adjCom);
      }
 else {
        community.connections.put(adjCom,comEdgesto - e.weight);
      }
    }
    Float nodeEgesTo=nodeConnections[node].get(adjCom);
    if (nodeEgesTo - e.weight <= epsilon) {
      nodeConnections[node].remove(adjCom);
    }
 else {
      nodeConnections[node].put(adjCom,nodeEgesTo - e.weight);
    }
  }
  from.remove(new Integer(node));
}

Fixed version (ground truth):
private void removeNodeFrom(int node,Community from){
  Community community=nodeCommunities[node];
  for (  ModEdge e : topology[node]) {
    int neighbor=e.target;
    Float edgesTo=nodeConnectionsWeight[neighbor].get(community);
    Integer countEdgesTo=nodeConnectionsCount[neighbor].get(community);
    if (countEdgesTo - 1 == 0) {
      nodeConnectionsWeight[neighbor].remove(community);
      nodeConnectionsCount[neighbor].remove(community);
    }
 else {
      nodeConnectionsWeight[neighbor].put(community,edgesTo - e.weight);
      nodeConnectionsCount[neighbor].put(community,countEdgesTo - 1);
    }
    Modularity.Community adjCom=nodeCommunities[neighbor];
    Float oEdgesto=adjCom.connectionsWeight.get(community);
    Integer oCountEdgesto=adjCom.connectionsCount.get(community);
    if (oCountEdgesto - 1 == 0) {
      adjCom.connectionsWeight.remove(community);
      adjCom.connectionsCount.remove(community);
    }
 else {
      adjCom.connectionsWeight.put(community,oEdgesto - e.weight);
      adjCom.connectionsCount.put(community,oCountEdgesto - 1);
    }
    if (node == neighbor) {
      continue;
    }
    if (adjCom != community) {
      Float comEdgesto=community.connectionsWeight.get(adjCom);
      Integer comCountEdgesto=community.connectionsCount.get(adjCom);
      if (comCountEdgesto - 1 == 0) {
        community.connectionsWeight.remove(adjCom);
        community.connectionsCount.remove(adjCom);
      }
 else {
        community.connectionsWeight.put(adjCom,comEdgesto - e.weight);
        community.connectionsCount.put(adjCom,comCountEdgesto - 1);
      }
    }
    Float nodeEgesTo=nodeConnectionsWeight[node].get(adjCom);
    Integer nodeCountEgesTo=nodeConnectionsCount[node].get(adjCom);
    if (nodeCountEgesTo - 1 == 0) {
      nodeConnectionsWeight[node].remove(adjCom);
      nodeConnectionsCount[node].remove(adjCom);
    }
 else {
      nodeConnectionsWeight[node].put(adjCom,nodeEgesTo - e.weight);
      nodeConnectionsCount[node].put(adjCom,nodeCountEgesTo - 1);
    }
  }
  from.remove(new Integer(node));
}