PrivateHandler.java

1
/* $Id: PrivateHandler.java 19907 2012-12-30 13:06:01Z closettop_nightlybuild $
2
 *****************************************************************************
3
 * Copyright (c) 2009-2012 Contributors - see below
4
 * All rights reserved. This program and the accompanying materials
5
 * are made available under the terms of the Eclipse Public License v1.0
6
 * which accompanies this distribution, and is available at
7
 * http://www.eclipse.org/legal/epl-v10.html
8
 *
9
 * Contributors:
10
 *    tfmorris
11
 *****************************************************************************
12
 *
13
 * Some portions of this file was previously release using the BSD License:
14
 */
15
16
// Copyright (c) 1996-2009 The Regents of the University of California. All
17
// Rights Reserved. Permission to use, copy, modify, and distribute this
18
// software and its documentation without fee, and without a written
19
// agreement is hereby granted, provided that the above copyright notice
20
// and this paragraph appear in all copies.  This software program and
21
// documentation are copyrighted by The Regents of the University of
22
// California. The software program and documentation are supplied "AS
23
// IS", without any accompanying services from The Regents. The Regents
24
// does not warrant that the operation of the program will be
25
// uninterrupted or error-free. The end-user understands that the program
26
// was developed for research purposes and is advised not to rely
27
// exclusively on the program for any reason.  IN NO EVENT SHALL THE
28
// UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
29
// SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS,
30
// ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
31
// THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
32
// SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY
33
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
34
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
35
// PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
36
// CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT,
37
// UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
38
39
package org.argouml.persistence;
40
41
import java.util.StringTokenizer;
42
import java.util.logging.Level;
43
import java.util.logging.Logger;
44
45
import org.argouml.uml.diagram.ui.PathItemPlacement;
46
import org.argouml.util.IItemUID;
47
import org.argouml.util.ItemUID;
48
import org.tigris.gef.base.PathItemPlacementStrategy;
49
import org.tigris.gef.persistence.pgml.Container;
50
import org.tigris.gef.persistence.pgml.FigEdgeHandler;
51
import org.tigris.gef.persistence.pgml.FigGroupHandler;
52
import org.tigris.gef.persistence.pgml.PGMLHandler;
53
import org.tigris.gef.presentation.Fig;
54
import org.tigris.gef.presentation.FigEdge;
55
import org.xml.sax.Attributes;
56
import org.xml.sax.SAXException;
57
58
/**
59
 * Will set the ItemUID for objects represented by
60
 * PGML elements that contain private elements that have
61
 * ItemUID assignments in them.<p>
62
 *
63
 * Currently, there are three possibilities: ArgoDiagram,
64
 * FigNode, FigEdge
65
 */
66
class PrivateHandler
67
    extends org.tigris.gef.persistence.pgml.PrivateHandler {
68
69
    private Container container;
70
71
    /**
72
     * Logger.
73
     */
74
    private static final Logger LOG =
75
        Logger.getLogger(PrivateHandler.class.getName());
76
77
    /**
78
     * The constructor.
79
     *
80
     * @param parser
81
     * @param cont
82
     */
83
    public PrivateHandler(PGMLStackParser parser, Container cont) {
84
        super(parser, cont);
85
        container = cont;
86
    }
87
88
    /**
89
     * If the containing object is a type for which the private element
90
     * might contain an ItemUID, extract the ItemUID if it exists and assign it
91
     * to the object.
92
     *
93
     * @param contents
94
     * @exception SAXException
95
     */
96
    public void gotElement(String contents)
97
        throws SAXException {
98
99 1 1. gotElement : negated conditional → NO_COVERAGE
        if (container instanceof PGMLHandler) {
100
            Object o = getPGMLStackParser().getDiagram();
101 1 1. gotElement : negated conditional → NO_COVERAGE
            if (o instanceof IItemUID) {
102
                ItemUID uid = getItemUID(contents);
103 1 1. gotElement : negated conditional → NO_COVERAGE
                if (uid != null) {
104 1 1. gotElement : removed call to org/argouml/util/IItemUID::setItemUID → NO_COVERAGE
                    ((IItemUID) o).setItemUID(uid);
105
                }
106
            }
107
            // No other uses of string in PGMLHandler
108
            return;
109
        }
110
111 1 1. gotElement : negated conditional → NO_COVERAGE
        if (container instanceof FigGroupHandler) {
112
            Object o = ((FigGroupHandler) container).getFigGroup();
113 1 1. gotElement : negated conditional → NO_COVERAGE
            if (o instanceof IItemUID) {
114
                ItemUID uid = getItemUID(contents);
115 1 1. gotElement : negated conditional → NO_COVERAGE
                if (uid != null) {
116 1 1. gotElement : removed call to org/argouml/util/IItemUID::setItemUID → NO_COVERAGE
                    ((IItemUID) o).setItemUID(uid);
117
                }
118
            }
119
        }
120
121 1 1. gotElement : negated conditional → NO_COVERAGE
        if (container instanceof FigEdgeHandler) {
122
            Object o = ((FigEdgeHandler) container).getFigEdge();
123 1 1. gotElement : negated conditional → NO_COVERAGE
            if (o instanceof IItemUID) {
124
                ItemUID uid = getItemUID(contents);
125 1 1. gotElement : negated conditional → NO_COVERAGE
                if (uid != null) {
126 1 1. gotElement : removed call to org/argouml/util/IItemUID::setItemUID → NO_COVERAGE
                    ((IItemUID) o).setItemUID(uid);
127
                }
128
            }
129
        }
130
131
        // Handle other uses of <private> contents
132 1 1. gotElement : removed call to org/tigris/gef/persistence/pgml/PrivateHandler::gotElement → NO_COVERAGE
        super.gotElement(contents);
133
    }
134
135
    /**
136
     * Process starting elements within the private tag.
137
     * This method handles all attributes within tags within private methods.
138
     * The only specific tags we handle here at the moment are pathitems.
139
     *
140
     * The strategy for handling pathitems is as follows:
141
     * <ul>
142
     *  <li>Data is saved for each path item using one <argouml:pathitem ... />
143
     *      tag per path item.
144
     *  <li>The code that defines what is stored is in
145
     *      org.argouml.persistence.PGML.tee
146
     *  <li>Each <argouml:pathitem> tag stores
147
     *  <ul>
148
     *    <li>The class name of the PathItemPlacementStrategy
149
     *    <li>The class name of the fig which it places.
150
     *    <li>The href of the model element which owns the fig being placed.
151
     *    <li>The angle of the placement vector (PathItemPlacement.angle)
152
     *    <li>The distance along the displacement vector to place the fig
153
     *        (PathItemPlacement.vectorOffset).
154
     *  </ul>
155
     *  </li>
156
     *  <li>No specific data is stored to match pathitem tags to the
157
     *      diagram figs which they control.
158
     *  <li>The matching during file load depends entirely on
159
     *      there being a unique figclassname and ownerhref combination
160
     *      for each pathitem on the diagram.  For example, For a
161
     *      FigAssociation, the main label is a FigTextGroup, and it's
162
     *      owner is assigned to the Association.  This combination is
163
     *      unique, and is used to match the parsed pathitem data back
164
     *      to the instantiated PathItemPlacement.
165
     *      Another example is the source multiplicity, which is a
166
     *      FigMultiplicity, and it's owner is assigned to the
167
     *      source model element.
168
     *      In each case, the combination is unique, so there is only
169
     *      one pathitem that matches when rebuilding the diagram.
170
     *  </ul>
171
     *
172
     * @param uri
173
     * @param localname
174
     * @param qname
175
     * @param attributes
176
     * @throws SAXException
177
     * @see org.tigris.gef.persistence.pgml.BaseHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
178
     */
179
    public void startElement(String uri, String localname, String qname,
180
            Attributes attributes) throws SAXException {
181 1 1. startElement : negated conditional → NO_COVERAGE
        if ("argouml:pathitem".equals(qname)
182 1 1. startElement : negated conditional → NO_COVERAGE
                && container instanceof FigEdgeHandler) {
183
            String classname = attributes.getValue("classname");
184
            String figclassname =
185
                attributes.getValue("figclassname");
186
            String ownerhref = attributes.getValue("ownerhref");
187
            String angle = attributes.getValue("angle");
188
            String offset = attributes.getValue("offset");
189 1 1. startElement : negated conditional → NO_COVERAGE
            if ( classname != null
190 1 1. startElement : negated conditional → NO_COVERAGE
                    && figclassname != null
191 1 1. startElement : negated conditional → NO_COVERAGE
                    && ownerhref != null
192 1 1. startElement : negated conditional → NO_COVERAGE
                    && angle != null
193 1 1. startElement : negated conditional → NO_COVERAGE
                    && offset != null ) {
194
                // Method 2: (assign data immediately, see end of file).
195
                // TODO: if we ever want to extend PathItemPlacement,
196
                // we should modify this, so that we also recognise any
197
                // subclass of PathItemPlacement.
198
                // Is the class name a PathItemPlacment?
199
                // TODO: Use class reference to make this dependency obvious
200 1 1. startElement : negated conditional → NO_COVERAGE
                if ("org.argouml.uml.diagram.ui.PathItemPlacement".equals(
201
                        classname)) {
202
                    PathItemPlacementStrategy pips
203
                        = getPips(figclassname, ownerhref);
204
                    // Sanity check - the returned path item placement
205
                    // strategy should match the one in the UML.
206
                    // If it doesn't, it could be that the UML was
207
                    // created with an older argo version, and the new
208
                    // argo version use a different placement strategy.
209
                    // If they don't match, just use the default.
210 1 1. startElement : negated conditional → NO_COVERAGE
                    if (pips != null
211 1 1. startElement : negated conditional → NO_COVERAGE
                            && classname.equals(pips.getClass().getName())) {
212
                        // Now we're into processing each specific path
213
                        // item strategy.
214
                        // At the moment, we only know PathItemPlacement
215 1 1. startElement : negated conditional → NO_COVERAGE
                        if (pips instanceof PathItemPlacement) {
216
                            PathItemPlacement pip =
217
                                (PathItemPlacement) pips;
218 1 1. startElement : removed call to org/argouml/uml/diagram/ui/PathItemPlacement::setDisplacementVector → NO_COVERAGE
                            pip.setDisplacementVector(
219
                                    Double.parseDouble(angle),
220
                                    Integer.parseInt(offset));
221
                        }
222
                        // Continue (future PathItemPlacementStrategy impl)
223
                        //else if (...) {
224
                        //}
225
                    }
226
                    // If the PathItemPlacement was unknown, leave the
227
                    // diagram with the default settings.
228
                    else {
229
                        LOG.log(Level.WARNING,
230
                                "PGML stored pathitem class name does "
231
                                + "not match the class name on the "
232
                                + "diagram. Label position will revert "
233
                                + "to defaults.");
234
                    }
235
                }
236
            }
237
            // If any of the values are null, ignore the element.
238
            else {
239
                LOG.log(Level.WARNING, "Could not find all attributes for <"
240
                        + qname + "> tag, ignoring.");
241
                //System.out.println("Error - one of these is null:"
242
                //        + "classname=" + classname
243
                //        + " figclassname=" + figclassname
244
                //        + " ownerhref=" + ownerhref
245
                //        + " angle=" + angle
246
                //        + " offset=" + offset);
247
            }
248
        }
249 1 1. startElement : removed call to org/tigris/gef/persistence/pgml/PrivateHandler::startElement → NO_COVERAGE
        super.startElement(uri, localname, qname, attributes);
250
    }
251
252
    /**
253
     * Finds the path item placement strategy for a sub Fig, by its class name,
254
     * and it's owner href.
255
     * @param figclassname The class name of the fig being placed.
256
     * @param ownerhref The href of the owner of the fig being placed.
257
     * @return The path item placement strategy.
258
     */
259
    private PathItemPlacementStrategy getPips(String figclassname,
260
            String ownerhref) {
261 1 1. getPips : negated conditional → NO_COVERAGE
        if (container instanceof FigEdgeHandler) {
262
            FigEdge fe = ((FigEdgeHandler) container).getFigEdge();
263
            Object owner = getPGMLStackParser().findOwner(ownerhref);
264
265 1 1. getPips : negated conditional → NO_COVERAGE
            for (Object o : fe.getPathItemFigs()) {
266
                Fig f = (Fig) o;
267
                // For a match to be found, it has to have the same
268
                // owner, and the same long class name.
269 1 1. getPips : negated conditional → NO_COVERAGE
                if (owner.equals(f.getOwner())
270 1 1. getPips : negated conditional → NO_COVERAGE
                        && figclassname.equals(f.getClass().getName())) {
271
                    //System.out.println("MATCHED! " + figclassname);
272 1 1. getPips : mutated return of Object value for org/argouml/persistence/PrivateHandler::getPips to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
                    return fe.getPathItemPlacementStrategy(f);
273
                }
274
            }
275
        }
276
        LOG.log(Level.WARNING,
277
                "Could not load path item for fig '" + figclassname
278
                + "', using default placement.");
279 1 1. getPips : mutated return of Object value for org/argouml/persistence/PrivateHandler::getPips to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return null;
280
    }
281
282
    /**
283
     * Determine if the string contains an ItemUID.
284
     *
285
     * @return a newly created ItemUID (or <code>null</code>).
286
     */
287
    private ItemUID getItemUID(String privateContents) {
288
        StringTokenizer st = new StringTokenizer(privateContents, "\n");
289
290 1 1. getItemUID : negated conditional → NO_COVERAGE
        while (st.hasMoreElements()) {
291
            String str = st.nextToken();
292
            NameVal nval = splitNameVal(str);
293
294 1 1. getItemUID : negated conditional → NO_COVERAGE
            if (nval != null) {
295
                if (LOG.isLoggable(Level.FINE)) {
296
                    LOG.log(Level.FINE, "Private Element: \"" + nval.getName()
297
                              + "\" \"" + nval.getValue() + "\"");
298
                }
299 1 1. getItemUID : negated conditional → NO_COVERAGE
                if ("ItemUID".equals(nval.getName())
300 2 1. getItemUID : changed conditional boundary → NO_COVERAGE
2. getItemUID : negated conditional → NO_COVERAGE
                    && nval.getValue().length() > 0) {
301 1 1. getItemUID : mutated return of Object value for org/argouml/persistence/PrivateHandler::getItemUID to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
                    return new ItemUID(nval.getValue());
302
                }
303
            }
304
        }
305 1 1. getItemUID : mutated return of Object value for org/argouml/persistence/PrivateHandler::getItemUID to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return null;
306
    }
307
308
    /**
309
     * Utility class to pair a name and a value String together.
310
     */
311
    static class NameVal {
312
        private String name;
313
        private String value;
314
315
        /**
316
         * The constructor.
317
         *
318
         * @param n the name
319
         * @param v the value
320
         */
321
        NameVal(String n, String v) {
322
            name = n.trim();
323
            value = v.trim();
324
        }
325
326
        /**
327
         * @return returns the name
328
         */
329
        String getName() {
330 1 1. getName : mutated return of Object value for org/argouml/persistence/PrivateHandler$NameVal::getName to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return name;
331
        }
332
333
        /**
334
         * @return returns the value
335
         */
336
        String getValue() {
337 1 1. getValue : mutated return of Object value for org/argouml/persistence/PrivateHandler$NameVal::getValue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return value;
338
        }
339
    }
340
341
    /**
342
     * Splits a name value pair into a NameVal instance. A name value pair is
343
     * a String on the form &lt; name = ["] value ["] &gt;.
344
     *
345
     * @param str A String with a name value pair.
346
     * @return A NameVal, or null if they could not be split.
347
     */
348
    protected NameVal splitNameVal(String str) {
349
        NameVal rv = null;
350
        int lqpos, rqpos;
351
        int eqpos = str.indexOf('=');
352
353 2 1. splitNameVal : changed conditional boundary → NO_COVERAGE
2. splitNameVal : negated conditional → NO_COVERAGE
        if (eqpos < 0) {
354 1 1. splitNameVal : mutated return of Object value for org/argouml/persistence/PrivateHandler::splitNameVal to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return null;
355
        }
356
357
        lqpos = str.indexOf('"', eqpos);
358
        rqpos = str.lastIndexOf('"');
359
360 4 1. splitNameVal : changed conditional boundary → NO_COVERAGE
2. splitNameVal : changed conditional boundary → NO_COVERAGE
3. splitNameVal : negated conditional → NO_COVERAGE
4. splitNameVal : negated conditional → NO_COVERAGE
        if (lqpos < 0 || rqpos <= lqpos) {
361 1 1. splitNameVal : mutated return of Object value for org/argouml/persistence/PrivateHandler::splitNameVal to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
            return null;
362
        }
363
364
        rv =
365
            new NameVal(str.substring(0, eqpos),
366 1 1. splitNameVal : Replaced integer addition with subtraction → NO_COVERAGE
                str.substring(lqpos + 1, rqpos));
367
368 1 1. splitNameVal : mutated return of Object value for org/argouml/persistence/PrivateHandler::splitNameVal to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE
        return rv;
369
    }
370
}
371
372
// An alternative implementation of the parsing of pathitems is to collect
373
// everything at the start, then iterate through it all at the end.
374
// The code below does this - it works, but it is currently not used,
375
// since it is a unnecessarily complicated.
376
// There are probably better ways to implement this than using an
377
// ArrayList of Hashtables.
378
// see option 1 in
379
// http://argouml.tigris.org/issues/show_bug.cgi?id=1048#desc66
380
//
381
382
///**
383
// * A list of the path item attributes for this container.
384
// * The list is populated during parsing, them processed at endElement()
385
// */
386
//private List<Hashtable<String, String>> pathItemAttrs =
387
//    new ArrayList<Hashtable<String, String>>();
388
389
// This code has to go within the startElement block after the strings
390
// have been matched.
391
392
//// Method 1:
393
//// (collect data and assign later in endElement() method).
394
//Hashtable<String, String> ht =
395
//    new Hashtable<String, String>();
396
//ht.put("classname", classname);
397
//ht.put("figclassname", figclassname);
398
//ht.put("ownerhref", ownerhref);
399
//ht.put("angle", angle);
400
//ht.put("offset", offset);
401
//pathItemAttrs.add(ht);
402
403
//public void endElement(String uri, String localname, String qname)
404
//throws SAXException {
405
////System.out.print("Got endElement: "
406
////        + "uri='" + uri + "'\n"
407
////        + "localname='" + localname + "'\n"
408
////        + "qname='" + qname + "'\n"
409
////);
410
//// If we collected any path items for a FigEdgeModelElement,
411
//// process them now, and assign their values to real Figs on the diag.
412
//if (!(pathItemAttrs.isEmpty())) {
413
//    for (Hashtable<String, String> attrs : pathItemAttrs) {
414
//        // Is the class name a PathItemPlacment?
415
//        // TODO: if we ever want to extend PathItemPlacement,
416
//        // we should modify this, so that we also recognise any
417
//        // subclass of PathItemPlacement.
418
//        if ("org.argouml.uml.diagram.ui.PathItemPlacement".
419
//                equals(attrs.get("classname"))) {
420
//            //System.out.println("figclassname=" + attrs.get("figclassname"));
421
//
422
//            PathItemPlacementStrategy pips
423
//                = getPips(attrs.get("figclassname"),
424
//                        attrs.get("ownerhref"));
425
//            // Sanity check - the returned path item placement straty
426
//            // should match the one in the uml.
427
//            if (pips.getClass().getName().equals(attrs.get("classname"))) {
428
//                // Now we're into processing each specific path item
429
//                // strategy.
430
//                // At the moment, we only know about PathItemPlacement
431
//                if (pips instanceof PathItemPlacement) {
432
//                    PathItemPlacement pip = (PathItemPlacement) pips;
433
//                    pip.setDisplacementVector(
434
//                            Double.parseDouble(attrs.get("angle")),
435
//                            Integer.parseInt(attrs.get("offset")));
436
//                }
437
//                // Continue (future PathItemPlacementStrategy impl)
438
//                //else if (...) {
439
//                //
440
//                //}
441
//
442
//            }
443
//            else {
444
//                LOG.log(Level.WARNING, "PGML stored pathitem class name does not "
445
//                        + "match the class name on the diagram."
446
//                        + "Label position will revert to defaults.");
447
//            }
448
//        }
449
//    }
450
//}
451
//
452
//super.endElement(uri, localname, qname);
453
//}

Mutations

99

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

101

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

103

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

104

1.1
Location : gotElement
Killed by : none
removed call to org/argouml/util/IItemUID::setItemUID → NO_COVERAGE

111

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

113

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

115

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

116

1.1
Location : gotElement
Killed by : none
removed call to org/argouml/util/IItemUID::setItemUID → NO_COVERAGE

121

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

123

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

125

1.1
Location : gotElement
Killed by : none
negated conditional → NO_COVERAGE

126

1.1
Location : gotElement
Killed by : none
removed call to org/argouml/util/IItemUID::setItemUID → NO_COVERAGE

132

1.1
Location : gotElement
Killed by : none
removed call to org/tigris/gef/persistence/pgml/PrivateHandler::gotElement → NO_COVERAGE

181

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

182

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

189

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

190

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

191

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

192

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

193

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

200

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

210

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

211

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

215

1.1
Location : startElement
Killed by : none
negated conditional → NO_COVERAGE

218

1.1
Location : startElement
Killed by : none
removed call to org/argouml/uml/diagram/ui/PathItemPlacement::setDisplacementVector → NO_COVERAGE

249

1.1
Location : startElement
Killed by : none
removed call to org/tigris/gef/persistence/pgml/PrivateHandler::startElement → NO_COVERAGE

261

1.1
Location : getPips
Killed by : none
negated conditional → NO_COVERAGE

265

1.1
Location : getPips
Killed by : none
negated conditional → NO_COVERAGE

269

1.1
Location : getPips
Killed by : none
negated conditional → NO_COVERAGE

270

1.1
Location : getPips
Killed by : none
negated conditional → NO_COVERAGE

272

1.1
Location : getPips
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler::getPips to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

279

1.1
Location : getPips
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler::getPips to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

290

1.1
Location : getItemUID
Killed by : none
negated conditional → NO_COVERAGE

294

1.1
Location : getItemUID
Killed by : none
negated conditional → NO_COVERAGE

299

1.1
Location : getItemUID
Killed by : none
negated conditional → NO_COVERAGE

300

1.1
Location : getItemUID
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : getItemUID
Killed by : none
negated conditional → NO_COVERAGE

301

1.1
Location : getItemUID
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler::getItemUID to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

305

1.1
Location : getItemUID
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler::getItemUID to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

330

1.1
Location : getName
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler$NameVal::getName to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

337

1.1
Location : getValue
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler$NameVal::getValue to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

353

1.1
Location : splitNameVal
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : splitNameVal
Killed by : none
negated conditional → NO_COVERAGE

354

1.1
Location : splitNameVal
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler::splitNameVal to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

360

1.1
Location : splitNameVal
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : splitNameVal
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : splitNameVal
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : splitNameVal
Killed by : none
negated conditional → NO_COVERAGE

361

1.1
Location : splitNameVal
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler::splitNameVal to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

366

1.1
Location : splitNameVal
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

368

1.1
Location : splitNameVal
Killed by : none
mutated return of Object value for org/argouml/persistence/PrivateHandler::splitNameVal to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 0.32