Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corpus-CC

This library is built using Spring Boot microservices for detecting types 1-3 code-clones in Java applications.

Getting Started

These instructions will get a copy of the project up and running on your local machine

MongoDB Prerequisites

Before installing this project you'll want to make sure you have a MongoDB instance running. Configuration of the instance and user can be done for the cc-detection and cc-pipeline microservices.

Architecture

The architecture for the application is divided into four main microservices -

  • cc-detection : This microservice is in charge of finding clones between the corpus and the application
  • cc-discovery : This microservice is in charge of finding the local source files in an application
  • cc-pipeline : This microservice is in charge of loading a corpus from a source application
  • cc-tokenizer : This microservice is in charge of tokenizing source files and running heuristics

Loading the Corpus

To load the corpus you will want to send a discovery request to the "/findClones" endpoint for a full list of clones or the "/findRankedClones" for a breakdown of the clones by severity.

The discovery request is structured as follows -

{
  "baseFolder" : "<path-to-application>",
  "depth" : 15,
  "basePackage" : ""
}

Built With

  • Spring Boot - Open-source Java-based framework used to create a microservices
  • Javaparser - Lightweight set of tools to generate, analyze, and process Java code
  • Gson - Java library that can be used to convert Java Objects into their JSON representation

Authors

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages