Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.
mast-groupPublic archive

About

Source code for the Naturalize project

Resources

Stars

57 stars

Watchers

6 watching

Forks

Latest commit

 

History

35 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Naturalize

Naturalize suggests natural names for source code.

naturalize is released under a BSD license.

The project depends on three internal (maven) modules:

a) codemining-sequencelm b) codemining-utils c) codemining-core d) commitmining-tools

the rest of the dependencies are declared in the maven dependencies.

Basic Usage

final AbstractIdentifierRenamings renamer = new BaseIdentifierRenamings(
				new JavaTokenizer());
renamer.buildRenamingModel(trainingFiles);

final SortedSet<AbstractIdentifierRenamings.Renaming> renamings = renamer
						.getRenamings(new Scope(snippet,
								Scope.ScopeType.SCOPE_LOCAL, null, -1, -1),
								nameOfIdentifier);

If you need a method for directly specifying variable bindings consider using AbstractIdentifierRenamings.getRenamings(TokenNameBinding binding) that avoids retokenizing the snippet and performing a textual match on the tokens.

About

Source code for the Naturalize project

Resources

Stars

57 stars

Watchers

6 watching

Forks

Releases

Packages

Contributors

Languages