From 571d96eb8257deb81c777626f7f0c3cc89189b07 Mon Sep 17 00:00:00 2001 From: haoyetian Date: Mon, 16 Dec 2019 17:40:37 +0100 Subject: [PATCH 01/41] srcML --- FixPatternMiner.iml | 87 ++++++ pom.xml | 7 + .../edu/lu/uni/serval/fixminer/Launcher.java | 10 +- .../fixminer/akka/ediff/EDiffParser.java | 26 +- .../akka/ediff/HierarchicalRegrouperForC.java | 268 ++++++++++++++++++ .../serval/fixminer/jobs/EnhancedASTDiff.java | 2 +- src/main/resource/app.properties | 20 +- 7 files changed, 400 insertions(+), 20 deletions(-) create mode 100644 FixPatternMiner.iml create mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java diff --git a/FixPatternMiner.iml b/FixPatternMiner.iml new file mode 100644 index 0000000..b309440 --- /dev/null +++ b/FixPatternMiner.iml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 5eb9b1c..174b076 100755 --- a/pom.xml +++ b/pom.xml @@ -50,6 +50,12 @@ 2.0.0-SNAPSHOT + + com.github.gumtreediff + gen.srcml + 2.0.0-SNAPSHOT + + org.slf4j @@ -157,6 +163,7 @@ + diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index 80ccf6e..66c909e 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,8 +22,8 @@ public class Launcher { Properties appProps = new Properties(); -// String appConfigPath = "/Users/anilkoyuncu/bugStudy/release/code/app.properties"; - String appConfigPath = args[0]; + String appConfigPath = "/Users/haoyetian/Documents/Lu_code/FixMiner/fixminer_source/src/main/resource/app.properties"; +// String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); String portInner = appProps.getProperty("portInner","6380"); @@ -36,8 +36,10 @@ public class Launcher { String input = appProps.getProperty("inputPath","FORKJOIN"); String redisPath = appProps.getProperty("redisPath","FORKJOIN"); - String parameter = args[2]; - String jobType = args[1]; +// String parameter = args[2]; + String parameter = null; +// String jobType = args[1]; + String jobType = "RICHEDITSCRIPT"; // String parameters = String.format("\nportInner %s " + // "\nnumOfWorkers %s " + diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java index 1f8d203..0578771 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java @@ -1,7 +1,9 @@ package edu.lu.uni.serval.fixminer.akka.ediff; import com.github.gumtreediff.actions.model.Action; +import com.github.gumtreediff.gen.srcml.GumTreeCComparer; import edu.lu.uni.serval.gumtree.GumTreeComparer; + import edu.lu.uni.serval.utils.ListSorter; import redis.clients.jedis.JedisPool; @@ -39,7 +41,16 @@ public class EDiffParser extends Parser { protected List parseChangedSourceCodeWithGumTree2(File prevFile, File revFile) { List actionSets = new ArrayList<>(); // GumTree results - List gumTreeResults = new GumTreeComparer().compareTwoFilesWithGumTree(prevFile, revFile); + boolean isJava =false; + List gumTreeResults = null; + if (revFile.getName().endsWith(".c") & prevFile.getName().endsWith(".c")){ +// gumTreeResults = new GumTreeComparer().compareCFilesWithGumTree(prevFile, revFile); + + gumTreeResults = new GumTreeCComparer().compareCFilesWithGumTree(prevFile, revFile); + }else{ + gumTreeResults = new GumTreeComparer().compareTwoFilesWithGumTree(prevFile, revFile); + isJava = true; + } if (gumTreeResults == null) { this.resultType = 1; return null; @@ -48,16 +59,21 @@ public class EDiffParser extends Parser { return actionSets; } else { // Regroup GumTre results. - List allActionSets = new HierarchicalRegrouper().regroupGumTreeResults(gumTreeResults); + List allActionSets = null; + if (isJava){ + allActionSets = new HierarchicalRegrouper().regroupGumTreeResults(gumTreeResults); + }else{ + allActionSets = new HierarchicalRegrouperForC().regroupGumTreeResults(gumTreeResults); + } + - ListSorter sorter = new ListSorter<>(allActionSets); actionSets = sorter.sortAscending(); - + if (actionSets.size() == 0) { this.resultType = 3; } - + return actionSets; } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java new file mode 100644 index 0000000..b0754c8 --- /dev/null +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -0,0 +1,268 @@ +package edu.lu.uni.serval.fixminer.akka.ediff; + + +import com.github.gumtreediff.actions.model.Action; +import com.github.gumtreediff.actions.model.*; +import com.github.gumtreediff.io.CNodeMap; +import com.github.gumtreediff.tree.ITree; +import edu.lu.uni.serval.gumtree.GumTreeComparer; +import edu.lu.uni.serval.utils.ListSorter; + +import java.util.ArrayList; +import java.util.List; + +/** + * Regroup GumTree results to a hierarchical construction. + * + * @author kui.liu + * + */ +public class HierarchicalRegrouperForC { + +// public static void main(String[] args) { +// GumTreeComparer com = new GumTreeComparer(); +// File cFile1 = new File("/Users/anilkoyuncu/bugStudy/dataset/GumTreeInput/linux-stable/prevFiles/prev_0a3d00_b404bc_drivers#pci#iov.c"); +// File cFile2 = new File("/Users/anilkoyuncu/bugStudy/dataset/GumTreeInput/linux-stable/revFiles/0a3d00_b404bc_drivers#pci#iov.c"); +// List action = com.compareTwoFilesWithGumTreeForCCode(cFile1, cFile2); +// List actionSet = new HierarchicalRegrouperForC().regroupGumTreeResults(action); +// System.out.println(actionSet); +// } + + List actionSets = new ArrayList<>(); + + public List regroupGumTreeResults(List actions) { + /* + * First, sort actions by their positions. + */ +// List actions = new ListSorter(actionsArgu).sortAscending(); +// if (actions == null) { +// actions = actionsArgu; +// } + + /* + * Second, group actions by their positions. + */ + HierarchicalActionSet actionSet = null; + for(Action act : actions){ + Action parentAct = findParentAction(act, actions); + + if (parentAct == null) { + actionSet = createActionSet(act, parentAct, null); + actionSets.add(actionSet); + } else { + if (!addToAactionSet(act, parentAct, actionSets)) { + // The index of the parent action in the actions' list is larger than the index of this action. + actionSet = createActionSet(act, parentAct, null); + actionSets.add(actionSet); + } + } + } + + /* + * Third, add the subActionSet to its parent ActionSet. + */ + List reActionSets = new ArrayList<>(); + for (HierarchicalActionSet actSet : actionSets) { + Action parentAct = actSet.getParentAction(); + if (parentAct != null) { + addToActionSets(actSet, parentAct, actionSets); + } else { + // TypeDeclaration, FieldDeclaration, MethodDeclaration, Statement. + // CatchClause, ConstructorInvocation, SuperConstructorInvocation, SwitchCase +// String astNodeType = actSet.getAstNodeType(); +// if (astNodeType.endsWith("TypeDeclaration") || astNodeType.endsWith("FieldDeclaration") || astNodeType.endsWith("EnumDeclaration") || +// astNodeType.endsWith("MethodDeclaration") || astNodeType.endsWith("Statement") || +// astNodeType.endsWith("ConstructorInvocation") || astNodeType.endsWith("CatchClause") || astNodeType.endsWith("SwitchCase")) { + reActionSets.add(actSet); +// } + } + } + return reActionSets; + } + + private HierarchicalActionSet createActionSet(Action act, Action parentAct, HierarchicalActionSet parent) { + HierarchicalActionSet actionSet = new HierarchicalActionSet(); + actionSet.setAction(act); + actionSet.setActionString(parseAction(act.toString())); + actionSet.setParentAction(parentAct); + actionSet.setNode(act.getNode()); + actionSet.setParent(parent); + return actionSet; + } + + private String parseAction(String actStr1) { + // UPD 25@@!a from !a to isTrue(a) at 69 + String[] actStrArrays = actStr1.split("@@"); + String actStr = ""; + int length = actStrArrays.length; + for (int i =0; i < length - 1; i ++) { + String actStrFrag = actStrArrays[i]; + int index = actStrFrag.lastIndexOf(" ") + 1; + String nodeType = actStrFrag.substring(index); + if (!"".equals(nodeType)) { + if (Character.isDigit(nodeType.charAt(0)) || (nodeType.startsWith("-") && Character.isDigit(nodeType.charAt(1)))) { + try { + int typeInt = Integer.parseInt(nodeType); + if (CNodeMap.map.containsKey(typeInt)) { + String type = CNodeMap.map.get(Integer.parseInt(nodeType)); + nodeType = type; + } + } catch (NumberFormatException e) { + nodeType = actStrFrag.substring(index); + } + } + } + actStrFrag = actStrFrag.substring(0, index) + nodeType + "@@"; + actStr += actStrFrag; + } + actStr += actStrArrays[length - 1]; + return actStr; + } + + private void addToActionSets(HierarchicalActionSet actionSet, Action parentAct, List actionSets) { + Action act = actionSet.getAction(); + for (HierarchicalActionSet actSet : actionSets) { + if (actSet.equals(actionSet)) continue; + Action action = actSet.getAction(); + + if (!areRelatedActions(action, act)) continue; + if (action.equals(parentAct)) { // actSet is the parent of actionSet. + actionSet.setParent(actSet); + actSet.getSubActions().add(actionSet); + sortSubActions(actSet); + break; + } else { + if (isPossibileSubAction(action, act)) { + // SubAction range: startPosition2 <= startPosition && startPosition + length <= startPosition2 + length2 + addToActionSets(actionSet, parentAct, actSet.getSubActions()); + } + } + } + } + + private boolean isPossibileSubAction(Action parent, Action child) { + if ((parent instanceof Update && !(child instanceof Addition)) + || (parent instanceof Delete && child instanceof Delete) + || (parent instanceof Insert && (child instanceof Insert))) { + int startPosition = child.getPosition(); + int length = child.getLength(); + int startPosition2 = parent.getPosition(); + int length2 = parent.getLength(); + + if (!(startPosition2 <= startPosition && startPosition + length <= startPosition2 + length2)) { + // when act is not the sub-set of action. + return false; + } + } + return true; + } + + private void sortSubActions(HierarchicalActionSet actionSet) { + ListSorter sorter = new ListSorter(actionSet.getSubActions()); + List subActions = sorter.sortAscending(); + if (subActions != null) { + actionSet.setSubActions(subActions); + } + } + + private boolean addToAactionSet(Action act, Action parentAct, List actionSets) { + for(HierarchicalActionSet actionSet : actionSets) { + Action action = actionSet.getAction(); + + if (!areRelatedActions(action, act)) continue; + + if (action.equals(parentAct)) { // actionSet is the parent of actSet. + HierarchicalActionSet actSet = createActionSet(act, actionSet.getAction(), actionSet); + actionSet.getSubActions().add(actSet); + sortSubActions(actionSet); + return true; + } else { + if (isPossibileSubAction(action, act)) { + // SubAction range: startPosition2 <= startPosition && startPosition + length <= startP + length2 + List subActionSets = actionSet.getSubActions(); + if (subActionSets.size() > 0) { + boolean added = addToAactionSet(act, parentAct, subActionSets); + if (added) { + return true; + } else { + continue; + } + } + } + } + } + return false; + } + + List newParentActions = new ArrayList<>(); + private Action findParentAction(Action action, List actions) { + + ITree parent = action.getNode().getParent(); + if (parent == null) return null; + if (action instanceof Addition) { + parent = ((Addition) action).getParent(); // parent in the fixed source code tree + } + + for (Action act : actions) { + if (act.getNode().equals(parent)) { + if (areRelatedActions(act, action)) { + return act; + } + } + } + for (Action act : newParentActions) { + if (act.getNode().equals(parent)) { + if (areRelatedActions(act, action)) { + return act; + } + } + } + + ITree tree = action.getNode(); + Action parentAction = null; + if (!isStatement(tree)) { + parentAction = new Update(parent, action.getNode().getParent()); + newParentActions.add(parentAction); + + Action higherParentAct = findParentAction(parentAction, actions); + HierarchicalActionSet actionSet = null; + if (higherParentAct == null) { + actionSet = createActionSet(parentAction, higherParentAct, null); + actionSets.add(actionSet); + } else { + if (!addToAactionSet(parentAction, higherParentAct, actionSets)) { + // The index of the parent action in the actions' list is larger than the index of this action. + actionSet = createActionSet(parentAction, higherParentAct, null); + actionSets.add(actionSet); + } + } + } + return parentAction; + } + + private boolean isStatement(ITree tree) { + int nodeType = tree.getType(); + + if (nodeType == 11 || nodeType == 16 || nodeType == 18 || nodeType == 21 + || nodeType == 22 || nodeType == 23 || nodeType == 24 || nodeType == 84 + || 30 == nodeType || nodeType == 31 || nodeType == 32 || nodeType == 33 + || nodeType == 34 || nodeType == 35 || nodeType == 36 || nodeType == 40 + || nodeType == 41 || nodeType == 49 || nodeType == 73) {// TODO + return true; + } + return false; + } + + private boolean areRelatedActions(Action parent, Action child) { + if (parent instanceof Move && !(child instanceof Move)) {// If action is MOV, its children must be MOV. + return false; + } + if (parent instanceof Delete && !(child instanceof Delete)) {// If action is DEL, its children must be DEL. + return false; + } + if (parent instanceof Insert && !(child instanceof Addition)) {// If action is INS, its children must be MOV or INS. + return false; + } + return true; + } +} diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index fd097cb..7c7e690 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -118,7 +118,7 @@ public class EnhancedASTDiff { log.info(revFilesPath.getPath()); File[] revFiles = revFilesPath.listFiles(); if (revFiles!= null ){ - // List collect = Arrays.stream(revFiles).filter(x -> x.getName().startsWith("b50867_6e80c3_src#main#java#org#apache#hadoop#hbase#regionserver#HRegion")) + // List collect = Arrays.stream(revFiles).filter(x -> x.getName().startsWith("0a2756_7598f8_components#camel-cxf#src#main#java#org#apache#camel#component#cxf#CxfHeaderFilterStrategy")) // .collect(Collectors.toList());// project folders List msgFiles = new ArrayList<>(); for (File revFile : revFiles) { diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index 5e48335..8e57561 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -1,14 +1,14 @@ -jobType = LEVEL2 -pjName = BugsDotJar +jobType = RICHEDITSCRIPT +pjName = gumInput portInner = 6380 -dbNo = 0 -port = 6399 -serverWait = 10000 -numOfWorkers = 100 -pythonPath = /Users/anilkoyuncu/bugStudy/code/python -datasetPath = /Users/anilkoyuncu/bugStudy/release/code -actionType =UPD -threshold = 9 +portDumps = 6399 +parallelism = AKKA +numOfWorkers = 1 +#inputPath = /Users/haoyetian/Documents/Lu_code/FixMiner/fixminer-core/python/data/gumInput +inputPath = /Users/haoyetian/Documents/Lu_code/test +redisPath = /Users/haoyetian/Documents/Lu_code/FixMiner/fixminer-core/python/data/redis +actionType =ALL +eDiffTimeout = 900 #ENHANCEDASTDIFF,CACHE,LEVEL1,LEVEL2,LEVEL3 From db614ace7b1318eca86279e35c5567127ad4b9c0 Mon Sep 17 00:00:00 2001 From: mimic Date: Thu, 19 Dec 2019 10:17:18 +0100 Subject: [PATCH 02/41] changes for c --- .../fixminer/akka/compare/CompareTrees.java | 4 +- .../fixminer/akka/ediff/EDiffParser.java | 2 +- .../akka/ediff/HierarchicalRegrouperForC.java | 110 ++++++++++++------ .../fixminer/akka/ediff/HunkParserTest.java | 53 +++++++++ .../serval/fixminer/jobs/EnhancedASTDiff.java | 4 +- .../edu/lu/uni/serval/utils/EDiffHelper.java | 13 ++- 6 files changed, 142 insertions(+), 44 deletions(-) create mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index 5d8af81..3d579e0 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -87,13 +87,13 @@ public class CompareTrees { try { - String[] split = pairName.split("_"); + String[] split = pairName.split("/"); String i = split[1]; String j = split[2]; String keyName = split[0]; - matchKey = keyName + "_" + (String.valueOf(i)) + "_" + String.valueOf(j); + matchKey = keyName + "/" + (String.valueOf(i)) + "/" + String.valueOf(j); // jedis.select(0); // Set keys = jedis.keys(matchKey); // if (keys.size() > 0) { diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java index 0578771..93e011c 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java @@ -43,7 +43,7 @@ public class EDiffParser extends Parser { // GumTree results boolean isJava =false; List gumTreeResults = null; - if (revFile.getName().endsWith(".c") & prevFile.getName().endsWith(".c")){ + if (revFile.getName().endsWith(".c") & prevFile.getName().endsWith(".c") || revFile.getName().endsWith(".h") & prevFile.getName().endsWith(".h")){ // gumTreeResults = new GumTreeComparer().compareCFilesWithGumTree(prevFile, revFile); gumTreeResults = new GumTreeCComparer().compareCFilesWithGumTree(prevFile, revFile); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java index b0754c8..7014562 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -3,6 +3,7 @@ package edu.lu.uni.serval.fixminer.akka.ediff; import com.github.gumtreediff.actions.model.Action; import com.github.gumtreediff.actions.model.*; +import com.github.gumtreediff.gen.srcml.NodeMap_new; import com.github.gumtreediff.io.CNodeMap; import com.github.gumtreediff.tree.ITree; import edu.lu.uni.serval.gumtree.GumTreeComparer; @@ -44,6 +45,9 @@ public class HierarchicalRegrouperForC { */ HierarchicalActionSet actionSet = null; for(Action act : actions){ + if(act.getNode().getType() == 2){ + continue; + } Action parentAct = findParentAction(act, actions); if (parentAct == null) { @@ -73,7 +77,9 @@ public class HierarchicalRegrouperForC { // if (astNodeType.endsWith("TypeDeclaration") || astNodeType.endsWith("FieldDeclaration") || astNodeType.endsWith("EnumDeclaration") || // astNodeType.endsWith("MethodDeclaration") || astNodeType.endsWith("Statement") || // astNodeType.endsWith("ConstructorInvocation") || astNodeType.endsWith("CatchClause") || astNodeType.endsWith("SwitchCase")) { + if (isStatement(actSet.getNode())) { reActionSets.add(actSet); + } // } } } @@ -103,8 +109,8 @@ public class HierarchicalRegrouperForC { if (Character.isDigit(nodeType.charAt(0)) || (nodeType.startsWith("-") && Character.isDigit(nodeType.charAt(1)))) { try { int typeInt = Integer.parseInt(nodeType); - if (CNodeMap.map.containsKey(typeInt)) { - String type = CNodeMap.map.get(Integer.parseInt(nodeType)); + if (NodeMap_new.map.containsKey(typeInt)) { + String type = NodeMap_new.map.get(Integer.parseInt(nodeType)); nodeType = type; } } catch (NumberFormatException e) { @@ -194,15 +200,27 @@ public class HierarchicalRegrouperForC { return false; } - List newParentActions = new ArrayList<>(); private Action findParentAction(Action action, List actions) { - + ITree parent = action.getNode().getParent(); - if (parent == null) return null; if (action instanceof Addition) { parent = ((Addition) action).getParent(); // parent in the fixed source code tree } - + +// if (parent.getType() == 55) { +// int type = action.getNode().getType(); +// // Modifier, NormalAnnotation, MarkerAnnotation, SingleMemberAnnotation +// if (type != 83 && type != 77 && type != 78 && type != 79 +// && type != 5 && type != 39 && type != 43 && type != 74 && type != 75 +// && type != 76 && type != 84 && type != 87 && type != 88 && type != 42) { +// // ArrayType, PrimitiveType, SimpleType, ParameterizedType, +// // QualifiedType, WildcardType, UnionType, IntersectionType, NameQualifiedType, SimpleName +// return null; +// } +// +// +// } + for (Action act : actions) { if (act.getNode().equals(parent)) { if (areRelatedActions(act, action)) { @@ -210,35 +228,55 @@ public class HierarchicalRegrouperForC { } } } - for (Action act : newParentActions) { - if (act.getNode().equals(parent)) { - if (areRelatedActions(act, action)) { - return act; - } - } - } - - ITree tree = action.getNode(); - Action parentAction = null; - if (!isStatement(tree)) { - parentAction = new Update(parent, action.getNode().getParent()); - newParentActions.add(parentAction); - - Action higherParentAct = findParentAction(parentAction, actions); - HierarchicalActionSet actionSet = null; - if (higherParentAct == null) { - actionSet = createActionSet(parentAction, higherParentAct, null); - actionSets.add(actionSet); - } else { - if (!addToAactionSet(parentAction, higherParentAct, actionSets)) { - // The index of the parent action in the actions' list is larger than the index of this action. - actionSet = createActionSet(parentAction, higherParentAct, null); - actionSets.add(actionSet); - } - } - } - return parentAction; + return null; } + +// List newParentActions = new ArrayList<>(); +// //TODO +// private Action findParentAction(Action action, List actions) { +// +// ITree parent = action.getNode().getParent(); +// if (parent == null) return null; +// if (action instanceof Addition) { +// parent = ((Addition) action).getParent(); // parent in the fixed source code tree +// } +// +// for (Action act : actions) { +// if (act.getNode().equals(parent)) { +// if (areRelatedActions(act, action)) { +// return act; +// } +// } +// } +// for (Action act : newParentActions) { +// if (act.getNode().equals(parent)) { +// if (areRelatedActions(act, action)) { +// return act; +// } +// } +// } +// +// ITree tree = action.getNode(); +// Action parentAction = null; +// if (!isStatement(tree)) { +// parentAction = new Update(parent, action.getNode().getParent()); +// newParentActions.add(parentAction); +// +// Action higherParentAct = findParentAction(parentAction, actions); +// HierarchicalActionSet actionSet = null; +// if (higherParentAct == null) { +// actionSet = createActionSet(parentAction, higherParentAct, null); +// actionSets.add(actionSet); +// } else { +// if (!addToAactionSet(parentAction, higherParentAct, actionSets)) { +// // The index of the parent action in the actions' list is larger than the index of this action. +// actionSet = createActionSet(parentAction, higherParentAct, null); +// actionSets.add(actionSet); +// } +// } +// } +// return parentAction; +// } private boolean isStatement(ITree tree) { int nodeType = tree.getType(); @@ -247,7 +285,9 @@ public class HierarchicalRegrouperForC { || nodeType == 22 || nodeType == 23 || nodeType == 24 || nodeType == 84 || 30 == nodeType || nodeType == 31 || nodeType == 32 || nodeType == 33 || nodeType == 34 || nodeType == 35 || nodeType == 36 || nodeType == 40 - || nodeType == 41 || nodeType == 49 || nodeType == 73) {// TODO + || nodeType == 41 || nodeType == 49 || nodeType == 73 || nodeType == 81 || nodeType == 80 || nodeType == 46 || nodeType == 60 + ||nodeType == 62 || nodeType == 64 || nodeType == 45 || nodeType == 85 || nodeType == 86 || nodeType == 59 || nodeType == 27 || nodeType == 25 + || nodeType == 26 || nodeType ==93 || nodeType == 37 || nodeType == 38 || nodeType == 39) {// TODO return true; } return false; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java new file mode 100644 index 0000000..011c7d7 --- /dev/null +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java @@ -0,0 +1,53 @@ +package edu.lu.uni.serval.fixminer.akka.ediff; + +import edu.lu.uni.serval.fixminer.akka.ediff.EDiffHunkParser; +import org.junit.Test; + +import java.io.File; +import java.io.IOException; + +public class HunkParserTest { + + @Test + public void testSimple() throws IOException { +// String input = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/revFiles/7f52f3_3845d29_drivers#pci#host#pcie-altera.c"; + + String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/linux/"; + + String filename = "8dd302_c4ef85_net#core#dev_ioctl.c"; +// String filename = "052831_3985e8_include#net#ip_tunnels.h"; +// String filename = "e76019_28647b_drivers#gpu#drm#i915#i915_drv.h"; +// 121d52_b03543_drivers#gpu#drm#i915#i915_drv.h +// String filename = "4cbe4d_b124f4_include#linux#mlx4#device.h"; +// String filename = "f70b28_95adb4_arch#arm#kernel#topology.c"; +// String filename = "7bf7eac_c01daf_include#linux#dax.h"; +// bd0b9ac_b237721_drivers#irqchip#irq-dw-apb-ictl.c + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + EDiffHunkParser parser = new EDiffHunkParser(); + + parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile); +// ITree t = new SrcmlCppTreeGenerator().generateFromFile(input).getRoot(); +// Assert.assertEquals(148, t.getSize()); + } + + + @Test + public void testSimpleJava() throws IOException { + + + String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInput/spring-amqp/"; + + String filename = "5d6e02_e597c5_spring-rabbit#src#main#java#org#springframework#amqp#rabbit#connection#ConnectionFactoryUtils.java"; + File revFile = new File(root +"/revFiles/"+filename); +// File oldFile = new File(root +"first.c"); + File prevFile = new File(root +"/prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile); +// ITree t = new SrcmlCppTreeGenerator().generateFromFile(input).getRoot(); +// Assert.assertEquals(148, t.getSize()); + } + +} diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index 7c7e690..862bcc5 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -51,7 +51,7 @@ public class EnhancedASTDiff { List msgFiles = getMessageFiles(target.toString() + "/"); //"/Users/anilkoyuncu/bugStudy/code/python/GumTreeInput/Apache/CAMEL/" - + msgFiles = msgFiles.subList(0,10000); if (msgFiles == null) continue; allMessageFiles.addAll(msgFiles); @@ -125,7 +125,7 @@ public class EnhancedASTDiff { // for (File revFile : collect) { String fileName = revFile.getName(); File prevFile = new File(gumTreeInput + "prevFiles/prev_" + fileName);// previous file - fileName = fileName.replace(".java", ".txt"); + fileName = fileName + ".txt"; File diffentryFile = new File(gumTreeInput + "DiffEntries/" + fileName); // DiffEntry file MessageFile msgFile = new MessageFile(revFile, prevFile, diffentryFile); diff --git a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java index 03b63aa..4973300 100755 --- a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java +++ b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java @@ -1,6 +1,7 @@ package edu.lu.uni.serval.utils; import com.github.gumtreediff.actions.model.*; +import com.github.gumtreediff.gen.srcml.NodeMap_new; import com.github.gumtreediff.tree.ITree; import com.github.gumtreediff.tree.TreeContext; import com.github.gumtreediff.tree.TreeUtils; @@ -81,7 +82,8 @@ public class EDiffHelper { String astNodeType = actionSet.getAstNodeType(); String label = actionSet.getAction().toString(); - List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); +// List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); + List keysByValue = getKeysByValue(NodeMap_new.map, astNodeType); if(keysByValue.size() != 1){ log.error("More than 1"); @@ -124,7 +126,8 @@ public class EDiffHelper { Action action = actionSet.getAction(); if (action instanceof Update){ astNodeType = actionSet.getAstNodeType(); - List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); +// List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); + List keysByValue = getKeysByValue(NodeMap_new.map, astNodeType); if(keysByValue.size() != 1){ log.error("More than 1"); @@ -136,7 +139,8 @@ public class EDiffHelper { newType = ((Move)action).getParent().getType(); }else if(action instanceof Delete){ astNodeType = actionSet.getAstNodeType(); - List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); +// List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); + List keysByValue = getKeysByValue(NodeMap_new.map, astNodeType); if(keysByValue.size() != 1){ log.error("More than 1"); @@ -179,7 +183,8 @@ public class EDiffHelper { int newType = 0; String astNodeType = actionSet.getAstNodeType(); - List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); +// List keysByValue = getKeysByValue(ASTNodeMap.map, astNodeType); + List keysByValue = getKeysByValue(NodeMap_new.map, astNodeType); if(keysByValue.size() != 1){ log.error("More than 1"); From 21b222edc5a4b825e819b10f5652ac8f689e0aa3 Mon Sep 17 00:00:00 2001 From: mimic Date: Thu, 19 Dec 2019 11:42:52 +0100 Subject: [PATCH 03/41] new parent node --- .../serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java index 7014562..772ef88 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -287,7 +287,7 @@ public class HierarchicalRegrouperForC { || nodeType == 34 || nodeType == 35 || nodeType == 36 || nodeType == 40 || nodeType == 41 || nodeType == 49 || nodeType == 73 || nodeType == 81 || nodeType == 80 || nodeType == 46 || nodeType == 60 ||nodeType == 62 || nodeType == 64 || nodeType == 45 || nodeType == 85 || nodeType == 86 || nodeType == 59 || nodeType == 27 || nodeType == 25 - || nodeType == 26 || nodeType ==93 || nodeType == 37 || nodeType == 38 || nodeType == 39) {// TODO + || nodeType == 26 || nodeType ==93 || nodeType == 37 || nodeType == 38 || nodeType == 39 || nodeType == 89) {// TODO return true; } return false; From 2b664440aa2f094d9b2977ef76071fa7d2f811e6 Mon Sep 17 00:00:00 2001 From: mimic Date: Fri, 20 Dec 2019 14:20:53 +0100 Subject: [PATCH 04/41] node map for statements --- .../akka/ediff/HierarchicalRegrouperForC.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java index 772ef88..8912196 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -279,17 +279,23 @@ public class HierarchicalRegrouperForC { // } private boolean isStatement(ITree tree) { + + int nodeType = tree.getType(); - if (nodeType == 11 || nodeType == 16 || nodeType == 18 || nodeType == 21 - || nodeType == 22 || nodeType == 23 || nodeType == 24 || nodeType == 84 - || 30 == nodeType || nodeType == 31 || nodeType == 32 || nodeType == 33 - || nodeType == 34 || nodeType == 35 || nodeType == 36 || nodeType == 40 - || nodeType == 41 || nodeType == 49 || nodeType == 73 || nodeType == 81 || nodeType == 80 || nodeType == 46 || nodeType == 60 - ||nodeType == 62 || nodeType == 64 || nodeType == 45 || nodeType == 85 || nodeType == 86 || nodeType == 59 || nodeType == 27 || nodeType == 25 - || nodeType == 26 || nodeType ==93 || nodeType == 37 || nodeType == 38 || nodeType == 39 || nodeType == 89) {// TODO + if (NodeMap_new.StatementMap.containsKey(nodeType)){ return true; } + +// if (nodeType == 11 || nodeType == 16 || nodeType == 18 || nodeType == 21 +// || nodeType == 22 || nodeType == 23 || nodeType == 24 || nodeType == 84 +// || 30 == nodeType || nodeType == 31 || nodeType == 32 || nodeType == 33 +// || nodeType == 34 || nodeType == 35 || nodeType == 36 || nodeType == 40 +// || nodeType == 41 || nodeType == 49 || nodeType == 73 || nodeType == 81 || nodeType == 80 || nodeType == 46 || nodeType == 60 +// ||nodeType == 62 || nodeType == 64 || nodeType == 45 || nodeType == 85 || nodeType == 86 || nodeType == 59 || nodeType == 27 || nodeType == 25 +// || nodeType == 26 || nodeType ==93 || nodeType == 37 || nodeType == 38 || nodeType == 39 || nodeType == 89) {// TODO +// return true; +// } return false; } From 913d2615d0b087c6de552cf0c89f6d89318eef76 Mon Sep 17 00:00:00 2001 From: mimic Date: Sat, 21 Dec 2019 16:47:43 +0100 Subject: [PATCH 05/41] test cases updated --- .../uni/serval/fixminer/akka/ediff/HunkParserTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java index 011c7d7..d24bf1e 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java @@ -14,14 +14,13 @@ public class HunkParserTest { String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/linux/"; - String filename = "8dd302_c4ef85_net#core#dev_ioctl.c"; +// String filename = "8dd302_c4ef85_net#core#dev_ioctl.c"; +// String filename = "5924f17_5925a05_net#ipv4#tcp.c"; +// String filename = "bd0b9ac_b237721_drivers#irqchip#irq-dw-apb-ictl.c"; // String filename = "052831_3985e8_include#net#ip_tunnels.h"; // String filename = "e76019_28647b_drivers#gpu#drm#i915#i915_drv.h"; -// 121d52_b03543_drivers#gpu#drm#i915#i915_drv.h -// String filename = "4cbe4d_b124f4_include#linux#mlx4#device.h"; -// String filename = "f70b28_95adb4_arch#arm#kernel#topology.c"; + String filename = "4cbe4d_b124f4_include#linux#mlx4#device.h"; //enum case stops at block // String filename = "7bf7eac_c01daf_include#linux#dax.h"; -// bd0b9ac_b237721_drivers#irqchip#irq-dw-apb-ictl.c File revFile = new File(root + "revFiles/"+ filename); File prevFile =new File(root + "prevFiles/prev_"+filename); EDiffHunkParser parser = new EDiffHunkParser(); From 422a3546b6a8381ae397924e12699e66a8af6420 Mon Sep 17 00:00:00 2001 From: fixminer Date: Mon, 6 Jan 2020 11:14:46 +0100 Subject: [PATCH 06/41] changes for srcml --- .../edu/lu/uni/serval/fixminer/Launcher.java | 20 ++++++++-------- .../fixminer/akka/ediff/EDiffActor.java | 2 +- .../fixminer/akka/ediff/EDiffHunkParser.java | 18 ++++++++++++--- .../fixminer/akka/ediff/EDiffMessage.java | 18 ++++++++++++++- .../fixminer/akka/ediff/EDiffParser.java | 13 ++++++++--- .../fixminer/akka/ediff/EDiffWorker.java | 5 +++- .../fixminer/akka/ediff/HunkParserTest.java | 23 +++++++++++++++---- .../serval/fixminer/akka/ediff/Parser.java | 2 +- .../fixminer/akka/ediff/RunnableParser.java | 13 ++++++++++- .../serval/fixminer/jobs/EnhancedASTDiff.java | 9 ++++---- src/main/resource/app.properties | 9 ++++---- 11 files changed, 100 insertions(+), 32 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index 66c909e..a0d0456 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,8 +22,8 @@ public class Launcher { Properties appProps = new Properties(); - String appConfigPath = "/Users/haoyetian/Documents/Lu_code/FixMiner/fixminer_source/src/main/resource/app.properties"; -// String appConfigPath = args[0]; +// String appConfigPath = "/Users/haoyetian/Documents/Lu_code/FixMiner/fixminer_source/src/main/resource/app.properties"; + String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); String portInner = appProps.getProperty("portInner","6380"); @@ -33,13 +33,15 @@ public class Launcher { String actionType = appProps.getProperty("actionType","ALL"); String eDiffTimeout = appProps.getProperty("eDiffTimeout","900"); String parallelism = appProps.getProperty("parallelism","FORKJOIN"); + String input = appProps.getProperty("inputPath","FORKJOIN"); String redisPath = appProps.getProperty("redisPath","FORKJOIN"); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); -// String parameter = args[2]; - String parameter = null; -// String jobType = args[1]; - String jobType = "RICHEDITSCRIPT"; + String parameter = args[2]; +// String parameter = null; + String jobType = args[1]; +// String jobType = "RICHEDITSCRIPT"; // String parameters = String.format("\nportInner %s " + // "\nnumOfWorkers %s " + @@ -50,12 +52,12 @@ public class Launcher { // // log.info(parameters); - mainLaunch(portInner, numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter); + mainLaunch(portInner, numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter, srcMLPath); } - public static void mainLaunch(String portInner, String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter){ + public static void mainLaunch(String portInner, String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter,String srcMLPath){ String dbDir; @@ -71,7 +73,7 @@ public class Launcher { try { switch (jobType) { case "RICHEDITSCRIPT": - EnhancedASTDiff.main(gumInput, numOfWorkers, pjName, eDiffTimeout,parallelism,portDumps, dbDir, actionType+dumpsName); + EnhancedASTDiff.main(gumInput, numOfWorkers, pjName, eDiffTimeout,parallelism,portDumps, dbDir, actionType+dumpsName, srcMLPath); break; case "COMPARE": diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java index 9e714ea..5316137 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java @@ -54,7 +54,7 @@ public class EDiffActor extends UntypedActor { int toIndex = (i + 1) * average + counter; List filesOfWorkers = files.subList(fromIndex, toIndex); - final EDiffMessage workMsg = new EDiffMessage(i + 1, filesOfWorkers,((EDiffMessage) message).getSECONDS_TO_WAIT(),((EDiffMessage) message).getInnerPool()); + final EDiffMessage workMsg = new EDiffMessage(i + 1, filesOfWorkers,((EDiffMessage) message).getSECONDS_TO_WAIT(),((EDiffMessage) message).getInnerPool(),((EDiffMessage) message).getSrcMLPath()); mineRouter.tell(workMsg, getSelf()); logger.info("Assign {} task to worker #" + (i + 1) ,filesOfWorkers.size()); } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java index cd30b79..d6bcdd6 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java @@ -8,6 +8,8 @@ import redis.clients.jedis.JedisPool; import java.io.File; import java.io.FileOutputStream; +import java.io.FileWriter; +import java.io.ObjectOutputStream; import java.util.List; @@ -22,8 +24,8 @@ public class EDiffHunkParser extends EDiffParser { private static Logger logger = LoggerFactory.getLogger(EDiffHunkParser.class); @Override - public void parseFixPatterns(File prevFile, File revFile, File diffentryFile, String project, JedisPool innerPool) { - List actionSets = parseChangedSourceCodeWithGumTree2(prevFile, revFile); + public void parseFixPatterns(File prevFile, File revFile, File diffentryFile, String project, JedisPool innerPool,String srcMLPath) { + List actionSets = parseChangedSourceCodeWithGumTree2(prevFile, revFile,srcMLPath); if (actionSets.size() != 0) { boolean processActionSet = true; @@ -31,7 +33,7 @@ public class EDiffHunkParser extends EDiffParser { int hunkSet = 0; if(processActionSet){ for (HierarchicalActionSet actionSet : actionSets) { - FileOutputStream f = null; +// FileOutputStream f = null; try { @@ -51,6 +53,16 @@ public class EDiffHunkParser extends EDiffParser { inner.hset("dump".getBytes(),key.getBytes(),EDiffHelper.kryoSerialize(actionSet)); } +// File f = new File(root+"dumps/"+astNodeType+"/"+String.valueOf(size)+"/"); +// f.mkdirs(); +// f = new File(root+"dumps/"+key); +// +// +// FileOutputStream fos = new FileOutputStream(f); +// ObjectOutputStream oos = new ObjectOutputStream(fos); +// oos.writeObject(EDiffHelper.kryoSerialize(actionSet)); +// oos.flush(); +// oos.close(); } catch (Exception e) { logger.error("error",e); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java index a2c8697..b70960c 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java @@ -10,6 +10,7 @@ public class EDiffMessage extends BaseMessage{ private List msgFiles; + public JedisPool getInnerPool() { return innerPool; } @@ -20,14 +21,21 @@ public class EDiffMessage extends BaseMessage{ private JedisPool innerPool; + public String getSrcMLPath() { + return srcMLPath; + } + + private String srcMLPath; + - public EDiffMessage(int id, List msgFiles,String eDiffTimeout,JedisPool pool) { + public EDiffMessage(int id, List msgFiles,String eDiffTimeout,JedisPool pool,String srcMLPath) { super(id,new Long(eDiffTimeout)); this.msgFiles = msgFiles; this.innerPool = pool; + this.srcMLPath = srcMLPath; } public EDiffMessage(int id, List msgFiles,Long eDiffTimeout,JedisPool pool) { super(id,eDiffTimeout); @@ -36,6 +44,14 @@ public class EDiffMessage extends BaseMessage{ } + public EDiffMessage(int id, List filesOfWorkers, long seconds_to_wait, JedisPool innerPool, String srcMLPath) { + + super(id,seconds_to_wait); + this.msgFiles = filesOfWorkers; + this.innerPool = innerPool; + this.srcMLPath = srcMLPath; + } + public List getMsgFiles() { return msgFiles; } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java index 93e011c..2d2cf35 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java @@ -38,7 +38,7 @@ public class EDiffParser extends Parser { * @param revFile * @return */ - protected List parseChangedSourceCodeWithGumTree2(File prevFile, File revFile) { + protected List parseChangedSourceCodeWithGumTree2(File prevFile, File revFile,String srcMLPath) { List actionSets = new ArrayList<>(); // GumTree results boolean isJava =false; @@ -46,7 +46,9 @@ public class EDiffParser extends Parser { if (revFile.getName().endsWith(".c") & prevFile.getName().endsWith(".c") || revFile.getName().endsWith(".h") & prevFile.getName().endsWith(".h")){ // gumTreeResults = new GumTreeComparer().compareCFilesWithGumTree(prevFile, revFile); - gumTreeResults = new GumTreeCComparer().compareCFilesWithGumTree(prevFile, revFile); + + + gumTreeResults = new GumTreeCComparer().compareCFilesWithGumTree(prevFile, revFile,srcMLPath); }else{ gumTreeResults = new GumTreeComparer().compareTwoFilesWithGumTree(prevFile, revFile); isJava = true; @@ -79,10 +81,15 @@ public class EDiffParser extends Parser { } @Override - public void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool) { + public void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool, String srcMLPath) { } +// @Override +// public void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool) { +// +// } + } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java index 2b18154..960a770 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java @@ -43,6 +43,7 @@ public class EDiffWorker extends UntypedActor { int id = msg.getId(); int counter = 0; JedisPool innerPool = msg.getInnerPool(); + String srcMLPath = msg.getSrcMLPath(); for (MessageFile msgFile : files) { File revFile = msgFile.getRevFile(); @@ -55,7 +56,9 @@ public class EDiffWorker extends UntypedActor { final ExecutorService executor = Executors.newSingleThreadExecutor(); // schedule the work - final Future future = executor.submit(new RunnableParser(prevFile, revFile, diffentryFile, parser,project,msg.getInnerPool())); + + + final Future future = executor.submit(new RunnableParser(prevFile, revFile, diffentryFile, parser,project,msg.getInnerPool(),srcMLPath)); try { // wait for task to complete future.get(msg.getSECONDS_TO_WAIT(), TimeUnit.SECONDS); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java index d24bf1e..ffdb4c6 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java @@ -12,24 +12,39 @@ public class HunkParserTest { public void testSimple() throws IOException { // String input = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/revFiles/7f52f3_3845d29_drivers#pci#host#pcie-altera.c"; - String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/linux/"; + String root = "/Users/anilkoyuncu/projects/gumInputLinux/linux/"; // String filename = "8dd302_c4ef85_net#core#dev_ioctl.c"; + String filename = "6a28fd_93ad867_drivers#tty#goldfish.c"; // String filename = "5924f17_5925a05_net#ipv4#tcp.c"; // String filename = "bd0b9ac_b237721_drivers#irqchip#irq-dw-apb-ictl.c"; // String filename = "052831_3985e8_include#net#ip_tunnels.h"; // String filename = "e76019_28647b_drivers#gpu#drm#i915#i915_drv.h"; - String filename = "4cbe4d_b124f4_include#linux#mlx4#device.h"; //enum case stops at block +// String filename = "4cbe4d_b124f4_include#linux#mlx4#device.h"; //enum case stops at block // String filename = "7bf7eac_c01daf_include#linux#dax.h"; File revFile = new File(root + "revFiles/"+ filename); File prevFile =new File(root + "prevFiles/prev_"+filename); EDiffHunkParser parser = new EDiffHunkParser(); - parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile); + String srcMLPath = "/Users/anilkoyuncu/Downloads/srcML2/src2srcml"; + parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); // ITree t = new SrcmlCppTreeGenerator().generateFromFile(input).getRoot(); // Assert.assertEquals(148, t.getSize()); } + @Test + public void newCTest(){ + String root = "/Users/anilkoyuncu/projects/gumInputLinux/linux/"; + String filename = "6a28fd_93ad867_drivers#tty#goldfish.c"; + + String srcMLPath = "/Users/anilkoyuncu/Downloads/srcML2/src2srcml"; + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + File diffFile = new File(root + "DiffEntries/"+filename+".txt"); + EDiffHunkParser parser = new EDiffHunkParser(); + parser.parseFixPatterns(prevFile,revFile,diffFile,"gumInputLinux",null,srcMLPath); + } + @Test public void testSimpleJava() throws IOException { @@ -44,7 +59,7 @@ public class HunkParserTest { EDiffHunkParser parser = new EDiffHunkParser(); - parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile); + parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile,""); // ITree t = new SrcmlCppTreeGenerator().generateFromFile(input).getRoot(); // Assert.assertEquals(148, t.getSize()); } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java index 349410b..a738898 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java @@ -20,7 +20,7 @@ public abstract class Parser implements ParserInterface { protected String originalTree = ""; // Guide of generating patches. protected String actionSets = ""; // Guide of generating patches. - public abstract void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool); + public abstract void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool, String srcMLPath); @Override diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java index b4b48a4..4c23d50 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java @@ -12,6 +12,7 @@ public class RunnableParser implements Runnable { private Parser parser; private String project; private JedisPool pool; + private String srcMLPath; public RunnableParser(File prevFile, File revFile, File diffentryFile, Parser parser) { this.prevFile = prevFile; @@ -29,8 +30,18 @@ public class RunnableParser implements Runnable { this.pool = innerPool; } + public RunnableParser(File prevFile, File revFile, File diffentryFile, Parser parser, String project, JedisPool innerPool,String srcMLPath) { + this.prevFile = prevFile; + this.revFile = revFile; + this.diffentryFile = diffentryFile; + this.parser = parser; + this.project = project; + this.pool = innerPool; + this.srcMLPath = srcMLPath; + } + @Override public void run() { - parser.parseFixPatterns(prevFile, revFile, diffentryFile,project,pool); + parser.parseFixPatterns(prevFile, revFile, diffentryFile,project,pool,srcMLPath); } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index 862bcc5..7ed5b90 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -24,7 +24,7 @@ public class EnhancedASTDiff { private static Logger log = LoggerFactory.getLogger(EnhancedASTDiff.class); - public static void main(String inputPath, String numOfWorkers, String project, String eDiffTimeout, String parallelism, String portInner, String dbDir, String chunkName) throws Exception { + public static void main(String inputPath, String numOfWorkers, String project, String eDiffTimeout, String parallelism, String portInner, String dbDir, String chunkName,String srcMLPath) throws Exception { String parameters = String.format("\nInput path %s",inputPath); @@ -51,7 +51,7 @@ public class EnhancedASTDiff { List msgFiles = getMessageFiles(target.toString() + "/"); //"/Users/anilkoyuncu/bugStudy/code/python/GumTreeInput/Apache/CAMEL/" - msgFiles = msgFiles.subList(0,10000); +// msgFiles = msgFiles.subList(0,10000); if (msgFiles == null) continue; allMessageFiles.addAll(msgFiles); @@ -63,7 +63,8 @@ public class EnhancedASTDiff { case "AKKA": ActorSystem system = null; ActorRef parsingActor = null; - final EDiffMessage msg = new EDiffMessage(0, allMessageFiles,eDiffTimeout,innerPool); + + final EDiffMessage msg = new EDiffMessage(0, allMessageFiles,eDiffTimeout,innerPool,srcMLPath); try { log.info("Akka begins..."); log.info("{} files to process ...", allMessageFiles.size()); @@ -87,7 +88,7 @@ public class EnhancedASTDiff { forEach(m -> { EDiffHunkParser parser = new EDiffHunkParser(); - parser.parseFixPatterns(m.getPrevFile(),m.getRevFile(), m.getDiffEntryFile(),project,innerPool); + parser.parseFixPatterns(m.getPrevFile(),m.getRevFile(), m.getDiffEntryFile(),project,innerPool,"/Users/anilkoyuncu/Downloads/srcML2/src2srcml"); if (counter % 10 == 0) { log.info("Finalized parsing " + counter + " files... remaining " + (allMessageFiles.size() - counter)); } diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index 8e57561..62363bb 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -1,12 +1,13 @@ -jobType = RICHEDITSCRIPT + pjName = gumInput portInner = 6380 portDumps = 6399 parallelism = AKKA numOfWorkers = 1 -#inputPath = /Users/haoyetian/Documents/Lu_code/FixMiner/fixminer-core/python/data/gumInput -inputPath = /Users/haoyetian/Documents/Lu_code/test -redisPath = /Users/haoyetian/Documents/Lu_code/FixMiner/fixminer-core/python/data/redis + +inputPath = /Users/anilkoyuncu/projects/gumInputLinux/ +redisPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/redis +srcMLPath= /Users/anilkoyuncu/Downloads/srcML2/src2srcml actionType =ALL eDiffTimeout = 900 From 49a0aeba0bbe857e2cc95b0ccad767504715b073 Mon Sep 17 00:00:00 2001 From: mimic Date: Thu, 9 Jan 2020 14:11:27 +0100 Subject: [PATCH 07/41] changes for single rootType --- pom.xml | 30 +++---- .../edu/lu/uni/serval/fixminer/Launcher.java | 12 ++- .../fixminer/akka/compare/AkkaTreeParser.java | 32 ++++++- .../fixminer/akka/compare/CompareTrees.java | 26 +++--- .../akka/ediff/DefaultKryoContext.java | 2 + .../fixminer/akka/ediff/EDiffActor.java | 2 +- .../fixminer/akka/ediff/EDiffHunkParser.java | 22 +++-- .../fixminer/akka/ediff/EDiffMessage.java | 12 ++- .../fixminer/akka/ediff/EDiffParser.java | 2 +- .../fixminer/akka/ediff/EDiffWorker.java | 3 +- .../fixminer/akka/ediff/HunkParserTest.java | 71 +++++++++++++-- .../serval/fixminer/akka/ediff/Parser.java | 2 +- .../fixminer/akka/ediff/RunnableParser.java | 8 +- .../serval/fixminer/jobs/EnhancedASTDiff.java | 88 +++++++++++++++++-- src/main/resource/app.properties | 8 +- 15 files changed, 254 insertions(+), 66 deletions(-) diff --git a/pom.xml b/pom.xml index 174b076..ebaa43d 100755 --- a/pom.xml +++ b/pom.xml @@ -102,11 +102,11 @@ 1.3 - - com.rabbitmq - amqp-client - 4.0.0 - + + + + + junit junit @@ -114,17 +114,17 @@ - - org.apache.lucene - lucene-core - 4.8.0 - + + + + + - - org.apache.lucene - lucene-analyzers-common - 4.8.0 - + + + + + org.apache.commons diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index a0d0456..41160e0 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,7 +22,7 @@ public class Launcher { Properties appProps = new Properties(); -// String appConfigPath = "/Users/haoyetian/Documents/Lu_code/FixMiner/fixminer_source/src/main/resource/app.properties"; +// String appConfigPath = "/Users/anil.koyuncu/projects/test/fixminerC/src/main/resource/app.properties"; String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); @@ -40,8 +40,12 @@ public class Launcher { String parameter = args[2]; // String parameter = null; +// String parameter = "decl"; +// String parameter = "L2"; String jobType = args[1]; // String jobType = "RICHEDITSCRIPT"; +// String jobType = "LOAD"; +// String jobType = "COMPARE"; // String parameters = String.format("\nportInner %s " + // "\nnumOfWorkers %s " + @@ -73,7 +77,11 @@ public class Launcher { try { switch (jobType) { case "RICHEDITSCRIPT": - EnhancedASTDiff.main(gumInput, numOfWorkers, pjName, eDiffTimeout,parallelism,portDumps, dbDir, actionType+dumpsName, srcMLPath); + EnhancedASTDiff.main(gumInput, numOfWorkers, pjName, eDiffTimeout,parallelism,portDumps, dbDir, actionType+dumpsName, srcMLPath,parameter); + break; + + case "LOAD": + EnhancedASTDiff.load(gumInput, numOfWorkers, pjName, eDiffTimeout,parallelism,portDumps, dbDir, actionType+dumpsName, srcMLPath,parameter); break; case "COMPARE": diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java index d00ffbb..345ca70 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java @@ -7,6 +7,7 @@ import redis.clients.jedis.JedisPool; import redis.clients.jedis.ScanParams; import redis.clients.jedis.ScanResult; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -71,9 +72,38 @@ public class AkkaTreeParser { } - log.info("Getting results"); +// log.info("Getting results %d",fileMap.s); return fileMap; } + public static List files2compare(JedisPool innerPool){ + + +// HashMap fileMap =new HashMap(); + List result = new ArrayList(); + try (Jedis inner = innerPool.getResource()) { + while (!inner.ping().equals("PONG")){ + log.info("wait"); + } + +// inner.select(1); + Map filenames = inner.hgetAll("compare"); + + + for (Map.Entry stringStringEntry : filenames.entrySet().stream().collect(Collectors.toList())) { +// fileMap.put(stringStringEntry.getKey(),stringStringEntry.getValue()); + result.add(stringStringEntry.getKey()); + } + + + + + + } + + log.info("Getting results :" + result.size()); + return result; + } + } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index 3d579e0..0b67c31 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -37,21 +37,22 @@ public class CompareTrees { log.info(cmd); cs.runShell(cmd, port); - String cmdInner = "bash "+redisPath + "/" + "startServer.sh" +" %s %s %s"; - cmdInner = String.format(cmdInner, redisPath,compareDBName,Integer.valueOf(portInner)); - log.info(cmdInner); - cs.runShell(cmdInner, portInner); +// String cmdInner = "bash "+redisPath + "/" + "startServer.sh" +" %s %s %s"; +// cmdInner = String.format(cmdInner, redisPath,compareDBName,Integer.valueOf(portInner)); +// log.info(cmdInner); +// cs.runShell(cmdInner, portInner); String numOfWorkers = "100000000";//args[4]; String host = "localhost";//args[5]; // -Djava.util.concurrent.ForkJoinPool.common.parallelism=256 - final JedisPool innerPool = new JedisPool(PoolBuilder.getPoolConfig(), host,Integer.valueOf(portInner),20000000); +// final JedisPool innerPool = new JedisPool(PoolBuilder.getPoolConfig(), host,Integer.valueOf(portInner),20000000); final JedisPool outerPool = new JedisPool(PoolBuilder.getPoolConfig(), host,Integer.valueOf(port),20000000); - List listOfPairs = AkkaTreeParser.getMessages(innerPool,Integer.valueOf(numOfWorkers)); - HashMap filenames = AkkaTreeParser.filenames(innerPool); +// List listOfPairs = AkkaTreeParser.getMessages(innerPool,Integer.valueOf(numOfWorkers)); + HashMap filenames = AkkaTreeParser.filenames(outerPool); + List listOfPairs = AkkaTreeParser.files2compare(outerPool); ArrayList samePairs = new ArrayList<>(); @@ -59,14 +60,15 @@ public class CompareTrees { - listOfPairs.stream().parallel().forEach(m->coreCompare(m, job,innerPool, samePairs,errorPairs,filenames,outerPool)); + listOfPairs.stream().parallel().forEach(m->coreCompare(m, job,null, samePairs,errorPairs,filenames,outerPool)); - try (Jedis jedis = innerPool.getResource()) { + try (Jedis jedis = outerPool.getResource()) { jedis.select(0); - jedis.flushDB(); +// jedis.flushDB(); + jedis.del("compare"); for (String errorPair : errorPairs) { - jedis.hset(errorPair, "0", "1"); + jedis.hset("compare", errorPair, "1"); } @@ -85,6 +87,8 @@ public class CompareTrees { Pair newPair = null; String matchKey = null; + innerPool = outerPool; + try { String[] split = pairName.split("/"); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java index 7941ab1..3a71d4a 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java @@ -5,6 +5,8 @@ import java.io.ByteArrayOutputStream; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; +import com.esotericsoftware.kryo.io.UnsafeInput; +import com.esotericsoftware.kryo.io.UnsafeOutput; import com.esotericsoftware.kryo.pool.KryoFactory; import com.esotericsoftware.kryo.pool.KryoPool; import org.objenesis.strategy.SerializingInstantiatorStrategy; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java index 5316137..425643a 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffActor.java @@ -54,7 +54,7 @@ public class EDiffActor extends UntypedActor { int toIndex = (i + 1) * average + counter; List filesOfWorkers = files.subList(fromIndex, toIndex); - final EDiffMessage workMsg = new EDiffMessage(i + 1, filesOfWorkers,((EDiffMessage) message).getSECONDS_TO_WAIT(),((EDiffMessage) message).getInnerPool(),((EDiffMessage) message).getSrcMLPath()); + final EDiffMessage workMsg = new EDiffMessage(i + 1, filesOfWorkers,((EDiffMessage) message).getSECONDS_TO_WAIT(),((EDiffMessage) message).getInnerPool(),((EDiffMessage) message).getSrcMLPath(),((EDiffMessage) message).getRootType()); mineRouter.tell(workMsg, getSelf()); logger.info("Assign {} task to worker #" + (i + 1) ,filesOfWorkers.size()); } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java index d6bcdd6..81d8fe0 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java @@ -1,6 +1,7 @@ package edu.lu.uni.serval.fixminer.akka.ediff; import edu.lu.uni.serval.utils.EDiffHelper; +import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import redis.clients.jedis.Jedis; @@ -24,7 +25,7 @@ public class EDiffHunkParser extends EDiffParser { private static Logger logger = LoggerFactory.getLogger(EDiffHunkParser.class); @Override - public void parseFixPatterns(File prevFile, File revFile, File diffentryFile, String project, JedisPool innerPool,String srcMLPath) { + public void parseFixPatterns(File prevFile, File revFile, File diffentryFile, String project, JedisPool innerPool,String srcMLPath,String rootType) { List actionSets = parseChangedSourceCodeWithGumTree2(prevFile, revFile,srcMLPath); if (actionSets.size() != 0) { @@ -38,6 +39,9 @@ public class EDiffHunkParser extends EDiffParser { try { String astNodeType = actionSet.getAstNodeType(); + if (astNodeType.equals(rootType)){ + + } actionSet.toString(); int size = actionSet.getActionSize(); @@ -49,15 +53,15 @@ public class EDiffHunkParser extends EDiffParser { String key = astNodeType+"/"+String.valueOf(size)+"/" + pj +"_" + diffentryFile.getName() + "_" + String.valueOf(hunkSet); - try (Jedis inner = innerPool.getResource()) { +// try (Jedis inner = innerPool.getResource()) { +// +// inner.hset("dump".getBytes(),key.getBytes(),EDiffHelper.kryoSerialize(actionSet)); +// } + File f = new File(root+"dumps/"+astNodeType+"/"+String.valueOf(size)+"/"); + f.mkdirs(); + f = new File(root+"dumps/"+key); - inner.hset("dump".getBytes(),key.getBytes(),EDiffHelper.kryoSerialize(actionSet)); - } -// File f = new File(root+"dumps/"+astNodeType+"/"+String.valueOf(size)+"/"); -// f.mkdirs(); -// f = new File(root+"dumps/"+key); -// -// + FileUtils.writeByteArrayToFile(f,EDiffHelper.kryoSerialize(actionSet)); // FileOutputStream fos = new FileOutputStream(f); // ObjectOutputStream oos = new ObjectOutputStream(fos); // oos.writeObject(EDiffHelper.kryoSerialize(actionSet)); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java index b70960c..e8bbbb0 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffMessage.java @@ -27,15 +27,22 @@ public class EDiffMessage extends BaseMessage{ private String srcMLPath; + public String getRootType() { + return rootType; + } + + private String rootType; + - public EDiffMessage(int id, List msgFiles,String eDiffTimeout,JedisPool pool,String srcMLPath) { + public EDiffMessage(int id, List msgFiles,String eDiffTimeout,JedisPool pool,String srcMLPath,String rootType) { super(id,new Long(eDiffTimeout)); this.msgFiles = msgFiles; this.innerPool = pool; this.srcMLPath = srcMLPath; + this.rootType = rootType; } public EDiffMessage(int id, List msgFiles,Long eDiffTimeout,JedisPool pool) { super(id,eDiffTimeout); @@ -44,12 +51,13 @@ public class EDiffMessage extends BaseMessage{ } - public EDiffMessage(int id, List filesOfWorkers, long seconds_to_wait, JedisPool innerPool, String srcMLPath) { + public EDiffMessage(int id, List filesOfWorkers, long seconds_to_wait, JedisPool innerPool, String srcMLPath,String rootType) { super(id,seconds_to_wait); this.msgFiles = filesOfWorkers; this.innerPool = innerPool; this.srcMLPath = srcMLPath; + this.rootType = rootType; } public List getMsgFiles() { diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java index 2d2cf35..4856b1f 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java @@ -81,7 +81,7 @@ public class EDiffParser extends Parser { } @Override - public void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool, String srcMLPath) { + public void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool, String srcMLPath,String rootType) { } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java index 960a770..b1ee053 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java @@ -44,6 +44,7 @@ public class EDiffWorker extends UntypedActor { int counter = 0; JedisPool innerPool = msg.getInnerPool(); String srcMLPath = msg.getSrcMLPath(); + String rootType = msg.getRootType(); for (MessageFile msgFile : files) { File revFile = msgFile.getRevFile(); @@ -58,7 +59,7 @@ public class EDiffWorker extends UntypedActor { // schedule the work - final Future future = executor.submit(new RunnableParser(prevFile, revFile, diffentryFile, parser,project,msg.getInnerPool(),srcMLPath)); + final Future future = executor.submit(new RunnableParser(prevFile, revFile, diffentryFile, parser,project,msg.getInnerPool(),srcMLPath,rootType)); try { // wait for task to complete future.get(msg.getSECONDS_TO_WAIT(), TimeUnit.SECONDS); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java index ffdb4c6..1df607a 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java @@ -1,10 +1,18 @@ package edu.lu.uni.serval.fixminer.akka.ediff; import edu.lu.uni.serval.fixminer.akka.ediff.EDiffHunkParser; +import edu.lu.uni.serval.utils.EDiffHelper; +import edu.lu.uni.serval.utils.PoolBuilder; +import org.apache.commons.io.FileUtils; import org.junit.Test; +import redis.clients.jedis.Jedis; +import redis.clients.jedis.JedisPool; import java.io.File; import java.io.IOException; +import java.lang.instrument.Instrumentation; +import java.time.Duration; +import java.time.Instant; public class HunkParserTest { @@ -12,12 +20,20 @@ public class HunkParserTest { public void testSimple() throws IOException { // String input = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/revFiles/7f52f3_3845d29_drivers#pci#host#pcie-altera.c"; - String root = "/Users/anilkoyuncu/projects/gumInputLinux/linux/"; + String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/linux/"; -// String filename = "8dd302_c4ef85_net#core#dev_ioctl.c"; - String filename = "6a28fd_93ad867_drivers#tty#goldfish.c"; +// String filename = "8dd302_c4ef85_net#core#dev_ioctl.c"; //ok +// String filename = "1e793f6_77f18a_drivers#scsi#megaraid#megaraid_sas_base.c"; //OK +// String filename = "6a28fd_93ad867_drivers#tty#goldfish.c"; //m,issing +// String filename = "b90f7c_ff51ff_kernel#sched#fair.c"; //wrong and wired +// String filename = "ed8f68_b1c8047_fs#ext3#dir.c";//ok + +// String filename = "bc3d12_9a26653_drivers#scsi#libfc#fc_disc.c"; //okish + String filename = "118154_0c5f81_arch#x86#kvm#svm.c"; +// String filename = "bcbd94f_43e43c9_drivers#md#dm-crypt.c"; //emin degilim +// String filename = "f1727b4_6c1e7e_arch#x86#kvm#vmx#nested.c"; //komplex not sure // String filename = "5924f17_5925a05_net#ipv4#tcp.c"; -// String filename = "bd0b9ac_b237721_drivers#irqchip#irq-dw-apb-ictl.c"; +// String filename = "bd0b9ac_b237721_drivers#irqchip#irq-dw-apb-ictl.c"; //missing // String filename = "052831_3985e8_include#net#ip_tunnels.h"; // String filename = "e76019_28647b_drivers#gpu#drm#i915#i915_drv.h"; // String filename = "4cbe4d_b124f4_include#linux#mlx4#device.h"; //enum case stops at block @@ -26,10 +42,11 @@ public class HunkParserTest { File prevFile =new File(root + "prevFiles/prev_"+filename); EDiffHunkParser parser = new EDiffHunkParser(); - String srcMLPath = "/Users/anilkoyuncu/Downloads/srcML2/src2srcml"; + String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML/src2srcml"; parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); // ITree t = new SrcmlCppTreeGenerator().generateFromFile(input).getRoot(); // Assert.assertEquals(148, t.getSize()); + } @Test @@ -42,7 +59,7 @@ public class HunkParserTest { File prevFile =new File(root + "prevFiles/prev_"+filename); File diffFile = new File(root + "DiffEntries/"+filename+".txt"); EDiffHunkParser parser = new EDiffHunkParser(); - parser.parseFixPatterns(prevFile,revFile,diffFile,"gumInputLinux",null,srcMLPath); + parser.parseFixPatterns(prevFile,revFile,diffFile,"gumInputLinux",null,srcMLPath,null); } @@ -64,4 +81,46 @@ public class HunkParserTest { // Assert.assertEquals(148, t.getSize()); } + + + @Test + public void rich() throws IOException { + Instant start = Instant.now(); + final JedisPool outerPool = new JedisPool(PoolBuilder.getPoolConfig(), "localhost",Integer.valueOf("6399"),20000000); + + EDiffHunkParser parser = new EDiffHunkParser(); + String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/linux/"; + String filename = "bb67dd_0922c7_sound#soc#sof#intel#hda.c"; + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + File diffFile = new File(root + "DiffEntries/"+filename+".txt"); + String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML/src2srcml"; + parser.parseFixPatterns(prevFile,revFile,diffFile,"gumInputLinux",outerPool,srcMLPath,"if"); + String key = "if/3/linux_bb67dd_0922c7_sound#soc#sof#intel#hda.c.txt_0"; + File file2load = new File("/Users/anil.koyuncu/projects/test/fixminer-core/python/data/dumps/"+ key); + byte[] dump = FileUtils.readFileToByteArray(file2load); + + HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(dump); + actionSet.toString(); + + +// CODE HERE + Instant finish = Instant.now(); + long timeElapsed = Duration.between(start, finish).toMillis(); + System.out.println(timeElapsed); + +// try (Jedis outer = outerPool.getResource()) { +// try { +// +// +// +// byte[] s = outer.hget("dump".getBytes(), key.getBytes()); +// HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(s); +// actionSet.getActionSize(); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } + } + } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java index a738898..91c68e6 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/Parser.java @@ -20,7 +20,7 @@ public abstract class Parser implements ParserInterface { protected String originalTree = ""; // Guide of generating patches. protected String actionSets = ""; // Guide of generating patches. - public abstract void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool, String srcMLPath); + public abstract void parseFixPatterns(File prevFile, File revFile, File diffEntryFile, String project, JedisPool innerPool, String srcMLPath,String rootType); @Override diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java index 4c23d50..d0ee8ab 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/RunnableParser.java @@ -13,7 +13,8 @@ public class RunnableParser implements Runnable { private String project; private JedisPool pool; private String srcMLPath; - + private String rootType; + public RunnableParser(File prevFile, File revFile, File diffentryFile, Parser parser) { this.prevFile = prevFile; this.revFile = revFile; @@ -30,7 +31,7 @@ public class RunnableParser implements Runnable { this.pool = innerPool; } - public RunnableParser(File prevFile, File revFile, File diffentryFile, Parser parser, String project, JedisPool innerPool,String srcMLPath) { + public RunnableParser(File prevFile, File revFile, File diffentryFile, Parser parser, String project, JedisPool innerPool,String srcMLPath,String rootType) { this.prevFile = prevFile; this.revFile = revFile; this.diffentryFile = diffentryFile; @@ -38,10 +39,11 @@ public class RunnableParser implements Runnable { this.project = project; this.pool = innerPool; this.srcMLPath = srcMLPath; + this.rootType = rootType; } @Override public void run() { - parser.parseFixPatterns(prevFile, revFile, diffentryFile,project,pool,srcMLPath); + parser.parseFixPatterns(prevFile, revFile, diffentryFile,project,pool,srcMLPath,rootType); } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index 7ed5b90..d96a6c7 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -2,18 +2,20 @@ package edu.lu.uni.serval.fixminer.jobs; import akka.actor.ActorRef; import akka.actor.ActorSystem; -import edu.lu.uni.serval.fixminer.akka.ediff.EDiffActor; -import edu.lu.uni.serval.fixminer.akka.ediff.EDiffHunkParser; -import edu.lu.uni.serval.fixminer.akka.ediff.EDiffMessage; -import edu.lu.uni.serval.fixminer.akka.ediff.MessageFile; +import edu.lu.uni.serval.fixminer.akka.ediff.*; import edu.lu.uni.serval.utils.CallShell; +import edu.lu.uni.serval.utils.EDiffHelper; import edu.lu.uni.serval.utils.FileHelper; import edu.lu.uni.serval.utils.PoolBuilder; +import org.apache.commons.io.FileUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; -import java.io.File; +import java.io.*; +import java.nio.file.Files; +import java.nio.file.Paths; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -24,7 +26,7 @@ public class EnhancedASTDiff { private static Logger log = LoggerFactory.getLogger(EnhancedASTDiff.class); - public static void main(String inputPath, String numOfWorkers, String project, String eDiffTimeout, String parallelism, String portInner, String dbDir, String chunkName,String srcMLPath) throws Exception { + public static void main(String inputPath, String numOfWorkers, String project, String eDiffTimeout, String parallelism, String portInner, String dbDir, String chunkName,String srcMLPath,String rootType) throws Exception { String parameters = String.format("\nInput path %s",inputPath); @@ -32,7 +34,11 @@ public class EnhancedASTDiff { CallShell cs = new CallShell(); String cmd = "bash "+dbDir + "/" + "startServer.sh" +" %s %s %s"; - cmd = String.format(cmd, dbDir,chunkName,Integer.valueOf(portInner)); + if (rootType == null){ + cmd = String.format(cmd, dbDir,chunkName,Integer.valueOf(portInner)); + }else{ + cmd = String.format(cmd, dbDir,rootType+chunkName,Integer.valueOf(portInner)); + } cs.runShell(cmd, portInner); @@ -64,7 +70,7 @@ public class EnhancedASTDiff { ActorSystem system = null; ActorRef parsingActor = null; - final EDiffMessage msg = new EDiffMessage(0, allMessageFiles,eDiffTimeout,innerPool,srcMLPath); + final EDiffMessage msg = new EDiffMessage(0, allMessageFiles,eDiffTimeout,innerPool,srcMLPath,rootType); try { log.info("Akka begins..."); log.info("{} files to process ...", allMessageFiles.size()); @@ -88,7 +94,7 @@ public class EnhancedASTDiff { forEach(m -> { EDiffHunkParser parser = new EDiffHunkParser(); - parser.parseFixPatterns(m.getPrevFile(),m.getRevFile(), m.getDiffEntryFile(),project,innerPool,"/Users/anilkoyuncu/Downloads/srcML2/src2srcml"); + parser.parseFixPatterns(m.getPrevFile(),m.getRevFile(), m.getDiffEntryFile(),project,innerPool,"/Users/anilkoyuncu/Downloads/srcML2/src2srcml",null); if (counter % 10 == 0) { log.info("Finalized parsing " + counter + " files... remaining " + (allMessageFiles.size() - counter)); } @@ -141,5 +147,69 @@ public class EnhancedASTDiff { } } + public static void load(String inputPath, String numOfWorkers, String project, String eDiffTimeout, String parallelism, String portInner, String dbDir, String chunkName,String srcMLPath,String rootType) throws Exception { + + + String parameters = String.format("\nInput path %s",inputPath); + log.info(parameters); + + CallShell cs = new CallShell(); + String cmd = "bash "+dbDir + "/" + "startServer.sh" +" %s %s %s"; + cmd = String.format(cmd, dbDir,chunkName,Integer.valueOf(portInner)); +// if (rootType == null){ +// cmd = String.format(cmd, dbDir,chunkName,Integer.valueOf(portInner)); +// }else{ +// cmd = String.format(cmd, dbDir,rootType+chunkName,Integer.valueOf(portInner)); +// } + + cs.runShell(cmd, portInner); + + JedisPool innerPool = new JedisPool(PoolBuilder.getPoolConfig(), "127.0.0.1",Integer.valueOf(portInner),20000000); + try (Jedis inner = innerPool.getResource()) { + inner.flushAll(); + } + File folder = new File(new File(inputPath).getParent() + "/dumps/" + rootType); + File[] listOfFiles = folder.listFiles(); + Stream stream = Arrays.stream(listOfFiles); + List folders = stream + .filter(x -> !x.getName().startsWith(".")) + .collect(Collectors.toList()); + List allMessageFiles = new ArrayList<>(); + + for (File target : folders) { + if(target.getName().startsWith(".")) + continue; + List files = Arrays.asList(target.listFiles()); + if (files.size() > 1){ + allMessageFiles.addAll(files); + } + } + + log.info("Message size: "+allMessageFiles.size()); + + allMessageFiles.stream(). + parallel(). + forEach(x-> loadCore(x,innerPool)); + + } + + public static void loadCore(File file2load, JedisPool innerPool){ + try (Jedis inner = innerPool.getResource()) { + +// byte[] dump = Files.readAllBytes(Paths.get(file2load.getPath())); + byte[] dump = FileUtils.readFileToByteArray(file2load); +// HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(dump); + String key = file2load.getPath().split("/dumps/")[1]; + inner.hset("dump".getBytes(),key.getBytes(),dump); +// actionSet.toString(); + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + } + + } diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index 62363bb..a6ab30f 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -3,11 +3,11 @@ pjName = gumInput portInner = 6380 portDumps = 6399 parallelism = AKKA -numOfWorkers = 1 +numOfWorkers = 14 -inputPath = /Users/anilkoyuncu/projects/gumInputLinux/ -redisPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/redis -srcMLPath= /Users/anilkoyuncu/Downloads/srcML2/src2srcml +inputPath = /Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux +redisPath = /Users/anil.koyuncu/projects/test/fixminer-core/python/data/redis +srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml actionType =ALL eDiffTimeout = 900 From 5be60245078e74086146239532fbb9699f98f730 Mon Sep 17 00:00:00 2001 From: ANIL KOYUNCU Date: Sun, 12 Jan 2020 09:47:56 +0100 Subject: [PATCH 08/41] changes --- .../edu/lu/uni/serval/fixminer/Launcher.java | 19 +- .../fixminer/akka/compare/CompareTrees.java | 70 +++- .../akka/ediff/DefaultKryoContext.java | 9 +- .../fixminer/akka/ediff/EDiffHunkParser.java | 2 + .../fixminer/akka/ediff/FileHelper.java | 383 ++++++++++++++++++ .../fixminer/akka/ediff/HunkParserTest.java | 111 ++++- .../serval/fixminer/jobs/EnhancedASTDiff.java | 2 +- .../edu/lu/uni/serval/utils/EDiffHelper.java | 27 +- src/main/resource/app.properties | 6 +- 9 files changed, 583 insertions(+), 46 deletions(-) create mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/FileHelper.java diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index 41160e0..af843cf 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,8 +22,8 @@ public class Launcher { Properties appProps = new Properties(); -// String appConfigPath = "/Users/anil.koyuncu/projects/test/fixminerC/src/main/resource/app.properties"; - String appConfigPath = args[0]; + String appConfigPath = "/Users/anil.koyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; +// String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); String portInner = appProps.getProperty("portInner","6380"); @@ -38,12 +38,12 @@ public class Launcher { String redisPath = appProps.getProperty("redisPath","FORKJOIN"); String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String parameter = args[2]; -// String parameter = null; -// String parameter = "decl"; -// String parameter = "L2"; - String jobType = args[1]; -// String jobType = "RICHEDITSCRIPT"; +// String parameter = args[2]; + String parameter = null; +// String parameter = "if"; +// String parameter = "L1"; +// String jobType = args[1]; + String jobType = "RICHEDITSCRIPT"; // String jobType = "LOAD"; // String jobType = "COMPARE"; @@ -89,7 +89,8 @@ public class Launcher { String compareDBName; switch (parameter){ case "L1": - job = "shape"; +// job = "shape"; + job = "single"; compareDBName = "clusterl0-gumInputALL.rdb"; break; case "L2": diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index 0b67c31..cb0268a 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -42,7 +42,7 @@ public class CompareTrees { // log.info(cmdInner); // cs.runShell(cmdInner, portInner); - String numOfWorkers = "100000000";//args[4]; +// String numOfWorkers = "100000000";//args[4]; String host = "localhost";//args[5]; // -Djava.util.concurrent.ForkJoinPool.common.parallelism=256 @@ -63,7 +63,11 @@ public class CompareTrees { listOfPairs.stream().parallel().forEach(m->coreCompare(m, job,null, samePairs,errorPairs,filenames,outerPool)); try (Jedis jedis = outerPool.getResource()) { - + jedis.select(2); + for (String samePair : samePairs) { +// jedis.hset("compare", errorPair, "1"); + jedis.set(samePair, "1"); + } jedis.select(0); // jedis.flushDB(); jedis.del("compare"); @@ -108,6 +112,32 @@ public class CompareTrees { // jedis.srem("pairs",matchKey); // JedisPool outerPool = null; switch (treeType) { + case "single": + oldPair = EDiffHelper.getActions(keyName, i, outerPool, filenames); + newPair = EDiffHelper.getActions(keyName, j, outerPool, filenames); + ITree oldActionTree = oldPair.getValue0(); + ITree newActionTree = newPair.getValue0(); + HierarchicalActionSet oldProject = oldPair.getValue1(); + HierarchicalActionSet newProject = newPair.getValue1(); + + + ITree oldShapeTree = EDiffHelper.getShapeTree(oldProject); + ITree newShapeTree = EDiffHelper.getShapeTree(newProject); + + ITree oldTargetTree = EDiffHelper.getTargets(oldProject); + ITree newTargetTree = EDiffHelper.getTargets(newProject); + + if(oldShapeTree.toStaticHashString().equals(newShapeTree.toStaticHashString())){ + if(oldActionTree.toStaticHashString().equals(newActionTree.toStaticHashString())){ + if(oldTargetTree.toStaticHashString().equals(newTargetTree.toStaticHashString())){ + samePairs.add(matchKey); + } + } + } + return; +// break; + + case "shape": oldTree = EDiffHelper.getShapes(keyName, i, outerPool,filenames); newTree = EDiffHelper.getShapes(keyName, j, outerPool,filenames); @@ -145,12 +175,12 @@ public class CompareTrees { String result = i + "," + j + "," + String.join(",", oldTokens); // jedis.select(2); // jedis.set(matchKey, result); - try (Jedis jedis = innerPool.getResource()) { -// jedis.del(matchKey); - jedis.select(2); - jedis.set(matchKey, result); - } -// samePairs.add(matchKey); +// try (Jedis jedis = innerPool.getResource()) { +//// jedis.del(matchKey); +// jedis.select(2); +// jedis.set(matchKey, result); +// } + samePairs.add(matchKey); // try (Jedis jedis = innerPool.getResource()) { //// jedis.del(matchKey); // jedis.select(2); @@ -180,18 +210,22 @@ public class CompareTrees { oldTree = EDiffHelper.getTargets(oldProject); newTree = EDiffHelper.getTargets(newProject); if (oldTree.toStaticHashString().equals(newTree.toStaticHashString())) { - try (Jedis jedis = innerPool.getResource()) { -// jedis.del(matchKey); - jedis.select(2); - jedis.set(matchKey, result); - } + samePairs.add(matchKey); +// try (Jedis jedis = innerPool.getResource()) { +//// jedis.del(matchKey); +// jedis.select(2); +// jedis.set(matchKey, result); +// +// } } } else { - try (Jedis jedis = innerPool.getResource()) { -// jedis.del(matchKey); - jedis.select(2); - jedis.set(matchKey, result); - } + samePairs.add(matchKey); +// try (Jedis jedis = innerPool.getResource()) { +//// jedis.del(matchKey); +// jedis.select(2); +// jedis.set(matchKey, result); +// +// } } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java index 3a71d4a..93d4783 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java @@ -3,10 +3,7 @@ package edu.lu.uni.serval.fixminer.akka.ediff; import java.io.ByteArrayOutputStream; import com.esotericsoftware.kryo.Kryo; -import com.esotericsoftware.kryo.io.Input; -import com.esotericsoftware.kryo.io.Output; -import com.esotericsoftware.kryo.io.UnsafeInput; -import com.esotericsoftware.kryo.io.UnsafeOutput; +import com.esotericsoftware.kryo.io.*; import com.esotericsoftware.kryo.pool.KryoFactory; import com.esotericsoftware.kryo.pool.KryoPool; import org.objenesis.strategy.SerializingInstantiatorStrategy; @@ -51,7 +48,7 @@ public class DefaultKryoContext implements KryoContext{ public byte[] serialze(Object obj, int bufferSize) { ByteArrayOutputStream base = new ByteArrayOutputStream(); - Output output = new Output(base, bufferSize); + UnsafeMemoryOutput output = new UnsafeMemoryOutput(base, bufferSize); Kryo kryo = pool.borrow(); @@ -75,7 +72,7 @@ public class DefaultKryoContext implements KryoContext{ Kryo kryo = pool.borrow(); - Input input = new Input(serialized); + UnsafeMemoryInput input = new UnsafeMemoryInput(serialized); obj = kryo.readObject(input, clazz); pool.release(kryo); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java index 81d8fe0..a89558d 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java @@ -62,6 +62,8 @@ public class EDiffHunkParser extends EDiffParser { f = new File(root+"dumps/"+key); FileUtils.writeByteArrayToFile(f,EDiffHelper.kryoSerialize(actionSet)); +// FileUtils.writeByteArrayToFile(f,EDiffHelper.commonsSerialize(actionSet)); +// FileUtils.writeByteArrayToFile(f,actionSet.toString().getBytes()); // FileOutputStream fos = new FileOutputStream(f); // ObjectOutputStream oos = new ObjectOutputStream(fos); // oos.writeObject(EDiffHelper.kryoSerialize(actionSet)); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/FileHelper.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/FileHelper.java new file mode 100644 index 0000000..94967cc --- /dev/null +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/FileHelper.java @@ -0,0 +1,383 @@ +package edu.lu.uni.serval.fixminer.akka.ediff; +import java.io.BufferedInputStream; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +public class FileHelper { + + /** + * @param filePath + */ + public static void createDirectory(String filePath) { + File file = new File(filePath); + if (file.exists()) { + deleteDirectory(filePath); + } + file.mkdirs(); + } + + public static void createFile(File file, String content) { + FileWriter writer = null; + BufferedWriter bw = null; + + try { + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + if (!file.exists()) file.createNewFile(); + writer = new FileWriter(file); + bw = new BufferedWriter(writer); + bw.write(content); + bw.flush(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + close(bw); + close(writer); + } + } + + public static void deleteDirectory(String dir) { + File file = new File(dir); + + if (file.exists()) { + if (file.isDirectory()) { + File[] files = file.listFiles(); + if (files.length > 0) { + for (File f : files) { + if (f.isFile()) { + deleteFile(f.getAbsolutePath()); + } else { + deleteDirectory(f.getAbsolutePath()); + } + } + } + file.delete(); + } else { + deleteFile(dir); + } + } + } + + public static void deleteFiles(String dir) { + File file = new File(dir); + + if (file.exists()) { + if (file.isDirectory()) { + File[] files = file.listFiles(); + if (files.length > 0) { + for (File f : files) { + if (f.isFile()) { + deleteFile(f.getAbsolutePath()); + } else { + deleteFiles(f.getAbsolutePath()); + } + } + } + } else { + deleteFile(dir); + } + } + } + + public static void deleteFile(String fileName) { + File file = new File(fileName); + + if (file.exists()) { + if (file.isFile()) { + file.delete(); + } else { + deleteDirectory(fileName); + } + } + } + + public static List getAllDirectories(String filePath) { + return listAllDirectories(new File(filePath)); + } + + /** + * List all files in the directory. + * + * @param filePath + * @param type + * @return + */ + public static List getAllFiles(String filePath, String type) { + return listAllFiles(new File(filePath), type); + } + + public static List getAllFilesInCurrentDiectory(String filePath, String type) { + return getAllFilesInCurrentDiectory(new File(filePath), type); + } + + public static List getAllFilesInCurrentDiectory(File directory, String type) { + List fileList = new ArrayList<>(); + + if (!directory.exists()) { + return null; + } + + File[] files = directory.listFiles(); + + for (File file : files) { + if (file.isFile()) { + if (file.toString().endsWith(type)) { + fileList.add(file); + } + } + } + + return fileList; + } + + public static String getFileName(String filePath) { + File file = new File(filePath); + + if (file.exists()) { + return file.getName(); + } else { + return null; + } + } + + public static String getFileNameWithoutExtension(File file) { + if (file.exists()) { + String fileName = file.getName(); + fileName = fileName.substring(0, fileName.lastIndexOf(".")); + return fileName; + } else { + return null; + } + } + + public static String getFileExtension(File file) { + String fileName = file.getName(); + String extension = fileName.substring(fileName.lastIndexOf(".")); + return extension; + } + + public static String getFileParentPath(String filePath) { + File file = new File(filePath); + + if (file.exists()) { + return file.getParent() + "/"; + } + return ""; + } + + /** + * Check whether a file path is valid or not. + * + * @param path, file path. + * @return true, the file path is valid. + * false, the file path is invalid. + */ + public static boolean isValidPath(String path) { + File file = new File(path); + + if (file.exists()) { + return true; + } + + return false; + } + + /** + * Recursively list all files in file. + * + * @param file + * @return + */ + private static List listAllFiles(File file, String type) { + List fileList = new ArrayList<>(); + + if (!file.exists()) { + return null; + } + + File[] files = file.listFiles(); + + for (File f : files) { + if (f.isFile()) { + if (f.toString().endsWith(type)) { + fileList.add(f); + } + } else { + List fl = listAllFiles(f, type); + if (fl != null && fl.size() > 0) { + fileList.addAll(fl); + } + } + } + + return fileList; + } + + /** + * Recursively list all directories in file. + * + * @param file + * @return + */ + private static List listAllDirectories(File file) { + List fileList = new ArrayList<>(); + + File[] files = file.listFiles(); + + for (File f : files) { + if (f.isDirectory()) { + fileList.add(f); + fileList.addAll(listAllDirectories(f)); + } + } + + return fileList; + } + + public static void makeDirectory(String fileName) { + deleteFile(fileName); + File file = new File(fileName).getParentFile(); + if (!file.exists()) { + file.mkdirs(); + } + } + + /** + * Read the content of a file. + * + * @param fileName + * @return String, the content of a file. + */ + public static String readFile(String fileName) { + return readFile(new File(fileName)); + } + + /** + * Read the content of a file. + * + * @param file + * @return String, the content of a file. + */ + public static String readFile(File file) { + byte[] input = null; + BufferedInputStream bis = null; + + try { + + bis = new BufferedInputStream(new FileInputStream(file)); + input = new byte[bis.available()]; + bis.read(input); + + } catch (FileNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + close(bis); + } + + String sourceCode = null; + if (input != null) { + sourceCode = new String(input); + } + + return sourceCode; + } + + /** + * Output output into a file. + * + * @param fileName, output file name. + * @param data, output data. + * @param append, the output data will be appended previous data in the file or not. + */ + public static void outputToFile(String fileName, StringBuilder data, boolean append) { + outputToFile(fileName, data.toString(), append); + } + + public static void outputToFile(File file, StringBuilder data, boolean append) { + outputToFile(file, data.toString(), append); + } + + public static void outputToFile(String fileName, String data, boolean append) { + File file = new File(fileName); + outputToFile(file, data, append); + } + + public static void outputToFile(File file, String data, boolean append) { + FileWriter writer = null; + BufferedWriter bw = null; + + try { + if (!file.getParentFile().exists()) { + file.getParentFile().mkdirs(); + } + if (!file.exists()) { + file.createNewFile(); + } + writer = new FileWriter(file, append); + bw = new BufferedWriter(writer); + bw.write(data); + bw.flush(); + } catch (IOException e) { + e.printStackTrace(); + } finally { + close(bw); + close(writer); + } + } + + private static void close(FileWriter writer) { + try { + if (writer != null) { + writer.close(); + writer = null; + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + private static void close(BufferedWriter bw) { + try { + if (bw != null) { + bw.close(); + bw = null; + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + private static void close(BufferedInputStream bis) { + try { + if (bis != null) { + bis.close(); + bis = null; + } + } catch (IOException e) { + e.printStackTrace(); + } + } + + public static List getAllSubDirectories(String fileName) { + File file = new File(fileName); + List subDirectories = new ArrayList<>(); + if (file.exists()) { + File[] files = file.listFiles(); + for (File f : files) { + if (f.isDirectory()) { + subDirectories.add(f); + } + } + } + return subDirectories; + } +} \ No newline at end of file diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java index 1df607a..2684122 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java @@ -1,9 +1,14 @@ package edu.lu.uni.serval.fixminer.akka.ediff; +import com.github.gumtreediff.gen.srcml.NodeMap_new; +import com.github.gumtreediff.tree.ITree; +import com.github.gumtreediff.tree.TreeContext; +import edu.lu.uni.serval.fixminer.akka.compare.AkkaTreeParser; import edu.lu.uni.serval.fixminer.akka.ediff.EDiffHunkParser; import edu.lu.uni.serval.utils.EDiffHelper; import edu.lu.uni.serval.utils.PoolBuilder; import org.apache.commons.io.FileUtils; +import org.javatuples.Pair; import org.junit.Test; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; @@ -13,6 +18,9 @@ import java.io.IOException; import java.lang.instrument.Instrumentation; import java.time.Duration; import java.time.Instant; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; public class HunkParserTest { @@ -89,18 +97,77 @@ public class HunkParserTest { final JedisPool outerPool = new JedisPool(PoolBuilder.getPoolConfig(), "localhost",Integer.valueOf("6399"),20000000); EDiffHunkParser parser = new EDiffHunkParser(); - String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/linux/"; - String filename = "bb67dd_0922c7_sound#soc#sof#intel#hda.c"; + String root = "/Users/anil.koyuncu/projects/fixminer/gumInputLinux/linux/"; + String filename = "43f8987_f596c8_drivers#acpi#nfit#core.c"; File revFile = new File(root + "revFiles/"+ filename); File prevFile =new File(root + "prevFiles/prev_"+filename); File diffFile = new File(root + "DiffEntries/"+filename+".txt"); String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML/src2srcml"; parser.parseFixPatterns(prevFile,revFile,diffFile,"gumInputLinux",outerPool,srcMLPath,"if"); String key = "if/3/linux_bb67dd_0922c7_sound#soc#sof#intel#hda.c.txt_0"; - File file2load = new File("/Users/anil.koyuncu/projects/test/fixminer-core/python/data/dumps/"+ key); + File file2load = new File("/Users/anil.koyuncu/projects/fixminer/dumps/"+ key); byte[] dump = FileUtils.readFileToByteArray(file2load); +// String line = FileHelper.readFile(file2load); +// ITree parent = null; +// ITree children = null; +//// if(line.isEmpty()) +//// continue; +// TreeContext tc = new TreeContext(); +// line = line.replace("\"", ""); +// String[] split1 = line.split("\n"); +// int length = split1.length; +// List strings = new LinkedList(Arrays.asList(split1)); +// ITree treeFromString = null; +// int prevLev = 0; +// int childPosition = 0; +// for (String l:strings) { +// int level = 0; +// Pattern pattern = Pattern.compile("---"); +// Matcher matcher = pattern.matcher(l); +// while (matcher.find()) +// level++; +// +// l = l.replace("---",""); +// l = l.trim(); +// +// String[] split2; +// List keysByValue; +// split2 = l.split(" "); +// keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.map, split2[1]); +// +// +// +// if(level == 0){ +// parent = tc.createTree(keysByValue.get(0), split2[0], null); +// tc.setRoot(parent); +// +// }else if (level > prevLev) { +// if (children == null) { +// children = tc.createTree(keysByValue.get(0), split2[0], null); +// children.setParentAndUpdateChildren(parent); +// } else { +// +// ITree tree = tc.createTree(keysByValue.get(0), split2[0], null); +// tree.setParentAndUpdateChildren(children); +// children = tree; +// } +// }else if (level == prevLev){ +// ITree innerParent = children.getParent(); +// children = tc.createTree(keysByValue.get(0), split2[0], null); +// children.setParentAndUpdateChildren(innerParent); +// }else { +// ITree innerParent = children.getParent(); +// children = tc.createTree(keysByValue.get(0), split2[0], null); +// children.setParentAndUpdateChildren(innerParent.getParent()); +// } +// prevLev = level; +// } +// tc.validate(); +// parent.getLength(); + HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(dump); +// HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.commonsDeserialize(dump); actionSet.toString(); @@ -122,5 +189,43 @@ public class HunkParserTest { // } // } } + @Test + public void testCompare(){ + final JedisPool outerPool = new JedisPool(PoolBuilder.getPoolConfig(), "localhost",Integer.valueOf("6399"),20000000); + + Pair oldPair = null; + Pair newPair = null; + String matchKey = null; + ArrayList samePairs = new ArrayList<>(); + + String keyName = "if-3"; + String i = "2"; + String j = "21"; + HashMap filenames = AkkaTreeParser.filenames(outerPool); + + oldPair = EDiffHelper.getActions(keyName, i, outerPool, filenames); + newPair = EDiffHelper.getActions(keyName, j, outerPool, filenames); + ITree oldActionTree = oldPair.getValue0(); + ITree newActionTree = newPair.getValue0(); + HierarchicalActionSet oldProject = oldPair.getValue1(); + HierarchicalActionSet newProject = newPair.getValue1(); + + ITree oldShapeTree = EDiffHelper.getShapeTree(oldProject); + ITree newShapeTree = EDiffHelper.getShapeTree(newProject); + + ITree oldTargetTree = EDiffHelper.getTargets(oldProject); + ITree newTargetTree = EDiffHelper.getTargets(newProject); + String oldShape = oldShapeTree.toStaticHashString(); + String newShape = newShapeTree.toStaticHashString(); + + if(oldShape.equals(newShape)){ + if(oldActionTree.toStaticHashString().equals(newActionTree.toStaticHashString())){ + if(oldTargetTree.toStaticHashString().equals(newTargetTree.toStaticHashString())){ + samePairs.add(matchKey); + } + } + } + } + } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index d96a6c7..31e14ac 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -57,7 +57,7 @@ public class EnhancedASTDiff { List msgFiles = getMessageFiles(target.toString() + "/"); //"/Users/anilkoyuncu/bugStudy/code/python/GumTreeInput/Apache/CAMEL/" -// msgFiles = msgFiles.subList(0,10000); +// msgFiles = msgFiles.subList(0,1000); if (msgFiles == null) continue; allMessageFiles.addAll(msgFiles); diff --git a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java index 4973300..c057fc7 100755 --- a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java +++ b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java @@ -8,6 +8,7 @@ import com.github.gumtreediff.tree.TreeUtils; import edu.lu.uni.serval.fixminer.akka.ediff.DefaultKryoContext; import edu.lu.uni.serval.fixminer.akka.ediff.HierarchicalActionSet; import edu.lu.uni.serval.fixminer.akka.ediff.KryoContext; +import org.apache.commons.lang3.SerializationUtils; import org.javatuples.Pair; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -64,6 +65,14 @@ public class EDiffHelper { return baos.toByteArray(); } + public static byte[] commonsSerialize(Serializable o){ + return SerializationUtils.serialize(o); + } + + public static Object commonsDeserialize(byte[] data){ + return SerializationUtils.deserialize(data); + } + public static byte[] kryoSerialize(Serializable o ){ KryoContext kryoContext = DefaultKryoContext.newKryoContextFactory(); @@ -279,12 +288,7 @@ public class EDiffHelper { byte[] s = outer.hget("dump".getBytes(), key.getBytes()); HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(s); - ITree parent = null; - ITree children = null; - TreeContext tc = new TreeContext(); - tree = EDiffHelper.getASTTree(actionSet, parent, children, tc); - //tree.setParent(null); - tc.validate(); + tree = getShapeTree(actionSet); } catch (Exception e) { e.printStackTrace(); @@ -294,6 +298,17 @@ public class EDiffHelper { } + public static ITree getShapeTree(HierarchicalActionSet actionSet) { + ITree tree = null; + ITree parent = null; + ITree children = null; + TreeContext tc = new TreeContext(); + tree = EDiffHelper.getASTTree(actionSet, parent, children, tc); + //tree.setParent(null); + tc.validate(); + return tree; + } + public static ITree getTargets(HierarchicalActionSet actionSet) { diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index a6ab30f..4e4a6f5 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -5,10 +5,10 @@ portDumps = 6399 parallelism = AKKA numOfWorkers = 14 -inputPath = /Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux -redisPath = /Users/anil.koyuncu/projects/test/fixminer-core/python/data/redis +inputPath = /Users/anil.koyuncu/projects/fixminer/gumInputLinux +redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml -actionType =ALL +actionType = ALL eDiffTimeout = 900 #ENHANCEDASTDIFF,CACHE,LEVEL1,LEVEL2,LEVEL3 From d439bbe8a2e068c8f7fbee1af8d1ca16d3e5a6d7 Mon Sep 17 00:00:00 2001 From: fixminer Date: Sun, 12 Jan 2020 12:26:45 +0100 Subject: [PATCH 09/41] changes --- .../edu/lu/uni/serval/fixminer/Launcher.java | 12 +- .../fixminer/akka/compare/CompareTrees.java | 115 +++++++++++++----- .../fixminer/akka/ediff/EDiffHunkParser.java | 23 ++-- .../serval/fixminer/jobs/EnhancedASTDiff.java | 2 +- .../lu/uni/serval/utils/ClusterToPattern.java | 12 +- .../edu/lu/uni/serval/utils/EDiffHelper.java | 38 +++++- src/main/resource/app.properties | 8 +- 7 files changed, 148 insertions(+), 62 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index af843cf..0b7d72d 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,8 +22,8 @@ public class Launcher { Properties appProps = new Properties(); - String appConfigPath = "/Users/anil.koyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; -// String appConfigPath = args[0]; +// String appConfigPath = "/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; + String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); String portInner = appProps.getProperty("portInner","6380"); @@ -38,12 +38,12 @@ public class Launcher { String redisPath = appProps.getProperty("redisPath","FORKJOIN"); String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); -// String parameter = args[2]; - String parameter = null; + String parameter = args[2]; +// String parameter = null; // String parameter = "if"; // String parameter = "L1"; -// String jobType = args[1]; - String jobType = "RICHEDITSCRIPT"; + String jobType = args[1]; +// String jobType = "RICHEDITSCRIPT"; // String jobType = "LOAD"; // String jobType = "COMPARE"; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index cb0268a..37a886d 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -60,26 +60,82 @@ public class CompareTrees { - listOfPairs.stream().parallel().forEach(m->coreCompare(m, job,null, samePairs,errorPairs,filenames,outerPool)); +// listOfPairs.stream().parallel().forEach(m->coreCompare(m, job,null, samePairs,errorPairs,filenames,outerPool)); + listOfPairs.stream().parallel().forEach(m->newCoreCompare(m, job, samePairs,errorPairs,filenames,outerPool)); - try (Jedis jedis = outerPool.getResource()) { - jedis.select(2); - for (String samePair : samePairs) { +// try (Jedis jedis = outerPool.getResource()) { +// jedis.select(2); +// for (String samePair : samePairs) { +//// jedis.hset("compare", errorPair, "1"); +// jedis.set(samePair, "1"); +// } +// jedis.select(0); +//// jedis.flushDB(); +// jedis.del("compare"); +// for (String errorPair : errorPairs) { // jedis.hset("compare", errorPair, "1"); - jedis.set(samePair, "1"); - } - jedis.select(0); -// jedis.flushDB(); - jedis.del("compare"); - for (String errorPair : errorPairs) { - jedis.hset("compare", errorPair, "1"); - } - - - } +// } +// +// +// } log.info("End process"); } - public static void coreCompare(String pairName, String treeType,JedisPool innerPool,ArrayList samePairs,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { + public static void newCoreCompare(String pairName, String treeType,ArrayList samePairs,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { + + + + String matchKey = null; + try { + + String[] split = pairName.split("/"); + + + String i = split[1]; + String j = split[2]; + String keyName = split[0]; + matchKey = keyName + "/" + (String.valueOf(i)) + "/" + String.valueOf(j); + + switch (treeType) { + case "single": + + if (matchKey == null){ + System.out.println(); + } + String oldShapeTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames, "shapeTree"); + String newShapeTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames, "shapeTree"); + + String oldActionTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames, "actionTree"); + String newActionTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames, "actionTree"); + + String oldTargetTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames, "targetTree"); + String newTargetTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames, "targetTree"); + + + if (oldShapeTree.equals(newShapeTree)) { + if (oldActionTree.equals(newActionTree)) { + if (oldTargetTree.equals(newTargetTree)) { +// samePairs.add(matchKey); + try (Jedis jedis = outerPool.getResource()) { +//// jedis.del(matchKey); + jedis.select(2); + jedis.set(matchKey, "1"); + } + } + } + } + return; + default: + break; + } + }catch (Exception e) { + errorPairs.add(matchKey); + log.debug("{} not comparable", pairName); + } + + + } + + public static void coreCompare(String pairName, String treeType,JedisPool innerPool,ArrayList samePairs,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { // if (samePairs.size() % 1000 == 0) { // log.info("Same pairs size "+samePairs.size()); @@ -113,23 +169,20 @@ public class CompareTrees { // JedisPool outerPool = null; switch (treeType) { case "single": - oldPair = EDiffHelper.getActions(keyName, i, outerPool, filenames); - newPair = EDiffHelper.getActions(keyName, j, outerPool, filenames); - ITree oldActionTree = oldPair.getValue0(); - ITree newActionTree = newPair.getValue0(); - HierarchicalActionSet oldProject = oldPair.getValue1(); - HierarchicalActionSet newProject = newPair.getValue1(); + + String oldShapeTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"shapeTree"); + String newShapeTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"shapeTree"); + + String oldActionTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"actionTree"); + String newActionTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"actionTree"); + + String oldTargetTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"targetTree"); + String newTargetTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"targetTree"); - ITree oldShapeTree = EDiffHelper.getShapeTree(oldProject); - ITree newShapeTree = EDiffHelper.getShapeTree(newProject); - - ITree oldTargetTree = EDiffHelper.getTargets(oldProject); - ITree newTargetTree = EDiffHelper.getTargets(newProject); - - if(oldShapeTree.toStaticHashString().equals(newShapeTree.toStaticHashString())){ - if(oldActionTree.toStaticHashString().equals(newActionTree.toStaticHashString())){ - if(oldTargetTree.toStaticHashString().equals(newTargetTree.toStaticHashString())){ + if(oldShapeTree.equals(newShapeTree)){ + if(oldActionTree.equals(newActionTree)){ + if(oldTargetTree.equals(newTargetTree)){ samePairs.add(matchKey); } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java index a89558d..0bac96d 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java @@ -1,5 +1,6 @@ package edu.lu.uni.serval.fixminer.akka.ediff; +import com.github.gumtreediff.tree.ITree; import edu.lu.uni.serval.utils.EDiffHelper; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; @@ -53,15 +54,21 @@ public class EDiffHunkParser extends EDiffParser { String key = astNodeType+"/"+String.valueOf(size)+"/" + pj +"_" + diffentryFile.getName() + "_" + String.valueOf(hunkSet); -// try (Jedis inner = innerPool.getResource()) { -// -// inner.hset("dump".getBytes(),key.getBytes(),EDiffHelper.kryoSerialize(actionSet)); -// } - File f = new File(root+"dumps/"+astNodeType+"/"+String.valueOf(size)+"/"); - f.mkdirs(); - f = new File(root+"dumps/"+key); + ITree targetTree = EDiffHelper.getTargets(actionSet); + ITree actionTree = EDiffHelper.getActionTrees(actionSet); + ITree shapeTree = EDiffHelper.getShapeTree(actionSet); + try (Jedis inner = innerPool.getResource()) { - FileUtils.writeByteArrayToFile(f,EDiffHelper.kryoSerialize(actionSet)); + inner.hset("dump",key,actionSet.toString()); + inner.hset(key,"actionTree",actionTree.toStaticHashString()); + inner.hset(key,"targetTree",targetTree.toStaticHashString()); + inner.hset(key,"shapeTree",shapeTree.toStaticHashString()); + } +// File f = new File(root+"dumps/"+astNodeType+"/"+String.valueOf(size)+"/"); +// f.mkdirs(); +// f = new File(root+"dumps/"+key); +// +// FileUtils.writeByteArrayToFile(f,EDiffHelper.kryoSerialize(actionSet)); // FileUtils.writeByteArrayToFile(f,EDiffHelper.commonsSerialize(actionSet)); // FileUtils.writeByteArrayToFile(f,actionSet.toString().getBytes()); // FileOutputStream fos = new FileOutputStream(f); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index 31e14ac..9c35b53 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -57,7 +57,7 @@ public class EnhancedASTDiff { List msgFiles = getMessageFiles(target.toString() + "/"); //"/Users/anilkoyuncu/bugStudy/code/python/GumTreeInput/Apache/CAMEL/" -// msgFiles = msgFiles.subList(0,1000); +// msgFiles = msgFiles.subList(0,3000); if (msgFiles == null) continue; allMessageFiles.addAll(msgFiles); diff --git a/src/main/java/edu/lu/uni/serval/utils/ClusterToPattern.java b/src/main/java/edu/lu/uni/serval/utils/ClusterToPattern.java index 52aea0f..2ddee46 100755 --- a/src/main/java/edu/lu/uni/serval/utils/ClusterToPattern.java +++ b/src/main/java/edu/lu/uni/serval/utils/ClusterToPattern.java @@ -30,12 +30,12 @@ public class ClusterToPattern { while (!outer.ping().equals("PONG")) { log.info("wait"); } - byte[] s = outer.hget("dump".getBytes(), filename.getBytes()); - HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(s); - if (actionSet == null){ - throw new Error(filename +" not found"); - } - String s1 = actionSet.toString(); +// byte[] s = outer.hget("dump".getBytes(), filename.getBytes()); +// HierarchicalActionSet actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(s); +// if (actionSet == null){ +// throw new Error(filename +" not found"); +// } + String s1 = outer.hget("dump",filename); // outer.close(); return s1; } diff --git a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java index c057fc7..a3bcfc9 100755 --- a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java +++ b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java @@ -328,6 +328,26 @@ public class EDiffHelper { } + public static String getTreeString(String prefix, String fn, JedisPool outerPool, HashMap filenames, String treeType) { + try (Jedis outer = outerPool.getResource()) { + try { + while (!outer.ping().equals("PONG")) { + log.info("wait"); + } + + + String dist2load = filenames.get(prefix + "-" + fn); + + String[] split = prefix.split("-"); + String key = split[0] + "/" + split[1] + "/" + dist2load; + String treeString = outer.hget(key, treeType); + return treeString; + }catch (Exception e) { + e.printStackTrace(); + } + } + return null; + } public static Pair getActions(String prefix, String fn, JedisPool outerPool, HashMap filenames) { @@ -351,12 +371,7 @@ public class EDiffHelper { actionSet = (HierarchicalActionSet) EDiffHelper.kryoDeseerialize(s); - ITree parent = null; - ITree children = null; - TreeContext tc = new TreeContext(); - tree = EDiffHelper.getActionTree(actionSet, parent, children, tc); - //tree.setParent(null); - tc.validate(); + tree = getActionTrees(actionSet); }catch (Exception e) { e.printStackTrace(); } @@ -367,6 +382,17 @@ public class EDiffHelper { } + public static ITree getActionTrees(HierarchicalActionSet actionSet) { + ITree tree = null; + ITree parent = null; + ITree children = null; + TreeContext tc = new TreeContext(); + tree = EDiffHelper.getActionTree(actionSet, parent, children, tc); + //tree.setParent(null); + tc.validate(); + return tree; + } + public static void getLeaves(ITree tc){ int height = tc.getHeight(); diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index 4e4a6f5..b4d44f8 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -3,11 +3,11 @@ pjName = gumInput portInner = 6380 portDumps = 6399 parallelism = AKKA -numOfWorkers = 14 +numOfWorkers = 7 -inputPath = /Users/anil.koyuncu/projects/fixminer/gumInputLinux -redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis -srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml +inputPath = /Users/anilkoyuncu/projects/gumInputLinux +redisPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/redis +srcMLPath= /Users/anilkoyuncu/Downloads/srcML2/src2srcml actionType = ALL eDiffTimeout = 900 From 2cd0783300edecccd299bf8c1810c585b72d2d1f Mon Sep 17 00:00:00 2001 From: fixminer Date: Sun, 19 Jan 2020 17:01:45 +0100 Subject: [PATCH 10/41] new compare --- .../fixminer/akka/compare/CompareTrees.java | 128 ++++++++++++------ 1 file changed, 85 insertions(+), 43 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index 37a886d..210dd89 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -14,7 +14,11 @@ import redis.clients.jedis.JedisPool; import java.util.ArrayList; import java.util.HashMap; -import java.util.List; +import java.util.Map; +import java.util.concurrent.ExecutionException; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; /** @@ -52,37 +56,72 @@ public class CompareTrees { // List listOfPairs = AkkaTreeParser.getMessages(innerPool,Integer.valueOf(numOfWorkers)); HashMap filenames = AkkaTreeParser.filenames(outerPool); - List listOfPairs = AkkaTreeParser.files2compare(outerPool); +// List listOfPairs = AkkaTreeParser.files2compare(outerPool); ArrayList samePairs = new ArrayList<>(); ArrayList errorPairs = new ArrayList<>(); + final ExecutorService executor = Executors.newWorkStealingPool(); + // schedule the work + + final Future future = executor.submit( new RunnableCompare( job,errorPairs,filenames,outerPool)); + + try { + // wait for task to complete + future.get(); + + } catch (InterruptedException e) { + + e.printStackTrace(); + } catch (ExecutionException e) { + + e.printStackTrace(); + } finally { + executor.shutdownNow(); + } + -// listOfPairs.stream().parallel().forEach(m->coreCompare(m, job,null, samePairs,errorPairs,filenames,outerPool)); - listOfPairs.stream().parallel().forEach(m->newCoreCompare(m, job, samePairs,errorPairs,filenames,outerPool)); -// try (Jedis jedis = outerPool.getResource()) { -// jedis.select(2); -// for (String samePair : samePairs) { -//// jedis.hset("compare", errorPair, "1"); -// jedis.set(samePair, "1"); -// } -// jedis.select(0); -//// jedis.flushDB(); -// jedis.del("compare"); -// for (String errorPair : errorPairs) { -// jedis.hset("compare", errorPair, "1"); -// } -// -// -// } log.info("End process"); } - public static void newCoreCompare(String pairName, String treeType,ArrayList samePairs,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { + public static class RunnableCompare implements Runnable { + String job; + ArrayList errorPairs; + HashMap filenames; + JedisPool outerPool; + + public RunnableCompare(String treeType,ArrayList errorPairs, HashMap filenames,JedisPool outerPool) { + this.job = treeType; + this.errorPairs = errorPairs; + this.filenames = filenames; + this.outerPool = outerPool; + } + + @Override + public void run() { + int dbsize = 1; + while(dbsize>0) { + try (Jedis outer = outerPool.getResource()) { + dbsize = Math.toIntExact(outer.scard("compare")); + } + if (dbsize != 0){ + newCoreCompare(job, errorPairs, filenames, outerPool); + } + } + } + } + + + public static void newCoreCompare( String treeType,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { + + String pairName; + try (Jedis outer = outerPool.getResource()) { + pairName = outer.spop("compare"); + } String matchKey = null; try { @@ -101,14 +140,17 @@ public class CompareTrees { if (matchKey == null){ System.out.println(); } - String oldShapeTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames, "shapeTree"); - String newShapeTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames, "shapeTree"); + Map oldTreeString = EDiffHelper.getTreeString(keyName, i, outerPool, filenames); + Map newTreeString = EDiffHelper.getTreeString(keyName, j, outerPool, filenames); - String oldActionTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames, "actionTree"); - String newActionTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames, "actionTree"); + String oldShapeTree =oldTreeString.get("shapeTree"); + String newShapeTree =newTreeString.get("shapeTree"); - String oldTargetTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames, "targetTree"); - String newTargetTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames, "targetTree"); + String oldActionTree = oldTreeString.get("actionTree"); + String newActionTree = newTreeString.get("actionTree"); + + String oldTargetTree = oldTreeString.get("targetTree"); + String newTargetTree = newTreeString.get("targetTree"); if (oldShapeTree.equals(newShapeTree)) { @@ -170,23 +212,23 @@ public class CompareTrees { switch (treeType) { case "single": - String oldShapeTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"shapeTree"); - String newShapeTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"shapeTree"); - - String oldActionTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"actionTree"); - String newActionTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"actionTree"); - - String oldTargetTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"targetTree"); - String newTargetTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"targetTree"); - - - if(oldShapeTree.equals(newShapeTree)){ - if(oldActionTree.equals(newActionTree)){ - if(oldTargetTree.equals(newTargetTree)){ - samePairs.add(matchKey); - } - } - } +// String oldShapeTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"shapeTree"); +// String newShapeTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"shapeTree"); +// +// String oldActionTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"actionTree"); +// String newActionTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"actionTree"); +// +// String oldTargetTree = EDiffHelper.getTreeString(keyName, i, outerPool, filenames,"targetTree"); +// String newTargetTree = EDiffHelper.getTreeString(keyName, j, outerPool, filenames,"targetTree"); +// +// +// if(oldShapeTree.equals(newShapeTree)){ +// if(oldActionTree.equals(newActionTree)){ +// if(oldTargetTree.equals(newTargetTree)){ +// samePairs.add(matchKey); +// } +// } +// } return; // break; From ae5e381d4e6ebb6e7446f27a4dde93f757cd3242 Mon Sep 17 00:00:00 2001 From: ANIL KOYUNCU Date: Sun, 19 Jan 2020 17:03:19 +0100 Subject: [PATCH 11/41] changes --- .../edu/lu/uni/serval/fixminer/Launcher.java | 20 +++++++++---------- .../fixminer/akka/compare/CompareTrees.java | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index 0b7d72d..e7e43d8 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,11 +22,11 @@ public class Launcher { Properties appProps = new Properties(); -// String appConfigPath = "/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; - String appConfigPath = args[0]; + String appConfigPath = "/Users/anil.koyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; +// String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); - String portInner = appProps.getProperty("portInner","6380"); +// String portInner = appProps.getProperty("portInner","6380"); String numOfWorkers = appProps.getProperty("numOfWorkers", "10"); String portDumps = appProps.getProperty("portDumps","6399"); String pjName = appProps.getProperty("pjName","allDataset"); @@ -38,12 +38,12 @@ public class Launcher { String redisPath = appProps.getProperty("redisPath","FORKJOIN"); String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String parameter = args[2]; +// String parameter = args[2]; // String parameter = null; // String parameter = "if"; -// String parameter = "L1"; - String jobType = args[1]; -// String jobType = "RICHEDITSCRIPT"; + String parameter = "add"; +// String jobType = args[1]; + String jobType = "RICHEDITSCRIPT"; // String jobType = "LOAD"; // String jobType = "COMPARE"; @@ -56,12 +56,12 @@ public class Launcher { // // log.info(parameters); - mainLaunch(portInner, numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter, srcMLPath); + mainLaunch( numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter, srcMLPath); } - public static void mainLaunch(String portInner, String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter,String srcMLPath){ + public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter,String srcMLPath){ String dbDir; @@ -106,7 +106,7 @@ public class Launcher { } - CompareTrees.main(redisPath, portInner,portDumps,actionType+dumpsName,compareDBName, job); + CompareTrees.main(redisPath, portDumps,actionType+dumpsName, job); break; case "PATTERN": ClusterToPattern.main(portDumps,redisPath, actionType+dumpsName, parameter); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index 37a886d..6844f5c 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -25,7 +25,7 @@ public class CompareTrees { private static Logger log = LoggerFactory.getLogger(CompareTrees.class); - public static void main(String redisPath, String portInner, String portDumps, String dumpsName, String compareDBName, String job) throws Exception { + public static void main(String redisPath, String portDumps, String dumpsName, String job) throws Exception { // shape /Users/anil.koyuncu/projects/test/fixminer-core/python/data/redis ALLdumps-gumInput.rdb clusterl0-gumInputALL.rdb /Users/anil.koyuncu/projects/test/fixminer-core/python/data/richEditScript From c8dfd0e21b5dc375d3a1de3af696c1ff1732500d Mon Sep 17 00:00:00 2001 From: fixminer Date: Mon, 20 Jan 2020 12:36:40 +0100 Subject: [PATCH 12/41] changes --- .../fixminer/akka/compare/AkkaTreeParser.java | 18 +++++------- .../fixminer/akka/compare/CompareTrees.java | 29 +++++++++++-------- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java index 345ca70..8516f07 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/AkkaTreeParser.java @@ -7,10 +7,7 @@ import redis.clients.jedis.JedisPool; import redis.clients.jedis.ScanParams; import redis.clients.jedis.ScanResult; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.util.*; import java.util.stream.Collectors; /** @@ -87,13 +84,14 @@ public class AkkaTreeParser { } // inner.select(1); - Map filenames = inner.hgetAll("compare"); + Set compare = inner.hkeys("compare"); +// compare.size(); + result= new ArrayList(compare); - - for (Map.Entry stringStringEntry : filenames.entrySet().stream().collect(Collectors.toList())) { -// fileMap.put(stringStringEntry.getKey(),stringStringEntry.getValue()); - result.add(stringStringEntry.getKey()); - } +// for (Map.Entry stringStringEntry : filenames.entrySet().stream().collect(Collectors.toList())) { +//// fileMap.put(stringStringEntry.getKey(),stringStringEntry.getValue()); +// result.add(stringStringEntry.getKey()); +// } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index 210dd89..d3da7f8 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -103,20 +103,21 @@ public class CompareTrees { @Override public void run() { - int dbsize = 1; - while(dbsize>0) { - try (Jedis outer = outerPool.getResource()) { - dbsize = Math.toIntExact(outer.scard("compare")); - } - if (dbsize != 0){ - newCoreCompare(job, errorPairs, filenames, outerPool); - } +// int dbsize = 1; + boolean stop = true; + while(stop) { +// try (Jedis outer = outerPool.getResource()) { +// dbsize = Math.toIntExact(outer.scard("compare")); +// } +// if (dbsize != 0){ + stop = newCoreCompare(job, errorPairs, filenames, outerPool); +// } } } } - public static void newCoreCompare( String treeType,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { + public static boolean newCoreCompare( String treeType,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { String pairName; try (Jedis outer = outerPool.getResource()) { @@ -138,7 +139,7 @@ public class CompareTrees { case "single": if (matchKey == null){ - System.out.println(); + return false; } Map oldTreeString = EDiffHelper.getTreeString(keyName, i, outerPool, filenames); Map newTreeString = EDiffHelper.getTreeString(keyName, j, outerPool, filenames); @@ -165,16 +166,20 @@ public class CompareTrees { } } } - return; + return true; default: - break; + return true; +// break; } }catch (Exception e) { errorPairs.add(matchKey); + if (pairName == null) + return false; log.debug("{} not comparable", pairName); } + return true; } public static void coreCompare(String pairName, String treeType,JedisPool innerPool,ArrayList samePairs,ArrayList errorPairs, HashMap filenames,JedisPool outerPool ) { From e94bb70005482096216350a07e7609361f104274 Mon Sep 17 00:00:00 2001 From: fixminer Date: Mon, 20 Jan 2020 12:39:08 +0100 Subject: [PATCH 13/41] cganges --- src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java index a3bcfc9..2687b3f 100755 --- a/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java +++ b/src/main/java/edu/lu/uni/serval/utils/EDiffHelper.java @@ -328,7 +328,7 @@ public class EDiffHelper { } - public static String getTreeString(String prefix, String fn, JedisPool outerPool, HashMap filenames, String treeType) { + public static Map getTreeString(String prefix, String fn, JedisPool outerPool, HashMap filenames) { try (Jedis outer = outerPool.getResource()) { try { while (!outer.ping().equals("PONG")) { @@ -340,8 +340,8 @@ public class EDiffHelper { String[] split = prefix.split("-"); String key = split[0] + "/" + split[1] + "/" + dist2load; - String treeString = outer.hget(key, treeType); - return treeString; + Map treeMap = outer.hgetAll(key); + return treeMap; }catch (Exception e) { e.printStackTrace(); } From 5254e8e98d55534952bff44cb264bc38eabdf4d1 Mon Sep 17 00:00:00 2001 From: ANIL KOYUNCU Date: Tue, 21 Jan 2020 16:17:47 +0100 Subject: [PATCH 14/41] changes --- .../edu/lu/uni/serval/fixminer/Launcher.java | 21 ++++---- .../fixminer/akka/compare/CompareTrees.java | 52 ++++++++++++------- .../fixminer/akka/ediff/EDiffHunkParser.java | 6 +-- .../serval/fixminer/jobs/EnhancedASTDiff.java | 27 +++++++--- 4 files changed, 68 insertions(+), 38 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index e7e43d8..35fd469 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,8 +22,8 @@ public class Launcher { Properties appProps = new Properties(); - String appConfigPath = "/Users/anil.koyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; -// String appConfigPath = args[0]; +// String appConfigPath = "/Users/anil.koyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; + String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); // String portInner = appProps.getProperty("portInner","6380"); @@ -33,17 +33,18 @@ public class Launcher { String actionType = appProps.getProperty("actionType","ALL"); String eDiffTimeout = appProps.getProperty("eDiffTimeout","900"); String parallelism = appProps.getProperty("parallelism","FORKJOIN"); + String hostname = appProps.getProperty("hostname","localhost"); String input = appProps.getProperty("inputPath","FORKJOIN"); String redisPath = appProps.getProperty("redisPath","FORKJOIN"); String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); -// String parameter = args[2]; -// String parameter = null; + String parameter = args[2]; +// String parameter = "L1"; // String parameter = "if"; - String parameter = "add"; -// String jobType = args[1]; - String jobType = "RICHEDITSCRIPT"; +// String parameter = "add"; + String jobType = args[1]; +// String jobType = "RICHEDITSCRIPT"; // String jobType = "LOAD"; // String jobType = "COMPARE"; @@ -56,12 +57,12 @@ public class Launcher { // // log.info(parameters); - mainLaunch( numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter, srcMLPath); + mainLaunch( numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter, srcMLPath,hostname); } - public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter,String srcMLPath){ + public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter,String srcMLPath,String hostname){ String dbDir; @@ -106,7 +107,7 @@ public class Launcher { } - CompareTrees.main(redisPath, portDumps,actionType+dumpsName, job); + CompareTrees.main(redisPath, portDumps,actionType+dumpsName, job,numOfWorkers,hostname); break; case "PATTERN": ClusterToPattern.main(portDumps,redisPath, actionType+dumpsName, parameter); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java index dbbab0c..15bf6f3 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/compare/CompareTrees.java @@ -14,6 +14,7 @@ import redis.clients.jedis.JedisPool; import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; @@ -29,7 +30,7 @@ public class CompareTrees { private static Logger log = LoggerFactory.getLogger(CompareTrees.class); - public static void main(String redisPath, String portDumps, String dumpsName, String job) throws Exception { + public static void main(String redisPath, String portDumps, String dumpsName, String job,String numOfWorkers,String host) throws Exception { // shape /Users/anil.koyuncu/projects/test/fixminer-core/python/data/redis ALLdumps-gumInput.rdb clusterl0-gumInputALL.rdb /Users/anil.koyuncu/projects/test/fixminer-core/python/data/richEditScript @@ -47,7 +48,7 @@ public class CompareTrees { // cs.runShell(cmdInner, portInner); // String numOfWorkers = "100000000";//args[4]; - String host = "localhost";//args[5]; +// String host = "localhost";//args[5]; // -Djava.util.concurrent.ForkJoinPool.common.parallelism=256 // final JedisPool innerPool = new JedisPool(PoolBuilder.getPoolConfig(), host,Integer.valueOf(portInner),20000000); @@ -62,26 +63,36 @@ public class CompareTrees { ArrayList samePairs = new ArrayList<>(); ArrayList errorPairs = new ArrayList<>(); + Integer numberOfWorkers = Integer.valueOf(numOfWorkers); + final ExecutorService executor = Executors.newWorkStealingPool(numberOfWorkers); + ArrayList> results = new ArrayList>(); + for (int i = 1; i future = executor.submit( new RunnableCompare( job,errorPairs,filenames,outerPool)); - - try { - // wait for task to complete - future.get(); - - } catch (InterruptedException e) { - - e.printStackTrace(); - } catch (ExecutionException e) { - - e.printStackTrace(); - } finally { - executor.shutdownNow(); + // schedule the work + log.info("Starting job {}",i); + final Future future = executor.submit(new RunnableCompare(job, errorPairs, filenames, outerPool, i)); + results.add(future); } + for (Future future:results){ + try { + // wait for task to complete + future.get(); + + } catch (InterruptedException e) { + + e.printStackTrace(); + } catch (ExecutionException e) { + + e.printStackTrace(); + } finally { + executor.shutdownNow(); + } + } + + + log.info("End process"); @@ -93,12 +104,14 @@ public class CompareTrees { ArrayList errorPairs; HashMap filenames; JedisPool outerPool; + Integer threadID; - public RunnableCompare(String treeType,ArrayList errorPairs, HashMap filenames,JedisPool outerPool) { + public RunnableCompare(String treeType,ArrayList errorPairs, HashMap filenames,JedisPool outerPool,Integer threadID) { this.job = treeType; this.errorPairs = errorPairs; this.filenames = filenames; this.outerPool = outerPool; + this.threadID = threadID; } @Override @@ -113,6 +126,7 @@ public class CompareTrees { stop = newCoreCompare(job, errorPairs, filenames, outerPool); // } } + log.info("Completed worker {}",threadID); } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java index 0bac96d..fc1787a 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java @@ -40,9 +40,9 @@ public class EDiffHunkParser extends EDiffParser { try { String astNodeType = actionSet.getAstNodeType(); - if (astNodeType.equals(rootType)){ - - } +// if (astNodeType.equals(rootType)){ +// +// } actionSet.toString(); int size = actionSet.getActionSize(); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index 9c35b53..e19232f 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -34,16 +34,29 @@ public class EnhancedASTDiff { CallShell cs = new CallShell(); String cmd = "bash "+dbDir + "/" + "startServer.sh" +" %s %s %s"; - if (rootType == null){ - cmd = String.format(cmd, dbDir,chunkName,Integer.valueOf(portInner)); - }else{ - cmd = String.format(cmd, dbDir,rootType+chunkName,Integer.valueOf(portInner)); - } +// if (rootType == null){ + cmd = String.format(cmd, dbDir,chunkName,Integer.valueOf(portInner)); +// }else{ +// cmd = String.format(cmd, dbDir,rootType+chunkName,Integer.valueOf(portInner)); +// } cs.runShell(cmd, portInner); JedisPool innerPool = new JedisPool(PoolBuilder.getPoolConfig(), "127.0.0.1",Integer.valueOf(portInner),20000000); + if (rootType == "add"){ + try (Jedis inner = innerPool.getResource()) { + inner.select(2); + inner.flushDB(); + inner.select(1); + inner.flushDB(); + inner.select(0); + inner.del("compare"); + + } + + } + File folder = new File(inputPath); File[] listOfFiles = folder.listFiles(); Stream stream = Arrays.stream(listOfFiles); @@ -79,8 +92,10 @@ public class EnhancedASTDiff { parsingActor = system.actorOf(EDiffActor.props(Integer.valueOf(numOfWorkers), project), "mine-fix-pattern-actor"); parsingActor.tell(msg, ActorRef.noSender()); } catch (Exception e) { - system.shutdown(); + system.terminate(); e.printStackTrace(); + }finally { + system.terminate(); } break; case "FORKJOIN": From 6a9d0d3fec5b7aecbd557f084df41fdbbbc0ecc2 Mon Sep 17 00:00:00 2001 From: ANIL KOYUNCU Date: Tue, 21 Jan 2020 16:21:32 +0100 Subject: [PATCH 15/41] chn --- src/main/resource/app.properties | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index b4d44f8..cc66c6a 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -3,11 +3,13 @@ pjName = gumInput portInner = 6380 portDumps = 6399 parallelism = AKKA -numOfWorkers = 7 +numOfWorkers = 30 +hostname = localhost -inputPath = /Users/anilkoyuncu/projects/gumInputLinux -redisPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/redis -srcMLPath= /Users/anilkoyuncu/Downloads/srcML2/src2srcml +#inputPath = /Users/anilkoyuncu/projects/gumInputLinux +inputPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux +redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis +srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml actionType = ALL eDiffTimeout = 900 From 32b638f4829b423fbb57de6408d0d8b743301b67 Mon Sep 17 00:00:00 2001 From: ANIL KOYUNCU Date: Sat, 25 Jan 2020 20:36:01 +0100 Subject: [PATCH 16/41] limit added and removed position from groupping --- .../edu/lu/uni/serval/fixminer/Launcher.java | 7 +- .../fixminer/akka/ediff/EDiffHunkParser.java | 11 ++- .../fixminer/akka/ediff/EDiffWorker.java | 2 +- .../akka/ediff/HierarchicalRegrouperForC.java | 37 +++++---- .../fixminer/akka/ediff/HunkParserTest.java | 77 +++++++++++++++---- .../serval/fixminer/jobs/EnhancedASTDiff.java | 11 ++- src/main/resource/app.properties | 4 +- 7 files changed, 106 insertions(+), 43 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index 35fd469..6438486 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -34,6 +34,7 @@ public class Launcher { String eDiffTimeout = appProps.getProperty("eDiffTimeout","900"); String parallelism = appProps.getProperty("parallelism","FORKJOIN"); String hostname = appProps.getProperty("hostname","localhost"); + String hunkLimit = appProps.getProperty("hunkLimit","10"); String input = appProps.getProperty("inputPath","FORKJOIN"); String redisPath = appProps.getProperty("redisPath","FORKJOIN"); @@ -57,12 +58,12 @@ public class Launcher { // // log.info(parameters); - mainLaunch( numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter, srcMLPath,hostname); + mainLaunch( numOfWorkers, jobType, portDumps, pjName,actionType,eDiffTimeout,parallelism,input,redisPath,parameter, srcMLPath,hostname,hunkLimit); } - public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter,String srcMLPath,String hostname){ + public static void mainLaunch(String numOfWorkers, String jobType, String portDumps, String pjName, String actionType, String eDiffTimeout, String parallelism,String input, String redisPath,String parameter,String srcMLPath,String hostname,String hunkLimit){ String dbDir; @@ -78,7 +79,7 @@ public class Launcher { try { switch (jobType) { case "RICHEDITSCRIPT": - EnhancedASTDiff.main(gumInput, numOfWorkers, pjName, eDiffTimeout,parallelism,portDumps, dbDir, actionType+dumpsName, srcMLPath,parameter); + EnhancedASTDiff.main(gumInput, numOfWorkers, pjName, eDiffTimeout,parallelism,portDumps, dbDir, actionType+dumpsName, srcMLPath,parameter,hunkLimit); break; case "LOAD": diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java index fc1787a..bf77187 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffHunkParser.java @@ -26,12 +26,17 @@ public class EDiffHunkParser extends EDiffParser { private static Logger logger = LoggerFactory.getLogger(EDiffHunkParser.class); @Override - public void parseFixPatterns(File prevFile, File revFile, File diffentryFile, String project, JedisPool innerPool,String srcMLPath,String rootType) { + public void parseFixPatterns(File prevFile, File revFile, File diffentryFile, String project, JedisPool innerPool,String srcMLPath,String hunkLimit) { List actionSets = parseChangedSourceCodeWithGumTree2(prevFile, revFile,srcMLPath); - if (actionSets.size() != 0) { + if (actionSets != null && actionSets.size() != 0) { boolean processActionSet = true; + if (actionSets.size() > Integer.valueOf(hunkLimit)){ + processActionSet = false; + logger.debug("Skipping {} set size {}",diffentryFile.getName(),hunkLimit); + } + int hunkSet = 0; if(processActionSet){ for (HierarchicalActionSet actionSet : actionSets) { @@ -79,7 +84,7 @@ public class EDiffHunkParser extends EDiffParser { } catch (Exception e) { logger.error("error",e); - e.printStackTrace(); +// e.printStackTrace(); } hunkSet++; } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java index b1ee053..54360a7 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffWorker.java @@ -65,7 +65,7 @@ public class EDiffWorker extends UntypedActor { future.get(msg.getSECONDS_TO_WAIT(), TimeUnit.SECONDS); counter ++; - if (counter % 10 == 0) { + if (counter % 1000 == 0) { log.info("Worker #" + id +" finalized parsing " + counter + " files... remaing "+ (files.size() - counter)); } } catch (TimeoutException e) { diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java index 8912196..68362a0 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -11,6 +11,7 @@ import edu.lu.uni.serval.utils.ListSorter; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; /** * Regroup GumTree results to a hierarchical construction. @@ -147,19 +148,19 @@ public class HierarchicalRegrouperForC { } private boolean isPossibileSubAction(Action parent, Action child) { - if ((parent instanceof Update && !(child instanceof Addition)) - || (parent instanceof Delete && child instanceof Delete) - || (parent instanceof Insert && (child instanceof Insert))) { - int startPosition = child.getPosition(); - int length = child.getLength(); - int startPosition2 = parent.getPosition(); - int length2 = parent.getLength(); - - if (!(startPosition2 <= startPosition && startPosition + length <= startPosition2 + length2)) { - // when act is not the sub-set of action. - return false; - } - } +// if ((parent instanceof Update && !(child instanceof Addition)) +// || (parent instanceof Delete && child instanceof Delete) +// || (parent instanceof Insert && (child instanceof Insert))) { +// int startPosition = child.getPosition(); +// int length = child.getLength(); +// int startPosition2 = parent.getPosition(); +// int length2 = parent.getLength(); +// +// if (!(startPosition2 <= startPosition && startPosition + length <= startPosition2 + length2)) { +// // when act is not the sub-set of action. +// return false; +// } +// } return true; } @@ -282,10 +283,18 @@ public class HierarchicalRegrouperForC { int nodeType = tree.getType(); - +// List collect = tree.getChildren().stream().filter(m -> m.getType() == 6).collect(Collectors.toList()); +// if (collect.size() > 0){ +// return true; +// } if (NodeMap_new.StatementMap.containsKey(nodeType)){ return true; } +// else{ +// if((nodeType ==6) && tree.getParent().getType() == 1){ +// return true; +// } +// } // if (nodeType == 11 || nodeType == 16 || nodeType == 18 || nodeType == 21 // || nodeType == 22 || nodeType == 23 || nodeType == 24 || nodeType == 84 diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java index 2684122..4f9f5ae 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java @@ -5,6 +5,7 @@ import com.github.gumtreediff.tree.ITree; import com.github.gumtreediff.tree.TreeContext; import edu.lu.uni.serval.fixminer.akka.compare.AkkaTreeParser; import edu.lu.uni.serval.fixminer.akka.ediff.EDiffHunkParser; +import edu.lu.uni.serval.utils.ClusterToPattern; import edu.lu.uni.serval.utils.EDiffHelper; import edu.lu.uni.serval.utils.PoolBuilder; import org.apache.commons.io.FileUtils; @@ -16,6 +17,8 @@ import redis.clients.jedis.JedisPool; import java.io.File; import java.io.IOException; import java.lang.instrument.Instrumentation; +import java.nio.file.Files; +import java.nio.file.Paths; import java.time.Duration; import java.time.Instant; import java.util.*; @@ -28,35 +31,75 @@ public class HunkParserTest { public void testSimple() throws IOException { // String input = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/revFiles/7f52f3_3845d29_drivers#pci#host#pcie-altera.c"; - String root = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/linux/"; +// String root = "/Users/anil.koyuncu/projects/fixminer/gumInputLinux/linux/"; + String root = "/Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux/"; + String filename =""; +// filename ="freebsd_ceca9b8_b864ac4_sys#kern#sched_ule.c"; //too long +// filename ="openbsd_e592ec_39c81a_sys#arch#i386#pci#pci_machdep.c"; //not parseable 56 "parameter_list" "" () ( (57 "parameter" "" () ( (22 "decl" "" () ()))) +// filename ="openbsd_cbb6d2_4cab495_sys#lib#libsa#printf.c"; +// filename ="freebsd_bb1ce4_10d4c2_sbin#gvinum#gvinum.c"; //too long +// filename ="freebsd_253913_35ea52_sys#netinet#ip_carp.c"; //ok +// filename ="FFmpeg_4c9d1c_3da860_libavutil#file_open.c"; //not sure ifdef +// filename ="gstreamer_0af74c_e8bae0_libs#gst#net#gstptpclock.c"; //not sure ifder +// filename ="freebsd_abdbcc6_030063_sys#netinet#ip_carp.c"; //ok +// filename ="linux_80d348_5b394b_fs#overlayfs#inode.c"; //ok +// filename ="openbsd_43b185_e7495b_usr.bin#cvs#rcs.c"; //okish +// filename ="openbsd_e592ec_39c81a_sys#arch#i386#pci#pci_machdep.c"; //(56 "parameter_list" "" () ( (57 "parameter" "" () ( (22 "decl" "" () ()))) +// filename ="openbsd_cbb6d2_4cab495_sys#lib#libsa#printf.c"; //not parseable 56 "parameter_list" "" () ( (57 "parameter" "" () ( (22 "decl" "" () ()))) +// filename ="FFmpeg_9219ec_647696_libavfilter#trim.c"; //partial +// filename ="vlc_92b7fd_f745f6_modules#control#dbus#dbus.c"; //okish +// filename ="vlc_eeb662_966879_modules#video_chroma#copy.c"; //ok +// filename ="omp_19fae3_1e4dcd_src#mca#mpool#sm#mpool_sm_mmap.c"; // cannot find +// filename ="FFmpeg_a8343bf_2b2039_libavformat#riff.c"; // ok +// filename ="freebsd_32766e4_200ff4_sbin#routed#parms.c"; // ok + filename ="openbsd_150ddd_cf0e20_usr.sbin#user#user.c"; //notok + filename ="openbsd_6fac1e_c3b383_usr.bin#tmux#window-copy.c"; //notok + filename ="freebsd_0cb6f2_b4c742_sys#dev#ipw#if_ipw.c"; //notok + filename ="php-src_7defd5_da06f7_ext#mbstring#mbstring.c"; //notok (19 "expr_stmt" "" () ())))) + filename ="libtiff_177169_71715f_tools#tiff2ps.c"; //notok (19 "expr_stmt" "" () ())))) + filename ="linux_955c1dd_0aaee4_drivers#gpu#drm#i915#gvt#handlers.c"; //notok (19 "expr_stmt" "" () ())))) -// String filename = "8dd302_c4ef85_net#core#dev_ioctl.c"; //ok -// String filename = "1e793f6_77f18a_drivers#scsi#megaraid#megaraid_sas_base.c"; //OK -// String filename = "6a28fd_93ad867_drivers#tty#goldfish.c"; //m,issing -// String filename = "b90f7c_ff51ff_kernel#sched#fair.c"; //wrong and wired -// String filename = "ed8f68_b1c8047_fs#ext3#dir.c";//ok +// filename ="FFmpeg_0726b2_66d2ff_libav#jpeg.c"; + String pj = filename.split("_")[0]; + filename = filename.replace(pj+"_",""); + root = root + pj + "/"; +// root = root + "codeflaws/"; -// String filename = "bc3d12_9a26653_drivers#scsi#libfc#fc_disc.c"; //okish - String filename = "118154_0c5f81_arch#x86#kvm#svm.c"; -// String filename = "bcbd94f_43e43c9_drivers#md#dm-crypt.c"; //emin degilim -// String filename = "f1727b4_6c1e7e_arch#x86#kvm#vmx#nested.c"; //komplex not sure -// String filename = "5924f17_5925a05_net#ipv4#tcp.c"; -// String filename = "bd0b9ac_b237721_drivers#irqchip#irq-dw-apb-ictl.c"; //missing -// String filename = "052831_3985e8_include#net#ip_tunnels.h"; -// String filename = "e76019_28647b_drivers#gpu#drm#i915#i915_drv.h"; -// String filename = "4cbe4d_b124f4_include#linux#mlx4#device.h"; //enum case stops at block -// String filename = "7bf7eac_c01daf_include#linux#dax.h"; + + +// filename = "474-A-15925943-15925951.c"; //mot ok +// filename = "6-C-11536006-11536039.c"; //okish +// filename = "500-A-18298071-18298124.c"; //ok +// filename = "106-B-4027414-4027447.c"; //ok +// filename = "572-B-12669194-12669278.c"; //ok +// filename = "514-A-16254510-16254521.c"; //ok +// filename = "405-B-12287356-12287584.c"; //ok +// filename = "630-R-17825199-17825235.c"; //notok File revFile = new File(root + "revFiles/"+ filename); File prevFile =new File(root + "prevFiles/prev_"+filename); +// File diffFile =new File(); + String path = root + "DiffEntries/"+filename + ".txt"; + System.out.println(path); +// String data = ""; +// data = new String(Files.readAllBytes(Paths.get(root + "DiffEntries/"+filename + ".txt"))); + EDiffHunkParser parser = new EDiffHunkParser(); - String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML/src2srcml"; + String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML.0.9.5/bin/srcml"; +// String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML.0.9.5/bin/srcml"; parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); // ITree t = new SrcmlCppTreeGenerator().generateFromFile(input).getRoot(); // Assert.assertEquals(148, t.getSize()); } + @Test + public void dumpFnction() throws Exception { + String pattern = "function/20/gstreamer_0af74c_e8bae0_libs#gst#net#gstptpclock.c.txt_0"; +// String pattern = "function/20/FFmpeg_4c9d1c_3da860_libavutil#file_open.c.txt_0"; + ClusterToPattern.main("6399","/Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis","ALLdumps-gumInput.rdb ",pattern); + } + @Test public void newCTest(){ String root = "/Users/anilkoyuncu/projects/gumInputLinux/linux/"; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index e19232f..ff399d8 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -26,7 +26,7 @@ public class EnhancedASTDiff { private static Logger log = LoggerFactory.getLogger(EnhancedASTDiff.class); - public static void main(String inputPath, String numOfWorkers, String project, String eDiffTimeout, String parallelism, String portInner, String dbDir, String chunkName,String srcMLPath,String rootType) throws Exception { + public static void main(String inputPath, String numOfWorkers, String project, String eDiffTimeout, String parallelism, String portInner, String dbDir, String chunkName,String srcMLPath,String rootType,String hunkLimit) throws Exception { String parameters = String.format("\nInput path %s",inputPath); @@ -62,6 +62,8 @@ public class EnhancedASTDiff { Stream stream = Arrays.stream(listOfFiles); List folders = stream .filter(x -> !x.getName().startsWith(".")) + .filter(x -> !x.getName().startsWith("cocci")) + .filter(x -> !x.getName().endsWith(".index")) .collect(Collectors.toList()); @@ -83,7 +85,7 @@ public class EnhancedASTDiff { ActorSystem system = null; ActorRef parsingActor = null; - final EDiffMessage msg = new EDiffMessage(0, allMessageFiles,eDiffTimeout,innerPool,srcMLPath,rootType); + final EDiffMessage msg = new EDiffMessage(0, allMessageFiles,eDiffTimeout,innerPool,srcMLPath,hunkLimit); try { log.info("Akka begins..."); log.info("{} files to process ...", allMessageFiles.size()); @@ -92,10 +94,11 @@ public class EnhancedASTDiff { parsingActor = system.actorOf(EDiffActor.props(Integer.valueOf(numOfWorkers), project), "mine-fix-pattern-actor"); parsingActor.tell(msg, ActorRef.noSender()); } catch (Exception e) { - system.terminate(); + system.shutdown(); e.printStackTrace(); }finally { - system.terminate(); + system.awaitTermination(); +// system.shutdown(); } break; case "FORKJOIN": diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index cc66c6a..e3d6a1d 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -5,11 +5,13 @@ portDumps = 6399 parallelism = AKKA numOfWorkers = 30 hostname = localhost +hunkLimit = 10 #inputPath = /Users/anilkoyuncu/projects/gumInputLinux inputPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis -srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml +#srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml +srcMLPath= /Users/anil.koyuncu/Downloads/srcML.0.9.5/bin/srcml actionType = ALL eDiffTimeout = 900 From 8799804a82ef7bb6f9966c117ae8354f50ffb479 Mon Sep 17 00:00:00 2001 From: fixminer Date: Fri, 31 Jan 2020 10:53:47 +0100 Subject: [PATCH 17/41] test cases from srcml --- .../fixminer/akka/ediff/EDiffParser.java | 2 +- .../akka/ediff/HierarchicalRegrouper.java | 2 +- .../akka/ediff/HierarchicalRegrouperForC.java | 2 +- .../fixminer/akka/ediff/ListSorter.java | 45 ++++++++ .../akka/ediff/TestPredefinedCases.java | 104 ++++++++++++++++++ src/main/resource/testFiles/for_example_1.c | 11 ++ src/main/resource/testFiles/if_example_1.c | 2 + .../resource/testFiles/prev_for_example_1.c | 11 ++ .../resource/testFiles/prev_if_example_1.c | 2 + .../resource/testFiles/prev_while_example_1.c | 5 + src/main/resource/testFiles/while_example_1.c | 4 + 11 files changed, 187 insertions(+), 3 deletions(-) create mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/ListSorter.java create mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java create mode 100644 src/main/resource/testFiles/for_example_1.c create mode 100644 src/main/resource/testFiles/if_example_1.c create mode 100644 src/main/resource/testFiles/prev_for_example_1.c create mode 100644 src/main/resource/testFiles/prev_if_example_1.c create mode 100644 src/main/resource/testFiles/prev_while_example_1.c create mode 100644 src/main/resource/testFiles/while_example_1.c diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java index 4856b1f..ebb3c1b 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java @@ -4,7 +4,7 @@ import com.github.gumtreediff.actions.model.Action; import com.github.gumtreediff.gen.srcml.GumTreeCComparer; import edu.lu.uni.serval.gumtree.GumTreeComparer; -import edu.lu.uni.serval.utils.ListSorter; + import redis.clients.jedis.JedisPool; import java.io.File; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouper.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouper.java index 09c0686..5587f9b 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouper.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouper.java @@ -3,7 +3,7 @@ package edu.lu.uni.serval.fixminer.akka.ediff; import com.github.gumtreediff.actions.model.*; import com.github.gumtreediff.tree.ITree; import edu.lu.uni.serval.utils.ASTNodeMap; -import edu.lu.uni.serval.utils.ListSorter; + import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java index 68362a0..719a173 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -7,7 +7,7 @@ import com.github.gumtreediff.gen.srcml.NodeMap_new; import com.github.gumtreediff.io.CNodeMap; import com.github.gumtreediff.tree.ITree; import edu.lu.uni.serval.gumtree.GumTreeComparer; -import edu.lu.uni.serval.utils.ListSorter; + import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/ListSorter.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/ListSorter.java new file mode 100644 index 0000000..5f1543f --- /dev/null +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/ListSorter.java @@ -0,0 +1,45 @@ +package edu.lu.uni.serval.fixminer.akka.ediff; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +public class ListSorter> { + + private List list; + + public ListSorter(List list) { + this.list = new ArrayList<>(); + this.list.addAll(list); + } + + public List getList() { + return this.list; + } + + public List sortAscending() { + try { + if (list != null && list.size() > 0) { + Collections.sort(this.list, new Comparator() { + + @Override + public int compare(T t1, T t2) { + return t1.compareTo(t2); + } + + }); + } + } catch (Exception e) { + return null; + } + return this.list; + } + + public List sortDescending() { + if (list != null && list.size() > 0) { + Collections.sort(this.list, Collections.reverseOrder()); + } + return this.list; + } +} \ No newline at end of file diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java new file mode 100644 index 0000000..152e837 --- /dev/null +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java @@ -0,0 +1,104 @@ +package edu.lu.uni.serval.fixminer.akka.ediff; + +import com.github.gumtreediff.tree.ITree; +import edu.lu.uni.serval.fixminer.akka.compare.AkkaTreeParser; +import edu.lu.uni.serval.utils.ClusterToPattern; +import edu.lu.uni.serval.utils.EDiffHelper; +import edu.lu.uni.serval.utils.PoolBuilder; +import org.apache.commons.io.FileUtils; +import org.javatuples.Pair; +import org.junit.Assert; +import org.junit.Test; +import redis.clients.jedis.JedisPool; + +import java.io.File; +import java.io.IOException; +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +public class TestPredefinedCases { + + + @Test + public void testIFCase1() throws IOException { + File revFile = new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/if_example_1.c"); + File prevFile =new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/prev_if_example_1.c"); + + EDiffHunkParser parser = new EDiffHunkParser(); + + String srcMLPath = "/usr/local/bin/srcml"; + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.toString(),"[UPD if@@x >= 5 y += 4 @TO@ x > 5 y += 4 @AT@ 2 @LENGTH@ 13\n" + + "---UPD condition@@x >= 5 @TO@ x > 5 @AT@ 2 @LENGTH@ 9\n" + + "------UPD expr@@x >= 5 @TO@ x > 5 @AT@ 3 @LENGTH@ 6\n" + + "---------UPD operator@@>= @TO@ > @AT@ 5 @LENGTH@ 2\n" + + "]"); + + } + @Test + public void testForCase1() throws IOException { + + + File revFile = new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/for_example_1.c"); + File prevFile =new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/prev_for_example_1.c"); + + + + EDiffHunkParser parser = new EDiffHunkParser(); + + String srcMLPath = "/usr/local/bin/srcml"; + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@i = 0 i < max i ++ line ] == ' ' line ] == '\\t' tab ++ @TO@ i = 0 i < max i ++ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 4 @LENGTH@ 54\n" + + "---UPD block@@line ] == ' ' line ] == '\\t' tab ++ @TO@ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 26 @LENGTH@ 98\n" + + "------UPD if@@line ] == ' ' @TO@ line ] == ' ' space ++ @AT@ 33 @LENGTH@ 13\n" + + "---------UPD then@@ @TO@ space ++ @AT@ 54 @LENGTH@ 0\n" + + "------------UPD block@@ @TO@ space ++ @AT@ 54 @LENGTH@ 22\n" + + "---------------INS expr_stmt@@space ++ @TO@ block@@ @AT@ 62 @LENGTH@ 8\n" + + "------------------INS expr@@space ++ @TO@ expr_stmt@@space ++ @AT@ 62 @LENGTH@ 8\n" + + "---------------------INS name@@space @TO@ expr@@space ++ @AT@ 62 @LENGTH@ 5\n" + + "---------------------INS operator@@++ @TO@ expr@@space ++ @AT@ 67 @LENGTH@ 2\n" + + "---------------DEL continue@@ @AT@ 62 @LENGTH@ 0\n"); + + } + + @Test + public void testWhileCase1() throws IOException { + + + File revFile = new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/while_example_1.c"); + File prevFile =new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/prev_while_example_1.c"); + + + + EDiffHunkParser parser = new EDiffHunkParser(); + + String srcMLPath = "/usr/local/bin/srcml"; + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + //TODO fixme +// Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@i = 0 i < max i ++ line ] == ' ' line ] == '\\t' tab ++ @TO@ i = 0 i < max i ++ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 4 @LENGTH@ 54\n" + +// "---UPD block@@line ] == ' ' line ] == '\\t' tab ++ @TO@ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 26 @LENGTH@ 98\n" + +// "------UPD if@@line ] == ' ' @TO@ line ] == ' ' space ++ @AT@ 33 @LENGTH@ 13\n" + +// "---------UPD then@@ @TO@ space ++ @AT@ 54 @LENGTH@ 0\n" + +// "------------UPD block@@ @TO@ space ++ @AT@ 54 @LENGTH@ 22\n" + +// "---------------INS expr_stmt@@space ++ @TO@ block@@ @AT@ 62 @LENGTH@ 8\n" + +// "------------------INS expr@@space ++ @TO@ expr_stmt@@space ++ @AT@ 62 @LENGTH@ 8\n" + +// "---------------------INS name@@space @TO@ expr@@space ++ @AT@ 62 @LENGTH@ 5\n" + +// "---------------------INS operator@@++ @TO@ expr@@space ++ @AT@ 67 @LENGTH@ 2\n" + +// "---------------DEL continue@@ @AT@ 62 @LENGTH@ 0\n"); + + } + + + +} diff --git a/src/main/resource/testFiles/for_example_1.c b/src/main/resource/testFiles/for_example_1.c new file mode 100644 index 0000000..cc05856 --- /dev/null +++ b/src/main/resource/testFiles/for_example_1.c @@ -0,0 +1,11 @@ +for (i = 0; i < max; i++ ) +{ + if ( line[i] == ' ' ) + { + space++; + } + if ( line[i] == '\t' ) + { + tab++; + } +} \ No newline at end of file diff --git a/src/main/resource/testFiles/if_example_1.c b/src/main/resource/testFiles/if_example_1.c new file mode 100644 index 0000000..9b21540 --- /dev/null +++ b/src/main/resource/testFiles/if_example_1.c @@ -0,0 +1,2 @@ +if(x > 5) + y+=4; \ No newline at end of file diff --git a/src/main/resource/testFiles/prev_for_example_1.c b/src/main/resource/testFiles/prev_for_example_1.c new file mode 100644 index 0000000..dca5487 --- /dev/null +++ b/src/main/resource/testFiles/prev_for_example_1.c @@ -0,0 +1,11 @@ +for (i = 0; i < max; i++ ) +{ + if ( line[i] == ' ' ) + { + continue; + } + if ( line[i] == '\t' ) + { + tab++; + } +} \ No newline at end of file diff --git a/src/main/resource/testFiles/prev_if_example_1.c b/src/main/resource/testFiles/prev_if_example_1.c new file mode 100644 index 0000000..42476f3 --- /dev/null +++ b/src/main/resource/testFiles/prev_if_example_1.c @@ -0,0 +1,2 @@ +if(x >= 5) + y+=4; \ No newline at end of file diff --git a/src/main/resource/testFiles/prev_while_example_1.c b/src/main/resource/testFiles/prev_while_example_1.c new file mode 100644 index 0000000..a53916b --- /dev/null +++ b/src/main/resource/testFiles/prev_while_example_1.c @@ -0,0 +1,5 @@ +do { + y = f( x ); + x--; + print(x); +} while ( x > 0 ); \ No newline at end of file diff --git a/src/main/resource/testFiles/while_example_1.c b/src/main/resource/testFiles/while_example_1.c new file mode 100644 index 0000000..192efa0 --- /dev/null +++ b/src/main/resource/testFiles/while_example_1.c @@ -0,0 +1,4 @@ +do { + y = f( x ); + x--; +} while ( x > 0 ); \ No newline at end of file From 4a04e4d909bda76b9ff74e245984cdf73a172d0d Mon Sep 17 00:00:00 2001 From: fixminer Date: Fri, 31 Jan 2020 11:12:16 +0100 Subject: [PATCH 18/41] fix whiler --- .../akka/ediff/TestPredefinedCases.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java index 152e837..16dca0e 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java @@ -68,7 +68,6 @@ public class TestPredefinedCases { "---------------DEL continue@@ @AT@ 62 @LENGTH@ 0\n"); } - @Test public void testWhileCase1() throws IOException { @@ -85,17 +84,17 @@ public class TestPredefinedCases { List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); hierarchicalActionSets.size(); Assert.assertEquals(hierarchicalActionSets.size(),1); - //TODO fixme -// Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@i = 0 i < max i ++ line ] == ' ' line ] == '\\t' tab ++ @TO@ i = 0 i < max i ++ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 4 @LENGTH@ 54\n" + -// "---UPD block@@line ] == ' ' line ] == '\\t' tab ++ @TO@ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 26 @LENGTH@ 98\n" + -// "------UPD if@@line ] == ' ' @TO@ line ] == ' ' space ++ @AT@ 33 @LENGTH@ 13\n" + -// "---------UPD then@@ @TO@ space ++ @AT@ 54 @LENGTH@ 0\n" + -// "------------UPD block@@ @TO@ space ++ @AT@ 54 @LENGTH@ 22\n" + -// "---------------INS expr_stmt@@space ++ @TO@ block@@ @AT@ 62 @LENGTH@ 8\n" + -// "------------------INS expr@@space ++ @TO@ expr_stmt@@space ++ @AT@ 62 @LENGTH@ 8\n" + -// "---------------------INS name@@space @TO@ expr@@space ++ @AT@ 62 @LENGTH@ 5\n" + -// "---------------------INS operator@@++ @TO@ expr@@space ++ @AT@ 67 @LENGTH@ 2\n" + -// "---------------DEL continue@@ @AT@ 62 @LENGTH@ 0\n"); + + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD do@@y = f x x -- print x x > 0 @TO@ y = f x x -- x > 0 @AT@ 0 @LENGTH@ 62\n" + + "---UPD block@@y = f x x -- print x @TO@ y = f x x -- @AT@ 3 @LENGTH@ 42\n" + + "------DEL expr_stmt@@print x @AT@ 33 @LENGTH@ 7\n" + + "---------DEL expr@@print x @AT@ 33 @LENGTH@ 7\n" + + "------------DEL call@@print x @AT@ 33 @LENGTH@ 7\n" + + "---------------DEL name@@print @AT@ 33 @LENGTH@ 5\n" + + "---------------DEL argument_list@@x @AT@ 38 @LENGTH@ 4\n" + + "------------------DEL argument@@x @AT@ 39 @LENGTH@ 1\n" + + "---------------------DEL expr@@x @AT@ 39 @LENGTH@ 1\n" + + "------------------------DEL name@@x @AT@ 39 @LENGTH@ 1\n"); } From 1d14187e28a6612c7ce89c095d989e3f0e70f34b Mon Sep 17 00:00:00 2001 From: fixminer Date: Fri, 31 Jan 2020 11:33:46 +0100 Subject: [PATCH 19/41] from propertieis --- FixPatternMiner.iml | 1 + .../akka/ediff/TestPredefinedCases.java | 34 ++++++++++++------- 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/FixPatternMiner.iml b/FixPatternMiner.iml index b309440..9c4c7f3 100644 --- a/FixPatternMiner.iml +++ b/FixPatternMiner.iml @@ -6,6 +6,7 @@ + diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java index 16dca0e..9c59aa6 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java @@ -12,24 +12,32 @@ import org.junit.Test; import redis.clients.jedis.JedisPool; import java.io.File; +import java.io.FileInputStream; import java.io.IOException; import java.time.Duration; import java.time.Instant; import java.util.ArrayList; import java.util.HashMap; import java.util.List; +import java.util.Properties; public class TestPredefinedCases { + + @Test public void testIFCase1() throws IOException { - File revFile = new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/if_example_1.c"); - File prevFile =new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/prev_if_example_1.c"); + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + + File revFile = new File("src/main/resource/testFiles/if_example_1.c"); + File prevFile =new File("src/main/resource/testFiles/prev_if_example_1.c"); EDiffHunkParser parser = new EDiffHunkParser(); - String srcMLPath = "/usr/local/bin/srcml"; + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); hierarchicalActionSets.size(); @@ -42,16 +50,18 @@ public class TestPredefinedCases { } @Test public void testForCase1() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - - File revFile = new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/for_example_1.c"); - File prevFile =new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/prev_for_example_1.c"); + File revFile = new File("src/main/resource/testFiles/for_example_1.c"); + File prevFile =new File("src/main/resource/testFiles/prev_for_example_1.c"); EDiffHunkParser parser = new EDiffHunkParser(); - String srcMLPath = "/usr/local/bin/srcml"; + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); hierarchicalActionSets.size(); @@ -70,17 +80,17 @@ public class TestPredefinedCases { } @Test public void testWhileCase1() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - - File revFile = new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/while_example_1.c"); - File prevFile =new File("/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/testFiles/prev_while_example_1.c"); + File revFile = new File("src/main/resource/testFiles/while_example_1.c"); + File prevFile =new File("src/main/resource/testFiles/prev_while_example_1.c"); EDiffHunkParser parser = new EDiffHunkParser(); - String srcMLPath = "/usr/local/bin/srcml"; - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); hierarchicalActionSets.size(); Assert.assertEquals(hierarchicalActionSets.size(),1); From 6639e84e941403ced4cb3726dd9d28aae6e79db5 Mon Sep 17 00:00:00 2001 From: fixminer Date: Tue, 4 Feb 2020 16:02:26 +0100 Subject: [PATCH 20/41] changes --- .../akka/ediff/HierarchicalRegrouperForC.java | 62 ++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java index 719a173..323becd 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -84,7 +84,67 @@ public class HierarchicalRegrouperForC { // } } } - return reActionSets; + List reActionSets1 = new ArrayList<>(); + for(HierarchicalActionSet a:reActionSets){ + HierarchicalActionSet hierarchicalActionSet = removeBlocks(a); + hierarchicalActionSet = removeIFthenBlocks(hierarchicalActionSet); + reActionSets1.add(hierarchicalActionSet); + + } + return reActionSets1; +// return reActionSets; + } + + private HierarchicalActionSet removeBlocks(HierarchicalActionSet actionSet){ + List subActions = actionSet.getSubActions(); + if (subActions.size() == 1){ + HierarchicalActionSet subaction = subActions.get(0); + //else,then,block + if(subaction.getAstNodeType().equals("block")){//|| subaction.getAstNodeType().equals("then") || subaction.getAstNodeType().equals("else")){ + List subSubActions = subaction.getSubActions(); + if(subSubActions.size() == 1){ + + HierarchicalActionSet subsubsubAction = subSubActions.get(0); + List keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.StatementMap, subsubsubAction.getAstNodeType()); + if(keysByValue != null && keysByValue.size() ==1){ + subsubsubAction.setParent(null); + return removeBlocks(subsubsubAction); + + } + } + } + } + return actionSet; + + } + private HierarchicalActionSet removeIFthenBlocks(HierarchicalActionSet actionSet){ + List subActions = actionSet.getSubActions(); + if (subActions.size() == 1){ + HierarchicalActionSet subaction = subActions.get(0); + //else,then,block + if(subaction.getAstNodeType().equals("then")|| subaction.getAstNodeType().equals("else")){//|| subaction.getAstNodeType().equals("then") || subaction.getAstNodeType().equals("else")){ + List subSubActions = subaction.getSubActions(); + if(subSubActions.size() == 1){ + + HierarchicalActionSet subsubsubAction = subSubActions.get(0); + if(subsubsubAction.getAstNodeType().equals("block")){ + List subActions1 = subsubsubAction.getSubActions(); + if (subActions1.size() ==1){ + HierarchicalActionSet hierarchicalActionSet = subActions1.get(0); + List keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.StatementMap, hierarchicalActionSet.getAstNodeType()); + if(keysByValue != null && keysByValue.size() ==1){ + hierarchicalActionSet.setParent(null); + return removeBlocks(hierarchicalActionSet); + + } + } + } + + } + } + } + return actionSet; + } private HierarchicalActionSet createActionSet(Action act, Action parentAct, HierarchicalActionSet parent) { From 7751215257fda91521443dd204fffc29a6475ab7 Mon Sep 17 00:00:00 2001 From: fixminer Date: Thu, 6 Feb 2020 13:22:35 +0100 Subject: [PATCH 21/41] real test cases --- .../akka/ediff/TestPredefinedCases.java | 77 +- .../fixminer/akka/ediff/TestRealCases.java | 964 ++++++++++++++++++ 2 files changed, 1030 insertions(+), 11 deletions(-) create mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java index 9c59aa6..caed26b 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestPredefinedCases.java @@ -41,11 +41,11 @@ public class TestPredefinedCases { List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); hierarchicalActionSets.size(); - Assert.assertEquals(hierarchicalActionSets.toString(),"[UPD if@@x >= 5 y += 4 @TO@ x > 5 y += 4 @AT@ 2 @LENGTH@ 13\n" + + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if x >= 5 y += 4 @TO@ if x > 5 y += 4 @AT@ 2 @LENGTH@ 16\n" + "---UPD condition@@x >= 5 @TO@ x > 5 @AT@ 2 @LENGTH@ 9\n" + "------UPD expr@@x >= 5 @TO@ x > 5 @AT@ 3 @LENGTH@ 6\n" + - "---------UPD operator@@>= @TO@ > @AT@ 5 @LENGTH@ 2\n" + - "]"); + "---------UPD operator@@>= @TO@ > @AT@ 5 @LENGTH@ 2\n"); } @Test @@ -66,9 +66,9 @@ public class TestPredefinedCases { List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); hierarchicalActionSets.size(); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@i = 0 i < max i ++ line ] == ' ' line ] == '\\t' tab ++ @TO@ i = 0 i < max i ++ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 4 @LENGTH@ 54\n" + - "---UPD block@@line ] == ' ' line ] == '\\t' tab ++ @TO@ line ] == ' ' space ++ line ] == '\\t' tab ++ @AT@ 26 @LENGTH@ 98\n" + - "------UPD if@@line ] == ' ' @TO@ line ] == ' ' space ++ @AT@ 33 @LENGTH@ 13\n" + + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@i = 0 i < max i ++ if line ] == ' ' if line ] == '\\t' tab ++ @TO@ i = 0 i < max i ++ if line ] == ' ' space ++ if line ] == '\\t' tab ++ @AT@ 4 @LENGTH@ 60\n" + + "---UPD block@@if line ] == ' ' if line ] == '\\t' tab ++ @TO@ if line ] == ' ' space ++ if line ] == '\\t' tab ++ @AT@ 26 @LENGTH@ 98\n" + + "------UPD if@@if line ] == ' ' @TO@ if line ] == ' ' space ++ @AT@ 33 @LENGTH@ 16\n" + "---------UPD then@@ @TO@ space ++ @AT@ 54 @LENGTH@ 0\n" + "------------UPD block@@ @TO@ space ++ @AT@ 54 @LENGTH@ 22\n" + "---------------INS expr_stmt@@space ++ @TO@ block@@ @AT@ 62 @LENGTH@ 8\n" + @@ -82,20 +82,19 @@ public class TestPredefinedCases { public void testWhileCase1() throws IOException { Properties appProps = new Properties(); appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String srcMLPath = appProps.getProperty("srcMLPath", "FORKJOIN"); File revFile = new File("src/main/resource/testFiles/while_example_1.c"); - File prevFile =new File("src/main/resource/testFiles/prev_while_example_1.c"); - + File prevFile = new File("src/main/resource/testFiles/prev_while_example_1.c"); EDiffHunkParser parser = new EDiffHunkParser(); List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); hierarchicalActionSets.size(); - Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.size(), 1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD do@@y = f x x -- print x x > 0 @TO@ y = f x x -- x > 0 @AT@ 0 @LENGTH@ 62\n" + + Assert.assertEquals(hierarchicalActionSets.get(0).toString(), "UPD do@@y = f x x -- print x x > 0 @TO@ y = f x x -- x > 0 @AT@ 0 @LENGTH@ 62\n" + "---UPD block@@y = f x x -- print x @TO@ y = f x x -- @AT@ 3 @LENGTH@ 42\n" + "------DEL expr_stmt@@print x @AT@ 33 @LENGTH@ 7\n" + "---------DEL expr@@print x @AT@ 33 @LENGTH@ 7\n" + @@ -105,9 +104,65 @@ public class TestPredefinedCases { "------------------DEL argument@@x @AT@ 39 @LENGTH@ 1\n" + "---------------------DEL expr@@x @AT@ 39 @LENGTH@ 1\n" + "------------------------DEL name@@x @AT@ 39 @LENGTH@ 1\n"); + } + + @Test + public void testIFRetrun() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + + File revFile = new File("src/main/resource/testFiles/if_return.c"); + File prevFile =new File("src/main/resource/testFiles/prev_if_return.c"); + + + + EDiffHunkParser parser = new EDiffHunkParser(); + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); +// Assert.assertEquals(hierarchicalActionSets.size(),1); + } + @Test + public void testIfElse() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + + File revFile = new File("src/main/resource/testFiles/if_else.c"); + File prevFile =new File("src/main/resource/testFiles/prev_if_else.c"); + + + + EDiffHunkParser parser = new EDiffHunkParser(); + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + // Assert.assertEquals(hierarchicalActionSets.size(),1); + } + + @Test + public void testStruct() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + + File revFile = new File("src/main/resource/testFiles/struct.c"); + File prevFile =new File("src/main/resource/testFiles/prev_struct.c"); + + + + EDiffHunkParser parser = new EDiffHunkParser(); + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + // Assert.assertEquals(hierarchicalActionSets.size(),1); } + + + } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java new file mode 100644 index 0000000..ec1ce4d --- /dev/null +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java @@ -0,0 +1,964 @@ +package edu.lu.uni.serval.fixminer.akka.ediff; + +import org.junit.Assert; +import org.junit.Test; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.List; +import java.util.Properties; + +public class TestRealCases { + + + + + @Test + public void test_287_A_14208510_14208532() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="287-A-14208510-14208532.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @TO@ for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 184 @LENGTH@ 211\n" + + "---UPD block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @TO@ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 199 @LENGTH@ 347\n" + + "------UPD if@@if d == 3 || h == 3 printf \"YES\" 0 @TO@ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 449 @LENGTH@ 34\n" + + "---------UPD condition@@d == 3 || h == 3 @TO@ d >= 3 || h >= 3 @AT@ 449 @LENGTH@ 15\n" + + "------------UPD expr@@d == 3 || h == 3 @TO@ d >= 3 || h >= 3 @AT@ 450 @LENGTH@ 16\n" + + "---------------UPD operator@@== @TO@ >= @AT@ 451 @LENGTH@ 2\n" + + "---------------UPD operator@@== @TO@ >= @AT@ 459 @LENGTH@ 2\n" + + "------INS expr_stmt@@d = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @AT@ 548 @LENGTH@ 5\n" + + "---------INS expr@@d = 0 @TO@ expr_stmt@@d = 0 @AT@ 548 @LENGTH@ 5\n" + + "------------INS name@@d @TO@ expr@@d = 0 @AT@ 548 @LENGTH@ 1\n" + + "------------INS operator@@= @TO@ expr@@d = 0 @AT@ 549 @LENGTH@ 1\n" + + "------------INS literal@@0 @TO@ expr@@d = 0 @AT@ 550 @LENGTH@ 1\n" + + "------INS expr_stmt@@h = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @AT@ 553 @LENGTH@ 5\n" + + "---------INS expr@@h = 0 @TO@ expr_stmt@@h = 0 @AT@ 553 @LENGTH@ 5\n" + + "------------INS name@@h @TO@ expr@@h = 0 @AT@ 553 @LENGTH@ 1\n" + + "------------INS operator@@= @TO@ expr@@h = 0 @AT@ 554 @LENGTH@ 1\n" + + "------------INS literal@@0 @TO@ expr@@h = 0 @AT@ 555 @LENGTH@ 1\n"); + + } + + @Test + public void test_287_A_14208521_14208532() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="287-A-14208521-14208532.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @TO@ for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 184 @LENGTH@ 211\n" + + "---UPD block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @TO@ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 199 @LENGTH@ 347\n" + + "------INS expr_stmt@@d = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 548 @LENGTH@ 5\n" + + "---------INS expr@@d = 0 @TO@ expr_stmt@@d = 0 @AT@ 548 @LENGTH@ 5\n" + + "------------INS name@@d @TO@ expr@@d = 0 @AT@ 548 @LENGTH@ 1\n" + + "------------INS operator@@= @TO@ expr@@d = 0 @AT@ 549 @LENGTH@ 1\n" + + "------------INS literal@@0 @TO@ expr@@d = 0 @AT@ 550 @LENGTH@ 1\n" + + "------INS expr_stmt@@h = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 553 @LENGTH@ 5\n" + + "---------INS expr@@h = 0 @TO@ expr_stmt@@h = 0 @AT@ 553 @LENGTH@ 5\n" + + "------------INS name@@h @TO@ expr@@h = 0 @AT@ 553 @LENGTH@ 1\n" + + "------------INS operator@@= @TO@ expr@@h = 0 @AT@ 554 @LENGTH@ 1\n" + + "------------INS literal@@0 @TO@ expr@@h = 0 @AT@ 555 @LENGTH@ 1\n"); + + } + + @Test + public void test_189_1682083_1682218() throws IOException { + //TODO + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="189-B-1682083-1682218.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); +// Assert.assertFalse(true); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for j = 1 j < h j ++ k = i k = MIN k w - i t = j k = MIN k h - j ans += k * t @TO@ for j = 1 j < h j ++ k = i k = MIN k w - i t = j t = MIN t h - j ans += k * t @AT@ 174 @LENGTH@ 77\n" + + "---UPD block@@k = i k = MIN k w - i t = j k = MIN k h - j ans += k * t @TO@ k = i k = MIN k w - i t = j t = MIN t h - j ans += k * t @AT@ 195 @LENGTH@ 104\n" + + "------UPD expr_stmt@@k = MIN k h - j @TO@ t = MIN t h - j @AT@ 254 @LENGTH@ 15\n" + + "---------UPD expr@@k = MIN k h - j @TO@ t = MIN t h - j @AT@ 254 @LENGTH@ 15\n" + + "------------UPD name@@k @TO@ t @AT@ 254 @LENGTH@ 1\n" + + "------------UPD call@@MIN k h - j @TO@ MIN t h - j @AT@ 258 @LENGTH@ 11\n" + + "---------------UPD argument_list@@k h - j @TO@ t h - j @AT@ 261 @LENGTH@ 11\n" + + "------------------UPD argument@@k @TO@ t @AT@ 262 @LENGTH@ 1\n" + + "---------------------UPD expr@@k @TO@ t @AT@ 262 @LENGTH@ 1\n" + + "------------------------UPD name@@k @TO@ t @AT@ 262 @LENGTH@ 1\n"); + + } + + + @Test + public void test_177_A2_1594730_1595168() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="177-A2-1594730-1595168.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if i == ( n - 1 ) / 2 && j == ( n - 1 ) / 2 mid = a @TO@ if i == ( n + 1 ) / 2 && j == ( n + 1 ) / 2 mid = a @AT@ 350 @LENGTH@ 51\n" + + "---UPD condition@@i == ( n - 1 ) / 2 && j == ( n - 1 ) / 2 @TO@ i == ( n + 1 ) / 2 && j == ( n + 1 ) / 2 @AT@ 350 @LENGTH@ 27\n" + + "------UPD expr@@i == ( n - 1 ) / 2 && j == ( n - 1 ) / 2 @TO@ i == ( n + 1 ) / 2 && j == ( n + 1 ) / 2 @AT@ 351 @LENGTH@ 40\n" + + "---------UPD operator@@- @TO@ + @AT@ 356 @LENGTH@ 1\n" + + "---------UPD operator@@- @TO@ + @AT@ 370 @LENGTH@ 1\n"); + + } + + @Test + public void test_680_A_18343132_18343191() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="680-A-18343132-18343191.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),2); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if b ][a ][i == 3 max = 3 * a ][i break; @TO@ if b ][a ][i >= 3 max = 3 * a ][i break; @AT@ 176 @LENGTH@ 40\n" + + "---UPD condition@@b ][a ][i == 3 @TO@ b ][a ][i >= 3 @AT@ 176 @LENGTH@ 13\n" + + "------UPD expr@@b ][a ][i == 3 @TO@ b ][a ][i >= 3 @AT@ 177 @LENGTH@ 14\n" + + "---------UPD operator@@== @TO@ >= @AT@ 184 @LENGTH@ 2\n"); + Assert.assertEquals(hierarchicalActionSets.get(1).toString(),"UPD if@@if temp > max max = temp break; @TO@ if temp > max max = temp @AT@ 270 @LENGTH@ 31\n" + + "---UPD then@@max = temp break; @TO@ max = temp @AT@ 282 @LENGTH@ 17\n" + + "------UPD block@@max = temp break; @TO@ max = temp @AT@ 282 @LENGTH@ 24\n" + + "---------DEL break@@break; @AT@ 296 @LENGTH@ 6\n"); + + } + + @Test + public void test_245_D_3671804_3671831() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="245-D-3671804-3671831.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if i != j @TO@ if i != j ans |= a @AT@ 186 @LENGTH@ 9\n" + + "---UPD then@@ @TO@ ans |= a @AT@ 192 @LENGTH@ 0\n" + + "------UPD block@@ @TO@ ans |= a @AT@ 192 @LENGTH@ 0\n" + + "---------DEL empty_stmt@@ @AT@ 192 @LENGTH@ 0\n" + + "---------MOV expr_stmt@@ans |= a @TO@ block@@ @AT@ 194 @LENGTH@ 8\n"); + + } + + @Test + public void test_197_B_18221952_18221968() throws IOException { + //TODO not sure + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="197-B-18221952-18221968.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if a ][0 % i == 0 && b ][0 % i == 0 a ][0 /= i b ][0 /= i @TO@ if a ][0 % i == 0 && b ][0 % i == 0 a ][0 /= i b ][0 /= i i -- @AT@ 742 @LENGTH@ 57\n" + + "---UPD then@@a ][0 /= i b ][0 /= i @TO@ a ][0 /= i b ][0 /= i i -- @AT@ 779 @LENGTH@ 21\n" + + "------UPD block@@a ][0 /= i b ][0 /= i @TO@ a ][0 /= i b ][0 /= i i -- @AT@ 779 @LENGTH@ 66\n" + + "---------INS expr_stmt@@i -- @TO@ block@@a ][0 /= i b ][0 /= i @AT@ 831 @LENGTH@ 4\n" + + "------------INS expr@@i -- @TO@ expr_stmt@@i -- @AT@ 831 @LENGTH@ 4\n" + + "---------------INS name@@i @TO@ expr@@i -- @AT@ 831 @LENGTH@ 1\n" + + "---------------INS operator@@-- @TO@ expr@@i -- @AT@ 832 @LENGTH@ 2\n"); + + } + + @Test + public void test_474_A_15226851_15226912() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="474-A-15226851-15226912.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if str ][i == s ][j str ][i = s ][j + 1 @TO@ if str ][i == s ][j j ++ str ][i = s ][j @AT@ 546 @LENGTH@ 39\n" + + "---UPD then@@str ][i = s ][j + 1 @TO@ j ++ str ][i = s ][j @AT@ 560 @LENGTH@ 19\n" + + "------UPD block@@str ][i = s ][j + 1 @TO@ j ++ str ][i = s ][j @AT@ 560 @LENGTH@ 55\n" + + "---------INS expr_stmt@@j ++ @TO@ block@@str ][i = s ][j + 1 @AT@ 582 @LENGTH@ 4\n" + + "------------INS expr@@j ++ @TO@ expr_stmt@@j ++ @AT@ 582 @LENGTH@ 4\n" + + "---------------INS name@@j @TO@ expr@@j ++ @AT@ 582 @LENGTH@ 1\n" + + "---------------INS operator@@++ @TO@ expr@@j ++ @AT@ 583 @LENGTH@ 2\n" + + "---------UPD expr_stmt@@str ][i = s ][j + 1 @TO@ str ][i = s ][j @AT@ 582 @LENGTH@ 19\n" + + "------------UPD expr@@str ][i = s ][j + 1 @TO@ str ][i = s ][j @AT@ 582 @LENGTH@ 19\n" + + "---------------UPD name@@s ][j + 1 @TO@ s ][j @AT@ 589 @LENGTH@ 9\n" + + "------------------UPD index@@][j + 1 @TO@ ][j @AT@ 591 @LENGTH@ 7\n" + + "---------------------UPD expr@@[j + 1 @TO@ [j @AT@ 591 @LENGTH@ 6\n" + + "------------------------DEL operator@@+ @AT@ 592 @LENGTH@ 1\n" + + "------------------------DEL literal@@1 @AT@ 593 @LENGTH@ 1\n"); + + } + + @Test + public void test_469_B_8248222_8248281() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="469-B-8248222-8248281.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if temp1 < r && temp2 > l for k = temp1 k <= temp2 k ++ t ][k = 1 @TO@ if temp1 <= r && temp2 >= l for k = temp1 k <= temp2 k ++ t ][k = 1 @AT@ 432 @LENGTH@ 65\n" + + "---UPD condition@@temp1 < r && temp2 > l @TO@ temp1 <= r && temp2 >= l @AT@ 432 @LENGTH@ 19\n" + + "------UPD expr@@temp1 < r && temp2 > l @TO@ temp1 <= r && temp2 >= l @AT@ 433 @LENGTH@ 22\n" + + "---------UPD operator@@< @TO@ <= @AT@ 438 @LENGTH@ 1\n" + + "---------UPD operator@@> @TO@ >= @AT@ 447 @LENGTH@ 1\n"); + + } + + @Test + public void test_189_B_17295034_17295064() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="189-B-17295034-17295064.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for b = 2 b <= w b += 2 count += ( w - a + 1 ) * ( h - b + 1 ) @TO@ for b = 2 b <= h b += 2 count += ( w - a + 1 ) * ( h - b + 1 ) @AT@ 183 @LENGTH@ 62\n" + + "---UPD control@@b = 2 b <= w b += 2 @TO@ b = 2 b <= h b += 2 @AT@ 183 @LENGTH@ 16\n" + + "------UPD condition@@b <= w @TO@ b <= h @AT@ 188 @LENGTH@ 6\n" + + "---------UPD expr@@b <= w @TO@ b <= h @AT@ 188 @LENGTH@ 6\n" + + "------------UPD name@@w @TO@ h @AT@ 191 @LENGTH@ 1\n"); + + } + + @Test + public void test_244_B_5291533_5291541() throws IOException { + //TODO not sure + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="244-B-5291533-5291541.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if a <= 101 printf \"%d\\n\" a elseif if a == 123 printf \"113\\n\" elseif if a == 1000 printf \"352\\n\" elseif if a == 1000000000 printf \"40744\\n\" elseif if a == 999999999 printf \"40743\\n\" elseif if a == 999999998 printf \"40742\\n\" elseif if a == 999999997 printf \"40741\\n\" elseif if a == 909090901 printf \"38532\\n\" elseif if a == 142498040 printf \"21671\\n\" elseif if a == 603356456 printf \"31623\\n\" elseif if a == 64214872 printf \"15759\\n\" elseif if a == 820040584 printf \"36407\\n\" elseif if a == 442198 printf \"3071\\n\" elseif if a == 642678 printf \"3615\\n\" elseif if a == 468390 printf \"3223\\n\" elseif if a == 326806 printf \"2759\\n\" elseif if a == 940 printf \"331\\n\" elseif if a == 356 printf \"175\\n\" elseif if a == 132 printf \"114\\n\" elseif if a == 102 printf \"101\\n\" @TO@ if a <= 101 printf \"%d\\n\" a elseif if a == 123 printf \"113\\n\" elseif if a == 1000 printf \"352\\n\" elseif if a == 1000000000 printf \"40744\\n\" elseif if a == 999999999 printf \"40743\\n\" elseif if a == 999999998 printf \"40742\\n\" elseif if a == 999999997 printf \"40741\\n\" elseif if a == 909090901 printf \"38532\\n\" elseif if a == 142498040 printf \"21671\\n\" elseif if a == 603356456 printf \"31623\\n\" elseif if a == 64214872 printf \"15759\\n\" elseif if a == 820040584 printf \"36407\\n\" elseif if a == 442198 printf \"3071\\n\" elseif if a == 784262 printf \"4079\\n\" elseif if a == 642678 printf \"3615\\n\" elseif if a == 468390 printf \"3223\\n\" elseif if a == 326806 printf \"2759\\n\" elseif if a == 940 printf \"331\\n\" elseif if a == 356 printf \"175\\n\" elseif if a == 132 printf \"114\\n\" elseif if a == 102 printf \"101\\n\" @AT@ 110 @LENGTH@ 762\n" + + "---INS elseif@@elseif if a == 784262 printf \"4079\\n\" @TO@ if@@if a <= 101 printf \"%d\\n\" a elseif if a == 123 printf \"113\\n\" elseif if a == 1000 printf \"352\\n\" elseif if a == 1000000000 printf \"40744\\n\" elseif if a == 999999999 printf \"40743\\n\" elseif if a == 999999998 printf \"40742\\n\" elseif if a == 999999997 printf \"40741\\n\" elseif if a == 909090901 printf \"38532\\n\" elseif if a == 142498040 printf \"21671\\n\" elseif if a == 603356456 printf \"31623\\n\" elseif if a == 64214872 printf \"15759\\n\" elseif if a == 820040584 printf \"36407\\n\" elseif if a == 442198 printf \"3071\\n\" elseif if a == 642678 printf \"3615\\n\" elseif if a == 468390 printf \"3223\\n\" elseif if a == 326806 printf \"2759\\n\" elseif if a == 940 printf \"331\\n\" elseif if a == 356 printf \"175\\n\" elseif if a == 132 printf \"114\\n\" elseif if a == 102 printf \"101\\n\" @AT@ 877 @LENGTH@ 37\n" + + "------INS if@@if a == 784262 printf \"4079\\n\" @TO@ elseif@@elseif if a == 784262 printf \"4079\\n\" @AT@ 877 @LENGTH@ 30\n" + + "---------INS condition@@a == 784262 @TO@ if@@if a == 784262 printf \"4079\\n\" @AT@ 877 @LENGTH@ 12\n" + + "------------INS expr@@a == 784262 @TO@ condition@@a == 784262 @AT@ 878 @LENGTH@ 11\n" + + "---------------INS name@@a @TO@ expr@@a == 784262 @AT@ 878 @LENGTH@ 1\n" + + "---------------INS operator@@== @TO@ expr@@a == 784262 @AT@ 879 @LENGTH@ 2\n" + + "---------------INS literal@@784262 @TO@ expr@@a == 784262 @AT@ 881 @LENGTH@ 6\n" + + "---------INS then@@printf \"4079\\n\" @TO@ if@@if a == 784262 printf \"4079\\n\" @AT@ 901 @LENGTH@ 15\n" + + "------------INS block@@printf \"4079\\n\" @TO@ then@@printf \"4079\\n\" @AT@ 901 @LENGTH@ 15\n" + + "---------------INS expr_stmt@@printf \"4079\\n\" @TO@ block@@printf \"4079\\n\" @AT@ 901 @LENGTH@ 15\n" + + "------------------INS expr@@printf \"4079\\n\" @TO@ expr_stmt@@printf \"4079\\n\" @AT@ 901 @LENGTH@ 15\n" + + "---------------------INS call@@printf \"4079\\n\" @TO@ expr@@printf \"4079\\n\" @AT@ 901 @LENGTH@ 15\n" + + "------------------------INS name@@printf @TO@ call@@printf \"4079\\n\" @AT@ 901 @LENGTH@ 6\n" + + "------------------------INS argument_list@@\"4079\\n\" @TO@ call@@printf \"4079\\n\" @AT@ 907 @LENGTH@ 11\n" + + "---------------------------INS argument@@\"4079\\n\" @TO@ argument_list@@\"4079\\n\" @AT@ 908 @LENGTH@ 8\n" + + "------------------------------INS expr@@\"4079\\n\" @TO@ argument@@\"4079\\n\" @AT@ 908 @LENGTH@ 8\n" + + "---------------------------------INS literal@@\"4079\\n\" @TO@ expr@@\"4079\\n\" @AT@ 908 @LENGTH@ 8\n"); + + } + @Test + public void test_166_C_1395587_1395933() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="166-C-1395587-1395933.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if array ][( n + 1 ) / 2 == x printf \"0\\n\" elseif if last < ( n + 1 ) / 2 printf \"%d\\n\" n - 2 * last elseif if first > ( n + 1 ) / 2 printf \"%d\\n\" 2 * first - n - 1 @TO@ if array ][( n + 1 ) / 2 - 1 == x printf \"0\\n\" elseif if last < ( n + 1 ) / 2 printf \"%d\\n\" n - 2 * last elseif if first > ( n + 1 ) / 2 printf \"%d\\n\" 2 * first - n - 1 elseif if n == 1 printf \"0\\n\" @AT@ 771 @LENGTH@ 164\n" + + "---UPD condition@@array ][( n + 1 ) / 2 == x @TO@ array ][( n + 1 ) / 2 - 1 == x @AT@ 771 @LENGTH@ 20\n" + + "------UPD expr@@array ][( n + 1 ) / 2 == x @TO@ array ][( n + 1 ) / 2 - 1 == x @AT@ 772 @LENGTH@ 26\n" + + "---------UPD name@@array ][( n + 1 ) / 2 @TO@ array ][( n + 1 ) / 2 - 1 @AT@ 772 @LENGTH@ 21\n" + + "------------UPD index@@][( n + 1 ) / 2 @TO@ ][( n + 1 ) / 2 - 1 @AT@ 778 @LENGTH@ 15\n" + + "---------------UPD expr@@[( n + 1 ) / 2 @TO@ [( n + 1 ) / 2 - 1 @AT@ 778 @LENGTH@ 14\n" + + "------------------INS operator@@- @TO@ expr@@[( n + 1 ) / 2 @AT@ 785 @LENGTH@ 1\n" + + "------------------INS literal@@1 @TO@ expr@@[( n + 1 ) / 2 @AT@ 786 @LENGTH@ 1\n" + + "---INS elseif@@elseif if n == 1 printf \"0\\n\" @TO@ if@@if array ][( n + 1 ) / 2 == x printf \"0\\n\" elseif if last < ( n + 1 ) / 2 printf \"%d\\n\" n - 2 * last elseif if first > ( n + 1 ) / 2 printf \"%d\\n\" 2 * first - n - 1 @AT@ 925 @LENGTH@ 29\n" + + "------INS if@@if n == 1 printf \"0\\n\" @TO@ elseif@@elseif if n == 1 printf \"0\\n\" @AT@ 925 @LENGTH@ 22\n" + + "---------INS condition@@n == 1 @TO@ if@@if n == 1 printf \"0\\n\" @AT@ 925 @LENGTH@ 7\n" + + "------------INS expr@@n == 1 @TO@ condition@@n == 1 @AT@ 926 @LENGTH@ 6\n" + + "---------------INS name@@n @TO@ expr@@n == 1 @AT@ 926 @LENGTH@ 1\n" + + "---------------INS operator@@== @TO@ expr@@n == 1 @AT@ 927 @LENGTH@ 2\n" + + "---------------INS literal@@1 @TO@ expr@@n == 1 @AT@ 929 @LENGTH@ 1\n" + + "---------INS then@@printf \"0\\n\" @TO@ if@@if n == 1 printf \"0\\n\" @AT@ 932 @LENGTH@ 12\n" + + "------------INS block@@printf \"0\\n\" @TO@ then@@printf \"0\\n\" @AT@ 932 @LENGTH@ 12\n" + + "---------------INS expr_stmt@@printf \"0\\n\" @TO@ block@@printf \"0\\n\" @AT@ 932 @LENGTH@ 12\n" + + "------------------INS expr@@printf \"0\\n\" @TO@ expr_stmt@@printf \"0\\n\" @AT@ 932 @LENGTH@ 12\n" + + "---------------------INS call@@printf \"0\\n\" @TO@ expr@@printf \"0\\n\" @AT@ 932 @LENGTH@ 12\n" + + "------------------------INS name@@printf @TO@ call@@printf \"0\\n\" @AT@ 932 @LENGTH@ 6\n" + + "------------------------INS argument_list@@\"0\\n\" @TO@ call@@printf \"0\\n\" @AT@ 938 @LENGTH@ 8\n" + + "---------------------------INS argument@@\"0\\n\" @TO@ argument_list@@\"0\\n\" @AT@ 939 @LENGTH@ 5\n" + + "------------------------------INS expr@@\"0\\n\" @TO@ argument@@\"0\\n\" @AT@ 939 @LENGTH@ 5\n" + + "---------------------------------INS literal@@\"0\\n\" @TO@ expr@@\"0\\n\" @AT@ 939 @LENGTH@ 5\n"); + + } + + @Test + public void test_315_A_6149995_6150754() throws IOException { + //TODO not sure + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="315-A-6149995-6150754.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if a ][j == t ans -- @TO@ if a ][j == t ans -- a ][j = 0 @AT@ 302 @LENGTH@ 20\n" + + "---UPD then@@ans -- @TO@ ans -- a ][j = 0 @AT@ 332 @LENGTH@ 6\n" + + "------UPD block@@ans -- @TO@ ans -- a ][j = 0 @AT@ 332 @LENGTH@ 6\n" + + "---------INS expr_stmt@@a ][j = 0 @TO@ block@@ans -- @AT@ 377 @LENGTH@ 9\n" + + "------------INS expr@@a ][j = 0 @TO@ expr_stmt@@a ][j = 0 @AT@ 377 @LENGTH@ 9\n" + + "---------------INS name@@a ][j @TO@ expr@@a ][j = 0 @AT@ 377 @LENGTH@ 5\n" + + "------------------INS name@@a @TO@ name@@a ][j @AT@ 377 @LENGTH@ 1\n" + + "------------------INS index@@][j @TO@ name@@a ][j @AT@ 379 @LENGTH@ 3\n" + + "---------------------INS expr@@[j @TO@ index@@][j @AT@ 379 @LENGTH@ 2\n" + + "------------------------INS name@@[j @TO@ expr@@[j @AT@ 379 @LENGTH@ 2\n" + + "---------------INS operator@@= @TO@ expr@@a ][j = 0 @AT@ 381 @LENGTH@ 1\n" + + "---------------INS literal@@0 @TO@ expr@@a ][j = 0 @AT@ 382 @LENGTH@ 1\n"); + + } + + @Test + public void test_158_A_18237828_18237840() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="158-A-18237828-18237840.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ara ][i >= ara ][k - 1 count ++ @TO@ if ara ][i >= ara ][k - 1 && ara ][i != 0 count ++ @AT@ 219 @LENGTH@ 34\n" + + "---UPD condition@@ara ][i >= ara ][k - 1 @TO@ ara ][i >= ara ][k - 1 && ara ][i != 0 @AT@ 219 @LENGTH@ 19\n" + + "------UPD expr@@ara ][i >= ara ][k - 1 @TO@ ara ][i >= ara ][k - 1 && ara ][i != 0 @AT@ 220 @LENGTH@ 22\n" + + "---------INS operator@@&& @TO@ expr@@ara ][i >= ara ][k - 1 @AT@ 236 @LENGTH@ 2\n" + + "---------INS name@@ara ][i @TO@ expr@@ara ][i >= ara ][k - 1 @AT@ 239 @LENGTH@ 7\n" + + "------------INS name@@ara @TO@ name@@ara ][i @AT@ 239 @LENGTH@ 3\n" + + "------------INS index@@][i @TO@ name@@ara ][i @AT@ 243 @LENGTH@ 3\n" + + "---------------INS expr@@[i @TO@ index@@][i @AT@ 243 @LENGTH@ 2\n" + + "------------------INS name@@[i @TO@ expr@@[i @AT@ 243 @LENGTH@ 2\n" + + "---------INS operator@@!= @TO@ expr@@ara ][i >= ara ][k - 1 @AT@ 245 @LENGTH@ 2\n" + + "---------INS literal@@0 @TO@ expr@@ara ][i >= ara ][k - 1 @AT@ 247 @LENGTH@ 1\n"); + + } + + @Test + public void test_405_B_9434593_9434605() throws IOException { + //TODO not sure + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="405-B-9434593-9434605.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if input ][0 == '.' count = 1 @TO@ if input ][0 == '.' count = 1 else i1 = 0 @AT@ 260 @LENGTH@ 29\n" + + "---INS else@@else i1 = 0 @TO@ if@@if input ][0 == '.' count = 1 @AT@ 295 @LENGTH@ 11\n" + + "------INS block@@i1 = 0 @TO@ else@@else i1 = 0 @AT@ 295 @LENGTH@ 6\n" + + "---------INS expr_stmt@@i1 = 0 @TO@ block@@i1 = 0 @AT@ 295 @LENGTH@ 6\n" + + "------------INS expr@@i1 = 0 @TO@ expr_stmt@@i1 = 0 @AT@ 295 @LENGTH@ 6\n" + + "---------------INS name@@i1 @TO@ expr@@i1 = 0 @AT@ 295 @LENGTH@ 2\n" + + "---------------INS operator@@= @TO@ expr@@i1 = 0 @AT@ 297 @LENGTH@ 1\n" + + "---------------INS literal@@0 @TO@ expr@@i1 = 0 @AT@ 298 @LENGTH@ 1\n"); + + } + + + @Test + public void test_489_A_9343123_9343126() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="489-A-9343123-9343126.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ZA ][d < ZA ][c d = c @TO@ if ZA ][d > ZA ][c d = c @AT@ 252 @LENGTH@ 24\n" + + "---UPD condition@@ZA ][d < ZA ][c @TO@ ZA ][d > ZA ][c @AT@ 252 @LENGTH@ 16\n" + + "------UPD expr@@ZA ][d < ZA ][c @TO@ ZA ][d > ZA ][c @AT@ 253 @LENGTH@ 15\n" + + "---------UPD operator@@< @TO@ > @AT@ 259 @LENGTH@ 1\n"); + + } + + @Test + public void test_143_A_17964626_17964657() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="143-A-17964626-17964657.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for a = 1 a < ( r1 % 10 ) a ++ for i = 1 i <= 1000 i ++ ar ][i = 0 ar ][a = 1 if a >= c1 || a >= d1 continue; b = r1 - a if ar ][b == 1 continue; else ar ][b = 1 if b >= c2 || b >= d2 continue; c = c1 - a if ar ][c == 1 continue; else ar ][c = 1 if c >= r2 || c >= d2 continue; d = d1 - a if ar ][d == 1 continue; if d >= r2 || d >= c2 continue; if b + c != d2 continue; if b + d != c2 continue; if c + d != r2 continue; if a > 9 || b > 9 || c > 9 || d > 9 continue; flag = 1 break; @TO@ for a = 1 a < r1 a ++ for i = 1 i <= 1000 i ++ ar ][i = 0 ar ][a = 1 if a >= c1 || a >= d1 continue; b = r1 - a if ar ][b == 1 continue; else ar ][b = 1 if b >= c2 || b >= d2 continue; c = c1 - a if ar ][c == 1 continue; else ar ][c = 1 if c >= r2 || c >= d2 continue; d = d1 - a if ar ][d == 1 continue; if d >= r2 || d >= c2 continue; if b + c != d2 continue; if b + d != c2 continue; if c + d != r2 continue; if a > 9 || b > 9 || c > 9 || d > 9 continue; flag = 1 break; @AT@ 187 @LENGTH@ 482\n" + + "---UPD control@@a = 1 a < ( r1 % 10 ) a ++ @TO@ a = 1 a < r1 a ++ @AT@ 187 @LENGTH@ 22\n" + + "------UPD condition@@a < ( r1 % 10 ) @TO@ a < r1 @AT@ 193 @LENGTH@ 15\n" + + "---------UPD expr@@a < ( r1 % 10 ) @TO@ a < r1 @AT@ 193 @LENGTH@ 15\n" + + "------------DEL operator@@( @AT@ 195 @LENGTH@ 1\n" + + "------------DEL operator@@% @AT@ 198 @LENGTH@ 1\n" + + "------------DEL literal@@10 @AT@ 199 @LENGTH@ 2\n" + + "------------DEL operator@@) @AT@ 201 @LENGTH@ 1\n"); + + } + + + @Test + public void test_612_A_15750192_15750273() throws IOException { + //TODO + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="612-A-15750192-15750273.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for i = p i <= k i ++ printf \"%c\" a ][i @TO@ for i = p i < k i ++ printf \"%c\" a ][i @AT@ 262 @LENGTH@ 39\n" + + "---UPD control@@i = p i <= k i ++ @TO@ i = p i < k i ++ @AT@ 262 @LENGTH@ 15\n" + + "------UPD condition@@i <= k @TO@ i < k @AT@ 267 @LENGTH@ 6\n" + + "---------UPD expr@@i <= k @TO@ i < k @AT@ 267 @LENGTH@ 6\n" + + "------------UPD operator@@<= @TO@ < @AT@ 268 @LENGTH@ 2\n"); + + } + + @Test + public void test_31_B_6435804_6435825() throws IOException { + //TODO + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="31-B-6435804-6435825.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for i = 1 i <= strlen s i ++ if n == - 1 if fl == 1 elseif if s ][i == '@' fl = 1 @TO@ for i = 1 i < strlen s i ++ if n == - 1 if fl == 1 elseif if s ][i == '@' fl = 1 @AT@ 225 @LENGTH@ 81\n" + + "---UPD control@@i = 1 i <= strlen s i ++ @TO@ i = 1 i < strlen s i ++ @AT@ 225 @LENGTH@ 29\n" + + "------UPD condition@@i <= strlen s @TO@ i < strlen s @AT@ 233 @LENGTH@ 13\n" + + "---------UPD expr@@i <= strlen s @TO@ i < strlen s @AT@ 233 @LENGTH@ 13\n" + + "------------UPD operator@@<= @TO@ < @AT@ 235 @LENGTH@ 2\n"); + + } + + @Test + public void test_644_A_18166947_18166954() throws IOException { + //TODO + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="644-A-18166947-18166954.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for i = 0 i < b i ++ for j = 0 j < b j ++ printf \"%lld \" array ][i ][j printf \"\\n\" @TO@ for i = 0 i < a i ++ for j = 0 j < b j ++ printf \"%lld \" array ][i ][j printf \"\\n\" @AT@ 1251 @LENGTH@ 82\n" + + "---UPD control@@i = 0 i < b i ++ @TO@ i = 0 i < a i ++ @AT@ 1251 @LENGTH@ 14\n" + + "------UPD condition@@i < b @TO@ i < a @AT@ 1256 @LENGTH@ 5\n" + + "---------UPD expr@@i < b @TO@ i < a @AT@ 1256 @LENGTH@ 5\n" + + "------------UPD name@@b @TO@ a @AT@ 1258 @LENGTH@ 1\n"); + + } + + @Test + public void test_5_B_10350073_10350082() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="5-B-10350073-10350082.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ! ( ( ml - l ) % 2 ) if right sl += 1 right = 1 - right @TO@ if ( ml - l ) % 2 if right sl += 1 right = 1 - right @AT@ 515 @LENGTH@ 58\n" + + "---UPD condition@@! ( ( ml - l ) % 2 ) @TO@ ( ml - l ) % 2 @AT@ 515 @LENGTH@ 18\n" + + "------UPD expr@@! ( ( ml - l ) % 2 ) @TO@ ( ml - l ) % 2 @AT@ 516 @LENGTH@ 20\n" + + "---------DEL operator@@! @AT@ 516 @LENGTH@ 1\n" + + "---------DEL operator@@( @AT@ 518 @LENGTH@ 1\n" + + "---------DEL operator@@) @AT@ 530 @LENGTH@ 1\n"); + + } + + @Test + public void test_675_A_18211752_18211767() throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="675-A-18211752-18211767.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"MOV return@@0 @TO@ block@@ @AT@ 242 @LENGTH@ 10\n"); + + } + + @Test + public void test_158_A_18278572_18278586() throws IOException { + //TODO + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="158-A-18278572-18278586.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD while@@while a ][i >= a ][k && i <= n count ++ i ++ @TO@ while a ][i >= a ][k && i <= n && a ][i != 0 count ++ i ++ @AT@ 501 @LENGTH@ 44\n" + + "---UPD condition@@a ][i >= a ][k && i <= n @TO@ a ][i >= a ][k && i <= n && a ][i != 0 @AT@ 501 @LENGTH@ 19\n" + + "------UPD expr@@a ][i >= a ][k && i <= n @TO@ a ][i >= a ][k && i <= n && a ][i != 0 @AT@ 502 @LENGTH@ 24\n" + + "---------INS operator@@&& @TO@ expr@@a ][i >= a ][k && i <= n @AT@ 518 @LENGTH@ 2\n" + + "---------INS name@@a ][i @TO@ expr@@a ][i >= a ][k && i <= n @AT@ 520 @LENGTH@ 5\n" + + "------------INS name@@a @TO@ name@@a ][i @AT@ 520 @LENGTH@ 1\n" + + "------------INS index@@][i @TO@ name@@a ][i @AT@ 522 @LENGTH@ 3\n" + + "---------------INS expr@@[i @TO@ index@@][i @AT@ 522 @LENGTH@ 2\n" + + "------------------INS name@@[i @TO@ expr@@[i @AT@ 522 @LENGTH@ 2\n" + + "---------INS operator@@!= @TO@ expr@@a ][i >= a ][k && i <= n @AT@ 524 @LENGTH@ 2\n" + + "---------INS literal@@0 @TO@ expr@@a ][i >= a ][k && i <= n @AT@ 526 @LENGTH@ 1\n"); + + } + + @Test + public void test_31_B_136044_136045() throws IOException { + + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="31-B-136044-136045.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"MOV if@@if flag puts ans + 1 else printf \"No solution\\n\" @TO@ block@@long i l flag 0 tot 0 gets str + 1 l = strlen str + 1 if str ][1 == '@' || str ][l == '@' end for i = 1 i <= l - 2 i ++ if str ][i == '@' && ( str ][i + 1 == '@' || str ][i + 2 == '@' ) end for i = 1 i <= l i ++ if flag && str ][i + 1 == '@' ans ][++ tot = ',' if str ][i == '@' flag = 1 ans ][++ tot = str ][i if flag puts ans + 1 else printf \"No solution\\n\" end 0 @AT@ 937 @LENGTH@ 48\n"); + + } + + @Test + public void test_432_A_16886797_16886828() throws IOException { + + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="432-A-16886797-16886828.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"MOV if@@if z <= 5 - y s ++ @TO@ block@@scanf \"%d\" & z @AT@ 132 @LENGTH@ 18\n"); + } + + @Test + public void test_507_A_16886367_16886377() throws IOException { + //TODO macro + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="507-A-16886367-16886377.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD function@@int main int argc char * argv [] int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 n printf \"%d \" a ][j 0 @TO@ int main int argc char * argv [] int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 i printf \"%d \" a ][j 0 @AT@ 237 @LENGTH@ 382\n" + + "---UPD block@@int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 n printf \"%d \" a ][j 0 @TO@ int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 i printf \"%d \" a ][j 0 @AT@ 270 @LENGTH@ 491\n" + + "------UPD macro@@FOR j 0 n @TO@ FOR j 0 i @AT@ 701 @LENGTH@ 9\n" + + "---------UPD argument_list@@j 0 n @TO@ j 0 i @AT@ 704 @LENGTH@ 8\n" + + "------------UPD argument@@n @TO@ i @AT@ 709 @LENGTH@ 1\n"); + } + + @Test + public void test_25_D_110126_110132() throws IOException { + //TODO macro + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="25-D-110126-110132.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD function@@int main int argc char * argv [] int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i m cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @TO@ int main int argc char * argv [] int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i n cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @AT@ 379 @LENGTH@ 869\n" + + "---UPD block@@int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i m cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @TO@ int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i n cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @AT@ 411 @LENGTH@ 955\n" + + "------UPD macro@@rep i m @TO@ rep i n @AT@ 746 @LENGTH@ 7\n" + + "---------UPD argument_list@@i m @TO@ i n @AT@ 749 @LENGTH@ 6\n" + + "------------UPD argument@@m @TO@ n @AT@ 752 @LENGTH@ 1\n"); + } + + @Test + public void test_490_A_14580360_14580456() throws IOException { + //TODO + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename ="490-A-14580360-14580456.c"; + + File revFile = new File(root + "revFiles/"+ filename); + File prevFile =new File(root + "prevFiles/prev_"+filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(),1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD function@@int main int argc char * argv [] int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x elseif if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @TO@ int main int argc char * argv [] int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @AT@ 18 @LENGTH@ 435\n" + + "---UPD block@@int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x elseif if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @TO@ int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @AT@ 51 @LENGTH@ 642\n" + + "------UPD if@@if x < min min = x elseif if y < min min = y @TO@ if x < min min = x @AT@ 507 @LENGTH@ 44\n" + + "---------DEL elseif@@elseif if y < min min = y @AT@ 548 @LENGTH@ 25\n" + + "------MOV if@@if y < min min = y @TO@ block@@int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x elseif if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @AT@ 548 @LENGTH@ 18\n"); + } + + @Test + public void test_336_A_11394760_11394769() throws IOException { + //TODO + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath", "FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename = "336-A-11394760-11394769.c"; + + File revFile = new File(root + "revFiles/" + filename); + File prevFile = new File(root + "prevFiles/prev_" + filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(), "UPD function@@int main int argc char * argv [] ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @TO@ int main int argc char * argv [] ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @AT@ 39 @LENGTH@ 390\n" + + "---UPD block@@ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @TO@ ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @AT@ 72 @LENGTH@ 493\n" + + "------DEL if@@if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero @AT@ 146 @LENGTH@ 72\n" + + "------UPD if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @TO@ if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 245 @LENGTH@ 240\n" + + "---------MOV condition@@x >= 0 && y >= 0 @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 146 @LENGTH@ 13\n" + + "---------MOV then@@printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 165 @LENGTH@ 52\n" + + "---------INS elseif@@elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 250 @LENGTH@ 88\n" + + "------------INS if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @TO@ elseif@@elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @AT@ 250 @LENGTH@ 81\n" + + "---------------MOV condition@@x < 0 && y >= 0 @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @AT@ 245 @LENGTH@ 12\n" + + "---------------MOV then@@printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @AT@ 263 @LENGTH@ 62\n"); + } + + @Test + public void test_328_B_4080800_4080805() throws IOException { + + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath", "FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename = "328-B-4080800-4080805.c"; + + File revFile = new File(root + "revFiles/" + filename); + File prevFile = new File(root + "prevFiles/prev_" + filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + hierarchicalActionSets.size(); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(), "DEL for@@for i = 0 i < 10 i ++ printf \"%d %d\\n\" num ][i tnum ][i @AT@ 453 @LENGTH@ 55\n" + + "---DEL control@@i = 0 i < 10 i ++ @AT@ 453 @LENGTH@ 15\n" + + "------DEL init@@i = 0 @AT@ 454 @LENGTH@ 5\n" + + "---------DEL expr@@i = 0 @AT@ 454 @LENGTH@ 5\n" + + "------------DEL name@@i @AT@ 454 @LENGTH@ 1\n" + + "------------DEL operator@@= @AT@ 455 @LENGTH@ 1\n" + + "------------DEL literal@@0 @AT@ 456 @LENGTH@ 1\n" + + "------DEL condition@@i < 10 @AT@ 458 @LENGTH@ 6\n" + + "---------DEL expr@@i < 10 @AT@ 458 @LENGTH@ 6\n" + + "------------DEL name@@i @AT@ 458 @LENGTH@ 1\n" + + "------------DEL operator@@< @AT@ 459 @LENGTH@ 1\n" + + "------------DEL literal@@10 @AT@ 460 @LENGTH@ 2\n" + + "------DEL incr@@i ++ @AT@ 463 @LENGTH@ 4\n" + + "---------DEL expr@@i ++ @AT@ 463 @LENGTH@ 4\n" + + "------------DEL name@@i @AT@ 463 @LENGTH@ 1\n" + + "------------DEL operator@@++ @AT@ 464 @LENGTH@ 2\n" + + "---DEL block@@printf \"%d %d\\n\" num ][i tnum ][i @AT@ 467 @LENGTH@ 50\n" + + "------DEL expr_stmt@@printf \"%d %d\\n\" num ][i tnum ][i @AT@ 477 @LENGTH@ 33\n" + + "---------DEL expr@@printf \"%d %d\\n\" num ][i tnum ][i @AT@ 477 @LENGTH@ 33\n" + + "------------DEL call@@printf \"%d %d\\n\" num ][i tnum ][i @AT@ 477 @LENGTH@ 33\n" + + "---------------DEL name@@printf @AT@ 477 @LENGTH@ 6\n" + + "---------------DEL argument_list@@\"%d %d\\n\" num ][i tnum ][i @AT@ 483 @LENGTH@ 27\n" + + "------------------DEL argument@@\"%d %d\\n\" @AT@ 484 @LENGTH@ 9\n" + + "---------------------DEL expr@@\"%d %d\\n\" @AT@ 484 @LENGTH@ 9\n" + + "------------------------DEL literal@@\"%d %d\\n\" @AT@ 484 @LENGTH@ 9\n" + + "------------------DEL argument@@num ][i @AT@ 494 @LENGTH@ 7\n" + + "---------------------DEL expr@@num ][i @AT@ 494 @LENGTH@ 7\n" + + "------------------------DEL name@@num ][i @AT@ 494 @LENGTH@ 7\n" + + "---------------------------DEL name@@num @AT@ 494 @LENGTH@ 3\n" + + "---------------------------DEL index@@][i @AT@ 498 @LENGTH@ 3\n" + + "------------------------------DEL expr@@[i @AT@ 498 @LENGTH@ 2\n" + + "---------------------------------DEL name@@[i @AT@ 498 @LENGTH@ 2\n" + + "------------------DEL argument@@tnum ][i @AT@ 501 @LENGTH@ 8\n" + + "---------------------DEL expr@@tnum ][i @AT@ 501 @LENGTH@ 8\n" + + "------------------------DEL name@@tnum ][i @AT@ 501 @LENGTH@ 8\n" + + "---------------------------DEL name@@tnum @AT@ 501 @LENGTH@ 4\n" + + "---------------------------DEL index@@][i @AT@ 506 @LENGTH@ 3\n" + + "------------------------------DEL expr@@[i @AT@ 506 @LENGTH@ 2\n" + + "---------------------------------DEL name@@[i @AT@ 506 @LENGTH@ 2\n"); + } + + + + +} From faac1391b7e05b3e73e795909f9eacd2bbb7250c Mon Sep 17 00:00:00 2001 From: fixminer Date: Mon, 17 Feb 2020 15:58:40 +0100 Subject: [PATCH 22/41] new miner --- .../edu/lu/uni/serval/fixminer/Launcher.java | 4 +- .../fixminer/akka/ediff/EDiffParser.java | 3 +- .../akka/ediff/HierarchicalRegrouperForC.java | 74 +- .../fixminer/akka/ediff/HunkParserTest.java | 24 +- .../fixminer/akka/ediff/TestIntroClass.java | 446 +++++++++ .../fixminer/akka/ediff/TestRealCases.java | 851 ++++++------------ .../serval/fixminer/jobs/EnhancedASTDiff.java | 12 +- src/main/resource/app.properties | 9 +- src/main/resource/testFiles/if_else.c | 10 + src/main/resource/testFiles/if_return.c | 6 + src/main/resource/testFiles/prev_if_else.c | 9 + src/main/resource/testFiles/prev_if_return.c | 4 + src/main/resource/testFiles/prev_struct.c | 5 + src/main/resource/testFiles/struct.c | 5 + 14 files changed, 837 insertions(+), 625 deletions(-) create mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestIntroClass.java create mode 100644 src/main/resource/testFiles/if_else.c create mode 100644 src/main/resource/testFiles/if_return.c create mode 100644 src/main/resource/testFiles/prev_if_else.c create mode 100644 src/main/resource/testFiles/prev_if_return.c create mode 100644 src/main/resource/testFiles/prev_struct.c create mode 100644 src/main/resource/testFiles/struct.c diff --git a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java index 6438486..edbc261 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/Launcher.java @@ -22,8 +22,8 @@ public class Launcher { Properties appProps = new Properties(); -// String appConfigPath = "/Users/anil.koyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; - String appConfigPath = args[0]; + String appConfigPath = "/Users/anilkoyuncu/projects/fixminer/fixminer_source/src/main/resource/app.properties"; +// String appConfigPath = args[0]; appProps.load(new FileInputStream(appConfigPath)); // String portInner = appProps.getProperty("portInner","6380"); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java index ebb3c1b..bb418c1 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/EDiffParser.java @@ -43,7 +43,8 @@ public class EDiffParser extends Parser { // GumTree results boolean isJava =false; List gumTreeResults = null; - if (revFile.getName().endsWith(".c") & prevFile.getName().endsWith(".c") || revFile.getName().endsWith(".h") & prevFile.getName().endsWith(".h")){ + if (true){ +// if (revFile.getName().endsWith(".c") & prevFile.getName().endsWith(".c") || revFile.getName().endsWith(".h") & prevFile.getName().endsWith(".h")){ // gumTreeResults = new GumTreeComparer().compareCFilesWithGumTree(prevFile, revFile); diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java index 323becd..e36d6bb 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HierarchicalRegrouperForC.java @@ -88,6 +88,7 @@ public class HierarchicalRegrouperForC { for(HierarchicalActionSet a:reActionSets){ HierarchicalActionSet hierarchicalActionSet = removeBlocks(a); hierarchicalActionSet = removeIFthenBlocks(hierarchicalActionSet); + hierarchicalActionSet = removeParentForSingle(hierarchicalActionSet); reActionSets1.add(hierarchicalActionSet); } @@ -97,19 +98,23 @@ public class HierarchicalRegrouperForC { private HierarchicalActionSet removeBlocks(HierarchicalActionSet actionSet){ List subActions = actionSet.getSubActions(); + Action action = actionSet.getAction(); if (subActions.size() == 1){ HierarchicalActionSet subaction = subActions.get(0); + Action action1 = subaction.getAction(); //else,then,block - if(subaction.getAstNodeType().equals("block")){//|| subaction.getAstNodeType().equals("then") || subaction.getAstNodeType().equals("else")){ - List subSubActions = subaction.getSubActions(); - if(subSubActions.size() == 1){ + if(action.getClass().equals(action1.getClass())) { + if (subaction.getAstNodeType().equals("block")) {//|| subaction.getAstNodeType().equals("then") || subaction.getAstNodeType().equals("else")){ + List subSubActions = subaction.getSubActions(); + if (subSubActions.size() == 1) { - HierarchicalActionSet subsubsubAction = subSubActions.get(0); - List keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.StatementMap, subsubsubAction.getAstNodeType()); - if(keysByValue != null && keysByValue.size() ==1){ - subsubsubAction.setParent(null); - return removeBlocks(subsubsubAction); + HierarchicalActionSet subsubsubAction = subSubActions.get(0); + List keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.StatementMap, subsubsubAction.getAstNodeType()); + if (keysByValue != null && keysByValue.size() == 1) { + subsubsubAction.setParent(null); + return removeBlocks(subsubsubAction); + } } } } @@ -117,29 +122,54 @@ public class HierarchicalRegrouperForC { return actionSet; } - private HierarchicalActionSet removeIFthenBlocks(HierarchicalActionSet actionSet){ + + private HierarchicalActionSet removeParentForSingle(HierarchicalActionSet actionSet){ List subActions = actionSet.getSubActions(); + Action action = actionSet.getAction(); if (subActions.size() == 1){ HierarchicalActionSet subaction = subActions.get(0); //else,then,block - if(subaction.getAstNodeType().equals("then")|| subaction.getAstNodeType().equals("else")){//|| subaction.getAstNodeType().equals("then") || subaction.getAstNodeType().equals("else")){ - List subSubActions = subaction.getSubActions(); - if(subSubActions.size() == 1){ + Action action1 = subaction.getAction(); + //else,then,block + if(action.getClass().equals(action1.getClass())) { + if(!(subaction.getAstNodeType().equals("condition") || subaction.getAstNodeType().equals("init"))){ + List keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.StatementMap, subaction.getAstNodeType()); + if(keysByValue != null && keysByValue.size() ==1){ + subaction.setParent(null); + return removeParentForSingle(subaction); + }}} + } + return actionSet; - HierarchicalActionSet subsubsubAction = subSubActions.get(0); - if(subsubsubAction.getAstNodeType().equals("block")){ - List subActions1 = subsubsubAction.getSubActions(); - if (subActions1.size() ==1){ - HierarchicalActionSet hierarchicalActionSet = subActions1.get(0); - List keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.StatementMap, hierarchicalActionSet.getAstNodeType()); - if(keysByValue != null && keysByValue.size() ==1){ - hierarchicalActionSet.setParent(null); - return removeBlocks(hierarchicalActionSet); + } + private HierarchicalActionSet removeIFthenBlocks(HierarchicalActionSet actionSet){ + List subActions = actionSet.getSubActions(); + Action action = actionSet.getAction(); + if (subActions.size() == 1){ + HierarchicalActionSet subaction = subActions.get(0); + //else,then,block + Action action1 = subaction.getAction(); + //else,then,block + if(action.getClass().equals(action1.getClass())) { + if (subaction.getAstNodeType().equals("then") || subaction.getAstNodeType().equals("else")) {//|| subaction.getAstNodeType().equals("then") || subaction.getAstNodeType().equals("else")){ + List subSubActions = subaction.getSubActions(); + if (subSubActions.size() == 1) { + HierarchicalActionSet subsubsubAction = subSubActions.get(0); + if (subsubsubAction.getAstNodeType().equals("block")) { + List subActions1 = subsubsubAction.getSubActions(); + if (subActions1.size() == 1) { + HierarchicalActionSet hierarchicalActionSet = subActions1.get(0); + List keysByValue = NodeMap_new.getKeysByValue(NodeMap_new.StatementMap, hierarchicalActionSet.getAstNodeType()); + if (keysByValue != null && keysByValue.size() == 1) { + hierarchicalActionSet.setParent(null); + return removeBlocks(hierarchicalActionSet); + + } } } - } + } } } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java index 4f9f5ae..3e9f19b 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/HunkParserTest.java @@ -10,6 +10,7 @@ import edu.lu.uni.serval.utils.EDiffHelper; import edu.lu.uni.serval.utils.PoolBuilder; import org.apache.commons.io.FileUtils; import org.javatuples.Pair; +import org.junit.Assert; import org.junit.Test; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; @@ -31,8 +32,8 @@ public class HunkParserTest { public void testSimple() throws IOException { // String input = "/Users/anil.koyuncu/projects/test/fixminer-core/python/data/gumInputLinux/revFiles/7f52f3_3845d29_drivers#pci#host#pcie-altera.c"; -// String root = "/Users/anil.koyuncu/projects/fixminer/gumInputLinux/linux/"; - String root = "/Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux/"; +// String root = "//Users/anilkoyuncu/projects/gumInputLinux/"; + String root = "/Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux/"; String filename =""; // filename ="freebsd_ceca9b8_b864ac4_sys#kern#sched_ule.c"; //too long // filename ="openbsd_e592ec_39c81a_sys#arch#i386#pci#pci_machdep.c"; //not parseable 56 "parameter_list" "" () ( (57 "parameter" "" () ( (22 "decl" "" () ()))) @@ -52,21 +53,21 @@ public class HunkParserTest { // filename ="omp_19fae3_1e4dcd_src#mca#mpool#sm#mpool_sm_mmap.c"; // cannot find // filename ="FFmpeg_a8343bf_2b2039_libavformat#riff.c"; // ok // filename ="freebsd_32766e4_200ff4_sbin#routed#parms.c"; // ok - filename ="openbsd_150ddd_cf0e20_usr.sbin#user#user.c"; //notok - filename ="openbsd_6fac1e_c3b383_usr.bin#tmux#window-copy.c"; //notok - filename ="freebsd_0cb6f2_b4c742_sys#dev#ipw#if_ipw.c"; //notok - filename ="php-src_7defd5_da06f7_ext#mbstring#mbstring.c"; //notok (19 "expr_stmt" "" () ())))) - filename ="libtiff_177169_71715f_tools#tiff2ps.c"; //notok (19 "expr_stmt" "" () ())))) +// filename ="openbsd_150ddd_cf0e20_usr.sbin#user#user.c"; //notok +// filename ="openbsd_6fac1e_c3b383_usr.bin#tmux#window-copy.c"; //notok +// filename ="freebsd_0cb6f2_b4c742_sys#dev#ipw#if_ipw.c"; //notok +// filename ="php-src_7defd5_da06f7_ext#mbstring#mbstring.c"; //notok (19 "expr_stmt" "" () ())))) +// filename ="libtiff_177169_71715f_tools#tiff2ps.c"; //notok (19 "expr_stmt" "" () ())))) filename ="linux_955c1dd_0aaee4_drivers#gpu#drm#i915#gvt#handlers.c"; //notok (19 "expr_stmt" "" () ())))) // filename ="FFmpeg_0726b2_66d2ff_libav#jpeg.c"; String pj = filename.split("_")[0]; filename = filename.replace(pj+"_",""); - root = root + pj + "/"; -// root = root + "codeflaws/"; - +// root = root + pj + "/"; + root = root + "codeflaws/"; + filename ="287-A-14208510-14208532.c"; // filename = "474-A-15925943-15925951.c"; //mot ok // filename = "6-C-11536006-11536039.c"; //okish // filename = "500-A-18298071-18298124.c"; //ok @@ -85,7 +86,7 @@ public class HunkParserTest { EDiffHunkParser parser = new EDiffHunkParser(); - String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML.0.9.5/bin/srcml"; + String srcMLPath = "/usr/local/bin/srcml"; // String srcMLPath = "/Users/anil.koyuncu/Downloads/srcML.0.9.5/bin/srcml"; parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); // ITree t = new SrcmlCppTreeGenerator().generateFromFile(input).getRoot(); @@ -93,6 +94,7 @@ public class HunkParserTest { } + @Test public void dumpFnction() throws Exception { String pattern = "function/20/gstreamer_0af74c_e8bae0_libs#gst#net#gstptpclock.c.txt_0"; diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestIntroClass.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestIntroClass.java new file mode 100644 index 0000000..3a8dd1d --- /dev/null +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestIntroClass.java @@ -0,0 +1,446 @@ +package edu.lu.uni.serval.fixminer.akka.ediff; + +import com.github.gumtreediff.tree.ITree; +import edu.lu.uni.serval.utils.EDiffHelper; +import org.apache.commons.lang3.StringUtils; +import org.junit.Assert; +import org.junit.Test; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.List; +import java.util.Optional; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; + +import static reactor.core.reactivestreams.PublisherFactory.forEach; + +public class TestIntroClass { + + + + @Test + public void test_manybugs_gmp_14166_14167() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:gmp:14166-14167"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD expr_stmt@@ssize = SIZ a >= 0 1 else - 1 @TO@ ssize = SIZ a >= 0 ( asize != 0 ) else - 1 @AT@ 1795 @LENGTH@ 29\n" + + "---UPD expr@@ssize = SIZ a >= 0 1 else - 1 @TO@ ssize = SIZ a >= 0 ( asize != 0 ) else - 1 @AT@ 1795 @LENGTH@ 29\n" + + "------UPD ternary@@SIZ a >= 0 1 else - 1 @TO@ SIZ a >= 0 ( asize != 0 ) else - 1 @AT@ 1803 @LENGTH@ 21\n" + + "---------UPD then@@1 @TO@ ( asize != 0 ) @AT@ 1817 @LENGTH@ 4\n" + + "------------UPD expr@@1 @TO@ ( asize != 0 ) @AT@ 1818 @LENGTH@ 1\n" + + "---------------INS operator@@( @TO@ expr@@1 @AT@ 1813 @LENGTH@ 1\n" + + "---------------INS name@@asize @TO@ expr@@1 @AT@ 1814 @LENGTH@ 5\n" + + "---------------UPD literal@@1 @TO@ 0 @AT@ 1818 @LENGTH@ 1\n" + + "---------------INS operator@@!= @TO@ expr@@1 @AT@ 1820 @LENGTH@ 2\n" + + "---------------INS operator@@) @TO@ expr@@1 @AT@ 1824 @LENGTH@ 1\n"); + } + + + @Test + public void test_manybugs_gzip_2009_09_26_a1d3d4019d_f17cbd13a1() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:gzip:2009-09-26-a1d3d4019d-f17cbd13a1"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"INS expr_stmt@@ifd = fileno stdin @TO@ block@@if ! force && ! list && isatty fileno ( FILE * ) ( decompress stdin else stdout ) fprintf stderr \"%s: compressed data not %s a terminal. Use -f to force %scompression.\\n\" program_name decompress \"read from\" else \"written to\" decompress \"de\" else \"\" fprintf stderr \"For help, type: %s -h\\n\" program_name do_exit ERROR if decompress || ! ascii if ! test && ! list && ( ! decompress || ! ascii ) strcpy ifname \"stdin\" strcpy ofname \"stdout\" if fstat fileno stdin & istat != 0 progerror \"standard input\" do_exit ERROR ifile_size = S_ISREG istat . st_mode istat . st_size else - 1 time_stamp . tv_nsec = - 1 if ! no_time || list time_stamp = get_stat_mtime & istat clear_bufs to_stdout = 1 part_nb = 0 if decompress method = get_method ifd if method < 0 do_exit exit_code if list do_list ifd method for if * work fileno stdin fileno stdout != OK if input_eof break; method = get_method ifd if method < 0 bytes_out = 0 if verbose @AT@ 20290 @LENGTH@ 18\n" + + "---INS expr@@ifd = fileno stdin @TO@ expr_stmt@@ifd = fileno stdin @AT@ 20290 @LENGTH@ 18\n" + + "------INS name@@ifd @TO@ expr@@ifd = fileno stdin @AT@ 20290 @LENGTH@ 3\n" + + "------INS operator@@= @TO@ expr@@ifd = fileno stdin @AT@ 20294 @LENGTH@ 1\n" + + "------INS call@@fileno stdin @TO@ expr@@ifd = fileno stdin @AT@ 20296 @LENGTH@ 12\n" + + "---------INS name@@fileno @TO@ call@@fileno stdin @AT@ 20296 @LENGTH@ 6\n" + + "---------INS argument_list@@stdin @TO@ call@@fileno stdin @AT@ 20302 @LENGTH@ 8\n" + + "------------INS argument@@stdin @TO@ argument_list@@stdin @AT@ 20303 @LENGTH@ 5\n" + + "---------------INS expr@@stdin @TO@ argument@@stdin @AT@ 20303 @LENGTH@ 5\n" + + "------------------INS name@@stdin @TO@ expr@@stdin @AT@ 20303 @LENGTH@ 5\n"); + } + + @Test + public void test_manybugs_gzip_2010_02_19_3eb6091d69_884ef6d16c() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:gzip:2010-02-19-3eb6091d69-884ef6d16c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ( z_len == 0 && ! decompress ) || z_len > MAX_SUFFIX fprintf stderr \"%s: incorrect suffix '%s'\\n\" program_name z_suffix do_exit ERROR @TO@ if z_len == 0 || z_len > MAX_SUFFIX fprintf stderr \"%s: invalid suffix '%s'\\n\" program_name z_suffix do_exit ERROR @AT@ 18150 @LENGTH@ 136\n" + + "---UPD condition@@( z_len == 0 && ! decompress ) || z_len > MAX_SUFFIX @TO@ z_len == 0 || z_len > MAX_SUFFIX @AT@ 18150 @LENGTH@ 52\n" + + "------UPD expr@@( z_len == 0 && ! decompress ) || z_len > MAX_SUFFIX @TO@ z_len == 0 || z_len > MAX_SUFFIX @AT@ 18151 @LENGTH@ 52\n" + + "---------DEL operator@@( @AT@ 18151 @LENGTH@ 1\n" + + "---------DEL operator@@&& @AT@ 18163 @LENGTH@ 2\n" + + "---------DEL operator@@! @AT@ 18166 @LENGTH@ 1\n" + + "---------DEL name@@decompress @AT@ 18167 @LENGTH@ 10\n" + + "---------DEL operator@@) @AT@ 18177 @LENGTH@ 1\n" + + "---UPD then@@fprintf stderr \"%s: incorrect suffix '%s'\\n\" program_name z_suffix do_exit ERROR @TO@ fprintf stderr \"%s: invalid suffix '%s'\\n\" program_name z_suffix do_exit ERROR @AT@ 18202 @LENGTH@ 80\n" + + "------UPD block@@fprintf stderr \"%s: incorrect suffix '%s'\\n\" program_name z_suffix do_exit ERROR @TO@ fprintf stderr \"%s: invalid suffix '%s'\\n\" program_name z_suffix do_exit ERROR @AT@ 18202 @LENGTH@ 128\n" + + "---------UPD expr_stmt@@fprintf stderr \"%s: incorrect suffix '%s'\\n\" program_name z_suffix @TO@ fprintf stderr \"%s: invalid suffix '%s'\\n\" program_name z_suffix @AT@ 18212 @LENGTH@ 66\n" + + "------------UPD expr@@fprintf stderr \"%s: incorrect suffix '%s'\\n\" program_name z_suffix @TO@ fprintf stderr \"%s: invalid suffix '%s'\\n\" program_name z_suffix @AT@ 18212 @LENGTH@ 66\n" + + "---------------UPD call@@fprintf stderr \"%s: incorrect suffix '%s'\\n\" program_name z_suffix @TO@ fprintf stderr \"%s: invalid suffix '%s'\\n\" program_name z_suffix @AT@ 18212 @LENGTH@ 66\n" + + "------------------UPD argument_list@@stderr \"%s: incorrect suffix '%s'\\n\" program_name z_suffix @TO@ stderr \"%s: invalid suffix '%s'\\n\" program_name z_suffix @AT@ 18219 @LENGTH@ 80\n" + + "---------------------UPD argument@@\"%s: incorrect suffix '%s'\\n\" @TO@ \"%s: invalid suffix '%s'\\n\" @AT@ 18228 @LENGTH@ 29\n" + + "------------------------UPD expr@@\"%s: incorrect suffix '%s'\\n\" @TO@ \"%s: invalid suffix '%s'\\n\" @AT@ 18228 @LENGTH@ 29\n" + + "---------------------------UPD literal@@\"%s: incorrect suffix '%s'\\n\" @TO@ \"%s: invalid suffix '%s'\\n\" @AT@ 18228 @LENGTH@ 29\n"); + } + @Test + public void test_manybugs_libtiff_2005_12_21_3b848a7_3edb9cd() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2005-12-21-3b848a7-3edb9cd"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if td -> td_nstrips > 1 && td -> td_compression == COMPRESSION_NONE && td -> td_stripbytecount ][0 != td -> td_stripbytecount ][1 TIFFWarning module \"%s: Wrong \\\"%s\\\" field, ignoring and calculating from imagelength\" tif -> tif_name _TIFFFieldWithTag tif TIFFTAG_STRIPBYTECOUNTS -> field_name if EstimateStripByteCounts tif dir dircount < 0 bad @TO@ if td -> td_nstrips > 2 && td -> td_compression == COMPRESSION_NONE && td -> td_stripbytecount ][0 != td -> td_stripbytecount ][1 TIFFWarning module \"%s: Wrong \\\"%s\\\" field, ignoring and calculating from imagelength\" tif -> tif_name _TIFFFieldWithTag tif TIFFTAG_STRIPBYTECOUNTS -> field_name if EstimateStripByteCounts tif dir dircount < 0 bad @AT@ 19379 @LENGTH@ 344\n" + + "---UPD condition@@td -> td_nstrips > 1 && td -> td_compression == COMPRESSION_NONE && td -> td_stripbytecount ][0 != td -> td_stripbytecount ][1 @TO@ td -> td_nstrips > 2 && td -> td_compression == COMPRESSION_NONE && td -> td_stripbytecount ][0 != td -> td_stripbytecount ][1 @AT@ 19379 @LENGTH@ 129\n" + + "------UPD expr@@td -> td_nstrips > 1 && td -> td_compression == COMPRESSION_NONE && td -> td_stripbytecount ][0 != td -> td_stripbytecount ][1 @TO@ td -> td_nstrips > 2 && td -> td_compression == COMPRESSION_NONE && td -> td_stripbytecount ][0 != td -> td_stripbytecount ][1 @AT@ 19380 @LENGTH@ 126\n" + + "---------UPD literal@@1 @TO@ 2 @AT@ 19397 @LENGTH@ 1\n"); + + } + @Test + public void test_manybugs_libtiff_2007_07_19_ce4b7af_7d6e298() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2007-07-19-ce4b7af-7d6e298"); + Assert.assertEquals(hierarchicalActionSets.size(), 4); + +// Assert.fail(); + } + @Test + public void test_manybugs_libtiff_2009_02_05_764dbba_2e42d63() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2009-02-05-764dbba-2e42d63"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD expr_stmt@@TIFFGetFieldDefaulted in TIFFTAG_RESOLUTIONUNIT & res_unit @TO@ TIFFGetField in TIFFTAG_RESOLUTIONUNIT & res_unit @AT@ 163079 @LENGTH@ 58\n" + + "---UPD expr@@TIFFGetFieldDefaulted in TIFFTAG_RESOLUTIONUNIT & res_unit @TO@ TIFFGetField in TIFFTAG_RESOLUTIONUNIT & res_unit @AT@ 163079 @LENGTH@ 58\n" + + "------UPD call@@TIFFGetFieldDefaulted in TIFFTAG_RESOLUTIONUNIT & res_unit @TO@ TIFFGetField in TIFFTAG_RESOLUTIONUNIT & res_unit @AT@ 163079 @LENGTH@ 58\n" + + "---------UPD name@@TIFFGetFieldDefaulted @TO@ TIFFGetField @AT@ 163079 @LENGTH@ 21\n"); + + + } + @Test + public void test_manybugs_libtiff_2008_04_15_2e8b2f1_0d27dc0() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2008-04-15-2e8b2f1-0d27dc0"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(), StringUtils.join( new String[] {"UPD decl_stmt@@static TIFFField tiffFields [] TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @TO@ static TIFFField tiffFields [] TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @AT@ 1793 @LENGTH@ 17245\n" , + "---UPD decl@@static TIFFField tiffFields [] TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @TO@ static TIFFField tiffFields [] TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @AT@ 1793 @LENGTH@ 17245\n" , + "------UPD init@@TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @TO@ TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @AT@ 1825 @LENGTH@ 17214\n" , + "---------UPD expr@@TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @TO@ TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @AT@ 1825 @LENGTH@ 17214\n" , + "------------UPD block@@TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @TO@ TIFFTAG_SUBFILETYPE 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"SubfileType\" NULL TIFFTAG_OSUBFILETYPE 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_SUBFILETYPE 1 0 \"OldSubfileType\" NULL TIFFTAG_IMAGEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 0 0 \"ImageWidth\" NULL TIFFTAG_IMAGELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDIMENSIONS 1 0 \"ImageLength\" NULL TIFFTAG_BITSPERSAMPLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_BITSPERSAMPLE 0 0 \"BitsPerSample\" NULL TIFFTAG_COMPRESSION - 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_COMPRESSION 0 0 \"Compression\" NULL TIFFTAG_PHOTOMETRIC 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PHOTOMETRIC 0 0 \"PhotometricInterpretation\" NULL TIFFTAG_THRESHHOLDING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_THRESHHOLDING 1 0 \"Threshholding\" NULL TIFFTAG_CELLWIDTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellWidth\" NULL TIFFTAG_CELLLENGTH 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"CellLength\" NULL TIFFTAG_FILLORDER 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_FILLORDER 0 0 \"FillOrder\" NULL TIFFTAG_DOCUMENTNAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DocumentName\" NULL TIFFTAG_IMAGEDESCRIPTION - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageDescription\" NULL TIFFTAG_MAKE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Make\" NULL TIFFTAG_MODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Model\" NULL TIFFTAG_STRIPOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"StripOffsets\" NULL TIFFTAG_ORIENTATION 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_ORIENTATION 0 0 \"Orientation\" NULL TIFFTAG_SAMPLESPERPIXEL 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLESPERPIXEL 0 0 \"SamplesPerPixel\" NULL TIFFTAG_ROWSPERSTRIP 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_ROWSPERSTRIP 0 0 \"RowsPerStrip\" NULL TIFFTAG_STRIPBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"StripByteCounts\" NULL TIFFTAG_MINSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MINSAMPLEVALUE 1 0 \"MinSampleValue\" NULL TIFFTAG_MAXSAMPLEVALUE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_MAXSAMPLEVALUE 1 0 \"MaxSampleValue\" NULL TIFFTAG_XRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"XResolution\" NULL TIFFTAG_YRESOLUTION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_RESOLUTION 1 0 \"YResolution\" NULL TIFFTAG_PLANARCONFIG 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_PLANARCONFIG 0 0 \"PlanarConfiguration\" NULL TIFFTAG_PAGENAME - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PageName\" NULL TIFFTAG_XPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"XPosition\" NULL TIFFTAG_YPOSITION 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_POSITION 1 0 \"YPosition\" NULL TIFFTAG_FREEOFFSETS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeOffsets\" NULL TIFFTAG_FREEBYTECOUNTS - 1 - 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 0 0 \"FreeByteCounts\" NULL TIFFTAG_GRAYRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseUnit\" NULL TIFFTAG_GRAYRESPONSECURVE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"GrayResponseCurve\" NULL TIFFTAG_RESOLUTIONUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_RESOLUTIONUNIT 1 0 \"ResolutionUnit\" NULL TIFFTAG_PAGENUMBER 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_PAGENUMBER 1 0 \"PageNumber\" NULL TIFFTAG_COLORRESPONSEUNIT 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_IGNORE 1 0 \"ColorResponseUnit\" NULL TIFFTAG_TRANSFERFUNCTION - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_TRANSFERFUNCTION 1 0 \"TransferFunction\" NULL TIFFTAG_SOFTWARE - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Software\" NULL TIFFTAG_DATETIME 20 20 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"DateTime\" NULL TIFFTAG_ARTIST - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Artist\" NULL TIFFTAG_HOSTCOMPUTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"HostComputer\" NULL TIFFTAG_WHITEPOINT 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"WhitePoint\" NULL TIFFTAG_PRIMARYCHROMATICITIES 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"PrimaryChromaticities\" NULL TIFFTAG_COLORMAP - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_OTHER TIFF_SETGET_UNDEFINED FIELD_COLORMAP 1 0 \"ColorMap\" NULL TIFFTAG_HALFTONEHINTS 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_HALFTONEHINTS 1 0 \"HalftoneHints\" NULL TIFFTAG_TILEWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileWidth\" NULL TIFFTAG_TILELENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDIMENSIONS 0 0 \"TileLength\" NULL TIFFTAG_TILEOFFSETS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPOFFSETS 0 0 \"TileOffsets\" NULL TIFFTAG_TILEBYTECOUNTS - 1 1 TIFF_LONG8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_STRIPBYTECOUNTS 0 0 \"TileByteCounts\" NULL TIFFTAG_SUBIFD - 1 - 1 TIFF_IFD8 0 TIFF_SETGET_C16_IFD8 TIFF_SETGET_UNDEFINED FIELD_SUBIFD 1 1 \"SubIFD\" & tiffFieldArray TIFFTAG_INKSET 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InkSet\" NULL TIFFTAG_INKNAMES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_C16_ASCII TIFF_SETGET_UNDEFINED FIELD_INKNAMES 1 1 \"InkNames\" NULL TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL TIFFTAG_DOTRANGE 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DotRange\" NULL TIFFTAG_TARGETPRINTER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TargetPrinter\" NULL TIFFTAG_EXTRASAMPLES - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 1 \"ExtraSamples\" NULL TIFFTAG_SAMPLEFORMAT - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"SampleFormat\" NULL TIFFTAG_SMINSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMINSAMPLEVALUE 1 0 \"SMinSampleValue\" NULL TIFFTAG_SMAXSAMPLEVALUE - 2 - 1 TIFF_ANY 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_SMAXSAMPLEVALUE 1 0 \"SMaxSampleValue\" NULL TIFFTAG_CLIPPATH - 1 - 3 TIFF_BYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ClipPath\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_XCLIPPATHUNITS 1 1 TIFF_SBYTE 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"XClipPathUnits\" NULL TIFFTAG_YCLIPPATHUNITS 1 1 TIFF_SLONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YClipPathUnits\" NULL TIFFTAG_YCBCRCOEFFICIENTS 3 3 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"YCbCrCoefficients\" NULL TIFFTAG_YCBCRSUBSAMPLING 2 2 TIFF_SHORT 0 TIFF_SETGET_UINT16_PAIR TIFF_SETGET_UNDEFINED FIELD_YCBCRSUBSAMPLING 0 0 \"YCbCrSubsampling\" NULL TIFFTAG_YCBCRPOSITIONING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_YCBCRPOSITIONING 0 0 \"YCbCrPositioning\" NULL TIFFTAG_REFERENCEBLACKWHITE 6 6 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ReferenceBlackWhite\" NULL TIFFTAG_XMLPACKET - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"XMLPacket\" NULL TIFFTAG_MATTEING 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_EXTRASAMPLES 0 0 \"Matteing\" NULL TIFFTAG_DATATYPE - 2 - 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_SAMPLEFORMAT 0 0 \"DataType\" NULL TIFFTAG_IMAGEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_IMAGEDEPTH 0 0 \"ImageDepth\" NULL TIFFTAG_TILEDEPTH 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_TILEDEPTH 0 0 \"TileDepth\" NULL TIFFTAG_PIXAR_IMAGEFULLWIDTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullWidth\" NULL TIFFTAG_PIXAR_IMAGEFULLLENGTH 1 1 TIFF_LONG 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"ImageFullLength\" NULL TIFFTAG_PIXAR_TEXTUREFORMAT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureFormat\" NULL TIFFTAG_PIXAR_WRAPMODES - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"TextureWrapModes\" NULL TIFFTAG_PIXAR_FOVCOT 1 1 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"FieldOfViewCotangent\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToScreen\" NULL TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 16 16 TIFF_FLOAT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"MatrixWorldToCamera\" NULL TIFFTAG_COPYRIGHT - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"Copyright\" NULL TIFFTAG_RICHTIFFIPTC - 3 - 3 TIFF_LONG 0 TIFF_SETGET_C32_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"RichTIFFIPTC\" NULL TIFFTAG_PHOTOSHOP - 3 - 3 TIFF_BYTE 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"Photoshop\" NULL TIFFTAG_EXIFIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"EXIFIFDOffset\" & exifFieldArray TIFFTAG_ICCPROFILE - 3 - 3 TIFF_UNDEFINED 0 TIFF_SETGET_C32_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ICC Profile\" NULL TIFFTAG_GPSIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_IFD8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"GPSIFDOffset\" NULL TIFFTAG_FAXRECVPARAMS 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvParams\" NULL TIFFTAG_FAXSUBADDRESS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxSubAddress\" NULL TIFFTAG_FAXRECVTIME 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UINT32 FIELD_CUSTOM TRUE FALSE \"FaxRecvTime\" NULL TIFFTAG_FAXDCS - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_ASCII FIELD_CUSTOM TRUE FALSE \"FaxDcs\" NULL TIFFTAG_STONITS 1 1 TIFF_DOUBLE 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"StoNits\" NULL TIFFTAG_INTEROPERABILITYIFD 1 1 TIFF_IFD8 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"InteroperabilityIFDOffset\" NULL TIFFTAG_DNGVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGVersion\" NULL TIFFTAG_DNGBACKWARDVERSION 4 4 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DNGBackwardVersion\" NULL TIFFTAG_UNIQUECAMERAMODEL - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"UniqueCameraModel\" NULL TIFFTAG_LOCALIZEDCAMERAMODEL - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"LocalizedCameraModel\" NULL TIFFTAG_CFAPLANECOLOR - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CFAPlaneColor\" NULL TIFFTAG_CFALAYOUT 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CFALayout\" NULL TIFFTAG_LINEARIZATIONTABLE - 1 - 1 TIFF_SHORT 0 TIFF_SETGET_C16_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"LinearizationTable\" NULL TIFFTAG_BLACKLEVELREPEATDIM 2 2 TIFF_SHORT 0 TIFF_SETGET_C0_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BlackLevelRepeatDim\" NULL TIFFTAG_BLACKLEVEL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevel\" NULL TIFFTAG_BLACKLEVELDELTAH - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaH\" NULL TIFFTAG_BLACKLEVELDELTAV - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"BlackLevelDeltaV\" NULL TIFFTAG_WHITELEVEL - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"WhiteLevel\" NULL TIFFTAG_DEFAULTSCALE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultScale\" NULL TIFFTAG_BESTQUALITYSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BestQualityScale\" NULL TIFFTAG_DEFAULTCROPORIGIN 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropOrigin\" NULL TIFFTAG_DEFAULTCROPSIZE 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"DefaultCropSize\" NULL TIFFTAG_COLORMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix1\" NULL TIFFTAG_COLORMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ColorMatrix2\" NULL TIFFTAG_CAMERACALIBRATION1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration1\" NULL TIFFTAG_CAMERACALIBRATION2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CameraCalibration2\" NULL TIFFTAG_REDUCTIONMATRIX1 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix1\" NULL TIFFTAG_REDUCTIONMATRIX2 - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"ReductionMatrix2\" NULL TIFFTAG_ANALOGBALANCE - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AnalogBalance\" NULL TIFFTAG_ASSHOTNEUTRAL - 1 - 1 TIFF_RATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotNeutral\" NULL TIFFTAG_ASSHOTWHITEXY 2 2 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AsShotWhiteXY\" NULL TIFFTAG_BASELINEEXPOSURE 1 1 TIFF_SRATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineExposure\" NULL TIFFTAG_BASELINENOISE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineNoise\" NULL TIFFTAG_BASELINESHARPNESS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BaselineSharpness\" NULL TIFFTAG_BAYERGREENSPLIT 1 1 TIFF_LONG 0 TIFF_SETGET_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"BayerGreenSplit\" NULL TIFFTAG_LINEARRESPONSELIMIT 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LinearResponseLimit\" NULL TIFFTAG_CAMERASERIALNUMBER - 1 - 1 TIFF_ASCII 0 TIFF_SETGET_ASCII TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"CameraSerialNumber\" NULL TIFFTAG_LENSINFO 4 4 TIFF_RATIONAL 0 TIFF_SETGET_C0_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"LensInfo\" NULL TIFFTAG_CHROMABLURRADIUS 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ChromaBlurRadius\" NULL TIFFTAG_ANTIALIASSTRENGTH 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"AntiAliasStrength\" NULL TIFFTAG_SHADOWSCALE 1 1 TIFF_RATIONAL 0 TIFF_SETGET_DOUBLE TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ShadowScale\" NULL TIFFTAG_DNGPRIVATEDATA - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"DNGPrivateData\" NULL TIFFTAG_MAKERNOTESAFETY 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"MakerNoteSafety\" NULL TIFFTAG_CALIBRATIONILLUMINANT1 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant1\" NULL TIFFTAG_CALIBRATIONILLUMINANT2 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"CalibrationIlluminant2\" NULL TIFFTAG_RAWDATAUNIQUEID 16 16 TIFF_BYTE 0 TIFF_SETGET_C0_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"RawDataUniqueID\" NULL TIFFTAG_ORIGINALRAWFILENAME - 1 - 1 TIFF_BYTE 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 1 \"OriginalRawFileName\" NULL TIFFTAG_ORIGINALRAWFILEDATA - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"OriginalRawFileData\" NULL TIFFTAG_ACTIVEAREA 4 4 TIFF_LONG 0 TIFF_SETGET_C0_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 0 \"ActiveArea\" NULL TIFFTAG_MASKEDAREAS - 1 - 1 TIFF_LONG 0 TIFF_SETGET_C16_UINT32 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"MaskedAreas\" NULL TIFFTAG_ASSHOTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotICCProfile\" NULL TIFFTAG_ASSHOTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"AsShotPreProfileMatrix\" NULL TIFFTAG_CURRENTICCPROFILE - 1 - 1 TIFF_UNDEFINED 0 TIFF_SETGET_C16_UINT8 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentICCProfile\" NULL TIFFTAG_CURRENTPREPROFILEMATRIX - 1 - 1 TIFF_SRATIONAL 0 TIFF_SETGET_C16_FLOAT TIFF_SETGET_UNDEFINED FIELD_CUSTOM 0 1 \"CurrentPreProfileMatrix\" NULL @AT@ 1825 @LENGTH@ 19568\n" , + "---------------UPD expr@@TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL @TO@ TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL @AT@ 8859 @LENGTH@ 118\n" , + "------------------UPD block@@TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UNDEFINED TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL @TO@ TIFFTAG_NUMBEROFINKS 1 1 TIFF_SHORT 0 TIFF_SETGET_UINT16 TIFF_SETGET_UNDEFINED FIELD_CUSTOM 1 0 \"NumberOfInks\" NULL @AT@ 8859 @LENGTH@ 134\n" , + "---------------------UPD expr@@TIFF_SETGET_UNDEFINED @TO@ TIFF_SETGET_UINT16 @AT@ 8904 @LENGTH@ 21\n" , + "------------------------UPD name@@TIFF_SETGET_UNDEFINED @TO@ TIFF_SETGET_UINT16 @AT@ 8904 @LENGTH@ 21\n"})); + + } + @Test + public void test_manybugs_libtiff_2007_11_02_371336d_865f7b2() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2007-11-02-371336d-865f7b2"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@tmsize_t orig_rawcc tif -> tif_rawcc if tif -> tif_flags & TIFF_POSTENCODE tif -> tif_flags &= ~ TIFF_POSTENCODE if ! * tif -> tif_postencode tif TIFFErrorExt tif -> tif_clientdata module \"Error post-encoding before directory write\" ( 0 ) * tif -> tif_close tif if tif -> tif_rawcc > 0 && tif -> tif_rawcc != orig_rawcc && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif TIFFErrorExt tif -> tif_clientdata module \"Error flushing data before directory write\" ( 0 ) if ( tif -> tif_flags & TIFF_MYBUFFER ) && tif -> tif_rawdata _TIFFfree tif -> tif_rawdata tif -> tif_rawdata = NULL tif -> tif_rawcc = 0 tif -> tif_rawdatasize = 0 tif -> tif_flags &= ~ ( TIFF_BEENWRITING | TIFF_BUFFERSETUP ) @TO@ if tif -> tif_flags & TIFF_POSTENCODE tif -> tif_flags &= ~ TIFF_POSTENCODE if ! * tif -> tif_postencode tif TIFFErrorExt tif -> tif_clientdata module \"Error post-encoding before directory write\" ( 0 ) * tif -> tif_close tif if tif -> tif_rawcc > 0 && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif TIFFErrorExt tif -> tif_clientdata module \"Error flushing data before directory write\" ( 0 ) if ( tif -> tif_flags & TIFF_MYBUFFER ) && tif -> tif_rawdata _TIFFfree tif -> tif_rawdata tif -> tif_rawdata = NULL tif -> tif_rawcc = 0 tif -> tif_rawdatasize = 0 tif -> tif_flags &= ~ ( TIFF_BEENWRITING | TIFF_BUFFERSETUP ) @AT@ 15470 @LENGTH@ 1194\n" + + "---DEL decl_stmt@@tmsize_t orig_rawcc tif -> tif_rawcc @AT@ 15488 @LENGTH@ 36\n" + + "------DEL decl@@tmsize_t orig_rawcc tif -> tif_rawcc @AT@ 15488 @LENGTH@ 36\n" + + "---------DEL type@@tmsize_t @AT@ 15488 @LENGTH@ 8\n" + + "------------DEL name@@tmsize_t @AT@ 15488 @LENGTH@ 8\n" + + "---------DEL name@@orig_rawcc @AT@ 15497 @LENGTH@ 10\n" + + "---------DEL init@@tif -> tif_rawcc @AT@ 15510 @LENGTH@ 16\n" + + "------------DEL expr@@tif -> tif_rawcc @AT@ 15510 @LENGTH@ 16\n" + + "---------------DEL name@@tif -> tif_rawcc @AT@ 15510 @LENGTH@ 16\n" + + "------------------DEL name@@tif @AT@ 15510 @LENGTH@ 3\n" + + "------------------DEL operator@@-> @AT@ 15513 @LENGTH@ 2\n" + + "------------------DEL name@@tif_rawcc @AT@ 15515 @LENGTH@ 9\n" + + "---UPD if@@if tif -> tif_rawcc > 0 && tif -> tif_rawcc != orig_rawcc && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif TIFFErrorExt tif -> tif_clientdata module \"Error flushing data before directory write\" ( 0 ) @TO@ if tif -> tif_rawcc > 0 && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif TIFFErrorExt tif -> tif_clientdata module \"Error flushing data before directory write\" ( 0 ) @AT@ 16168 @LENGTH@ 222\n" + + "------UPD condition@@tif -> tif_rawcc > 0 && tif -> tif_rawcc != orig_rawcc && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif @TO@ tif -> tif_rawcc > 0 && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif @AT@ 16168 @LENGTH@ 133\n" + + "---------UPD expr@@tif -> tif_rawcc > 0 && tif -> tif_rawcc != orig_rawcc && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif @TO@ tif -> tif_rawcc > 0 && ( tif -> tif_flags & TIFF_BEENWRITING ) != 0 && ! TIFFFlushData1 tif @AT@ 16169 @LENGTH@ 126\n" + + "------------DEL name@@tif -> tif_rawcc @AT@ 16191 @LENGTH@ 16\n" + + "---------------DEL name@@tif @AT@ 16191 @LENGTH@ 3\n" + + "---------------DEL operator@@-> @AT@ 16194 @LENGTH@ 2\n" + + "---------------DEL name@@tif_rawcc @AT@ 16196 @LENGTH@ 9\n" + + "------------DEL operator@@!= @AT@ 16206 @LENGTH@ 2\n" + + "------------DEL name@@orig_rawcc @AT@ 16209 @LENGTH@ 10\n" + + "------------DEL operator@@&& @AT@ 16226 @LENGTH@ 2\n"); + + + } + @Test + public void test_manybugs_libtiff_2007_08_24_827b6bc_22da1d6() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2007-08-24-827b6bc-22da1d6"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@const char module [] \"_TIFFMergeFields\" const char reason [] \"for fields array\" TIFFField * * tp uint32 i for i = 0 i < n i ++ const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if fip TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 tif -> tif_foundfield = NULL if tif -> tif_fields && tif -> tif_nfields > 0 else if ! tif -> tif_fields TIFFErrorExt tif -> tif_clientdata module \"Failed to allocate fields array\" 0 tp = tif -> tif_fields + tif -> tif_nfields for i = 0 i < n i ++ * tp ++ = ( TIFFField * ) ( info + i ) qsort tif -> tif_fields tif -> tif_nfields += n TIFFField * tagCompare n @TO@ const char module [] \"_TIFFMergeFields\" const char reason [] \"for fields array\" TIFFField * * tp uint32 i tif -> tif_foundfield = NULL if tif -> tif_fields && tif -> tif_nfields > 0 else if ! tif -> tif_fields TIFFErrorExt tif -> tif_clientdata module \"Failed to allocate fields array\" 0 tp = tif -> tif_fields + tif -> tif_nfields for i = 0 i < n i ++ const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if ! fip tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) tif -> tif_nfields ++ qsort tif -> tif_fields tif -> tif_nfields TIFFField * tagCompare n @AT@ 31106 @LENGTH@ 1161\n" + + "---MOV for@@for i = 0 i < n i ++ const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if fip TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @TO@ block@@const char module [] \"_TIFFMergeFields\" const char reason [] \"for fields array\" TIFFField * * tp uint32 i for i = 0 i < n i ++ const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if fip TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 tif -> tif_foundfield = NULL if tif -> tif_fields && tif -> tif_nfields > 0 else if ! tif -> tif_fields TIFFErrorExt tif -> tif_clientdata module \"Failed to allocate fields array\" 0 tp = tif -> tif_fields + tif -> tif_nfields for i = 0 i < n i ++ * tp ++ = ( TIFFField * ) ( info + i ) qsort tif -> tif_fields tif -> tif_nfields += n TIFFField * tagCompare n @AT@ 31228 @LENGTH@ 250\n" + + "---UPD for@@for i = 0 i < n i ++ const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if fip TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @TO@ for i = 0 i < n i ++ const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if ! fip tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) tif -> tif_nfields ++ @AT@ 31228 @LENGTH@ 250\n" + + "------UPD block@@const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if fip TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @TO@ const TIFFField * fip TIFFFindField tif info ][i . field_tag TIFF_ANY if ! fip tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) tif -> tif_nfields ++ @AT@ 31248 @LENGTH@ 284\n" + + "---------UPD if@@if fip TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @TO@ if ! fip tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) tif -> tif_nfields ++ @AT@ 31332 @LENGTH@ 159\n" + + "------------UPD condition@@fip @TO@ ! fip @AT@ 31332 @LENGTH@ 6\n" + + "---------------UPD expr@@fip @TO@ ! fip @AT@ 31333 @LENGTH@ 3\n" + + "------------------INS operator@@! @TO@ expr@@fip @AT@ 31918 @LENGTH@ 1\n" + + "------------UPD then@@TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @TO@ tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) tif -> tif_nfields ++ @AT@ 31338 @LENGTH@ 152\n" + + "---------------UPD block@@TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @TO@ tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) tif -> tif_nfields ++ @AT@ 31338 @LENGTH@ 191\n" + + "------------------DEL expr_stmt@@TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name @AT@ 31343 @LENGTH@ 150\n" + + "---------------------DEL expr@@TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name @AT@ 31343 @LENGTH@ 150\n" + + "------------------------DEL call@@TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name @AT@ 31343 @LENGTH@ 150\n" + + "---------------------------DEL name@@TIFFErrorExt @AT@ 31343 @LENGTH@ 12\n" + + "---------------------------DEL argument_list@@tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name @AT@ 31355 @LENGTH@ 156\n" + + "------------------------------DEL argument@@tif -> tif_clientdata @AT@ 31356 @LENGTH@ 21\n" + + "---------------------------------DEL expr@@tif -> tif_clientdata @AT@ 31356 @LENGTH@ 21\n" + + "------------------------------DEL argument@@module @AT@ 31377 @LENGTH@ 6\n" + + "---------------------------------DEL expr@@module @AT@ 31377 @LENGTH@ 6\n" + + "------------------------------------DEL name@@module @AT@ 31377 @LENGTH@ 6\n" + + "------------------------------DEL argument@@\"Field with tag %lu is already registered as \\\"%s\\\"\" @AT@ 31388 @LENGTH@ 52\n" + + "---------------------------------DEL expr@@\"Field with tag %lu is already registered as \\\"%s\\\"\" @AT@ 31388 @LENGTH@ 52\n" + + "------------------------------------DEL literal@@\"Field with tag %lu is already registered as \\\"%s\\\"\" @AT@ 31388 @LENGTH@ 52\n" + + "------------------------------DEL argument@@( unsigned int ) info ][i . field_tag @AT@ 31451 @LENGTH@ 37\n" + + "---------------------------------DEL expr@@( unsigned int ) info ][i . field_tag @AT@ 31451 @LENGTH@ 37\n" + + "------------------------------------DEL name@@int @AT@ 31461 @LENGTH@ 3\n" + + "------------------------------------DEL name@@info ][i @AT@ 31466 @LENGTH@ 8\n" + + "---------------------------------------DEL name@@info @AT@ 31466 @LENGTH@ 4\n" + + "---------------------------------------DEL index@@][i @AT@ 31471 @LENGTH@ 3\n" + + "------------------------------------------DEL expr@@[i @AT@ 31471 @LENGTH@ 2\n" + + "------------------------------------DEL name@@field_tag @AT@ 31474 @LENGTH@ 9\n" + + "------------------------------DEL argument@@fip -> field_name @AT@ 31494 @LENGTH@ 17\n" + + "---------------------------------DEL expr@@fip -> field_name @AT@ 31494 @LENGTH@ 17\n" + + "------------------DEL return@@0 @AT@ 31515 @LENGTH@ 10\n" + + "---------------------DEL expr@@0 @AT@ 31522 @LENGTH@ 1\n" + + "------------------------DEL literal@@0 @AT@ 31522 @LENGTH@ 1\n" + + "------------------INS expr_stmt@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @TO@ block@@TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @AT@ 31950 @LENGTH@ 69\n" + + "---------------------INS expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @TO@ expr_stmt@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31950 @LENGTH@ 69\n" + + "------------------------MOV operator@@( @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31451 @LENGTH@ 1\n" + + "------------------------MOV name@@unsigned @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31452 @LENGTH@ 8\n" + + "------------------------MOV operator@@) @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31464 @LENGTH@ 1\n" + + "------------------------MOV name@@[i @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31471 @LENGTH@ 2\n" + + "------------------------MOV operator@@. @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31473 @LENGTH@ 1\n" + + "------------------------INS name@@tif -> tif_fields ][tif -> tif_nfields @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31950 @LENGTH@ 38\n" + + "---------------------------INS name@@tif @TO@ name@@tif -> tif_fields ][tif -> tif_nfields @AT@ 31950 @LENGTH@ 3\n" + + "---------------------------INS operator@@-> @TO@ name@@tif -> tif_fields ][tif -> tif_nfields @AT@ 31953 @LENGTH@ 2\n" + + "---------------------------INS name@@tif_fields @TO@ name@@tif -> tif_fields ][tif -> tif_nfields @AT@ 31955 @LENGTH@ 10\n" + + "---------------------------INS index@@][tif -> tif_nfields @TO@ name@@tif -> tif_fields ][tif -> tif_nfields @AT@ 31966 @LENGTH@ 20\n" + + "------------------------------INS expr@@[tif -> tif_nfields @TO@ index@@][tif -> tif_nfields @AT@ 31966 @LENGTH@ 19\n" + + "---------------------------------MOV name@@tif -> tif_clientdata @TO@ expr@@[tif -> tif_nfields @AT@ 31356 @LENGTH@ 21\n" + + "------------------------INS operator@@= @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31984 @LENGTH@ 1\n" + + "------------------------INS operator@@* @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 31997 @LENGTH@ 1\n" + + "------------------------INS operator@@( @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 32000 @LENGTH@ 1\n" + + "------------------------INS name@@info @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 32001 @LENGTH@ 4\n" + + "------------------------INS operator@@+ @TO@ expr@@tif -> tif_fields ][tif -> tif_nfields = ( TIFFField * ) ( info + i ) @AT@ 32005 @LENGTH@ 1\n" + + "------------------INS expr_stmt@@tif -> tif_nfields ++ @TO@ block@@TIFFErrorExt tif -> tif_clientdata module \"Field with tag %lu is already registered as \\\"%s\\\"\" ( unsigned int ) info ][i . field_tag fip -> field_name 0 @AT@ 32034 @LENGTH@ 21\n" + + "---------------------INS expr@@tif -> tif_nfields ++ @TO@ expr_stmt@@tif -> tif_nfields ++ @AT@ 32034 @LENGTH@ 21\n" + + "------------------------MOV name@@fip -> field_name @TO@ expr@@tif -> tif_nfields ++ @AT@ 31494 @LENGTH@ 17\n" + + "------------------------INS operator@@++ @TO@ expr@@tif -> tif_nfields ++ @AT@ 32050 @LENGTH@ 2\n" + + "---DEL for@@for i = 0 i < n i ++ * tp ++ = ( TIFFField * ) ( info + i ) @AT@ 32050 @LENGTH@ 59\n" + + "------DEL control@@i = 0 i < n i ++ @AT@ 32050 @LENGTH@ 20\n" + + "---------DEL init@@i = 0 @AT@ 32051 @LENGTH@ 5\n" + + "------------DEL expr@@i = 0 @AT@ 32051 @LENGTH@ 5\n" + + "---------------DEL name@@i @AT@ 32051 @LENGTH@ 1\n" + + "---------------DEL operator@@= @AT@ 32053 @LENGTH@ 1\n" + + "---------------DEL literal@@0 @AT@ 32055 @LENGTH@ 1\n" + + "---------DEL condition@@i < n @AT@ 32058 @LENGTH@ 5\n" + + "------------DEL expr@@i < n @AT@ 32058 @LENGTH@ 5\n" + + "---------------DEL name@@i @AT@ 32058 @LENGTH@ 1\n" + + "---------------DEL operator@@< @AT@ 32060 @LENGTH@ 1\n" + + "---------------DEL name@@n @AT@ 32062 @LENGTH@ 1\n" + + "---------DEL incr@@i ++ @AT@ 32065 @LENGTH@ 4\n" + + "------------DEL expr@@i ++ @AT@ 32065 @LENGTH@ 4\n" + + "---------------DEL name@@i @AT@ 32065 @LENGTH@ 1\n" + + "---------------DEL operator@@++ @AT@ 32066 @LENGTH@ 2\n" + + "------DEL block@@* tp ++ = ( TIFFField * ) ( info + i ) @AT@ 32072 @LENGTH@ 38\n" + + "---------DEL expr_stmt@@* tp ++ = ( TIFFField * ) ( info + i ) @AT@ 32072 @LENGTH@ 38\n" + + "------------DEL expr@@* tp ++ = ( TIFFField * ) ( info + i ) @AT@ 32072 @LENGTH@ 38\n" + + "---------------DEL operator@@* @AT@ 32072 @LENGTH@ 1\n" + + "---------------DEL name@@tp @AT@ 32073 @LENGTH@ 2\n" + + "---------------DEL operator@@++ @AT@ 32075 @LENGTH@ 2\n" + + "---------------DEL operator@@= @AT@ 32078 @LENGTH@ 1\n" + + "---------------DEL operator@@( @AT@ 32080 @LENGTH@ 1\n" + + "---------------DEL name@@TIFFField @AT@ 32081 @LENGTH@ 9\n" + + "---------------DEL operator@@* @AT@ 32091 @LENGTH@ 1\n" + + "---------------DEL operator@@) @AT@ 32092 @LENGTH@ 1\n" + + "---------------DEL operator@@( @AT@ 32094 @LENGTH@ 1\n" + + "---------------DEL name@@info @AT@ 32095 @LENGTH@ 4\n" + + "---------------DEL operator@@+ @AT@ 32100 @LENGTH@ 1\n" + + "---------------DEL name@@i @AT@ 32102 @LENGTH@ 1\n" + + "---------------DEL operator@@) @AT@ 32103 @LENGTH@ 1\n" + + "---UPD expr_stmt@@qsort tif -> tif_fields tif -> tif_nfields += n TIFFField * tagCompare @TO@ qsort tif -> tif_fields tif -> tif_nfields TIFFField * tagCompare @AT@ 32166 @LENGTH@ 70\n" + + "------UPD expr@@qsort tif -> tif_fields tif -> tif_nfields += n TIFFField * tagCompare @TO@ qsort tif -> tif_fields tif -> tif_nfields TIFFField * tagCompare @AT@ 32166 @LENGTH@ 70\n" + + "---------UPD call@@qsort tif -> tif_fields tif -> tif_nfields += n TIFFField * tagCompare @TO@ qsort tif -> tif_fields tif -> tif_nfields TIFFField * tagCompare @AT@ 32166 @LENGTH@ 70\n" + + "------------UPD argument_list@@tif -> tif_fields tif -> tif_nfields += n TIFFField * tagCompare @TO@ tif -> tif_fields tif -> tif_nfields TIFFField * tagCompare @AT@ 32171 @LENGTH@ 81\n" + + "---------------UPD argument@@tif -> tif_nfields += n @TO@ tif -> tif_nfields @AT@ 32189 @LENGTH@ 23\n" + + "------------------UPD expr@@tif -> tif_nfields += n @TO@ tif -> tif_nfields @AT@ 32189 @LENGTH@ 23\n" + + "---------------------DEL operator@@+= @AT@ 32206 @LENGTH@ 2\n" + + "---------------------DEL name@@n @AT@ 32209 @LENGTH@ 1\n"); + + + } + @Test + public void test_manybugs_libtiff_2007_07_13_09e8220_f2d989d() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2007-07-13-09e8220-f2d989d"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@static const char module [] \"TIFFReadEncodedStrip\" TIFFDirectory * td & tif -> tif_dir uint32 rowsperstrip uint32 stripsperplane uint32 stripinplane uint16 plane uint32 rows tmsize_t stripsize if ! TIFFCheckRead tif 0 ( tmsize_t - 1 ) if strip >= td -> td_nstrips TIFFErrorExt tif -> tif_clientdata module \"%uld: Strip out of range, max %uld\" ( unsigned long ) strip ( unsigned long ) td -> td_nstrips ( tmsize_t - 1 ) rowsperstrip = td -> td_rowsperstrip if rowsperstrip > td -> td_imagelength rowsperstrip = td -> td_imagelength stripsperplane = ( ( td -> td_imagelength + rowsperstrip - 1 ) / rowsperstrip ) stripinplane = ( strip % stripsperplane ) plane = ( strip / stripsperplane ) rows = td -> td_imagelength - stripinplane * rowsperstrip if rows > rowsperstrip rows = rowsperstrip stripsize = TIFFVStripSize tif rows if stripsize == 0 ( tmsize_t - 1 ) if ( size != tmsize_t - 1 ) && ( size < stripsize ) stripsize = size if ! TIFFFillStrip tif strip ( tmsize_t - 1 ) if * tif -> tif_decodestrip tif buf size plane <= 0 ( tmsize_t - 1 ) * tif -> tif_postdecode tif buf size ( size ) @TO@ static const char module [] \"TIFFReadEncodedStrip\" TIFFDirectory * td & tif -> tif_dir uint32 rowsperstrip uint32 stripsperplane uint32 stripinplane uint16 plane uint32 rows tmsize_t stripsize if ! TIFFCheckRead tif 0 ( tmsize_t - 1 ) if strip >= td -> td_nstrips TIFFErrorExt tif -> tif_clientdata module \"%uld: Strip out of range, max %uld\" ( unsigned long ) strip ( unsigned long ) td -> td_nstrips ( tmsize_t - 1 ) rowsperstrip = td -> td_rowsperstrip if rowsperstrip > td -> td_imagelength rowsperstrip = td -> td_imagelength stripsperplane = ( ( td -> td_imagelength + rowsperstrip - 1 ) / rowsperstrip ) stripinplane = ( strip % stripsperplane ) plane = ( strip / stripsperplane ) rows = td -> td_imagelength - stripinplane * rowsperstrip if rows > rowsperstrip rows = rowsperstrip stripsize = TIFFVStripSize tif rows if stripsize == 0 ( tmsize_t - 1 ) if ( size != tmsize_t - 1 ) && ( size < stripsize ) stripsize = size if ! TIFFFillStrip tif strip ( tmsize_t - 1 ) if * tif -> tif_decodestrip tif buf stripsize plane <= 0 ( tmsize_t - 1 ) * tif -> tif_postdecode tif buf stripsize ( stripsize ) @AT@ 3869 @LENGTH@ 1303\n" + + "---UPD if@@if * tif -> tif_decodestrip tif buf size plane <= 0 ( tmsize_t - 1 ) @TO@ if * tif -> tif_decodestrip tif buf stripsize plane <= 0 ( tmsize_t - 1 ) @AT@ 5041 @LENGTH@ 68\n" + + "------UPD condition@@* tif -> tif_decodestrip tif buf size plane <= 0 @TO@ * tif -> tif_decodestrip tif buf stripsize plane <= 0 @AT@ 5041 @LENGTH@ 49\n" + + "---------UPD expr@@* tif -> tif_decodestrip tif buf size plane <= 0 @TO@ * tif -> tif_decodestrip tif buf stripsize plane <= 0 @AT@ 5043 @LENGTH@ 48\n" + + "------------UPD call@@* tif -> tif_decodestrip tif buf size plane @TO@ * tif -> tif_decodestrip tif buf stripsize plane @AT@ 5043 @LENGTH@ 43\n" + + "---------------UPD argument_list@@tif buf size plane @TO@ tif buf stripsize plane @AT@ 5065 @LENGTH@ 21\n" + + "------------------UPD argument@@size @TO@ stripsize @AT@ 5074 @LENGTH@ 4\n" + + "---------------------UPD expr@@size @TO@ stripsize @AT@ 5074 @LENGTH@ 4\n" + + "------------------------UPD name@@size @TO@ stripsize @AT@ 5074 @LENGTH@ 4\n" + + "---UPD expr_stmt@@* tif -> tif_postdecode tif buf size @TO@ * tif -> tif_postdecode tif buf stripsize @AT@ 5118 @LENGTH@ 36\n" + + "------UPD expr@@* tif -> tif_postdecode tif buf size @TO@ * tif -> tif_postdecode tif buf stripsize @AT@ 5118 @LENGTH@ 36\n" + + "---------UPD call@@* tif -> tif_postdecode tif buf size @TO@ * tif -> tif_postdecode tif buf stripsize @AT@ 5118 @LENGTH@ 36\n" + + "------------UPD argument_list@@tif buf size @TO@ tif buf stripsize @AT@ 5139 @LENGTH@ 15\n" + + "---------------UPD argument@@size @TO@ stripsize @AT@ 5148 @LENGTH@ 4\n" + + "------------------UPD expr@@size @TO@ stripsize @AT@ 5148 @LENGTH@ 4\n" + + "---------------------UPD name@@size @TO@ stripsize @AT@ 5148 @LENGTH@ 4\n" + + "---UPD return@@( size ) @TO@ ( stripsize ) @AT@ 5156 @LENGTH@ 14\n" + + "------UPD expr@@( size ) @TO@ ( stripsize ) @AT@ 5162 @LENGTH@ 8\n" + + "---------UPD name@@size @TO@ stripsize @AT@ 5163 @LENGTH@ 4\n"); + + } + + @Test + public void test_manybugs_libtiff_2006_03_03_a72cf60_0a36d7f() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2006-03-03-a72cf60-0a36d7f"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ! dir -> tdir_count || ! w || ( tsize_t ) dir -> tdir_count / w != cc bad @TO@ if ! dir -> tdir_count || ! w || cc / w != ( tsize_t ) dir -> tdir_count bad @AT@ 30669 @LENGTH@ 76\n" + + "---UPD condition@@! dir -> tdir_count || ! w || ( tsize_t ) dir -> tdir_count / w != cc @TO@ ! dir -> tdir_count || ! w || cc / w != ( tsize_t ) dir -> tdir_count @AT@ 30669 @LENGTH@ 63\n" + + "------UPD expr@@! dir -> tdir_count || ! w || ( tsize_t ) dir -> tdir_count / w != cc @TO@ ! dir -> tdir_count || ! w || cc / w != ( tsize_t ) dir -> tdir_count @AT@ 30670 @LENGTH@ 69\n" + + "---------INS name@@cc @TO@ expr@@! dir -> tdir_count || ! w || ( tsize_t ) dir -> tdir_count / w != cc @AT@ 30696 @LENGTH@ 2\n" + + "---------INS operator@@/ @TO@ expr@@! dir -> tdir_count || ! w || ( tsize_t ) dir -> tdir_count / w != cc @AT@ 30699 @LENGTH@ 1\n" + + "---------INS name@@w @TO@ expr@@! dir -> tdir_count || ! w || ( tsize_t ) dir -> tdir_count / w != cc @AT@ 30701 @LENGTH@ 1\n" + + "---------INS operator@@!= @TO@ expr@@! dir -> tdir_count || ! w || ( tsize_t ) dir -> tdir_count / w != cc @AT@ 30703 @LENGTH@ 2\n" + + "---------DEL operator@@/ @AT@ 30721 @LENGTH@ 1\n" + + "---------DEL name@@w @AT@ 30723 @LENGTH@ 1\n" + + "---------DEL operator@@!= @AT@ 30725 @LENGTH@ 2\n" + + "---------DEL name@@cc @AT@ 30728 @LENGTH@ 2\n"); + + } + @Test + public void test_manybugs_libtiff_2006_02_23_b2ce5d8_207c78a() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:libtiff:2006-02-23-b2ce5d8-207c78a"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"INS if@@if fip -> field_tag == TIFFTAG_DOTRANGE elseif if ! TIFFWriteNormalTag tif dir fip bad @TO@ block@@FIELD_STRIPOFFSETS tag = isTiled tif TIFFTAG_TILEOFFSETS else TIFFTAG_STRIPOFFSETS if tag != fip -> field_tag continue; dir -> tdir_tag = ( uint16 ) tag dir -> tdir_type = ( uint16 ) TIFF_LONG dir -> tdir_count = ( uint32 ) td -> td_nstrips if ! TIFFWriteLongArray tif dir td -> td_stripoffset bad break; FIELD_STRIPBYTECOUNTS tag = isTiled tif TIFFTAG_TILEBYTECOUNTS else TIFFTAG_STRIPBYTECOUNTS if tag != fip -> field_tag continue; dir -> tdir_tag = ( uint16 ) tag dir -> tdir_type = ( uint16 ) TIFF_LONG dir -> tdir_count = ( uint32 ) td -> td_nstrips if ! TIFFWriteLongArray tif dir td -> td_stripbytecount bad break; FIELD_ROWSPERSTRIP TIFFSetupShortLong tif TIFFTAG_ROWSPERSTRIP dir td -> td_rowsperstrip break; FIELD_COLORMAP if ! TIFFWriteShortTable tif TIFFTAG_COLORMAP dir 3 td -> td_colormap bad break; FIELD_IMAGEDIMENSIONS TIFFSetupShortLong tif TIFFTAG_IMAGEWIDTH dir ++ td -> td_imagewidth TIFFSetupShortLong tif TIFFTAG_IMAGELENGTH dir td -> td_imagelength break; FIELD_TILEDIMENSIONS TIFFSetupShortLong tif TIFFTAG_TILEWIDTH dir ++ td -> td_tilewidth TIFFSetupShortLong tif TIFFTAG_TILELENGTH dir td -> td_tilelength break; FIELD_COMPRESSION TIFFSetupShort tif TIFFTAG_COMPRESSION dir td -> td_compression break; FIELD_PHOTOMETRIC TIFFSetupShort tif TIFFTAG_PHOTOMETRIC dir td -> td_photometric break; FIELD_POSITION WriteRationalPair TIFF_RATIONAL TIFFTAG_XPOSITION td -> td_xposition TIFFTAG_YPOSITION td -> td_yposition break; FIELD_RESOLUTION WriteRationalPair TIFF_RATIONAL TIFFTAG_XRESOLUTION td -> td_xresolution TIFFTAG_YRESOLUTION td -> td_yresolution break; FIELD_BITSPERSAMPLE FIELD_MINSAMPLEVALUE FIELD_MAXSAMPLEVALUE FIELD_SAMPLEFORMAT if ! TIFFWritePerSampleShorts tif fip -> field_tag dir bad break; FIELD_SMINSAMPLEVALUE FIELD_SMAXSAMPLEVALUE if ! TIFFWritePerSampleAnys tif _TIFFSampleToTagType tif fip -> field_tag dir bad break; FIELD_PAGENUMBER FIELD_HALFTONEHINTS FIELD_YCBCRSUBSAMPLING if ! TIFFSetupShortPair tif fip -> field_tag dir bad break; FIELD_INKNAMES if ! TIFFWriteInkNames tif dir bad break; FIELD_TRANSFERFUNCTION if ! TIFFWriteTransferFunction tif dir bad break; FIELD_SUBIFD dir -> tdir_tag = ( uint16 ) fip -> field_tag dir -> tdir_type = ( uint16 ) TIFF_LONG dir -> tdir_count = ( uint32 ) td -> td_nsubifd if ! TIFFWriteLongArray tif dir td -> td_subifd bad if dir -> tdir_count > 0 tif -> tif_flags |= TIFF_INSUBIFD tif -> tif_nsubifd = ( uint16 ) dir -> tdir_count if dir -> tdir_count > 1 tif -> tif_subifdoff = dir -> tdir_offset else tif -> tif_subifdoff = uint32 tif -> tif_diroff + uint16 + ( ( char * ) & dir -> tdir_offset - data ) break; if ! TIFFWriteNormalTag tif dir fip bad break; @AT@ 11058 @LENGTH@ 86\n" + + "---INS condition@@fip -> field_tag == TIFFTAG_DOTRANGE @TO@ if@@if fip -> field_tag == TIFFTAG_DOTRANGE elseif if ! TIFFWriteNormalTag tif dir fip bad @AT@ 11058 @LENGTH@ 37\n" + + "------INS expr@@fip -> field_tag == TIFFTAG_DOTRANGE @TO@ condition@@fip -> field_tag == TIFFTAG_DOTRANGE @AT@ 11059 @LENGTH@ 36\n" + + "---------INS name@@fip -> field_tag @TO@ expr@@fip -> field_tag == TIFFTAG_DOTRANGE @AT@ 11059 @LENGTH@ 16\n" + + "------------INS name@@fip @TO@ name@@fip -> field_tag @AT@ 11059 @LENGTH@ 3\n" + + "------------INS operator@@-> @TO@ name@@fip -> field_tag @AT@ 11062 @LENGTH@ 2\n" + + "------------INS name@@field_tag @TO@ name@@fip -> field_tag @AT@ 11064 @LENGTH@ 9\n" + + "---------INS operator@@== @TO@ expr@@fip -> field_tag == TIFFTAG_DOTRANGE @AT@ 11074 @LENGTH@ 2\n" + + "---------INS name@@TIFFTAG_DOTRANGE @TO@ expr@@fip -> field_tag == TIFFTAG_DOTRANGE @AT@ 11077 @LENGTH@ 16\n" + + "---INS then@@ @TO@ if@@if fip -> field_tag == TIFFTAG_DOTRANGE elseif if ! TIFFWriteNormalTag tif dir fip bad @AT@ 11095 @LENGTH@ 0\n" + + "------INS block@@ @TO@ then@@ @AT@ 11095 @LENGTH@ 77\n" + + "---------INS if@@if ! TIFFSetupShortPair tif fip -> field_tag dir bad @TO@ block@@ @AT@ 11104 @LENGTH@ 52\n" + + "------------INS condition@@! TIFFSetupShortPair tif fip -> field_tag dir @TO@ if@@if ! TIFFSetupShortPair tif fip -> field_tag dir bad @AT@ 11104 @LENGTH@ 48\n" + + "---------------INS expr@@! TIFFSetupShortPair tif fip -> field_tag dir @TO@ condition@@! TIFFSetupShortPair tif fip -> field_tag dir @AT@ 11105 @LENGTH@ 45\n" + + "------------------INS operator@@! @TO@ expr@@! TIFFSetupShortPair tif fip -> field_tag dir @AT@ 11105 @LENGTH@ 1\n" + + "------------------INS call@@TIFFSetupShortPair tif fip -> field_tag dir @TO@ expr@@! TIFFSetupShortPair tif fip -> field_tag dir @AT@ 11106 @LENGTH@ 43\n" + + "---------------------INS name@@TIFFSetupShortPair @TO@ call@@TIFFSetupShortPair tif fip -> field_tag dir @AT@ 11106 @LENGTH@ 18\n" + + "---------------------INS argument_list@@tif fip -> field_tag dir @TO@ call@@TIFFSetupShortPair tif fip -> field_tag dir @AT@ 11124 @LENGTH@ 27\n" + + "------------------------INS argument@@tif @TO@ argument_list@@tif fip -> field_tag dir @AT@ 11125 @LENGTH@ 3\n" + + "---------------------------INS expr@@tif @TO@ argument@@tif @AT@ 11125 @LENGTH@ 3\n" + + "------------------------------INS name@@tif @TO@ expr@@tif @AT@ 11125 @LENGTH@ 3\n" + + "------------------------INS argument@@fip -> field_tag @TO@ argument_list@@tif fip -> field_tag dir @AT@ 11130 @LENGTH@ 16\n" + + "---------------------------INS expr@@fip -> field_tag @TO@ argument@@fip -> field_tag @AT@ 11130 @LENGTH@ 16\n" + + "------------------------------INS name@@fip -> field_tag @TO@ expr@@fip -> field_tag @AT@ 11130 @LENGTH@ 16\n" + + "---------------------------------INS name@@fip @TO@ name@@fip -> field_tag @AT@ 11130 @LENGTH@ 3\n" + + "---------------------------------INS operator@@-> @TO@ name@@fip -> field_tag @AT@ 11133 @LENGTH@ 2\n" + + "---------------------------------INS name@@field_tag @TO@ name@@fip -> field_tag @AT@ 11135 @LENGTH@ 9\n" + + "------------------------INS argument@@dir @TO@ argument_list@@tif fip -> field_tag dir @AT@ 11146 @LENGTH@ 3\n" + + "---------------------------INS expr@@dir @TO@ argument@@dir @AT@ 11146 @LENGTH@ 3\n" + + "------------------------------INS name@@dir @TO@ expr@@dir @AT@ 11146 @LENGTH@ 3\n" + + "------------INS then@@bad @TO@ if@@if ! TIFFSetupShortPair tif fip -> field_tag dir bad @AT@ 11157 @LENGTH@ 3\n" + + "---------------INS block@@bad @TO@ then@@bad @AT@ 11157 @LENGTH@ 3\n" + + "------------------INS goto@@bad @TO@ block@@bad @AT@ 11157 @LENGTH@ 10\n" + + "---------------------INS name@@bad @TO@ goto@@bad @AT@ 11162 @LENGTH@ 3\n" + + "---INS elseif@@elseif if ! TIFFWriteNormalTag tif dir fip bad @TO@ if@@if fip -> field_tag == TIFFTAG_DOTRANGE elseif if ! TIFFWriteNormalTag tif dir fip bad @AT@ 11183 @LENGTH@ 46\n" + + "------MOV if@@if ! TIFFWriteNormalTag tif dir fip bad @TO@ elseif@@elseif if ! TIFFWriteNormalTag tif dir fip bad @AT@ 11015 @LENGTH@ 39\n"); + + } + + + @Test + public void test_manybugs_gzip_2009_08_16_3fe0caeada_39a362ae9d() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("manybugs:gzip:2009-08-16-3fe0caeada-39a362ae9d"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@q = ( structhuft * ) malloc 2 * *q if ! q 3 hufts += 2 q ][0 . v . t = ( structhuft * ) NULL q ][1 . e = 99 q ][1 . b = 1 * t = q + 1 * m = 1 0 @TO@ q = ( structhuft * ) malloc 3 * *q if ! q 3 hufts += 3 q ][0 . v . t = ( structhuft * ) NULL q ][1 . e = 99 q ][1 . b = 1 q ][2 . e = 99 q ][2 . b = 1 * t = q + 1 * m = 1 0 @AT@ 16283 @LENGTH@ 239\n" + + "---UPD expr_stmt@@q = ( structhuft * ) malloc 2 * *q @TO@ q = ( structhuft * ) malloc 3 * *q @AT@ 16289 @LENGTH@ 34\n" + + "------UPD expr@@q = ( structhuft * ) malloc 2 * *q @TO@ q = ( structhuft * ) malloc 3 * *q @AT@ 16289 @LENGTH@ 34\n" + + "---------UPD call@@malloc 2 * *q @TO@ malloc 3 * *q @AT@ 16309 @LENGTH@ 13\n" + + "------------UPD argument_list@@2 * *q @TO@ 3 * *q @AT@ 16316 @LENGTH@ 16\n" + + "---------------UPD argument@@2 * *q @TO@ 3 * *q @AT@ 16317 @LENGTH@ 6\n" + + "------------------UPD expr@@2 * *q @TO@ 3 * *q @AT@ 16317 @LENGTH@ 6\n" + + "---------------------UPD literal@@2 @TO@ 3 @AT@ 16317 @LENGTH@ 1\n" + + "---UPD expr_stmt@@hufts += 2 @TO@ hufts += 3 @AT@ 16365 @LENGTH@ 10\n" + + "------UPD expr@@hufts += 2 @TO@ hufts += 3 @AT@ 16365 @LENGTH@ 10\n" + + "---------UPD literal@@2 @TO@ 3 @AT@ 16374 @LENGTH@ 1\n" + + "---INS expr_stmt@@q ][2 . e = 99 @TO@ block@@q = ( structhuft * ) malloc 2 * *q if ! q 3 hufts += 2 q ][0 . v . t = ( structhuft * ) NULL q ][1 . e = 99 q ][1 . b = 1 * t = q + 1 * m = 1 0 @AT@ 16480 @LENGTH@ 14\n" + + "------INS expr@@q ][2 . e = 99 @TO@ expr_stmt@@q ][2 . e = 99 @AT@ 16480 @LENGTH@ 14\n" + + "---------INS name@@q ][2 @TO@ expr@@q ][2 . e = 99 @AT@ 16480 @LENGTH@ 5\n" + + "------------INS name@@q @TO@ name@@q ][2 @AT@ 16480 @LENGTH@ 1\n" + + "------------INS index@@][2 @TO@ name@@q ][2 @AT@ 16482 @LENGTH@ 3\n" + + "---------------INS expr@@[2 @TO@ index@@][2 @AT@ 16482 @LENGTH@ 2\n" + + "------------------INS literal@@[2 @TO@ expr@@[2 @AT@ 16482 @LENGTH@ 2\n" + + "---------INS operator@@. @TO@ expr@@q ][2 . e = 99 @AT@ 16484 @LENGTH@ 1\n" + + "---------INS name@@e @TO@ expr@@q ][2 . e = 99 @AT@ 16485 @LENGTH@ 1\n" + + "---------INS operator@@= @TO@ expr@@q ][2 . e = 99 @AT@ 16487 @LENGTH@ 1\n" + + "---------INS literal@@99 @TO@ expr@@q ][2 . e = 99 @AT@ 16489 @LENGTH@ 2\n" + + "---INS expr_stmt@@q ][2 . b = 1 @TO@ block@@q = ( structhuft * ) malloc 2 * *q if ! q 3 hufts += 2 q ][0 . v . t = ( structhuft * ) NULL q ][1 . e = 99 q ][1 . b = 1 * t = q + 1 * m = 1 0 @AT@ 16526 @LENGTH@ 13\n" + + "------INS expr@@q ][2 . b = 1 @TO@ expr_stmt@@q ][2 . b = 1 @AT@ 16526 @LENGTH@ 13\n" + + "---------INS name@@q ][2 @TO@ expr@@q ][2 . b = 1 @AT@ 16526 @LENGTH@ 5\n" + + "------------INS name@@q @TO@ name@@q ][2 @AT@ 16526 @LENGTH@ 1\n" + + "------------INS index@@][2 @TO@ name@@q ][2 @AT@ 16528 @LENGTH@ 3\n" + + "---------------INS expr@@[2 @TO@ index@@][2 @AT@ 16528 @LENGTH@ 2\n" + + "------------------INS literal@@[2 @TO@ expr@@[2 @AT@ 16528 @LENGTH@ 2\n" + + "---------INS operator@@. @TO@ expr@@q ][2 . b = 1 @AT@ 16530 @LENGTH@ 1\n" + + "---------INS name@@b @TO@ expr@@q ][2 . b = 1 @AT@ 16531 @LENGTH@ 1\n" + + "---------INS operator@@= @TO@ expr@@q ][2 . b = 1 @AT@ 16533 @LENGTH@ 1\n" + + "---------INS literal@@1 @TO@ expr@@q ][2 . b = 1 @AT@ 16535 @LENGTH@ 1\n"); + } + + public List getHierarchicalActionSets(String s) throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath", "FORKJOIN"); + String root = appProps.getProperty("inputPath"); +// root = root + "/codeflaws/"; + root = "/Users/anilkoyuncu/projects/spinferResults/manybugs/"; + String filename = s; +//// filename = "manybugs:python:70019-70023"; +// filename = "manybugs:python:70098-70101"; +// filename = "manybugs:python:70120-70124"; +// filename = "manybugs:libtiff:2007-07-19-ce4b7af-7d6e298"; +// filename = "manybugs:libtiff:2008-09-05-d59e7df-5f42dba"; +// filename = "manybugs:libtiff:2009-02-05-764dbba-2e42d63"; +// filename = "manybugs:gzip:2009-10-09-1a085b1446-118a107f2d"; +// filename = "manybugs:gzip:2009-09-26-a1d3d4019d-f17cbd13a1"; + Pattern pattern = Pattern.compile("([0-9]{4}-[0-9]{2}-[0-9]{2}-)?([0-9a-z]+-[0-9a-z]+)"); + Matcher matcher = pattern.matcher(filename); + String g1 = ""; + String g2 = ""; + + while (matcher.find()){ + g1 = matcher.group(1); + g2 = matcher.group(2); + } + String[] ids = g2.split("-"); + String bug = ids[0]; + String fix = ids[1]; + + List collect = Files.walk(Paths.get(root + filename + "/diffs")) + .filter(Files::isRegularFile) + .collect(Collectors.toList()); + + List collect1 = collect.stream().filter(a -> a.getFileName().toString().contains(bug)).collect(Collectors.toList()); + List collect2 = collect.stream().filter(a -> a.getFileName().toString().contains(fix)).collect(Collectors.toList()); + File revFile = new File(collect2.get(0).toString()); + File prevFile = new File(collect1.get(0).toString()); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + return hierarchicalActionSets; + } + + +} diff --git a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java index ec1ce4d..c1c726c 100644 --- a/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/TestRealCases.java @@ -1,5 +1,7 @@ package edu.lu.uni.serval.fixminer.akka.ediff; +import com.github.gumtreediff.tree.ITree; +import edu.lu.uni.serval.utils.EDiffHelper; import org.junit.Assert; import org.junit.Test; @@ -16,130 +18,66 @@ public class TestRealCases { @Test public void test_287_A_14208510_14208532() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="287-A-14208510-14208532.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("287-A-14208510-14208532.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @TO@ for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 184 @LENGTH@ 211\n" + - "---UPD block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @TO@ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 199 @LENGTH@ 347\n" + - "------UPD if@@if d == 3 || h == 3 printf \"YES\" 0 @TO@ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 449 @LENGTH@ 34\n" + - "---------UPD condition@@d == 3 || h == 3 @TO@ d >= 3 || h >= 3 @AT@ 449 @LENGTH@ 15\n" + - "------------UPD expr@@d == 3 || h == 3 @TO@ d >= 3 || h >= 3 @AT@ 450 @LENGTH@ 16\n" + - "---------------UPD operator@@== @TO@ >= @AT@ 451 @LENGTH@ 2\n" + - "---------------UPD operator@@== @TO@ >= @AT@ 459 @LENGTH@ 2\n" + - "------INS expr_stmt@@d = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @AT@ 548 @LENGTH@ 5\n" + - "---------INS expr@@d = 0 @TO@ expr_stmt@@d = 0 @AT@ 548 @LENGTH@ 5\n" + - "------------INS name@@d @TO@ expr@@d = 0 @AT@ 548 @LENGTH@ 1\n" + - "------------INS operator@@= @TO@ expr@@d = 0 @AT@ 549 @LENGTH@ 1\n" + - "------------INS literal@@0 @TO@ expr@@d = 0 @AT@ 550 @LENGTH@ 1\n" + - "------INS expr_stmt@@h = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @AT@ 553 @LENGTH@ 5\n" + - "---------INS expr@@h = 0 @TO@ expr_stmt@@h = 0 @AT@ 553 @LENGTH@ 5\n" + - "------------INS name@@h @TO@ expr@@h = 0 @AT@ 553 @LENGTH@ 1\n" + - "------------INS operator@@= @TO@ expr@@h = 0 @AT@ 554 @LENGTH@ 1\n" + - "------------INS literal@@0 @TO@ expr@@h = 0 @AT@ 555 @LENGTH@ 1\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @TO@ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 199 @LENGTH@ 347\n" + + "---UPD if@@if d == 3 || h == 3 printf \"YES\" 0 @TO@ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 449 @LENGTH@ 34\n" + + "------UPD condition@@d == 3 || h == 3 @TO@ d >= 3 || h >= 3 @AT@ 449 @LENGTH@ 15\n" + + "---------UPD expr@@d == 3 || h == 3 @TO@ d >= 3 || h >= 3 @AT@ 450 @LENGTH@ 16\n" + + "------------UPD operator@@== @TO@ >= @AT@ 451 @LENGTH@ 2\n" + + "------------UPD operator@@== @TO@ >= @AT@ 459 @LENGTH@ 2\n" + + "---INS expr_stmt@@d = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @AT@ 548 @LENGTH@ 5\n" + + "------INS expr@@d = 0 @TO@ expr_stmt@@d = 0 @AT@ 548 @LENGTH@ 5\n" + + "---------INS name@@d @TO@ expr@@d = 0 @AT@ 548 @LENGTH@ 1\n" + + "---------INS operator@@= @TO@ expr@@d = 0 @AT@ 549 @LENGTH@ 1\n" + + "---------INS literal@@0 @TO@ expr@@d = 0 @AT@ 550 @LENGTH@ 1\n" + + "---INS expr_stmt@@h = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d == 3 || h == 3 printf \"YES\" 0 @AT@ 553 @LENGTH@ 5\n" + + "------INS expr@@h = 0 @TO@ expr_stmt@@h = 0 @AT@ 553 @LENGTH@ 5\n" + + "---------INS name@@h @TO@ expr@@h = 0 @AT@ 553 @LENGTH@ 1\n" + + "---------INS operator@@= @TO@ expr@@h = 0 @AT@ 554 @LENGTH@ 1\n" + + "---------INS literal@@0 @TO@ expr@@h = 0 @AT@ 555 @LENGTH@ 1\n"); } @Test public void test_287_A_14208521_14208532() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="287-A-14208521-14208532.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("287-A-14208521-14208532.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @TO@ for j = 0 j < 3 j ++ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 184 @LENGTH@ 211\n" + - "---UPD block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @TO@ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 199 @LENGTH@ 347\n" + - "------INS expr_stmt@@d = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 548 @LENGTH@ 5\n" + - "---------INS expr@@d = 0 @TO@ expr_stmt@@d = 0 @AT@ 548 @LENGTH@ 5\n" + - "------------INS name@@d @TO@ expr@@d = 0 @AT@ 548 @LENGTH@ 1\n" + - "------------INS operator@@= @TO@ expr@@d = 0 @AT@ 549 @LENGTH@ 1\n" + - "------------INS literal@@0 @TO@ expr@@d = 0 @AT@ 550 @LENGTH@ 1\n" + - "------INS expr_stmt@@h = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 553 @LENGTH@ 5\n" + - "---------INS expr@@h = 0 @TO@ expr_stmt@@h = 0 @AT@ 553 @LENGTH@ 5\n" + - "------------INS name@@h @TO@ expr@@h = 0 @AT@ 553 @LENGTH@ 1\n" + - "------------INS operator@@= @TO@ expr@@h = 0 @AT@ 554 @LENGTH@ 1\n" + - "------------INS literal@@0 @TO@ expr@@h = 0 @AT@ 555 @LENGTH@ 1\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @TO@ if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 d = 0 h = 0 @AT@ 199 @LENGTH@ 347\n" + + "---INS expr_stmt@@d = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 548 @LENGTH@ 5\n" + + "------INS expr@@d = 0 @TO@ expr_stmt@@d = 0 @AT@ 548 @LENGTH@ 5\n" + + "---------INS name@@d @TO@ expr@@d = 0 @AT@ 548 @LENGTH@ 1\n" + + "---------INS operator@@= @TO@ expr@@d = 0 @AT@ 549 @LENGTH@ 1\n" + + "---------INS literal@@0 @TO@ expr@@d = 0 @AT@ 550 @LENGTH@ 1\n" + + "---INS expr_stmt@@h = 0 @TO@ block@@if g ][i ][j == '.' d ++ else h ++ if g ][i ][j + 1 == '.' d ++ else h ++ if g ][i + 1 ][j == '.' d ++ else h ++ if g ][i + 1 ][j + 1 == '.' d ++ else h ++ if d >= 3 || h >= 3 printf \"YES\" 0 @AT@ 553 @LENGTH@ 5\n" + + "------INS expr@@h = 0 @TO@ expr_stmt@@h = 0 @AT@ 553 @LENGTH@ 5\n" + + "---------INS name@@h @TO@ expr@@h = 0 @AT@ 553 @LENGTH@ 1\n" + + "---------INS operator@@= @TO@ expr@@h = 0 @AT@ 554 @LENGTH@ 1\n" + + "---------INS literal@@0 @TO@ expr@@h = 0 @AT@ 555 @LENGTH@ 1\n"); } @Test public void test_189_1682083_1682218() throws IOException { //TODO - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="189-B-1682083-1682218.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("189-B-1682083-1682218.c"); // Assert.assertFalse(true); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for j = 1 j < h j ++ k = i k = MIN k w - i t = j k = MIN k h - j ans += k * t @TO@ for j = 1 j < h j ++ k = i k = MIN k w - i t = j t = MIN t h - j ans += k * t @AT@ 174 @LENGTH@ 77\n" + - "---UPD block@@k = i k = MIN k w - i t = j k = MIN k h - j ans += k * t @TO@ k = i k = MIN k w - i t = j t = MIN t h - j ans += k * t @AT@ 195 @LENGTH@ 104\n" + - "------UPD expr_stmt@@k = MIN k h - j @TO@ t = MIN t h - j @AT@ 254 @LENGTH@ 15\n" + - "---------UPD expr@@k = MIN k h - j @TO@ t = MIN t h - j @AT@ 254 @LENGTH@ 15\n" + - "------------UPD name@@k @TO@ t @AT@ 254 @LENGTH@ 1\n" + - "------------UPD call@@MIN k h - j @TO@ MIN t h - j @AT@ 258 @LENGTH@ 11\n" + - "---------------UPD argument_list@@k h - j @TO@ t h - j @AT@ 261 @LENGTH@ 11\n" + - "------------------UPD argument@@k @TO@ t @AT@ 262 @LENGTH@ 1\n" + - "---------------------UPD expr@@k @TO@ t @AT@ 262 @LENGTH@ 1\n" + - "------------------------UPD name@@k @TO@ t @AT@ 262 @LENGTH@ 1\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD expr_stmt@@k = MIN k h - j @TO@ t = MIN t h - j @AT@ 254 @LENGTH@ 15\n" + + "---UPD expr@@k = MIN k h - j @TO@ t = MIN t h - j @AT@ 254 @LENGTH@ 15\n" + + "------UPD name@@k @TO@ t @AT@ 254 @LENGTH@ 1\n" + + "------UPD call@@MIN k h - j @TO@ MIN t h - j @AT@ 258 @LENGTH@ 11\n" + + "---------UPD argument_list@@k h - j @TO@ t h - j @AT@ 261 @LENGTH@ 11\n" + + "------------UPD argument@@k @TO@ t @AT@ 262 @LENGTH@ 1\n" + + "---------------UPD expr@@k @TO@ t @AT@ 262 @LENGTH@ 1\n" + + "------------------UPD name@@k @TO@ t @AT@ 262 @LENGTH@ 1\n"); } @Test public void test_177_A2_1594730_1595168() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="177-A2-1594730-1595168.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("177-A2-1594730-1595168.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if i == ( n - 1 ) / 2 && j == ( n - 1 ) / 2 mid = a @TO@ if i == ( n + 1 ) / 2 && j == ( n + 1 ) / 2 mid = a @AT@ 350 @LENGTH@ 51\n" + "---UPD condition@@i == ( n - 1 ) / 2 && j == ( n - 1 ) / 2 @TO@ i == ( n + 1 ) / 2 && j == ( n + 1 ) / 2 @AT@ 350 @LENGTH@ 27\n" + @@ -151,22 +89,7 @@ public class TestRealCases { @Test public void test_680_A_18343132_18343191() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="680-A-18343132-18343191.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("680-A-18343132-18343191.c"); Assert.assertEquals(hierarchicalActionSets.size(),2); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if b ][a ][i == 3 max = 3 * a ][i break; @TO@ if b ][a ][i >= 3 max = 3 * a ][i break; @AT@ 176 @LENGTH@ 40\n" + "---UPD condition@@b ][a ][i == 3 @TO@ b ][a ][i >= 3 @AT@ 176 @LENGTH@ 13\n" + @@ -181,115 +104,47 @@ public class TestRealCases { @Test public void test_245_D_3671804_3671831() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="245-D-3671804-3671831.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("245-D-3671804-3671831.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if i != j @TO@ if i != j ans |= a @AT@ 186 @LENGTH@ 9\n" + - "---UPD then@@ @TO@ ans |= a @AT@ 192 @LENGTH@ 0\n" + - "------UPD block@@ @TO@ ans |= a @AT@ 192 @LENGTH@ 0\n" + - "---------DEL empty_stmt@@ @AT@ 192 @LENGTH@ 0\n" + - "---------MOV expr_stmt@@ans |= a @TO@ block@@ @AT@ 194 @LENGTH@ 8\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@max = temp break; @TO@ @AT@ 282 @LENGTH@ 24\n" + + "---DEL break@@break; @AT@ 296 @LENGTH@ 6\n"); } @Test public void test_197_B_18221952_18221968() throws IOException { //TODO not sure - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="197-B-18221952-18221968.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("197-B-18221952-18221968.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if a ][0 % i == 0 && b ][0 % i == 0 a ][0 /= i b ][0 /= i @TO@ if a ][0 % i == 0 && b ][0 % i == 0 a ][0 /= i b ][0 /= i i -- @AT@ 742 @LENGTH@ 57\n" + - "---UPD then@@a ][0 /= i b ][0 /= i @TO@ a ][0 /= i b ][0 /= i i -- @AT@ 779 @LENGTH@ 21\n" + - "------UPD block@@a ][0 /= i b ][0 /= i @TO@ a ][0 /= i b ][0 /= i i -- @AT@ 779 @LENGTH@ 66\n" + - "---------INS expr_stmt@@i -- @TO@ block@@a ][0 /= i b ][0 /= i @AT@ 831 @LENGTH@ 4\n" + - "------------INS expr@@i -- @TO@ expr_stmt@@i -- @AT@ 831 @LENGTH@ 4\n" + - "---------------INS name@@i @TO@ expr@@i -- @AT@ 831 @LENGTH@ 1\n" + - "---------------INS operator@@-- @TO@ expr@@i -- @AT@ 832 @LENGTH@ 2\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"INS expr_stmt@@i -- @TO@ block@@a ][0 /= i b ][0 /= i @AT@ 831 @LENGTH@ 4\n" + + "---INS expr@@i -- @TO@ expr_stmt@@i -- @AT@ 831 @LENGTH@ 4\n" + + "------INS name@@i @TO@ expr@@i -- @AT@ 831 @LENGTH@ 1\n" + + "------INS operator@@-- @TO@ expr@@i -- @AT@ 832 @LENGTH@ 2\n"); } @Test public void test_474_A_15226851_15226912() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="474-A-15226851-15226912.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("474-A-15226851-15226912.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if str ][i == s ][j str ][i = s ][j + 1 @TO@ if str ][i == s ][j j ++ str ][i = s ][j @AT@ 546 @LENGTH@ 39\n" + - "---UPD then@@str ][i = s ][j + 1 @TO@ j ++ str ][i = s ][j @AT@ 560 @LENGTH@ 19\n" + - "------UPD block@@str ][i = s ][j + 1 @TO@ j ++ str ][i = s ][j @AT@ 560 @LENGTH@ 55\n" + - "---------INS expr_stmt@@j ++ @TO@ block@@str ][i = s ][j + 1 @AT@ 582 @LENGTH@ 4\n" + - "------------INS expr@@j ++ @TO@ expr_stmt@@j ++ @AT@ 582 @LENGTH@ 4\n" + - "---------------INS name@@j @TO@ expr@@j ++ @AT@ 582 @LENGTH@ 1\n" + - "---------------INS operator@@++ @TO@ expr@@j ++ @AT@ 583 @LENGTH@ 2\n" + - "---------UPD expr_stmt@@str ][i = s ][j + 1 @TO@ str ][i = s ][j @AT@ 582 @LENGTH@ 19\n" + - "------------UPD expr@@str ][i = s ][j + 1 @TO@ str ][i = s ][j @AT@ 582 @LENGTH@ 19\n" + - "---------------UPD name@@s ][j + 1 @TO@ s ][j @AT@ 589 @LENGTH@ 9\n" + - "------------------UPD index@@][j + 1 @TO@ ][j @AT@ 591 @LENGTH@ 7\n" + - "---------------------UPD expr@@[j + 1 @TO@ [j @AT@ 591 @LENGTH@ 6\n" + - "------------------------DEL operator@@+ @AT@ 592 @LENGTH@ 1\n" + - "------------------------DEL literal@@1 @AT@ 593 @LENGTH@ 1\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@ @TO@ j ++ str ][i = s ][j @AT@ 560 @LENGTH@ 55\n" + + "---INS expr_stmt@@j ++ @TO@ block@@ @AT@ 582 @LENGTH@ 4\n" + + "------INS expr@@j ++ @TO@ expr_stmt@@j ++ @AT@ 582 @LENGTH@ 4\n" + + "---------INS name@@j @TO@ expr@@j ++ @AT@ 582 @LENGTH@ 1\n" + + "---------INS operator@@++ @TO@ expr@@j ++ @AT@ 583 @LENGTH@ 2\n" + + "---UPD expr_stmt@@str ][i = s ][j + 1 @TO@ str ][i = s ][j @AT@ 582 @LENGTH@ 19\n" + + "------UPD expr@@str ][i = s ][j + 1 @TO@ str ][i = s ][j @AT@ 582 @LENGTH@ 19\n" + + "---------UPD name@@s ][j + 1 @TO@ s ][j @AT@ 589 @LENGTH@ 9\n" + + "------------UPD index@@][j + 1 @TO@ ][j @AT@ 591 @LENGTH@ 7\n" + + "---------------UPD expr@@[j + 1 @TO@ [j @AT@ 591 @LENGTH@ 6\n" + + "------------------DEL operator@@+ @AT@ 592 @LENGTH@ 1\n" + + "------------------DEL literal@@1 @AT@ 593 @LENGTH@ 1\n"); } @Test public void test_469_B_8248222_8248281() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="469-B-8248222-8248281.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("469-B-8248222-8248281.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if temp1 < r && temp2 > l for k = temp1 k <= temp2 k ++ t ][k = 1 @TO@ if temp1 <= r && temp2 >= l for k = temp1 k <= temp2 k ++ t ][k = 1 @AT@ 432 @LENGTH@ 65\n" + "---UPD condition@@temp1 < r && temp2 > l @TO@ temp1 <= r && temp2 >= l @AT@ 432 @LENGTH@ 19\n" + @@ -301,22 +156,7 @@ public class TestRealCases { @Test public void test_189_B_17295034_17295064() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="189-B-17295034-17295064.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("189-B-17295034-17295064.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for b = 2 b <= w b += 2 count += ( w - a + 1 ) * ( h - b + 1 ) @TO@ for b = 2 b <= h b += 2 count += ( w - a + 1 ) * ( h - b + 1 ) @AT@ 183 @LENGTH@ 62\n" + "---UPD control@@b = 2 b <= w b += 2 @TO@ b = 2 b <= h b += 2 @AT@ 183 @LENGTH@ 16\n" + @@ -329,22 +169,7 @@ public class TestRealCases { @Test public void test_244_B_5291533_5291541() throws IOException { //TODO not sure - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="244-B-5291533-5291541.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("244-B-5291533-5291541.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if a <= 101 printf \"%d\\n\" a elseif if a == 123 printf \"113\\n\" elseif if a == 1000 printf \"352\\n\" elseif if a == 1000000000 printf \"40744\\n\" elseif if a == 999999999 printf \"40743\\n\" elseif if a == 999999998 printf \"40742\\n\" elseif if a == 999999997 printf \"40741\\n\" elseif if a == 909090901 printf \"38532\\n\" elseif if a == 142498040 printf \"21671\\n\" elseif if a == 603356456 printf \"31623\\n\" elseif if a == 64214872 printf \"15759\\n\" elseif if a == 820040584 printf \"36407\\n\" elseif if a == 442198 printf \"3071\\n\" elseif if a == 642678 printf \"3615\\n\" elseif if a == 468390 printf \"3223\\n\" elseif if a == 326806 printf \"2759\\n\" elseif if a == 940 printf \"331\\n\" elseif if a == 356 printf \"175\\n\" elseif if a == 132 printf \"114\\n\" elseif if a == 102 printf \"101\\n\" @TO@ if a <= 101 printf \"%d\\n\" a elseif if a == 123 printf \"113\\n\" elseif if a == 1000 printf \"352\\n\" elseif if a == 1000000000 printf \"40744\\n\" elseif if a == 999999999 printf \"40743\\n\" elseif if a == 999999998 printf \"40742\\n\" elseif if a == 999999997 printf \"40741\\n\" elseif if a == 909090901 printf \"38532\\n\" elseif if a == 142498040 printf \"21671\\n\" elseif if a == 603356456 printf \"31623\\n\" elseif if a == 64214872 printf \"15759\\n\" elseif if a == 820040584 printf \"36407\\n\" elseif if a == 442198 printf \"3071\\n\" elseif if a == 784262 printf \"4079\\n\" elseif if a == 642678 printf \"3615\\n\" elseif if a == 468390 printf \"3223\\n\" elseif if a == 326806 printf \"2759\\n\" elseif if a == 940 printf \"331\\n\" elseif if a == 356 printf \"175\\n\" elseif if a == 132 printf \"114\\n\" elseif if a == 102 printf \"101\\n\" @AT@ 110 @LENGTH@ 762\n" + "---INS elseif@@elseif if a == 784262 printf \"4079\\n\" @TO@ if@@if a <= 101 printf \"%d\\n\" a elseif if a == 123 printf \"113\\n\" elseif if a == 1000 printf \"352\\n\" elseif if a == 1000000000 printf \"40744\\n\" elseif if a == 999999999 printf \"40743\\n\" elseif if a == 999999998 printf \"40742\\n\" elseif if a == 999999997 printf \"40741\\n\" elseif if a == 909090901 printf \"38532\\n\" elseif if a == 142498040 printf \"21671\\n\" elseif if a == 603356456 printf \"31623\\n\" elseif if a == 64214872 printf \"15759\\n\" elseif if a == 820040584 printf \"36407\\n\" elseif if a == 442198 printf \"3071\\n\" elseif if a == 642678 printf \"3615\\n\" elseif if a == 468390 printf \"3223\\n\" elseif if a == 326806 printf \"2759\\n\" elseif if a == 940 printf \"331\\n\" elseif if a == 356 printf \"175\\n\" elseif if a == 132 printf \"114\\n\" elseif if a == 102 printf \"101\\n\" @AT@ 877 @LENGTH@ 37\n" + @@ -368,22 +193,7 @@ public class TestRealCases { } @Test public void test_166_C_1395587_1395933() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="166-C-1395587-1395933.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("166-C-1395587-1395933.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if array ][( n + 1 ) / 2 == x printf \"0\\n\" elseif if last < ( n + 1 ) / 2 printf \"%d\\n\" n - 2 * last elseif if first > ( n + 1 ) / 2 printf \"%d\\n\" 2 * first - n - 1 @TO@ if array ][( n + 1 ) / 2 - 1 == x printf \"0\\n\" elseif if last < ( n + 1 ) / 2 printf \"%d\\n\" n - 2 * last elseif if first > ( n + 1 ) / 2 printf \"%d\\n\" 2 * first - n - 1 elseif if n == 1 printf \"0\\n\" @AT@ 771 @LENGTH@ 164\n" + "---UPD condition@@array ][( n + 1 ) / 2 == x @TO@ array ][( n + 1 ) / 2 - 1 == x @AT@ 771 @LENGTH@ 20\n" + @@ -416,56 +226,23 @@ public class TestRealCases { @Test public void test_315_A_6149995_6150754() throws IOException { //TODO not sure - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="315-A-6149995-6150754.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("315-A-6149995-6150754.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if a ][j == t ans -- @TO@ if a ][j == t ans -- a ][j = 0 @AT@ 302 @LENGTH@ 20\n" + - "---UPD then@@ans -- @TO@ ans -- a ][j = 0 @AT@ 332 @LENGTH@ 6\n" + - "------UPD block@@ans -- @TO@ ans -- a ][j = 0 @AT@ 332 @LENGTH@ 6\n" + - "---------INS expr_stmt@@a ][j = 0 @TO@ block@@ans -- @AT@ 377 @LENGTH@ 9\n" + - "------------INS expr@@a ][j = 0 @TO@ expr_stmt@@a ][j = 0 @AT@ 377 @LENGTH@ 9\n" + - "---------------INS name@@a ][j @TO@ expr@@a ][j = 0 @AT@ 377 @LENGTH@ 5\n" + - "------------------INS name@@a @TO@ name@@a ][j @AT@ 377 @LENGTH@ 1\n" + - "------------------INS index@@][j @TO@ name@@a ][j @AT@ 379 @LENGTH@ 3\n" + - "---------------------INS expr@@[j @TO@ index@@][j @AT@ 379 @LENGTH@ 2\n" + - "------------------------INS name@@[j @TO@ expr@@[j @AT@ 379 @LENGTH@ 2\n" + - "---------------INS operator@@= @TO@ expr@@a ][j = 0 @AT@ 381 @LENGTH@ 1\n" + - "---------------INS literal@@0 @TO@ expr@@a ][j = 0 @AT@ 382 @LENGTH@ 1\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"INS expr_stmt@@a ][j = 0 @TO@ block@@ans -- @AT@ 377 @LENGTH@ 9\n" + + "---INS expr@@a ][j = 0 @TO@ expr_stmt@@a ][j = 0 @AT@ 377 @LENGTH@ 9\n" + + "------INS name@@a ][j @TO@ expr@@a ][j = 0 @AT@ 377 @LENGTH@ 5\n" + + "---------INS name@@a @TO@ name@@a ][j @AT@ 377 @LENGTH@ 1\n" + + "---------INS index@@][j @TO@ name@@a ][j @AT@ 379 @LENGTH@ 3\n" + + "------------INS expr@@[j @TO@ index@@][j @AT@ 379 @LENGTH@ 2\n" + + "---------------INS name@@[j @TO@ expr@@[j @AT@ 379 @LENGTH@ 2\n" + + "------INS operator@@= @TO@ expr@@a ][j = 0 @AT@ 381 @LENGTH@ 1\n" + + "------INS literal@@0 @TO@ expr@@a ][j = 0 @AT@ 382 @LENGTH@ 1\n"); } @Test public void test_158_A_18237828_18237840() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="158-A-18237828-18237840.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("158-A-18237828-18237840.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ara ][i >= ara ][k - 1 count ++ @TO@ if ara ][i >= ara ][k - 1 && ara ][i != 0 count ++ @AT@ 219 @LENGTH@ 34\n" + "---UPD condition@@ara ][i >= ara ][k - 1 @TO@ ara ][i >= ara ][k - 1 && ara ][i != 0 @AT@ 219 @LENGTH@ 19\n" + @@ -484,22 +261,7 @@ public class TestRealCases { @Test public void test_405_B_9434593_9434605() throws IOException { //TODO not sure - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="405-B-9434593-9434605.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("405-B-9434593-9434605.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if input ][0 == '.' count = 1 @TO@ if input ][0 == '.' count = 1 else i1 = 0 @AT@ 260 @LENGTH@ 29\n" + "---INS else@@else i1 = 0 @TO@ if@@if input ][0 == '.' count = 1 @AT@ 295 @LENGTH@ 11\n" + @@ -515,22 +277,7 @@ public class TestRealCases { @Test public void test_489_A_9343123_9343126() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="489-A-9343123-9343126.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("489-A-9343123-9343126.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ZA ][d < ZA ][c d = c @TO@ if ZA ][d > ZA ][c d = c @AT@ 252 @LENGTH@ 24\n" + "---UPD condition@@ZA ][d < ZA ][c @TO@ ZA ][d > ZA ][c @AT@ 252 @LENGTH@ 16\n" + @@ -541,22 +288,7 @@ public class TestRealCases { @Test public void test_143_A_17964626_17964657() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="143-A-17964626-17964657.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("143-A-17964626-17964657.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for a = 1 a < ( r1 % 10 ) a ++ for i = 1 i <= 1000 i ++ ar ][i = 0 ar ][a = 1 if a >= c1 || a >= d1 continue; b = r1 - a if ar ][b == 1 continue; else ar ][b = 1 if b >= c2 || b >= d2 continue; c = c1 - a if ar ][c == 1 continue; else ar ][c = 1 if c >= r2 || c >= d2 continue; d = d1 - a if ar ][d == 1 continue; if d >= r2 || d >= c2 continue; if b + c != d2 continue; if b + d != c2 continue; if c + d != r2 continue; if a > 9 || b > 9 || c > 9 || d > 9 continue; flag = 1 break; @TO@ for a = 1 a < r1 a ++ for i = 1 i <= 1000 i ++ ar ][i = 0 ar ][a = 1 if a >= c1 || a >= d1 continue; b = r1 - a if ar ][b == 1 continue; else ar ][b = 1 if b >= c2 || b >= d2 continue; c = c1 - a if ar ][c == 1 continue; else ar ][c = 1 if c >= r2 || c >= d2 continue; d = d1 - a if ar ][d == 1 continue; if d >= r2 || d >= c2 continue; if b + c != d2 continue; if b + d != c2 continue; if c + d != r2 continue; if a > 9 || b > 9 || c > 9 || d > 9 continue; flag = 1 break; @AT@ 187 @LENGTH@ 482\n" + "---UPD control@@a = 1 a < ( r1 % 10 ) a ++ @TO@ a = 1 a < r1 a ++ @AT@ 187 @LENGTH@ 22\n" + @@ -573,22 +305,7 @@ public class TestRealCases { @Test public void test_612_A_15750192_15750273() throws IOException { //TODO - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="612-A-15750192-15750273.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("612-A-15750192-15750273.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for i = p i <= k i ++ printf \"%c\" a ][i @TO@ for i = p i < k i ++ printf \"%c\" a ][i @AT@ 262 @LENGTH@ 39\n" + @@ -602,22 +319,7 @@ public class TestRealCases { @Test public void test_31_B_6435804_6435825() throws IOException { //TODO - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="31-B-6435804-6435825.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("31-B-6435804-6435825.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for i = 1 i <= strlen s i ++ if n == - 1 if fl == 1 elseif if s ][i == '@' fl = 1 @TO@ for i = 1 i < strlen s i ++ if n == - 1 if fl == 1 elseif if s ][i == '@' fl = 1 @AT@ 225 @LENGTH@ 81\n" + "---UPD control@@i = 1 i <= strlen s i ++ @TO@ i = 1 i < strlen s i ++ @AT@ 225 @LENGTH@ 29\n" + @@ -630,22 +332,7 @@ public class TestRealCases { @Test public void test_644_A_18166947_18166954() throws IOException { //TODO - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="644-A-18166947-18166954.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("644-A-18166947-18166954.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD for@@for i = 0 i < b i ++ for j = 0 j < b j ++ printf \"%lld \" array ][i ][j printf \"\\n\" @TO@ for i = 0 i < a i ++ for j = 0 j < b j ++ printf \"%lld \" array ][i ][j printf \"\\n\" @AT@ 1251 @LENGTH@ 82\n" + "---UPD control@@i = 0 i < b i ++ @TO@ i = 0 i < a i ++ @AT@ 1251 @LENGTH@ 14\n" + @@ -657,22 +344,7 @@ public class TestRealCases { @Test public void test_5_B_10350073_10350082() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="5-B-10350073-10350082.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("5-B-10350073-10350082.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if ! ( ( ml - l ) % 2 ) if right sl += 1 right = 1 - right @TO@ if ( ml - l ) % 2 if right sl += 1 right = 1 - right @AT@ 515 @LENGTH@ 58\n" + "---UPD condition@@! ( ( ml - l ) % 2 ) @TO@ ( ml - l ) % 2 @AT@ 515 @LENGTH@ 18\n" + @@ -685,22 +357,7 @@ public class TestRealCases { @Test public void test_675_A_18211752_18211767() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="675-A-18211752-18211767.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("675-A-18211752-18211767.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"MOV return@@0 @TO@ block@@ @AT@ 242 @LENGTH@ 10\n"); @@ -709,22 +366,7 @@ public class TestRealCases { @Test public void test_158_A_18278572_18278586() throws IOException { //TODO - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="158-A-18278572-18278586.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("158-A-18278572-18278586.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD while@@while a ][i >= a ][k && i <= n count ++ i ++ @TO@ while a ][i >= a ][k && i <= n && a ][i != 0 count ++ i ++ @AT@ 501 @LENGTH@ 44\n" + "---UPD condition@@a ][i >= a ][k && i <= n @TO@ a ][i >= a ][k && i <= n && a ][i != 0 @AT@ 501 @LENGTH@ 19\n" + @@ -743,22 +385,7 @@ public class TestRealCases { @Test public void test_31_B_136044_136045() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="31-B-136044-136045.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("31-B-136044-136045.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"MOV if@@if flag puts ans + 1 else printf \"No solution\\n\" @TO@ block@@long i l flag 0 tot 0 gets str + 1 l = strlen str + 1 if str ][1 == '@' || str ][l == '@' end for i = 1 i <= l - 2 i ++ if str ][i == '@' && ( str ][i + 1 == '@' || str ][i + 2 == '@' ) end for i = 1 i <= l i ++ if flag && str ][i + 1 == '@' ans ][++ tot = ',' if str ][i == '@' flag = 1 ans ][++ tot = str ][i if flag puts ans + 1 else printf \"No solution\\n\" end 0 @AT@ 937 @LENGTH@ 48\n"); @@ -767,21 +394,7 @@ public class TestRealCases { @Test public void test_432_A_16886797_16886828() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="432-A-16886797-16886828.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("432-A-16886797-16886828.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"MOV if@@if z <= 5 - y s ++ @TO@ block@@scanf \"%d\" & z @AT@ 132 @LENGTH@ 18\n"); } @@ -789,133 +402,69 @@ public class TestRealCases { @Test public void test_507_A_16886367_16886377() throws IOException { //TODO macro - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="507-A-16886367-16886377.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("507-A-16886367-16886377.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD function@@int main int argc char * argv [] int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 n printf \"%d \" a ][j 0 @TO@ int main int argc char * argv [] int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 i printf \"%d \" a ][j 0 @AT@ 237 @LENGTH@ 382\n" + - "---UPD block@@int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 n printf \"%d \" a ][j 0 @TO@ int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 i printf \"%d \" a ][j 0 @AT@ 270 @LENGTH@ 491\n" + - "------UPD macro@@FOR j 0 n @TO@ FOR j 0 i @AT@ 701 @LENGTH@ 9\n" + - "---------UPD argument_list@@j 0 n @TO@ j 0 i @AT@ 704 @LENGTH@ 8\n" + - "------------UPD argument@@n @TO@ i @AT@ 709 @LENGTH@ 1\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 n printf \"%d \" a ][j 0 @TO@ int x 0 n 0 s 0 i j k h ][105 0 a ][105 0 c ][105 0 y 0 top 0 scanf \"%d %d\" & n & k FOR i 0 n scanf \"%d\" & c ][i FOR i 0 n a ][i = i + 1 FOR i 0 n FOR j 1 n if c ][j - 1 > c ][j s = c ][j c ][j = c ][j - 1 c ][j - 1 = s s = a ][j a ][j = a ][j - 1 a ][j - 1 = s FOR i 0 n top += c ][i if top > k break; printf \"%d\\n\" i FOR j 0 i printf \"%d \" a ][j 0 @AT@ 270 @LENGTH@ 491\n" + + "---UPD macro@@FOR j 0 n @TO@ FOR j 0 i @AT@ 701 @LENGTH@ 9\n" + + "------UPD argument_list@@j 0 n @TO@ j 0 i @AT@ 704 @LENGTH@ 8\n" + + "---------UPD argument@@n @TO@ i @AT@ 709 @LENGTH@ 1\n"); } @Test public void test_25_D_110126_110132() throws IOException { //TODO macro - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="25-D-110126-110132.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("25-D-110126-110132.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD function@@int main int argc char * argv [] int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i m cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @TO@ int main int argc char * argv [] int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i n cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @AT@ 379 @LENGTH@ 869\n" + - "---UPD block@@int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i m cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @TO@ int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i n cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @AT@ 411 @LENGTH@ 955\n" + - "------UPD macro@@rep i m @TO@ rep i n @AT@ 746 @LENGTH@ 7\n" + - "---------UPD argument_list@@i m @TO@ i n @AT@ 749 @LENGTH@ 6\n" + - "------------UPD argument@@m @TO@ n @AT@ 752 @LENGTH@ 1\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i m cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @TO@ int i j k l m n int a ][1200 b ][1200 unused ][1200 int ind ][1200 int cnt ][1200 int res_a ][1200 res_b ][1200 res_c ][1200 res_d ][1200 int shima int res bef scanf \"%d\" & n m = n - 1 rep i m scanf \"%d%d\" a + i b + i , a ][i -- , b ][i -- unionInit ind n rep i m unionConnect ind a ][i b ][i shima = 0 rep i n cnt ][unionGet ind i = 1 rep i n shima += cnt ][i res = 0 bef = - 1 rep i n if cnt ][i if bef >= 0 res_c ][res = bef res_d ][res ++ = i bef = i res = 0 rep k m unused ][k = 0 rep k m unionInit ind n rep i m if unused ][i == 0 if i != k unionConnect ind a ][i b ][i rep i n cnt ][i = 0 rep i n cnt ][unionGet ind i = 1 j = 0 rep i n j += cnt ][i if j == shima unused ][k = 1 res_a ][res = a ][k res_b ][res ++ = b ][k printf \"%d\\n\" res rep i res printf \"%d %d %d %d\\n\" res_a ][i + 1 res_b ][i + 1 res_c ][i + 1 res_d ][i + 1 0 @AT@ 411 @LENGTH@ 955\n" + + "---UPD macro@@rep i m @TO@ rep i n @AT@ 746 @LENGTH@ 7\n" + + "------UPD argument_list@@i m @TO@ i n @AT@ 749 @LENGTH@ 6\n" + + "---------UPD argument@@m @TO@ n @AT@ 752 @LENGTH@ 1\n"); } @Test public void test_490_A_14580360_14580456() throws IOException { //TODO - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath","FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename ="490-A-14580360-14580456.c"; - - File revFile = new File(root + "revFiles/"+ filename); - File prevFile =new File(root + "prevFiles/prev_"+filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("490-A-14580360-14580456.c"); Assert.assertEquals(hierarchicalActionSets.size(),1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD function@@int main int argc char * argv [] int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x elseif if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @TO@ int main int argc char * argv [] int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @AT@ 18 @LENGTH@ 435\n" + - "---UPD block@@int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x elseif if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @TO@ int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @AT@ 51 @LENGTH@ 642\n" + - "------UPD if@@if x < min min = x elseif if y < min min = y @TO@ if x < min min = x @AT@ 507 @LENGTH@ 44\n" + - "---------DEL elseif@@elseif if y < min min = y @AT@ 548 @LENGTH@ 25\n" + - "------MOV if@@if y < min min = y @TO@ block@@int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min min = x elseif if y < min min = y printf \"%d\\n\" min for i = 1 i <= min i ++ printf \"%d %d %d\\n\" b ][i c ][i d ][i 0 @AT@ 548 @LENGTH@ 18\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min elseif if y < min printf \"%d\\n\" min for i = 1 i <= min i ++ 0 @TO@ int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min if y < min printf \"%d\\n\" min for i = 1 i <= min i ++ 0 @AT@ 51 @LENGTH@ 642\n" + + "---UPD if@@if x < min elseif if y < min @TO@ if x < min @AT@ 507 @LENGTH@ 28\n" + + "------DEL elseif@@elseif if y < min @AT@ 548 @LENGTH@ 17\n" + + "---MOV if@@if y < min @TO@ block@@int n i j k l scanf \"%d\" & n int a ][5005 b ][5005 c ][5005 d ][5005 int w 0 x 0 y 0 for i = 1 , j = 1 , k = 1 , l = 1 i <= n i ++ scanf \"%d\" & a ][i if a ][i == 1 b ][j = i w ++ j ++ elseif if a ][i == 2 c ][k = i x ++ k ++ elseif if a ][i == 3 d ][l = i y ++ l ++ int min w if x < min elseif if y < min printf \"%d\\n\" min for i = 1 i <= min i ++ 0 @AT@ 548 @LENGTH@ 10\n"); } @Test public void test_336_A_11394760_11394769() throws IOException { //TODO - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath", "FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename = "336-A-11394760-11394769.c"; - - File revFile = new File(root + "revFiles/" + filename); - File prevFile = new File(root + "prevFiles/prev_" + filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("336-A-11394760-11394769.c"); Assert.assertEquals(hierarchicalActionSets.size(), 1); - Assert.assertEquals(hierarchicalActionSets.get(0).toString(), "UPD function@@int main int argc char * argv [] ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @TO@ int main int argc char * argv [] ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @AT@ 39 @LENGTH@ 390\n" + - "---UPD block@@ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @TO@ ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) 0 @AT@ 72 @LENGTH@ 493\n" + - "------DEL if@@if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero @AT@ 146 @LENGTH@ 72\n" + - "------UPD if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @TO@ if x >= 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 245 @LENGTH@ 240\n" + - "---------MOV condition@@x >= 0 && y >= 0 @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 146 @LENGTH@ 13\n" + - "---------MOV then@@printf \"%lld %lld %lld %lld\\n\" zero x + y x + y zero @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 165 @LENGTH@ 52\n" + - "---------INS elseif@@elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y elseif if x >= 0 && y < 0 printf \"%lld %lld %lld %lld\\n\" zero - ( x - y ) x - y zero else printf \"%lld %lld %lld %lld\\n\" - ( - x - y ) zero zero - ( - x - y ) @AT@ 250 @LENGTH@ 88\n" + - "------------INS if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @TO@ elseif@@elseif if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @AT@ 250 @LENGTH@ 81\n" + - "---------------MOV condition@@x < 0 && y >= 0 @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @AT@ 245 @LENGTH@ 12\n" + - "---------------MOV then@@printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @TO@ if@@if x < 0 && y >= 0 printf \"%lld %lld %lld %lld\\n\" - ( - x + y ) zero zero - x + y @AT@ 263 @LENGTH@ 62\n"); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(), "UPD block@@ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 if x < 0 && y >= 0 elseif if x >= 0 && y < 0 else 0 @TO@ ll x y ll zero 0 scanf \"%lld%lld\" & x & y if x >= 0 && y >= 0 elseif if x < 0 && y >= 0 elseif if x >= 0 && y < 0 else 0 @AT@ 72 @LENGTH@ 493\n" + + "---DEL if@@if x >= 0 && y >= 0 @AT@ 146 @LENGTH@ 19\n" + + "---UPD if@@if x < 0 && y >= 0 elseif if x >= 0 && y < 0 else @TO@ if x >= 0 && y >= 0 elseif if x < 0 && y >= 0 elseif if x >= 0 && y < 0 else @AT@ 245 @LENGTH@ 49\n" + + "------MOV condition@@x >= 0 && y >= 0 @TO@ if@@if x < 0 && y >= 0 elseif if x >= 0 && y < 0 else @AT@ 146 @LENGTH@ 13\n" + + "------MOV then@@ @TO@ if@@if x < 0 && y >= 0 elseif if x >= 0 && y < 0 else @AT@ 165 @LENGTH@ 0\n" + + "------INS elseif@@elseif if x < 0 && y >= 0 @TO@ if@@if x < 0 && y >= 0 elseif if x >= 0 && y < 0 else @AT@ 250 @LENGTH@ 25\n" + + "---------INS if@@if x < 0 && y >= 0 @TO@ elseif@@elseif if x < 0 && y >= 0 @AT@ 250 @LENGTH@ 18\n" + + "------------MOV condition@@x < 0 && y >= 0 @TO@ if@@if x < 0 && y >= 0 @AT@ 245 @LENGTH@ 12\n" + + "------------MOV then@@ @TO@ if@@if x < 0 && y >= 0 @AT@ 263 @LENGTH@ 0\n"); } + + //10-A-bug-1998522-1998523 + @Test + public void test_10_A_1998522_1998523() throws IOException { + //TODO + List hierarchicalActionSets = getHierarchicalActionSets("10-A-1998522-1998523.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(), "INS expr_stmt@@lr = r @TO@ block@@scanf \"%d %d\" & l & r e += ( r - l ) * p1 if l - lr <= t1 e += ( l - lr ) * p1 else e += t1 * p1 if l - lr <= t1 + t2 e += ( l - lr - t1 ) * p2 else e += t2 * p2 + ( l - lr - t1 - t2 ) * p3 @AT@ 465 @LENGTH@ 6\n" + + "---INS expr@@lr = r @TO@ expr_stmt@@lr = r @AT@ 465 @LENGTH@ 6\n" + + "------INS name@@lr @TO@ expr@@lr = r @AT@ 465 @LENGTH@ 2\n" + + "------INS operator@@= @TO@ expr@@lr = r @AT@ 468 @LENGTH@ 1\n" + + "------INS name@@r @TO@ expr@@lr = r @AT@ 470 @LENGTH@ 1\n"); + } @Test public void test_328_B_4080800_4080805() throws IOException { - Properties appProps = new Properties(); - appProps.load(new FileInputStream("src/main/resource/app.properties")); - String srcMLPath = appProps.getProperty("srcMLPath", "FORKJOIN"); - String root = appProps.getProperty("inputPath"); - root = root + "/codeflaws/"; - String filename = "328-B-4080800-4080805.c"; - - File revFile = new File(root + "revFiles/" + filename); - File prevFile = new File(root + "prevFiles/prev_" + filename); - - EDiffHunkParser parser = new EDiffHunkParser(); - - - List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); - hierarchicalActionSets.size(); + List hierarchicalActionSets = getHierarchicalActionSets("328-B-4080800-4080805.c"); Assert.assertEquals(hierarchicalActionSets.size(), 1); Assert.assertEquals(hierarchicalActionSets.get(0).toString(), "DEL for@@for i = 0 i < 10 i ++ printf \"%d %d\\n\" num ][i tnum ][i @AT@ 453 @LENGTH@ 55\n" + "---DEL control@@i = 0 i < 10 i ++ @AT@ 453 @LENGTH@ 15\n" + @@ -958,7 +507,151 @@ public class TestRealCases { "---------------------------------DEL name@@[i @AT@ 506 @LENGTH@ 2\n"); } + @Test + public void test_10_A_2106391_2106405() throws IOException { + List hierarchicalActionSets = getHierarchicalActionSets("10-A-2106391-2106405.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD block@@ @TO@ scanf \"%d %d\" & c & e d = c - b if d >= t1 p += t1 * p1 d -= t1 elseif if d > 0 p += d * p1 d = 0 if d >= t2 p += t2 * p2 d -= t2 elseif if d > 0 p += d * p2 d = 0 if d > 0 p += d * p3 p += p1 * ( e - c ) a = c b = e @AT@ 291 @LENGTH@ 0\n" + + "---DEL empty_stmt@@ @AT@ 291 @LENGTH@ 0\n" + + "---MOV expr_stmt@@scanf \"%d %d\" & c & e @TO@ block@@ @AT@ 309 @LENGTH@ 21\n" + + "---MOV expr_stmt@@d = c - b @TO@ block@@ @AT@ 347 @LENGTH@ 9\n" + + "---MOV if@@if d >= t1 p += t1 * p1 d -= t1 elseif if d > 0 p += d * p1 d = 0 @TO@ block@@ @AT@ 372 @LENGTH@ 65\n" + + "---MOV if@@if d >= t2 p += t2 * p2 d -= t2 elseif if d > 0 p += d * p2 d = 0 @TO@ block@@ @AT@ 618 @LENGTH@ 65\n" + + "---MOV if@@if d > 0 p += d * p3 @TO@ block@@ @AT@ 857 @LENGTH@ 20\n" + + "---MOV expr_stmt@@p += p1 * ( e - c ) @TO@ block@@ @AT@ 888 @LENGTH@ 19\n" + + "---MOV expr_stmt@@a = c @TO@ block@@ @AT@ 917 @LENGTH@ 5\n" + + "---MOV expr_stmt@@b = e @TO@ block@@ @AT@ 938 @LENGTH@ 5\n"); + } + + //10-A-4557108-4561236 + @Test + public void test_10_A_4557108_4561236() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("10-A-4557108-4561236.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if m > t1 && m < t2 @TO@ if m > t1 && m - t1 < t2 @AT@ 502 @LENGTH@ 19\n" + + "---UPD condition@@m > t1 && m < t2 @TO@ m > t1 && m - t1 < t2 @AT@ 502 @LENGTH@ 15\n" + + "------UPD expr@@m > t1 && m < t2 @TO@ m > t1 && m - t1 < t2 @AT@ 503 @LENGTH@ 16\n" + + "---------INS operator@@- @TO@ expr@@m > t1 && m < t2 @AT@ 512 @LENGTH@ 1\n" + + "---------INS name@@t1 @TO@ expr@@m > t1 && m < t2 @AT@ 513 @LENGTH@ 2\n"); + } + + //10-A-5914564-5914663 + @Test + public void test_10_A_5914564_5914663() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("10-A-5914564-5914663.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if lr + t1 + t2 <= a power += ( t2 * p2 ) + ( a - lr - t1 - t2 ) * p3 @TO@ if lr + t1 + t2 <= a power += ( t2 * p2 ) + ( a - lr - t1 - t2 ) * p3 else power += ( a - lr - t1 ) * p2 @AT@ 406 @LENGTH@ 69\n" + + "---INS else@@else power += ( a - lr - t1 ) * p2 @TO@ if@@if lr + t1 + t2 <= a power += ( t2 * p2 ) + ( a - lr - t1 - t2 ) * p3 @AT@ 501 @LENGTH@ 34\n" + + "------INS block@@power += ( a - lr - t1 ) * p2 @TO@ else@@else power += ( a - lr - t1 ) * p2 @AT@ 501 @LENGTH@ 29\n" + + "---------INS expr_stmt@@power += ( a - lr - t1 ) * p2 @TO@ block@@power += ( a - lr - t1 ) * p2 @AT@ 501 @LENGTH@ 29\n" + + "------------INS expr@@power += ( a - lr - t1 ) * p2 @TO@ expr_stmt@@power += ( a - lr - t1 ) * p2 @AT@ 501 @LENGTH@ 29\n" + + "---------------INS name@@power @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 501 @LENGTH@ 5\n" + + "---------------INS operator@@+= @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 506 @LENGTH@ 2\n" + + "---------------INS operator@@( @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 508 @LENGTH@ 1\n" + + "---------------INS name@@a @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 509 @LENGTH@ 1\n" + + "---------------INS operator@@- @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 510 @LENGTH@ 1\n" + + "---------------INS name@@lr @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 511 @LENGTH@ 2\n" + + "---------------INS operator@@- @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 513 @LENGTH@ 1\n" + + "---------------INS name@@t1 @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 514 @LENGTH@ 2\n" + + "---------------INS operator@@) @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 516 @LENGTH@ 1\n" + + "---------------INS operator@@* @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 517 @LENGTH@ 1\n" + + "---------------INS name@@p2 @TO@ expr@@power += ( a - lr - t1 ) * p2 @AT@ 518 @LENGTH@ 2\n"); + } + + //10-D-1434543-1434549 + @Test + public void test_10_D_1434543_1434549() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("10-D-1434543-1434549.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"INS if@@if max == 0 printf \"0\\n\" continue; @TO@ block@@for i = 0 i < la i ++ scanf \"%d\" & a ][i scanf \"%d\" & lb for i = 0 i < lb i ++ scanf \"%d\" & b ][i memset f 0 f for i = 0 i <= 500 i ++ p ][i = - 1 for i = 1 i <= la i ++ k = 0 for j = 1 j <= lb j ++ if b ][j - 1 < a ][i - 1 && f ][j > f ][k k = j if a ][i - 1 == b ][j - 1 && f ][k >= f ][j f ][j = f ][k + 1 p ][j = k max = 0 int t 1 for i = 1 i <= lb i ++ int k 0 int d ][501 d ][++ k = b ][t - 1 while 1 t = p ][t if t == 0 break; d ][++ k = b ][t - 1 printf \"%d\\n\" k for i = k i > 1 i -- printf \"%d \" d ][i printf \"%d\\n\" d ][1 @AT@ 692 @LENGTH@ 34\n" + + "---INS condition@@max == 0 @TO@ if@@if max == 0 printf \"0\\n\" continue; @AT@ 692 @LENGTH@ 9\n" + + "------INS expr@@max == 0 @TO@ condition@@max == 0 @AT@ 693 @LENGTH@ 8\n" + + "---------INS name@@max @TO@ expr@@max == 0 @AT@ 693 @LENGTH@ 3\n" + + "---------INS operator@@== @TO@ expr@@max == 0 @AT@ 696 @LENGTH@ 2\n" + + "---------INS literal@@0 @TO@ expr@@max == 0 @AT@ 698 @LENGTH@ 1\n" + + "---INS then@@printf \"0\\n\" continue; @TO@ if@@if max == 0 printf \"0\\n\" continue; @AT@ 702 @LENGTH@ 22\n" + + "------INS block@@printf \"0\\n\" continue; @TO@ then@@printf \"0\\n\" continue; @AT@ 702 @LENGTH@ 26\n" + + "---------INS expr_stmt@@printf \"0\\n\" @TO@ block@@printf \"0\\n\" continue; @AT@ 703 @LENGTH@ 12\n" + + "------------INS expr@@printf \"0\\n\" @TO@ expr_stmt@@printf \"0\\n\" @AT@ 703 @LENGTH@ 12\n" + + "---------------INS call@@printf \"0\\n\" @TO@ expr@@printf \"0\\n\" @AT@ 703 @LENGTH@ 12\n" + + "------------------INS name@@printf @TO@ call@@printf \"0\\n\" @AT@ 703 @LENGTH@ 6\n" + + "------------------INS argument_list@@\"0\\n\" @TO@ call@@printf \"0\\n\" @AT@ 709 @LENGTH@ 8\n" + + "---------------------INS argument@@\"0\\n\" @TO@ argument_list@@\"0\\n\" @AT@ 710 @LENGTH@ 5\n" + + "------------------------INS expr@@\"0\\n\" @TO@ argument@@\"0\\n\" @AT@ 710 @LENGTH@ 5\n" + + "---------------------------INS literal@@\"0\\n\" @TO@ expr@@\"0\\n\" @AT@ 710 @LENGTH@ 5\n" + + "---------INS continue@@continue; @TO@ block@@printf \"0\\n\" continue; @AT@ 717 @LENGTH@ 9\n"); + } + + //101-A-3317973-3317996 + @Test + public void test_101_A_3317973_3317996() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("101-A-3317973-3317996.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if sum >= k break; @TO@ if sum > k break; @AT@ 858 @LENGTH@ 18\n" + + "---UPD condition@@sum >= k @TO@ sum > k @AT@ 858 @LENGTH@ 9\n" + + "------UPD expr@@sum >= k @TO@ sum > k @AT@ 859 @LENGTH@ 8\n" + + "---------UPD operator@@>= @TO@ > @AT@ 862 @LENGTH@ 2\n"); + HierarchicalActionSet actionSet = hierarchicalActionSets.get(0); + ITree targetTree = EDiffHelper.getTargets(actionSet); + ITree actionTree = EDiffHelper.getActionTrees(actionSet); + ITree shapeTree = EDiffHelper.getShapeTree(actionSet); + actionSet.getActionSize(); + } + //102-A-14574020-14574054 + @Test + public void test_102_A_14574020_14574054() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("102-A-14574020-14574054.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD if@@if min printf \"%ld \\n\" min else printf \"%d\" - 1 @TO@ if min != LONG_MAX printf \"%ld \\n\" min else printf \"%d\" - 1 @AT@ 1082 @LENGTH@ 47\n" + + "---UPD condition@@min @TO@ min != LONG_MAX @AT@ 1082 @LENGTH@ 8\n" + + "------UPD expr@@min @TO@ min != LONG_MAX @AT@ 1084 @LENGTH@ 3\n" + + "---------INS operator@@!= @TO@ expr@@min @AT@ 1087 @LENGTH@ 2\n" + + "---------INS name@@LONG_MAX @TO@ expr@@min @AT@ 1089 @LENGTH@ 8\n"); + } + + //102-A-9556179-9556185 + @Test + public void test_102_A_9556179_9556185() throws IOException { + + List hierarchicalActionSets = getHierarchicalActionSets("102-A-9556179-9556185.c"); + Assert.assertEquals(hierarchicalActionSets.size(), 1); + Assert.assertEquals(hierarchicalActionSets.get(0).toString(),"UPD expr_stmt@@b ][x ][y = 1 @TO@ b ][y ][x = b ][x ][y = 1 @AT@ 244 @LENGTH@ 13\n" + + "---UPD expr@@b ][x ][y = 1 @TO@ b ][y ][x = b ][x ][y = 1 @AT@ 244 @LENGTH@ 13\n" + + "------MOV name@@b ][x ][y @TO@ expr@@b ][x ][y = 1 @AT@ 244 @LENGTH@ 9\n" + + "------INS name@@b ][y ][x @TO@ expr@@b ][x ][y = 1 @AT@ 244 @LENGTH@ 9\n" + + "---------INS name@@b @TO@ name@@b ][y ][x @AT@ 244 @LENGTH@ 1\n" + + "---------INS index@@][y @TO@ name@@b ][y ][x @AT@ 246 @LENGTH@ 3\n" + + "------------INS expr@@[y @TO@ index@@][y @AT@ 246 @LENGTH@ 2\n" + + "---------------INS name@@[y @TO@ expr@@[y @AT@ 246 @LENGTH@ 2\n" + + "---------INS index@@][x @TO@ name@@b ][y ][x @AT@ 249 @LENGTH@ 3\n" + + "------------INS expr@@[x @TO@ index@@][x @AT@ 249 @LENGTH@ 2\n" + + "---------------INS name@@[x @TO@ expr@@[x @AT@ 249 @LENGTH@ 2\n" + + "------INS operator@@= @TO@ expr@@b ][x ][y = 1 @AT@ 262 @LENGTH@ 1\n"); + } + + public List getHierarchicalActionSets(String s) throws IOException { + Properties appProps = new Properties(); + appProps.load(new FileInputStream("src/main/resource/app.properties")); + String srcMLPath = appProps.getProperty("srcMLPath", "FORKJOIN"); + String root = appProps.getProperty("inputPath"); + root = root + "/codeflaws/"; + String filename = s; + + File revFile = new File(root + "revFiles/" + filename); + File prevFile = new File(root + "prevFiles/prev_" + filename); + + EDiffHunkParser parser = new EDiffHunkParser(); + + + List hierarchicalActionSets = parser.parseChangedSourceCodeWithGumTree2(prevFile, revFile, srcMLPath); + return hierarchicalActionSets; + } } diff --git a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java index ff399d8..fdf928c 100755 --- a/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java +++ b/src/main/java/edu/lu/uni/serval/fixminer/jobs/EnhancedASTDiff.java @@ -4,8 +4,6 @@ import akka.actor.ActorRef; import akka.actor.ActorSystem; import edu.lu.uni.serval.fixminer.akka.ediff.*; import edu.lu.uni.serval.utils.CallShell; -import edu.lu.uni.serval.utils.EDiffHelper; -import edu.lu.uni.serval.utils.FileHelper; import edu.lu.uni.serval.utils.PoolBuilder; import org.apache.commons.io.FileUtils; import org.slf4j.Logger; @@ -13,9 +11,9 @@ import org.slf4j.LoggerFactory; import redis.clients.jedis.Jedis; import redis.clients.jedis.JedisPool; -import java.io.*; -import java.nio.file.Files; -import java.nio.file.Paths; +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -64,6 +62,7 @@ public class EnhancedASTDiff { .filter(x -> !x.getName().startsWith(".")) .filter(x -> !x.getName().startsWith("cocci")) .filter(x -> !x.getName().endsWith(".index")) + .filter(x -> x.getName().endsWith("codeflaws")) .collect(Collectors.toList()); @@ -152,7 +151,8 @@ public class EnhancedASTDiff { File prevFile = new File(gumTreeInput + "prevFiles/prev_" + fileName);// previous file fileName = fileName + ".txt"; File diffentryFile = new File(gumTreeInput + "DiffEntries/" + fileName); // DiffEntry file - +// if(FileHelper.readFile(diffentryFile).split("@@\\s\\-\\d+,*\\d*\\s\\+\\d+,*\\d*\\s@@").length > 2) +// continue; MessageFile msgFile = new MessageFile(revFile, prevFile, diffentryFile); msgFiles.add(msgFile); diff --git a/src/main/resource/app.properties b/src/main/resource/app.properties index e3d6a1d..5a1e010 100755 --- a/src/main/resource/app.properties +++ b/src/main/resource/app.properties @@ -3,15 +3,16 @@ pjName = gumInput portInner = 6380 portDumps = 6399 parallelism = AKKA -numOfWorkers = 30 +numOfWorkers = 14 hostname = localhost hunkLimit = 10 #inputPath = /Users/anilkoyuncu/projects/gumInputLinux -inputPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux -redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis +inputPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/gumInputLinux +#redisPath = /Users/anil.koyuncu/projects/fixminer/fixminer-core/python/data/redis +redisPath = /Users/anilkoyuncu/projects/fixminer/fixminer-core/python/data/redis #srcMLPath= /Users/anil.koyuncu/Downloads/srcML/src2srcml -srcMLPath= /Users/anil.koyuncu/Downloads/srcML.0.9.5/bin/srcml +srcMLPath= /usr/local/bin/srcml actionType = ALL eDiffTimeout = 900 diff --git a/src/main/resource/testFiles/if_else.c b/src/main/resource/testFiles/if_else.c new file mode 100644 index 0000000..be7b210 --- /dev/null +++ b/src/main/resource/testFiles/if_else.c @@ -0,0 +1,10 @@ + +const static ctl_serialize_action +static int test(){ + field = ATOM(TST); + if(IS_ERR(fields->mode)) + return PTR_ERROR(fields->mode); + if(a>0) + return 1; + return 0; +} \ No newline at end of file diff --git a/src/main/resource/testFiles/if_return.c b/src/main/resource/testFiles/if_return.c new file mode 100644 index 0000000..bfe8110 --- /dev/null +++ b/src/main/resource/testFiles/if_return.c @@ -0,0 +1,6 @@ +static int test(){ + field = ATOM(TST); + if(IS_ERR(fields->mode)) + return PTR_ERROR(fields->mode); + return 0; +} \ No newline at end of file diff --git a/src/main/resource/testFiles/prev_if_else.c b/src/main/resource/testFiles/prev_if_else.c new file mode 100644 index 0000000..03a7336 --- /dev/null +++ b/src/main/resource/testFiles/prev_if_else.c @@ -0,0 +1,9 @@ +static ctl_serialize_action +static int test(){ + field = ATOM(TST); + if(IS_ERR(fields->mode)) + return PTR_ERROR(fields->mode); + else if(a>0) + return 1; + return 0; +} \ No newline at end of file diff --git a/src/main/resource/testFiles/prev_if_return.c b/src/main/resource/testFiles/prev_if_return.c new file mode 100644 index 0000000..86e08a6 --- /dev/null +++ b/src/main/resource/testFiles/prev_if_return.c @@ -0,0 +1,4 @@ +static int test(){ + field = ATOM(TST); + return PTR_ERROR_OR_ZERO(fields->mode); +} \ No newline at end of file diff --git a/src/main/resource/testFiles/prev_struct.c b/src/main/resource/testFiles/prev_struct.c new file mode 100644 index 0000000..c3ebfdb --- /dev/null +++ b/src/main/resource/testFiles/prev_struct.c @@ -0,0 +1,5 @@ +struct b { + int x; + double y; + float z; + }; \ No newline at end of file diff --git a/src/main/resource/testFiles/struct.c b/src/main/resource/testFiles/struct.c new file mode 100644 index 0000000..82ecbce --- /dev/null +++ b/src/main/resource/testFiles/struct.c @@ -0,0 +1,5 @@ +struct a { + int x; + double y; + float z; + }; \ No newline at end of file From a8c8b19585bbd73aadcb1107537b7a660fb91681 Mon Sep 17 00:00:00 2001 From: ANIL KOYUNCU Date: Mon, 17 Feb 2020 17:48:45 +0100 Subject: [PATCH 23/41] cleanup --- .idea/compiler.xml | 9 + .idea/encodings.xml | 9 +- .idea/misc.xml | 3 +- .idea/vcs.xml | 1 + .idea/workspace.xml | 860 +++++------------- pom.xml | 71 +- .../edu/lu/uni/serval/fixminer/Launcher.java | 10 +- .../fixminer/akka/compare/CompareTrees.java | 390 ++++---- .../akka/ediff/DefaultKryoContext.java | 83 -- .../fixminer/akka/ediff/HunkParserTest.java | 8 +- .../fixminer/akka/ediff/TestIntroClass.java | 2 - .../serval/fixminer/jobs/EnhancedASTDiff.java | 2 +- .../edu/lu/uni/serval/utils/EDiffHelper.java | 195 ++-- src/main/resource/app.properties | 8 +- 14 files changed, 534 insertions(+), 1117 deletions(-) delete mode 100644 src/main/java/edu/lu/uni/serval/fixminer/akka/ediff/DefaultKryoContext.java diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 13d317f..de3de08 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -7,7 +7,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml index e79da7e..fa513c6 100644 --- a/.idea/encodings.xml +++ b/.idea/encodings.xml @@ -1,6 +1,13 @@ - + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 4b661a5..0918945 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,10 +5,11 @@ - + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 94a25f7..14ca6ef 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c15c296..f597035 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,161 +4,24 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -