Compare commits

...

4 Commits

Author SHA1 Message Date
dependabot[bot] 1c8c40106d Bump logback-core from 1.1.7 to 1.2.0 in /gumtree/gen.srcml
Bumps logback-core from 1.1.7 to 1.2.0.

---
updated-dependencies:
- dependency-name: ch.qos.logback:logback-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-07 17:00:52 +00:00
Anil Koyuncu 5ab2d6f582 Create LICENSE.txt 2021-06-01 11:03:33 +03:00
mimic e33f306af3 updated readme with structure of cluster folders 2020-06-10 12:02:39 +02:00
mimic 5c2d78e370 fix compare 0 bug and cluster of tokens 2020-06-10 11:52:26 +02:00
5 changed files with 57 additions and 11 deletions
+22
View File
@@ -0,0 +1,22 @@
MIT License
Copyright (c) 2019 SnT,University of Luxembourg
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+21 -1
View File
@@ -126,7 +126,27 @@ A log file (app.log) is created after every execution of the [fixminer.sh]((pyth
8. __stats__: Calculate frequency statistics of the patterns under statsactions.csv in datapath. The information is also written in app.log file.
7. __patterns__ : Export FixPatterns of APR integration under patterns folder located in datapath/
9. __patterns__ : Export FixPatterns of APR integration under patterns folder located in datapath/
##### Structure of the cluster folders
```powershell
|--- actions : Action clusters
|------ReturnStatement : AST Node type
|---------4 : The size of the rich edit script
|------------0 : 0th Action cluster of ReturnStatement of rich edit size 4
|--------------- filename : 0th member of the cluster
|--- tokens : Token clusters
|------ReturnStatement : AST Node type
|---------4 : The size of the rich edit script
|------------0 : 0th Action cluster of ReturnStatement of rich edit size 4
|---------------0 : 0th Token cluster of ReturnStatement of rich edit size 4 of 0th action cluster
|----------------- filename : 0th member of the cluster
```
<!--
+1 -1
View File
@@ -35,7 +35,7 @@
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.7</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
+7 -4
View File
@@ -87,7 +87,7 @@ def loadPairMulti(root,clusterPath,level):
# matches['sizes']=matches['pairs_key'].apply(lambda x:x.split('_')[0].split('-')[1])
matches['sizes']=matches['pairs_key'].apply(lambda x:x.split(root)[1].split('/')[0].split('-')[1])
if level == 'tokens':
matches['tokens']=matches['pairs_key'].apply(lambda x:x.split('/')[0].split('-')[2])
matches['actions']=matches['pairs_key'].apply(lambda x:x.split('/')[0].split('-')[2])
# if level == 'tokens':
# matches['actions'] = matches['pairs_key'].apply(lambda x: x.split('/')[0].split('-')[2])
# matches['tokens']=matches['pairs_key'].apply(lambda x:x.split('/')[0].split('-')[3])
@@ -125,9 +125,9 @@ def cluster(clusterPath,pairsPath, level):
match = matches[matches['sizes'] == s]
if level == 'tokens':
actions = match['tokens'].unique().tolist()
actions = match['actions'].unique().tolist()
for action in actions:
match = match[match['tokens'] == action]
match = match[match['actions'] == action]
clusterCore(clusterPath, level, match, pairsPath, root, s,action)
# elif level == 'tokens':
# actions = match['actions'].unique().tolist()
@@ -200,7 +200,10 @@ def dumpFilesCore(t):
jdk8 = os.environ["JDK8"]
# cmd = "JAVA_HOME='"+jdk8+"' java -jar "+ join(DATA_PATH,'FixPatternMiner-1.0.1.jar') + " " + join(DATA_PATH,'app.properties')+" PATTERN " +key
clusterSavePath = join(clusterPath, root, s, str(idx))
if level == 'tokens':
clusterSavePath = join(clusterPath, root, s, action, str(idx))
else:
clusterSavePath = join(clusterPath, root, s, str(idx))
os.makedirs(clusterSavePath, exist_ok=True)
shutil.copy(filePath,join(clusterSavePath,dumpFile))
# with open(join(clusterSavePath, dumpFile), 'w', encoding='utf-8') as writeFile:
@@ -151,13 +151,14 @@ public class CompareTrees {
public static boolean newCoreCompare( String treeType,ArrayList<String> errorPairs, HashMap<String, String> filenames,JedisPool outerPool ) {
String pairName;
String pairName = null;
try (Jedis outer = outerPool.getResource()) {
pairName = outer.spop("compare");
}
// }
if(pairName.equals("0"))
return true;
String matchKey = null;
try {
// try {
String[] split = pairName.split("/");
@@ -235,7 +236,7 @@ public class CompareTrees {
// break;
}
}catch (Exception e) {
errorPairs.add(matchKey);
errorPairs.add(pairName);
if (pairName == null)
return false;
log.debug("{} not comparable", pairName);