#!/bin/bash
# This tool runner works with the myconfig.cfg nicad configuration file included
# You will need to modify the hard-coded installation below before running
# Test this out on one of the IJaDataset directories (such as 11/) to test and
# see that clones are detected and output in the correct format for BigCloneEval
# as specified in the readme.
ulimit -s hard
root=`dirname $1`
dir=`basename $1`
path=$root/$dir
# Go to NiCad installation directory
cd /home/xiaojie/Desktop/xiaojiework/NiCad-5.0/
# Execute NiCad, Suppress Output
./nicad5 functions java "$path" myconfig > /dev/null 2> /dev/null
# Convert Detected Clones Into BigCloneEval Format
java -jar Convert.jar ${path}_functions-blind-abstract-clones/${dir}_functions-blind-abstract-clones-0.30.xml 2> /dev/null
#cat ${path}_functions-blind-abstract-clones/${dir}_functions-blind-abstract-clones-0.30.xml | sed 's$$$g' | sed 's$.*$$g' | sed 's$$$g' |sed 's$$$g' | sed 's$ /dev/null 2> /dev/null
rm ${path}_functions-blind-abstract.xml > /dev/null 2> /dev/null
rm ${path}_functions-clones*.log > /dev/null 2> /dev/null
rm ${path}_functions-blind.xml > /dev/null 2> /dev/null
rm ${path}_functions.xml > /dev/null 2> /dev/null
#!/bin/bash
# This tool runner works with the myconfig.cfg nicad configuration file included
# You will need to modify the hard-coded installation below before running
# Test this out on one of the IJaDataset directories (such as 11/) to test and
# see that clones are detected and output in the correct format for BigCloneEval
# as specified in the readme.
ulimit -s hard
root=`dirname $1`
dir=`basename $1`
path=$root/$dir
# Go to NiCad installation directory
cd /home/xiaojie/Desktop/xiaojiework/NiCad-5.0/
# Execute NiCad, Suppress Output
./nicad5 functions java "$path" myconfig > /dev/null2> /dev/null
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, return&
在JDK1.5之前的单例实现方式有两种(懒汉式和饿汉式并无设计上的区别故看做一种),两者同是私有构
造器,导出静态成员变量,以便调用者访问。
第一种
package singleton;
public class Singleton {
//导出全局成员
public final static Singleton INSTANCE = new S