Program: 190213
Project: 190213
Buggy source:
/** 
 * @param graphModel
 */
public void execute(GraphModel graphModel,AttributeModel attributeModel){
  mIsCanceled=false;
  mAvgInDegree=mAvgOutDegree=0.0;
  AttributeTable nodeTable=attributeModel.getNodeTable();
  AttributeColumn inCol=nodeTable.getColumn(INDEGREE);
  AttributeColumn outCol=nodeTable.getColumn(OUTDEGREE);
  if (inCol == null) {
    inCol=nodeTable.addColumn(INDEGREE,"String_Node_Str",AttributeType.INT,AttributeOrigin.COMPUTED,0);
  }
  if (outCol == null) {
    outCol=nodeTable.addColumn(OUTDEGREE,"String_Node_Str",AttributeType.INT,AttributeOrigin.COMPUTED,0);
  }
  DirectedGraph graph=graphModel.getDirectedGraphVisible();
  int i=0;
  graph.readLock();
  this.mGraphRevision="String_Node_Str" + graph.getNodeVersion() + "String_Node_Str"+ graph.getEdgeVersion()+ "String_Node_Str";
  Progress.start(mProgress,graph.getNodeCount());
  for (  Node n : graph.getNodes()) {
    AttributeRow row=(AttributeRow)n.getNodeData().getAttributes();
    row.setValue(inCol,graph.getInDegree(n));
    row.setValue(outCol,graph.getOutDegree(n));
    mAvgInDegree+=graph.getInDegree(n);
    mAvgOutDegree+=graph.getOutDegree(n);
    if (mIsCanceled) {
      break;
    }
    i++;
    Progress.progress(mProgress,i);
  }
  mAvgDegree=mAvgInDegree + mAvgOutDegree;
  mAvgInDegree/=graph.getNodeCount();
  mAvgOutDegree/=graph.getNodeCount();
  mAvgDegree/=graph.getNodeCount();
  graph.readUnlockAll();
}

Fixed version (ground truth):
/** 
 * @param graphModel
 */
public void execute(GraphModel graphModel,AttributeModel attributeModel){
  mIsCanceled=false;
  mAvgInDegree=mAvgOutDegree=0.0;
  AttributeTable nodeTable=attributeModel.getNodeTable();
  AttributeColumn inCol=nodeTable.getColumn(INDEGREE);
  AttributeColumn outCol=nodeTable.getColumn(OUTDEGREE);
  AttributeColumn degCol=nodeTable.getColumn(DEGREE);
  if (graphModel.isDirected()) {
    if (inCol == null) {
      inCol=nodeTable.addColumn(INDEGREE,"String_Node_Str",AttributeType.INT,AttributeOrigin.COMPUTED,0);
    }
    if (outCol == null) {
      outCol=nodeTable.addColumn(OUTDEGREE,"String_Node_Str",AttributeType.INT,AttributeOrigin.COMPUTED,0);
    }
  }
  if (degCol == null) {
    degCol=nodeTable.addColumn(DEGREE,"String_Node_Str",AttributeType.INT,AttributeOrigin.COMPUTED,0);
  }
  Graph graph=graphModel.getGraphVisible();
  int i=0;
  graph.readLock();
  this.mGraphRevision="String_Node_Str" + graph.getNodeVersion() + "String_Node_Str"+ graph.getEdgeVersion()+ "String_Node_Str";
  Progress.start(mProgress,graph.getNodeCount());
  for (  Node n : graph.getNodes()) {
    AttributeRow row=(AttributeRow)n.getNodeData().getAttributes();
    if (graph instanceof DirectedGraph) {
      DirectedGraph directedGraph=(DirectedGraph)graph;
      row.setValue(inCol,directedGraph.getInDegree(n));
      row.setValue(outCol,directedGraph.getOutDegree(n));
      mAvgInDegree+=directedGraph.getInDegree(n);
      mAvgOutDegree+=directedGraph.getOutDegree(n);
    }
    row.setValue(degCol,graph.getDegree(n));
    mAvgDegree+=graph.getDegree(n);
    if (mIsCanceled) {
      break;
    }
    i++;
    Progress.progress(mProgress,i);
  }
  mAvgInDegree/=graph.getNodeCount();
  mAvgOutDegree/=graph.getNodeCount();
  mAvgDegree/=graph.getNodeCount();
  graph.readUnlockAll();
}