MapReduce for clone detection

MapReduce for clone detection

Bfacf748069915ec6f7ed4ac8d5457d7?s=128

Giustino Borzacchiello

December 05, 2013
Tweet

Transcript

  1. None
  2. None
  3. def mean(values): return sum(values) / len(values)

  4. def mean(values): return sum(values) / len(values) def average(numbers): avg =

    sum(numbers) N = len(numbers) return avg / N
  5. def mean(values): return sum(values) / len(values) def average(numbers): avg =

    sum(numbers) N = len(numbers) return avg / N >>> mean([]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 2, in mean ZeroDivisionError: integer division or modulo by zero
  6. while block while block block if CODE AST AST KERNEL

    block while block if block block while A. Corazza, S. Di Martino, V. Maggio and G. Scanniello A Tree Kernel based approach for clone detection, ICSM 2010
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. map(k1, v1) -> list((k2, v2)) • •

  23. map(k1, v1) -> list((k2, v2)) • • reduce(k2, list(v2)) ->

    list(v3) • •
  24. None
  25. None
  26. None
  27. None
  28. None
  29. e applicazione

  30. e applicazione

  31. e applicazione

  32. e applicazione

  33. • •

  34. • • •

  35. None
  36. None
  37. • – • – • – • •

  38. • – • – • – • •

  39. None
  40. None
  41. Abstract Syntax Tree (AST) Tree structure representing the syntactic structure

    of the different instructions of a program (function) Computation of the dot product between (Graph) Structures K( ) ,