CloneSet1


Previous CloneSetNext CloneSetBack to Main Report
Clone
Mass
Clones in
CloneSet
Parameter
Count
Clone
Similarity
Syntax Category
[Sequence Length]
56230.957statement_seq[2]
Clone AbstractionParameter Bindings
Clone Instance
(Click to see clone)
Line CountSource Line
Source File
1562672
InclusionConstraintGraph/Graph.h
2562758
InclusionConstraintGraph/Graph.h
Clone Instance
1
Line Count
56
Source Line
2672
Source File
InclusionConstraintGraph/Graph.h

                                                                // propagate inclusion constraints
                                                                do {
                                                                        // propagate inclusion constraints
                                                                        SetOfNodes existing_collapsed_inclusion_constraints;
                                                                        do {
                                                                                const SetOfNodes &inclusion_constraints = existing_collapses_to_node->GetInclusionConstraints();
                                                                                for (std::size_t ic=0; ic <inclusion_constraints.Size();ic++) {
                                                                                        existing_collapsed_inclusion_constraints.Add(inclusion_constraints[ic]->TransitivelyCollapse());
                                                                                                                                              }
                                                                           }
                                                                        while (  0);
                                                                        do {
                                                                                const SetOfNodes &inclusion_constraints = new_collapses_to_node->GetInclusionConstraints();
                                                                                for (std::size_t ic=0; ic <inclusion_constraints.Size();ic++) {
                                                                                        Node *node = inclusion_constraints[ic]->TransitivelyCollapse();
                                                                                        if (!existing_collapsed_inclusion_constraints.IsIn(node)) {
                                                                                                if (node != existing_collapses_to_node) {
                                                                                                        if (existing_collapses_to_node->EstablishIncludes(node)) {
                                                                                                                changed_on_read = true;
                                                                                                                                                                 }
                                                                                                                                        }
                                                                                                                                                  }
                                                                                                                                              }
                                                                           }
                                                                        while (  0);
                                                                        // check whether inclusion constraints changed for collapsed node
                                                                        if (!changed_on_read) {
                                                                                SetOfNodes new_collapsed_inclusion_constraints;
                                                                                do {
                                                                                        const SetOfNodes &inclusion_constraints = new_collapses_to_node->GetInclusionConstraints();
                                                                                        for (std::size_t ic=0; ic <inclusion_constraints.Size();ic++) {
                                                                                                new_collapsed_inclusion_constraints.Add(inclusion_constraints[ic]->TransitivelyCollapse());
                                                                                                                                                      }
                                                                                   }
                                                                                while (  0);
                                                                                for (std::size_t n=0; n <existing_collapsed_inclusion_constraints.Size();n++) {
                                                                                        if (!new_collapsed_inclusion_constraints.IsIn(existing_collapsed_inclusion_constraints[n])) {
                                                                                                changed_on_read = true;
                                                                                                break;
                                                                                                                                                                                    }
                                                                                                                                                              }
                                                                                              }
                                                                   }
                                                                while (  0);
                                                                // propagate pointed-to locations
                                                                if (new_collapses_to_node->GetKind() == Node::TemporaryNode) {
                                                                        // propagate pointed-to locations
                                                                        const SetOfNodes &new_pointed_to_locations = new_collapses_to_node->GetPointedToLocations();
                                                                        for (std::size_t p=0; p <new_pointed_to_locations.Size();p++) {
                                                                                if (existing_collapses_to_node->EstablishPointsTo(new_pointed_to_locations[p])) {
                                                                                        changed_on_read = true;
                                                                                                                                                                }
                                                                                                                                      }
                                                                        // check whether pointed-to locations changed for collapsed node
                                                                        if (!changed_on_read) {
                                                                                const SetOfNodes &existing_pointed_to_locations = existing_collapses_to_node->GetPointedToLocations();
                                                                                for (std::size_t n=0; n <existing_pointed_to_locations.Size();n++) {
                                                                                        if (!new_pointed_to_locations.IsIn(existing_pointed_to_locations[n])) {
                                                                                                changed_on_read = true;
                                                                                                break;
                                                                                                                                                              }
                                                                                                                                                   }
                                                                                              }
                                                                                                                             }


Clone Instance
2
Line Count
56
Source Line
2758
Source File
InclusionConstraintGraph/Graph.h

                                                        // propagate inclusion constraints
                                                        do {
                                                                // propagate inclusion constraints
                                                                SetOfNodes to_collapsed_inclusion_constraints;
                                                                do {
                                                                        const SetOfNodes &inclusion_constraints = to->GetInclusionConstraints();
                                                                        for (std::size_t ic=0; ic <inclusion_constraints.Size();ic++) {
                                                                                to_collapsed_inclusion_constraints.Add(inclusion_constraints[ic]->TransitivelyCollapse());
                                                                                                                                      }
                                                                   }
                                                                while (  0);
                                                                do {
                                                                        const SetOfNodes &inclusion_constraints = from->GetInclusionConstraints();
                                                                        for (std::size_t ic=0; ic <inclusion_constraints.Size();ic++) {
                                                                                Node *node = inclusion_constraints[ic]->TransitivelyCollapse();
                                                                                if (!to_collapsed_inclusion_constraints.IsIn(node)) {
                                                                                        if (node != to) {
                                                                                                if (to->EstablishIncludes(node)) {
                                                                                                        changed_on_read = true;
                                                                                                                                 }
                                                                                                        }
                                                                                                                                    }
                                                                                                                                      }
                                                                   }
                                                                while (  0);
                                                                // check whether inclusion constraints changed for collapsed node
                                                                if (!changed_on_read) {
                                                                        SetOfNodes new_collapsed_inclusion_constraints;
                                                                        do {
                                                                                const SetOfNodes &inclusion_constraints = from->GetInclusionConstraints();
                                                                                for (std::size_t ic=0; ic <inclusion_constraints.Size();ic++) {
                                                                                        new_collapsed_inclusion_constraints.Add(inclusion_constraints[ic]->TransitivelyCollapse());
                                                                                                                                              }
                                                                           }
                                                                        while (  0);
                                                                        for (std::size_t n=0; n <to_collapsed_inclusion_constraints.Size();n++) {
                                                                                if (!new_collapsed_inclusion_constraints.IsIn(to_collapsed_inclusion_constraints[n])) {
                                                                                        changed_on_read = true;
                                                                                        break;
                                                                                                                                                                      }
                                                                                                                                                }
                                                                                      }
                                                           }
                                                        while (  0);
                                                        // propagate pointed-to locations
                                                        if (from->GetKind() == Node::TemporaryNode) {
                                                                // propagate pointed-to locations
                                                                const SetOfNodes &new_pointed_to_locations = from->GetPointedToLocations();
                                                                for (std::size_t p=0; p <new_pointed_to_locations.Size();p++) {
                                                                        if (to->EstablishPointsTo(new_pointed_to_locations[p])) {
                                                                                changed_on_read = true;
                                                                                                                                }
                                                                                                                              }
                                                                // check whether pointed-to locations changed for collapsed node
                                                                if (!changed_on_read) {
                                                                        const SetOfNodes &existing_pointed_to_locations = to->GetPointedToLocations();
                                                                        for (std::size_t n=0; n <existing_pointed_to_locations.Size();n++) {
                                                                                if (!new_pointed_to_locations.IsIn(existing_pointed_to_locations[n])) {
                                                                                        changed_on_read = true;
                                                                                        break;
                                                                                                                                                      }
                                                                                                                                           }
                                                                                      }
                                                                                                    }


Clone AbstractionParameter Count: 3Parameter Bindings

// propagate inclusion constraints
do
  {
    // propagate inclusion constraints
    SetOfNodes [[#variable4f6c0e0]];
    do
      {
        const SetOfNodes &inclusion_constraints = [[#variable4f774c0]]->GetInclusionConstraints();
        for (std::size_t ic = 0; ic < inclusion_constraints.Size(); ic++)
          {
            [[#variable4f6c0e0]].Add(inclusion_constraints[ic]->TransitivelyCollapse());
          }
      }
    while (0);
    do
      {
        const SetOfNodes &inclusion_constraints = [[#variable4f5c1e0]]->GetInclusionConstraints();
        for (std::size_t ic = 0; ic < inclusion_constraints.Size(); ic++)
          {
            Node * node = inclusion_constraints[ic]->TransitivelyCollapse();
            if (![[#variable4f6c0e0]].IsIn(node))
              {
                if (node != [[#variable4f774c0]])
                  {
                    if ([[#variable4f774c0]]->EstablishIncludes(node))
                      {
                        changed_on_read = true;
                      }
                  }
              }
          }
      }
    while (0);
    // check whether inclusion constraints changed for collapsed node
    if (!changed_on_read)
      {
        SetOfNodes new_collapsed_inclusion_constraints;
        do
          {
            const SetOfNodes &inclusion_constraints = [[#variable4f5c1e0]]->GetInclusionConstraints();
            for (std::size_t ic = 0; ic < inclusion_constraints.Size(); ic++)
              {
                new_collapsed_inclusion_constraints.Add(inclusion_constraints[ic]->TransitivelyCollapse());
              }
          }
        while (0);
        for (std::size_t n = 0; n < [[#variable4f6c0e0]].Size(); n++)
          {
            if (!new_collapsed_inclusion_constraints.IsIn([[#variable4f6c0e0]][n]))
              {
                changed_on_read = true;
                break;
              }
          }
      }
  }
while (0);
// propagate pointed-to locations
if ([[#variable4f5c1e0]]->GetKind() == Node::TemporaryNode)
  {
    // propagate pointed-to locations
    const SetOfNodes &new_pointed_to_locations = [[#variable4f5c1e0]]->GetPointedToLocations();
    for (std::size_t p = 0; p < new_pointed_to_locations.Size(); p++)
      {
        if ([[#variable4f774c0]]->EstablishPointsTo(new_pointed_to_locations[p]))
          {
            changed_on_read = true;
          }
      }
    // check whether pointed-to locations changed for collapsed node
    if (!changed_on_read)
      {
        const SetOfNodes &existing_pointed_to_locations = [[#variable4f774c0]]->GetPointedToLocations();
        for (std::size_t n = 0; n < existing_pointed_to_locations.Size(); n++)
          {
            if (!new_pointed_to_locations.IsIn(existing_pointed_to_locations[n]))
              {
                changed_on_read = true;
                break;
              }
          }
      }
  }
 

CloneAbstraction
Parameter Bindings
Parameter
Index
Clone
Instance
Parameter
Name
Value
11[[#4f6c0e0]]
to_collapsed_inclusion_constraints 
12[[#4f6c0e0]]
existing_collapsed_inclusion_constraints 
21[[#4f774c0]]
to 
22[[#4f774c0]]
existing_collapses_to_node 
31[[#4f5c1e0]]
from 
32[[#4f5c1e0]]
new_collapses_to_node