nus-yam/ex-repair huggingface dataset:
Program: 88381
Project: 88381
Buggy source:
public void showInitializing(){
  mUiHandler.post(new Runnable(){
    public void run(){
      mText.setText(R.string.voice_initializing);
      mImage.setImageDrawable(mInitializing);
      mButtonText.setText(mContext.getText(R.string.cancel));
    }
  }
);
}

Fixed version (ground truth):
public void showInitializing(){
  mUiHandler.post(new Runnable(){
    public void run(){
      mProgress.setVisibility(View.GONE);
      mText.setText(R.string.voice_initializing);
      mImage.setImageDrawable(mInitializing);
      mButtonText.setText(mContext.getText(R.string.cancel));
    }
  }
);
}
Program: 88382
Project: 88382
Buggy source:
@Override public boolean isValidWord(CharSequence word){
  final int frequency=getWordFrequency(word);
  return frequency > VALIDITY_THRESHOLD;
}

Fixed version (ground truth):
@Override public boolean isValidWord(CharSequence word){
  final int frequency=getWordFrequency(word);
  return frequency >= VALIDITY_THRESHOLD;
}
Program: 88383
Project: 88383
Buggy source:
@Override public void addWord(String word,int addFrequency){
  final int length=word.length();
  if (length < 2 || length > getMaxWordLength())   return;
  super.addWord(word,addFrequency);
  final int freq=getWordFrequency(word);
  if (freq > PROMOTION_THRESHOLD) {
    LatinIME.this.promoteToUserDictionary(word,FREQUENCY_FOR_AUTO_ADD);
  }
}

Fixed version (ground truth):
@Override public void addWord(String word,int addFrequency){
  final int length=word.length();
  if (length < 2 || length > getMaxWordLength())   return;
  int freq=getWordFrequency(word);
  freq=freq < 0 ? addFrequency : freq + addFrequency;
  super.addWord(word,freq);
  if (freq >= PROMOTION_THRESHOLD) {
    LatinIME.this.promoteToUserDictionary(word,FREQUENCY_FOR_AUTO_ADD);
  }
}
Program: 88384
Project: 88384
Buggy source:
@Override protected boolean onLongPress(Key key){
  if (key.codes[0] == Keyboard.KEYCODE_MODE_CHANGE) {
    getOnKeyboardActionListener().onKey(KEYCODE_OPTIONS,null);
    return true;
  }
 else   if (key.codes[0] == Keyboard.KEYCODE_SHIFT) {
    getOnKeyboardActionListener().onKey(KEYCODE_SHIFT_LONGPRESS,null);
    invalidate();
    return true;
  }
 else   if (key.codes[0] == '0' && getKeyboard() == mPhoneKeyboard) {
    getOnKeyboardActionListener().onKey('+',null);
    return true;
  }
 else {
    return super.onLongPress(key);
  }
}

Fixed version (ground truth):
@Override protected boolean onLongPress(Key key){
  if (key.codes[0] == Keyboard.KEYCODE_MODE_CHANGE) {
    getOnKeyboardActionListener().onKey(KEYCODE_OPTIONS,null);
    return true;
  }
 else   if (key.codes[0] == Keyboard.KEYCODE_SHIFT) {
    getOnKeyboardActionListener().onKey(KEYCODE_SHIFT_LONGPRESS,null);
    invalidateAllKeys();
    return true;
  }
 else   if (key.codes[0] == '0' && getKeyboard() == mPhoneKeyboard) {
    getOnKeyboardActionListener().onKey('+',null);
    return true;
  }
 else {
    return super.onLongPress(key);
  }
}
Program: 88385
Project: 88385
Buggy source:
public void testBogusDomain() throws Exception {
  OEmbedSource source=new BaseOEmbedSource(getContext(),"String_Node_Str",Uri.parse("String_Node_Str")){
  }
;
  source.getThumbnail();
}

Fixed version (ground truth):
public void testBogusDomain() throws Exception {
  OEmbedSource source=new BaseOEmbedSource(getContext(),"String_Node_Str",Uri.parse("String_Node_Str")){
  }
;
  try {
    source.getThumbnail();
  }
 catch (  HttpException e) {
    if (e.getErrorCode() != HttpException.ERROR_NETWORK)     throw e;
  }
}
Program: 88386
Project: 88386
Buggy source:
public void testBogusData() throws Exception {
  OEmbedSource source=new BaseOEmbedSource(getContext(),"String_Node_Str",Uri.parse("String_Node_Str")){
  }
;
  source.getThumbnail();
}

Fixed version (ground truth):
public void testBogusData() throws Exception {
  OEmbedSource source=new BaseOEmbedSource(getContext(),"String_Node_Str",Uri.parse("String_Node_Str")){
  }
;
  try {
    source.getThumbnail();
  }
 catch (  HttpException e) {
    if (e.getErrorCode() != HttpException.ERROR_PARSER)     throw e;
  }
}
Program: 88387
Project: 88387
Buggy source:
public void testBogusUrl() throws Exception {
  OEmbedSource source=new BaseOEmbedSource(getContext(),"String_Node_Str",Uri.parse("String_Node_Str")){
  }
;
  source.getThumbnail();
}

Fixed version (ground truth):
public void testBogusUrl() throws Exception {
  OEmbedSource source=new BaseOEmbedSource(getContext(),"String_Node_Str",Uri.parse("String_Node_Str")){
  }
;
  try {
    source.getThumbnail();
  }
 catch (  HttpException e) {
    if (e.getHttpStatusCode() != HttpException.ERROR_HTTP_NOT_FOUND)     throw e;
  }
}
Program: 88388
Project: 88388
Buggy source:
@Override public void onItemClick(AdapterView<?> adapterView,View view,int i,long l){
  Node nd=(Node)adapterView.getItemAtPosition(i);
  setTitle(service.getForumName() + "String_Node_Str" + nd.getName());
  drawerList.setItemChecked(i,true);
  drawerLayout.closeDrawer(drawerList);
  current_node_id=nd.getId();
  progress=new ProgressDialog(view.getContext());
  progress.setTitle("String_Node_Str");
  progress.setMessage("String_Node_Str");
  progress.show();
  service.getNodeTopics(nd.getId(),this);
}

Fixed version (ground truth):
@Override public void onItemClick(AdapterView<?> adapterView,View view,int i,long l){
  Node nd=(Node)adapterView.getItemAtPosition(i);
  setTitle(service.getForumName() + "String_Node_Str" + nd.getName());
  drawerList.setItemChecked(i,true);
  drawerLayout.closeDrawer(drawerList);
  current_node_id=nd.getId();
  progress=new ProgressDialog(drawerLayout.getContext());
  progress.setTitle("String_Node_Str");
  progress.setMessage("String_Node_Str");
  progress.show();
  service.getNodeTopics(nd.getId(),this);
}
Program: 88389
Project: 88389
Buggy source:
@Override public void onCreate(){
  super.onCreate();
  mInstance=this;
}

Fixed version (ground truth):
@Override public void onCreate(){
  if (mInstance == null) {
    mInstance=this;
  }
  super.onCreate();
}
Program: 88390
Project: 88390
Buggy source:
@Override public void initialize(){
  Object o=GeneratorUtils.getStereotypePropertyFirst(dgElement,DocGenProfile.tomSawyerDiagramStereotype,"String_Node_Str",DocGenProfile.PROFILE_NAME,null);
  if (o instanceof String) {
    setDiagramType(DiagramType.valueOf(o.toString()));
  }
  if (o instanceof EnumerationLiteral) {
    Arrays.stream(DiagramType.values()).filter(dt -> dt.getName().equals(((EnumerationLiteral)o).getName())).findAny().ifPresent(this::setDiagramType);
  }
  if (diagramType == null) {
    Application.getInstance().getGUILog().log("String_Node_Str" + Converters.getElementToHumanNameConverter().apply(dgElement) + "String_Node_Str");
    return;
  }
  o=GeneratorUtils.getStereotypePropertyFirst(dgElement,DocGenProfile.tomSawyerDiagramStereotype,"String_Node_Str",DocGenProfile.PROFILE_NAME,false);
  if (o instanceof Boolean) {
    collectRelatedElements=(Boolean)o;
  }
}

Fixed version (ground truth):
@Override public void initialize(){
  Object o=GeneratorUtils.getStereotypePropertyFirst(dgElement,DocGenProfile.tomSawyerDiagramStereotype,"String_Node_Str",DocGenProfile.PROFILE_NAME,null);
  if (o instanceof String) {
    setDiagramType(DiagramType.valueOf(o.toString()));
  }
  if (o instanceof EnumerationLiteral) {
    Arrays.stream(DiagramType.values()).filter(dt -> dt.getName().equals(((EnumerationLiteral)o).getName())).findAny().ifPresent(this::setDiagramType);
  }
  if (diagramType == null) {
    Application.getInstance().getGUILog().log("String_Node_Str" + Converters.getElementToHumanNameConverter().apply(dgElement) + "String_Node_Str");
    return;
  }
  Object o2=GeneratorUtils.getStereotypePropertyFirst(dgElement,DocGenProfile.tomSawyerDiagramStereotype,"String_Node_Str",DocGenProfile.PROFILE_NAME,false);
  if (o2 instanceof Boolean) {
    collectRelatedElements=(Boolean)o2;
  }
}
Program: 88392
Project: 88392
Buggy source:
@Override public String toString(){
  return getSourceVertex().toString() + "String_Node_Str" + getTargetVertex().toString();
}

Fixed version (ground truth):
@Override public synchronized String toString(){
  return getSourceVertex().toString() + "String_Node_Str" + getTargetVertex().toString();
}
Program: 88393
Project: 88393
Buggy source:
@Override public String toString(){
  String string="String_Node_Str";
  boolean isFirst=true;
  for (  VertexType v : getSourceVertices()) {
    if (isFirst) {
      isFirst=false;
    }
 else {
      string=string.concat("String_Node_Str");
    }
    string=string.concat(v.toString());
  }
  string=string.concat("String_Node_Str");
  isFirst=true;
  for (  VertexType v : getTargetVertices()) {
    if (isFirst) {
      isFirst=false;
    }
 else {
      string=string.concat("String_Node_Str");
    }
    string=string.concat(v.toString());
  }
  string=string.concat("String_Node_Str");
  return string;
}

Fixed version (ground truth):
@Override public synchronized String toString(){
  String string="String_Node_Str";
  boolean isFirst=true;
  for (  VertexType v : getSourceVertices()) {
    if (isFirst) {
      isFirst=false;
    }
 else {
      string=string.concat("String_Node_Str");
    }
    string=string.concat(v.toString());
  }
  string=string.concat("String_Node_Str");
  isFirst=true;
  for (  VertexType v : getTargetVertices()) {
    if (isFirst) {
      isFirst=false;
    }
 else {
      string=string.concat("String_Node_Str");
    }
    string=string.concat(v.toString());
  }
  string=string.concat("String_Node_Str");
  return string;
}
Program: 88394
Project: 88394
Buggy source:
@Override public String toString(){
  return get(0).toString() + "String_Node_Str" + get(1).toString();
}

Fixed version (ground truth):
@Override public synchronized String toString(){
  return get(0).toString() + "String_Node_Str" + get(1).toString();
}
Program: 88395
Project: 88395
Buggy source:
@Override public String toString(){
  String string="String_Node_Str";
  boolean isFirst=true;
  for (  VertexType v : getVertices()) {
    if (isFirst) {
      isFirst=false;
    }
 else {
      string=string.concat("String_Node_Str");
    }
    string=string.concat(v.toString());
  }
  string=string.concat("String_Node_Str");
  return string;
}

Fixed version (ground truth):
@Override public synchronized String toString(){
  String string="String_Node_Str";
  boolean isFirst=true;
  for (  VertexType v : getVertices()) {
    if (isFirst) {
      isFirst=false;
    }
 else {
      string=string.concat("String_Node_Str");
    }
    string=string.concat(v.toString());
  }
  string=string.concat("String_Node_Str");
  return string;
}
Program: 88396
Project: 88396
Buggy source:
@Override public int compare(Object o1,Object o2){
  if (value.get(o1) < value.get(o2)) {
    return -1;
  }
 else   if (value.get(o1) == value.get(o2)) {
    return 0;
  }
 else {
    return 1;
  }
}

Fixed version (ground truth):
@Override public int compare(Object o1,Object o2){
  if (value.get(o1) < value.get(o2)) {
    return -1;
  }
 else   if (Objects.equals(value.get(o1),value.get(o2))) {
    return 0;
  }
 else {
    return 1;
  }
}
Program: 88397
Project: 88397
Buggy source:
public ActionsCategory handleMultipleNodes(ActionsCategory category,ActionsManager manager,List<Element> elements){
  final List<InstanceSpecification> instances=new ArrayList<InstanceSpecification>();
  final List<Element> validatableElements=new ArrayList<Element>();
  boolean hasUneditable=false;
  for (  Element element : elements) {
    if (element != null) {
      if (element instanceof Classifier) {
        validatableElements.add(element);
      }
 else       if (element instanceof InstanceSpecification) {
        instances.add((InstanceSpecification)element);
        validatableElements.add(element);
      }
      if (!hasUneditable && !element.isEditable()) {
        hasUneditable=true;
      }
    }
  }
  if (validatableElements.isEmpty()) {
    return null;
  }
  validateAction=new ValidateAction(validatableElements);
  category.addAction(validateAction);
  return category;
}

Fixed version (ground truth):
public ActionsCategory handleMultipleNodes(ActionsCategory category,ActionsManager manager,List<Element> elements){
  final List<Element> validatableElements=new ArrayList<Element>();
  boolean hasUneditable=false;
  for (  Element element : elements) {
    if (element != null) {
      if (element instanceof Classifier) {
        validatableElements.add(element);
      }
 else       if (element instanceof InstanceSpecification) {
        validatableElements.add(element);
      }
      if (!hasUneditable && !element.isEditable()) {
        hasUneditable=true;
      }
    }
  }
  if (validatableElements.isEmpty()) {
    return null;
  }
  validateAction=new ValidateAction(validatableElements);
  category.addAction(validateAction);
  return category;
}
Program: 88398
Project: 88398
Buggy source:
public String getContext(){
  return context.getID();
}

Fixed version (ground truth):
public String getContext(){
  return Converters.getElementToIdConverter().apply(context);
}
Program: 88399
Project: 88399
Buggy source:
/** 
 * Returns a URIBuilder object with a path = "/alfresco/service/projects/{$PROJECT_ID}/refs/{REF_ID}/elements" if element is not null
 * @param project The project to gather the mms url and site name information from
 * @return URIBuilder
 */
public static URIBuilder getServiceProjectsRefsElementsUri(Project project){
  URIBuilder elementUri=getServiceProjectsRefsUri(project);
  if (elementUri == null) {
    return null;
  }
  elementUri.setPath(elementUri.getPath() + "String_Node_Str" + MDUtils.getWorkspace(project)+ "String_Node_Str");
  return elementUri;
}

Fixed version (ground truth):
/** 
 * Returns a URIBuilder object with a path = "/alfresco/service/projects/{$PROJECT_ID}/refs/{REF_ID}/elements" if element is not null
 * @param project The project to gather the mms url and site name information from
 * @return URIBuilder
 */
public static URIBuilder getServiceProjectsRefsElementsUri(Project project){
  URIBuilder elementUri=getServiceProjectsRefsUri(project);
  if (elementUri == null) {
    return null;
  }
  String refId="String_Node_Str";
  if (project.isRemote() && !EsiUtils.getCurrentBranch(project.getPrimaryProject()).getName().equals("String_Node_Str")) {
    refId=EsiUtils.getCurrentBranch(project.getPrimaryProject()).getID().toString();
  }
  elementUri.setPath(elementUri.getPath() + "String_Node_Str" + refId+ "String_Node_Str");
  return elementUri;
}
Program: 88402
Project: 88402
Buggy source:
/** 
 * Returns a URIBuilder object with a path = "/alfresco/service/projects/{$PROJECT_ID}/refs/{$WORKSPACE_ID}/elements/${ELEMENT_ID}" if element is not null
 * @param project The project to gather the mms url and site name information from
 * @return URIBuilder
 */
public static URIBuilder getServiceProjectsRefsElementsUri(Project project){
  URIBuilder elementUri=getServiceProjectsRefsUri(project);
  if (elementUri == null) {
    return null;
  }
  elementUri.setPath(elementUri.getPath() + "String_Node_Str" + MDUtils.getWorkspace(project)+ "String_Node_Str");
  return elementUri;
}

Fixed version (ground truth):
/** 
 * Returns a URIBuilder object with a path = "/alfresco/service/projects/{$PROJECT_ID}/refs/{$WORKSPACE_ID}/elements/${ELEMENT_ID}" if element is not null
 * @param project The project to gather the mms url and site name information from
 * @return URIBuilder
 */
public static URIBuilder getServiceProjectsRefsElementsUri(Project project){
  URIBuilder elementUri=getServiceProjectsRefsUri(project);
  if (elementUri == null) {
    return null;
  }
  elementUri.setPath(elementUri.getPath() + "String_Node_Str" + MDUtils.getBranchId(project)+ "String_Node_Str");
  return elementUri;
}
Program: 88410
Project: 88410
Buggy source:
public static String getEID(EObject eObject){
  if (eObject == null) {
    return null;
  }
  if (!(eObject instanceof Element)) {
    return EcoreUtil.getID(eObject);
  }
  Element element=(Element)eObject;
  Project project=Project.getProject(element);
  if (element instanceof Model && project.getPrimaryModel() == element) {
    return Converters.getIProjectToIdConverter().apply(project.getPrimaryProject()) + MDKConstants.PRIMARY_MODEL_ID_SUFFIX;
  }
  if (element instanceof InstanceSpecification && ((InstanceSpecification)element).getStereotypedElement() != null) {
    return getEID(((InstanceSpecification)element).getStereotypedElement()) + MDKConstants.APPLIED_STEREOTYPE_INSTANCE_ID_SUFFIX;
  }
  if (element instanceof ValueSpecification && ((ValueSpecification)element).getOwningSlot() != null) {
    ValueSpecification slotValue=(ValueSpecification)element;
    return getEID(slotValue.getOwningSlot()) + MDKConstants.SLOT_VALUE_ID_SEPARATOR + slotValue.getOwningSlot().getValue().indexOf(slotValue)+ "String_Node_Str"+ slotValue.eClass().getName().toLowerCase();
  }
  if (element instanceof Slot) {
    Slot slot=(Slot)element;
    if (slot.getOwningInstance() != null && ((Slot)element).getDefiningFeature() != null) {
      return getEID(slot.getOwner()) + MDKConstants.SLOT_ID_SEPARATOR + getEID(slot.getDefiningFeature());
    }
  }
  return element.getLocalID();
}

Fixed version (ground truth):
public static String getEID(EObject eObject){
  if (eObject == null) {
    return null;
  }
  if (!(eObject instanceof Element)) {
    return EcoreUtil.getID(eObject);
  }
  Element element=(Element)eObject;
  Project project=Project.getProject(element);
  if (element instanceof Model && project.getPrimaryModel() == element) {
    return Converters.getIProjectToIdConverter().apply(project.getPrimaryProject()) + MDKConstants.PRIMARY_MODEL_ID_SUFFIX;
  }
  if (element instanceof InstanceSpecification && ((InstanceSpecification)element).getStereotypedElement() != null) {
    return getEID(((InstanceSpecification)element).getStereotypedElement()) + MDKConstants.APPLIED_STEREOTYPE_INSTANCE_ID_SUFFIX;
  }
  if (element instanceof ValueSpecification && ((ValueSpecification)element).getOwningSlot() != null) {
    ValueSpecification slotValue=(ValueSpecification)element;
    return getEID(slotValue.getOwningSlot()) + MDKConstants.SLOT_VALUE_ID_SEPARATOR + slotValue.getOwningSlot().getValue().indexOf(slotValue)+ "String_Node_Str"+ slotValue.eClass().getName().toLowerCase();
  }
  if (element instanceof Slot) {
    Slot slot=(Slot)element;
    if (slot.getOwningInstance() != null && ((Slot)element).getDefiningFeature() != null) {
      return getEID(slot.getOwningInstance()) + MDKConstants.SLOT_ID_SEPARATOR + getEID(slot.getDefiningFeature());
    }
  }
  return element.getLocalID();
}
Program: 88411
Project: 88411
Buggy source:
public static Changelog<String,Void> buildChangelog(ObjectNode objectNode){
  Changelog<String,Void> changelog=new Changelog<>();
  for (  Changelog.ChangeType changeType : Changelog.ChangeType.values()) {
    JsonNode jsonNode=objectNode.get(changeType.name().toLowerCase());
    if (jsonNode == null || !jsonNode.isArray()) {
      continue;
    }
    for (    JsonNode jsonNode1 : jsonNode) {
      if (jsonNode1 == null || !jsonNode1.isTextual()) {
        continue;
      }
      changelog.addChange(jsonNode1.asText(),null,changeType);
    }
  }
  return changelog;
}

Fixed version (ground truth):
public static Changelog<String,Void> buildChangelog(Changelog changelog,ObjectNode objectNode){
  for (  Changelog.ChangeType changeType : Changelog.ChangeType.values()) {
    JsonNode jsonNode=objectNode.get(changeType.name().toLowerCase());
    if (jsonNode == null || !jsonNode.isArray()) {
      continue;
    }
    for (    JsonNode jsonNode1 : jsonNode) {
      if (jsonNode1 == null || !jsonNode1.isTextual()) {
        continue;
      }
      changelog.addChange(jsonNode1.asText(),null,changeType);
    }
  }
  return changelog;
}
Program: 88417
Project: 88417
Buggy source:
public CreateSpecializedTypeAction(final Property property,final Classifier parent,final boolean redefineAttributes,final String name,boolean isIndividual){
  super(name);
  this.property=property;
  this.parent=parent;
  this.redefineAttributes=redefineAttributes;
  this.name=name;
  this.isIndividual=isIndividual;
}

Fixed version (ground truth):
public CreateSpecializedTypeAction(final Property property,final Classifier parent,final String name,boolean isIndividual,boolean isRecursive){
  super(name);
  this.property=property;
  this.parent=parent;
  this.name=name;
  this.isIndividual=isIndividual;
  this.isRecursive=isRecursive;
}
Program: 88419
Project: 88419
Buggy source:
@Override public void run(){
  CreateSpecializedTypeAction.createSpecializedType(property,parent,redefineAttributes,isIndividual);
}

Fixed version (ground truth):
@Override public void run(){
  CreateSpecializedTypeAction.createSpecializedType(property,parent,isIndividual,isRecursive);
}
Program: 88423
Project: 88423
Buggy source:
@Override public void run(){
  redefineRedefinableElement(subClassifier,re,recursion,isIndividual);
}

Fixed version (ground truth):
@Override public void run(){
  redefineRedefinableElement(subClassifier,re,isIndividual,isRecursive);
}
Program: 88424
Project: 88424
Buggy source:
public static void createInheritingAssociation(Property generalProperty,Classifier classifierOfnewProperty,Property newProperty){
  Association generalAssociation=generalProperty.getAssociation();
  Association newAssociation=UMLFactory.eINSTANCE.createAssociation();
  newAssociation.setName(generalAssociation.getName());
  Property ownedEnd=UMLFactory.eINSTANCE.createProperty();
  ownedEnd.setOwner(newAssociation);
  ownedEnd.setType(classifierOfnewProperty);
  Utils.createGeneralization(generalAssociation,newAssociation);
  newAssociation.setOwner(classifierOfnewProperty.getOwner());
  newAssociation.getMemberEnd().add(newProperty);
  newAssociation.getOwnedEnd().add(ownedEnd);
}

Fixed version (ground truth):
public static void createInheritingAssociation(Property generalProperty,Classifier classifierOfnewProperty,Property newProperty){
  Association generalAssociation=generalProperty.getAssociation();
  Association newAssociation=UMLFactory.eINSTANCE.createAssociation();
  newAssociation.setName(generalAssociation.getName());
  Property ownedEnd=UMLFactory.eINSTANCE.createProperty();
  ownedEnd.setOwner(newAssociation);
  ownedEnd.setType(classifierOfnewProperty);
  Utils.createGeneralization(generalAssociation,newAssociation);
  if (classifierOfnewProperty.getOwner() != null) {
    newAssociation.setOwner(classifierOfnewProperty.getOwner());
  }
 else {
    throw new NullPointerException("String_Node_Str");
  }
  newAssociation.getMemberEnd().add(newProperty);
  newAssociation.getOwnedEnd().add(ownedEnd);
}
Program: 88425
Project: 88425
Buggy source:
/** 
 * @param targetForRedefEl
 * @param elementToBeRedefined
 * @param recursion
 * @param name
 * @param isIndividual
 */
public SetOrCreateRedefinableElementAction(final Classifier targetForRedefEl,final RedefinableElement elementToBeRedefined,final boolean recursion,final String name,boolean isIndividual){
  super(name);
  this.subClassifier=targetForRedefEl;
  this.re=elementToBeRedefined;
  this.recursion=recursion;
  this.name=name;
  this.isIndividual=isIndividual;
}

Fixed version (ground truth):
/** 
 * @param targetForRedefEl
 * @param elementToBeRedefined
 * @param recursion
 * @param name
 * @param isIndividual
 */
public SetOrCreateRedefinableElementAction(final Classifier targetForRedefEl,final RedefinableElement elementToBeRedefined,final boolean recursion,final String name,boolean isIndividual){
  super(name);
  this.subClassifier=targetForRedefEl;
  this.re=elementToBeRedefined;
  this.isRecursive=recursion;
  this.name=name;
  this.isIndividual=isIndividual;
}
Program: 88426
Project: 88426
Buggy source:
public Classifier createSpecialClassifier(Namespace container,List<RedefinableElement> traveled,List<Classifier> visited){
  for (  final Class<? extends Classifier> c : UNSPECIALIZABLE_CLASSIFIERS) {
    if (c.isAssignableFrom(classifier.getClass())) {
      return null;
    }
  }
  Classifier specific=(Classifier)CopyPasting.copyPasteElement(classifier,container);
  visited.add(specific);
  visited.add(classifier);
  specific.getGeneralization().clear();
  ArrayList<RedefinableElement> redefinedElements=new ArrayList<RedefinableElement>();
  for (  NamedElement namedElement : specific.getOwnedMember()) {
    if (namedElement instanceof RedefinableElement && !((RedefinableElement)namedElement).isLeaf() && !(namedElement instanceof Classifier)) {
      redefinedElements.add((RedefinableElement)namedElement);
    }
  }
  Utils.createGeneralization(classifier,specific);
  for (  final NamedElement ne : specific.getInheritedMember()) {
    if (ne instanceof RedefinableElement && !((RedefinableElement)ne).isLeaf() && !(ne instanceof Classifier)) {
      final RedefinableElement elementToBeRedefined=(RedefinableElement)ne;
      SetOrCreateRedefinableElementAction.redefineRedefinableElement(specific,elementToBeRedefined,recursionMode,traveled,visited,individualMode);
    }
  }
  for (  RedefinableElement redefinedElement : redefinedElements) {
    redefinedElement.dispose();
  }
  return specific;
}

Fixed version (ground truth):
public Classifier createSpecialClassifier(Namespace container,List<RedefinableElement> traveled,List<Classifier> visited){
  for (  final Class<? extends Classifier> c : UNSPECIALIZABLE_CLASSIFIERS) {
    if (c.isAssignableFrom(classifier.getClass())) {
      return null;
    }
  }
  Classifier specific=(Classifier)CopyPasting.copyPasteElement(classifier,container);
  visited.add(specific);
  visited.add(classifier);
  specific.getGeneralization().clear();
  ArrayList<RedefinableElement> redefinedElements=new ArrayList<RedefinableElement>();
  for (  NamedElement namedElement : specific.getOwnedMember()) {
    if (namedElement instanceof RedefinableElement && !((RedefinableElement)namedElement).isLeaf() && !(namedElement instanceof Classifier)) {
      redefinedElements.add((RedefinableElement)namedElement);
      ((RedefinableElement)namedElement).getRedefinedElement().clear();
    }
  }
  Utils.createGeneralization(classifier,specific);
  for (  final NamedElement ne : specific.getInheritedMember()) {
    if (ne instanceof RedefinableElement && !((RedefinableElement)ne).isLeaf() && !(ne instanceof Classifier)) {
      final RedefinableElement elementToBeRedefined=(RedefinableElement)ne;
      SetOrCreateRedefinableElementAction.redefineRedefinableElement(specific,elementToBeRedefined,traveled,visited,individualMode,isRecursive);
    }
  }
  return specific;
}
Program: 88427
Project: 88427
Buggy source:
public SpecializeStructureAction(final Classifier classifier,boolean isValidationMode,String id,boolean isRecursive,boolean isIndividual){
  super(id,classifier);
  this.classifier=classifier;
  recursionList=new ArrayList<>();
  this.isValidationMode=isValidationMode;
  this.recursionMode=isRecursive;
  this.individualMode=isIndividual;
}

Fixed version (ground truth):
public SpecializeStructureAction(final Classifier classifier,boolean isValidationMode,String id,boolean isRecursive,boolean isIndividual){
  super(id,classifier);
  this.classifier=classifier;
  recursionList=new ArrayList<>();
  this.isValidationMode=isValidationMode;
  this.isRecursive=isRecursive;
  this.individualMode=isIndividual;
}
Program: 88430
Project: 88430
Buggy source:
private static ObjectNode convert(Element element,Project project,boolean nestedValueSpecification){
  if (element == null) {
    return null;
  }
  ObjectNode objectNode=JacksonUtils.getObjectMapper().createObjectNode();
  for (  PreProcessor preProcessor : PreProcessor.values()) {
    if (nestedValueSpecification && preProcessor == PreProcessor.VALUE_SPECIFICATION) {
      continue;
    }
    try {
      objectNode=preProcessor.getFunction().apply(element,project,objectNode);
    }
 catch (    RuntimeException e) {
      e.printStackTrace();
      System.out.println("String_Node_Str" + element.getHumanName() + "String_Node_Str"+ element.getID()+ "String_Node_Str"+ project.getName());
    }
    if (objectNode == null) {
      return null;
    }
  }
  for (  EStructuralFeature eStructuralFeature : element.eClass().getEAllStructuralFeatures()) {
    ExportFunction function=Arrays.stream(EStructuralFeatureOverride.values()).filter(override -> override.getPredicate().test(element,eStructuralFeature)).map(EStructuralFeatureOverride::getFunction).findAny().orElse(DEFAULT_E_STRUCTURAL_FEATURE_FUNCTION);
    try {
      objectNode=function.apply(element,project,eStructuralFeature,objectNode);
    }
 catch (    RuntimeException e) {
      e.printStackTrace();
      System.err.println(element);
    }
    if (objectNode == null) {
      return null;
    }
  }
  return objectNode;
}

Fixed version (ground truth):
private static ObjectNode convert(Element element,Project project,boolean nestedValueSpecification){
  if (element == null) {
    return null;
  }
  ObjectNode objectNode=JacksonUtils.getObjectMapper().createObjectNode();
  for (  PreProcessor preProcessor : PreProcessor.values()) {
    if (nestedValueSpecification && preProcessor == PreProcessor.VALUE_SPECIFICATION) {
      continue;
    }
    try {
      objectNode=preProcessor.getFunction().apply(element,project,objectNode);
    }
 catch (    RuntimeException e) {
      e.printStackTrace();
      System.out.println("String_Node_Str" + element.getHumanName() + "String_Node_Str"+ element.getLocalID()+ "String_Node_Str"+ project.getName());
    }
    if (objectNode == null) {
      return null;
    }
  }
  for (  EStructuralFeature eStructuralFeature : element.eClass().getEAllStructuralFeatures()) {
    ExportFunction function=Arrays.stream(EStructuralFeatureOverride.values()).filter(override -> override.getPredicate().test(element,eStructuralFeature)).map(EStructuralFeatureOverride::getFunction).findAny().orElse(DEFAULT_E_STRUCTURAL_FEATURE_FUNCTION);
    try {
      objectNode=function.apply(element,project,eStructuralFeature,objectNode);
    }
 catch (    RuntimeException e) {
      e.printStackTrace();
      System.err.println(element);
    }
    if (objectNode == null) {
      return null;
    }
  }
  return objectNode;
}
Program: 88436
Project: 88436
Buggy source:
public void addElementEquivalenceViolation(Pair<Element,ObjectNode> clientElement,ObjectNode serverElement){
  JsonNode diff=JsonPatchFunction.getInstance().apply(clientElement.getValue(),serverElement);
  if (diff != null && diff.size() != 0) {
    notEquivalentCount++;
    String name="String_Node_Str";
    if (clientElement.getKey() instanceof NamedElement && ((NamedElement)clientElement.getKey()).getName() != null && !((NamedElement)clientElement.getKey()).getName().isEmpty()) {
      name=((NamedElement)clientElement.getKey()).getName();
    }
    finishViolation(new ValidationRuleViolation(clientElement.getKey(),"String_Node_Str" + clientElement.getKey().getHumanType() + "String_Node_Str"+ name),clientElement.getKey().getID(),clientElement,serverElement,diff);
  }
}

Fixed version (ground truth):
public void addElementEquivalenceViolation(Pair<Element,ObjectNode> clientElement,ObjectNode serverElement){
  JsonNode diff=JsonPatchFunction.getInstance().apply(clientElement.getValue(),serverElement);
  if (diff != null && diff.size() != 0) {
    notEquivalentCount++;
    String name="String_Node_Str";
    if (clientElement.getKey() instanceof NamedElement && ((NamedElement)clientElement.getKey()).getName() != null && !((NamedElement)clientElement.getKey()).getName().isEmpty()) {
      name=((NamedElement)clientElement.getKey()).getName();
    }
    finishViolation(new ValidationRuleViolation(clientElement.getKey(),"String_Node_Str" + clientElement.getKey().getHumanType() + "String_Node_Str"+ name),clientElement.getKey().getLocalID(),clientElement,serverElement,diff);
  }
}
Program: 88438
Project: 88438
Buggy source:
private void addMissingOnMmsViolation(Pair<Element,ObjectNode> clientElement){
  missingOnMmsCount++;
  String name="String_Node_Str";
  if (clientElement.getKey() instanceof NamedElement && ((NamedElement)clientElement.getKey()).getName() != null && !((NamedElement)clientElement.getKey()).getName().isEmpty()) {
    name=((NamedElement)clientElement.getKey()).getName();
  }
  finishViolation(new ValidationRuleViolation(clientElement.getKey(),"String_Node_Str" + clientElement.getKey().getHumanType() + "String_Node_Str"+ name),clientElement.getKey().getID(),clientElement,null,null);
}

Fixed version (ground truth):
private void addMissingOnMmsViolation(Pair<Element,ObjectNode> clientElement){
  missingOnMmsCount++;
  String name="String_Node_Str";
  if (clientElement.getKey() instanceof NamedElement && ((NamedElement)clientElement.getKey()).getName() != null && !((NamedElement)clientElement.getKey()).getName().isEmpty()) {
    name=((NamedElement)clientElement.getKey()).getName();
  }
  finishViolation(new ValidationRuleViolation(clientElement.getKey(),"String_Node_Str" + clientElement.getKey().getHumanType() + "String_Node_Str"+ name),clientElement.getKey().getLocalID(),clientElement,null,null);
}
Program: 88439
Project: 88439
Buggy source:
TicketMapping(final Project project,String ticket){
  this.ticket=ticket;
  this.ticketRenewer=Executors.newScheduledThreadPool(1);
  final Runnable renewTicket=() -> {
    try {
      try {
        boolean isValid=isTicketValid(project,null);
        if (!isValid) {
          Application.getInstance().getGUILog().log("String_Node_Str");
          MMSLogoutAction.logoutAction(project);
        }
      }
 catch (      ServerException|IOException|URISyntaxException e) {
        Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
        e.printStackTrace();
      }
    }
 catch (    Exception ignored) {
    }
  }
;
  this.ticketRenewer.scheduleAtFixedRate(renewTicket,TICKET_RENEWAL_INTERVAL,TICKET_RENEWAL_INTERVAL,TimeUnit.SECONDS);
}

Fixed version (ground truth):
TicketMapping(Project project,String username,String ticket){
  this.ticket=ticket;
  this.username=username;
  this.ticketRenewer=Executors.newScheduledThreadPool(1);
  final Runnable renewTicket=() -> {
    try {
      try {
        boolean isValid=isTicketValid(project,null);
        if (!isValid) {
          Application.getInstance().getGUILog().log("String_Node_Str");
          MMSLogoutAction.logoutAction(project);
        }
      }
 catch (      ServerException|IOException|URISyntaxException e) {
        Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
        e.printStackTrace();
      }
    }
 catch (    Exception ignored) {
    }
  }
;
  this.ticketRenewer.scheduleAtFixedRate(renewTicket,TICKET_RENEWAL_INTERVAL,TICKET_RENEWAL_INTERVAL,TimeUnit.SECONDS);
}
Program: 88440
Project: 88440
Buggy source:
@Override public void run(ProgressStatus progressStatus){
  String ticket;
  try {
    ticket=MMSUtils.sendCredentials(project,username,pass,progressStatus);
  }
 catch (  ServerException|IOException|URISyntaxException e) {
    Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
    e.printStackTrace();
    return;
  }
  if (ticket != null) {
    ticketMappings.put(project,new TicketMapping(project,ticket));
  }
}

Fixed version (ground truth):
@Override public void run(ProgressStatus progressStatus){
  String ticket;
  try {
    ticket=MMSUtils.sendCredentials(project,username,pass,progressStatus);
  }
 catch (  ServerException|IOException|URISyntaxException e) {
    Application.getInstance().getGUILog().log("String_Node_Str" + e.getMessage());
    e.printStackTrace();
    return;
  }
  if (ticket != null) {
    ticketMappings.put(project,new TicketMapping(project,username,ticket));
  }
}
Program: 88441
Project: 88441
Buggy source:
/** 
 * Accessor for stored username.
 * @return username
 */
public static String getUsername(){
  return username;
}

Fixed version (ground truth):
public String getUsername(){
  return this.username;
}
Program: 88443
Project: 88443
Buggy source:
public void configure(ActionsManager manager,PresentationElement... elements){
  ActionsCategory category=(ActionsCategory)manager.getActionFor(MDKPlugin.MAIN_TOOLBAR_CATEGORY_NAME);
  if (category == null) {
    category=new MDActionsCategory(MDKPlugin.MAIN_TOOLBAR_CATEGORY_NAME,MDKPlugin.MAIN_TOOLBAR_CATEGORY_NAME,null,ActionsGroups.APPLICATION_RELATED);
    category.setNested(true);
  }
  manager.addCategory(category);
  category.addAction(new OclQueryAction());
  category.addAction(new ValidateConstraintsAction());
}

Fixed version (ground truth):
public void configure(ActionsManager manager,PresentationElement... elements){
  ActionsCategory category=manager.getCategory(MDKPlugin.MAIN_TOOLBAR_CATEGORY_NAME);
  if (category == null) {
    category=new MDActionsCategory(MDKPlugin.MAIN_TOOLBAR_CATEGORY_NAME,MDKPlugin.MAIN_TOOLBAR_CATEGORY_NAME,null,ActionsGroups.APPLICATION_RELATED);
    category.setNested(true);
  }
  manager.removeCategory(category);
  manager.addCategory(category);
  category.addAction(new OclQueryAction());
  category.addAction(new ValidateConstraintsAction());
}
Program: 88448
Project: 88448
Buggy source:
@SuppressWarnings("String_Node_Str") @Override public void visit(DBTable table){
  DBAlfrescoTableVisitor v=new DBAlfrescoTableVisitor(this.recurse);
  table.accept(v);
  viewElements.peek().addAll(v.getTableElements());
  elementSet.addAll(v.getElementSet());
  if (!main) {
    return;
  }
  InstanceSpecification i=null;
  if (!currentTableInstances.peek().isEmpty()) {
    i=currentTableInstances.peek().remove(0);
    currentInstanceList.peek().remove(0);
  }
  PresentationElementInstance parentSec=currentSection.isEmpty() ? null : currentSection.peek();
  PresentationElementInstance ipe=new PresentationElementInstance(i,v.getObject(),PresentationElementEnum.TABLE,currentView.peek(),table.getTitle() != null ? table.getTitle() : "String_Node_Str",parentSec,null);
  newpe.peek().add(ipe);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") @Override public void visit(DBTable table){
  DBAlfrescoTableVisitor v=new DBAlfrescoTableVisitor(this.recurse);
  table.accept(v);
  viewElements.peek().addAll(v.getTableElements());
  elementSet.addAll(v.getElementSet());
  images.putAll(v.getImages());
  if (!main) {
    return;
  }
  InstanceSpecification i=null;
  if (!currentTableInstances.peek().isEmpty()) {
    i=currentTableInstances.peek().remove(0);
    currentInstanceList.peek().remove(i);
  }
  PresentationElementInstance parentSec=currentSection.isEmpty() ? null : currentSection.peek();
  PresentationElementInstance ipe=new PresentationElementInstance(i,v.getObject(),PresentationElementEnum.TABLE,currentView.peek(),table.getTitle() != null ? table.getTitle() : "String_Node_Str",parentSec,null);
  newpe.peek().add(ipe);
}
Program: 88450
Project: 88450
Buggy source:
public DeltaSyncRunner(boolean shouldCommmit,boolean shouldCommitDeletes,boolean shouldUpdate){
  this.shouldCommit=shouldCommmit;
  this.shouldCommitDeletes=shouldCommitDeletes;
  this.shouldUpdate=shouldUpdate;
}

Fixed version (ground truth):
public DeltaSyncRunner(boolean shouldCommit,boolean shouldCommitDeletes,boolean shouldUpdate){
  this.shouldCommit=shouldCommit;
  this.shouldCommitDeletes=shouldCommitDeletes;
  this.shouldUpdate=shouldUpdate;
}
Program: 88452
Project: 88452
Buggy source:
protected void startSection(DBSection section){
  JSONObject newSection=new JSONObject();
  newSection.put("String_Node_Str","String_Node_Str");
  newSection.put("String_Node_Str",section.getTitle());
  JSONArray secArray=new JSONArray();
  newSection.put("String_Node_Str",secArray);
  this.curContains.peek().add(newSection);
  this.curContains.push(secArray);
  InstanceSpecification sec=null;
  Element loopElement=null;
  if (section.getDgElement() instanceof Section) {
    if (((Section)section.getDgElement()).getLoopElement() != null) {
      loopElement=((Section)section.getDgElement()).getLoopElement();
      sec=findInstanceForSection(loopElement);
    }
 else {
      sec=findInstanceForSection(null);
    }
  }
  if (sec != null) {
    currentInstanceList.peek().remove(sec);
    currentSectionInstances.peek().remove(sec);
  }
  PresentationElementInstance parentSec=currentSection.isEmpty() ? null : currentSection.peek();
  List<PresentationElementInstance> secChildren=new ArrayList<PresentationElementInstance>();
  PresentationElementInstance pe=new PresentationElementInstance(sec,newSection,PresentationElementEnum.SECTION,currentView.peek(),section.getTitle() != null ? section.getTitle() : "String_Node_Str",parentSec,secChildren);
  pe.setLoopElement(loopElement);
  newpe.peek().add(pe);
  currentSection.push(pe);
  newpe.push(secChildren);
  processCurrentInstances(sec,currentView.peek());
  addManualInstances(false);
}

Fixed version (ground truth):
protected void startSection(DBSection section){
  JSONObject newSection=new JSONObject();
  newSection.put("String_Node_Str","String_Node_Str");
  newSection.put("String_Node_Str",section.getTitle());
  InstanceSpecification sec=null;
  Element loopElement=null;
  if (section.getDgElement() instanceof Section) {
    if (((Section)section.getDgElement()).getLoopElement() != null) {
      loopElement=((Section)section.getDgElement()).getLoopElement();
      sec=findInstanceForSection(loopElement);
    }
 else {
      sec=findInstanceForSection(null);
    }
  }
  if (sec != null) {
    currentInstanceList.peek().remove(sec);
    currentSectionInstances.peek().remove(sec);
  }
  PresentationElementInstance parentSec=currentSection.isEmpty() ? null : currentSection.peek();
  List<PresentationElementInstance> secChildren=new ArrayList<PresentationElementInstance>();
  PresentationElementInstance pe=new PresentationElementInstance(sec,newSection,PresentationElementEnum.SECTION,currentView.peek(),section.getTitle() != null ? section.getTitle() : "String_Node_Str",parentSec,secChildren);
  pe.setLoopElement(loopElement);
  newpe.peek().add(pe);
  currentSection.push(pe);
  newpe.push(secChildren);
  processCurrentInstances(sec,currentView.peek());
  addManualInstances(false);
}
Program: 88453
Project: 88453
Buggy source:
@SuppressWarnings("String_Node_Str") public void startView(Element e){
  JSONObject view=new JSONObject();
  Project project=Project.getProject(e);
  if (StereotypesHelper.hasStereotypeOrDerived(e,Utils.getProductStereotype(project))) {
    view.put("String_Node_Str","String_Node_Str");
  }
 else {
    view.put("String_Node_Str","String_Node_Str");
  }
  String id=Converters.getElementToIdConverter().apply(e);
  view.put(MDKConstants.ID_KEY,id);
  views.put(id,view);
  Set<String> viewE=new HashSet<String>();
  viewElements.push(viewE);
  JSONArray contains=new JSONArray();
  view.put("String_Node_Str",contains);
  this.curContains.push(contains);
  sibviews.peek().add(Converters.getElementToIdConverter().apply(e));
  sibviewsElements.peek().add(e);
  JSONArray childViews=new JSONArray();
  sibviews.push(childViews);
  sibviewsElements.push(new ArrayList<Element>());
  currentView.push(e);
  List<PresentationElementInstance> viewChildren=new ArrayList<PresentationElementInstance>();
  newpe.push(viewChildren);
  view2pe.put(e,viewChildren);
  view2peOld.put(e,new ArrayList<PresentationElementInstance>());
  processCurrentInstances(e,e);
  if (currentInstanceList.peek().isEmpty()) {
    PresentationElementInstance hack=new PresentationElementInstance(null,null,null,e,null,null,null);
    hack.setManual(true);
    hack.setViewDocHack(true);
    newpe.peek().add(hack);
  }
  addManualInstances(false);
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void startView(Element e){
  Set<String> viewE=new HashSet<>();
  viewElements.push(viewE);
  sibviewsElements.peek().add(e);
  sibviewsElements.push(new ArrayList<>());
  currentView.push(e);
  List<PresentationElementInstance> viewChildren=new ArrayList<>();
  newpe.push(viewChildren);
  view2pe.put(e,viewChildren);
  view2peOld.put(e,new ArrayList<>());
  processCurrentInstances(e,e);
  if (currentInstanceList.peek().isEmpty()) {
    PresentationElementInstance hack=new PresentationElementInstance(null,null,null,e,null,null,null);
    hack.setManual(true);
    hack.setViewDocHack(true);
    newpe.peek().add(hack);
  }
  addManualInstances(false);
}
Program: 88454
Project: 88454
Buggy source:
@SuppressWarnings("String_Node_Str") public void endView(Element e){
  JSONArray viewEs=new JSONArray();
  viewEs.addAll(viewElements.pop());
  JSONObject view=(JSONObject)views.get(Converters.getElementToIdConverter().apply(e));
  view.put("String_Node_Str",viewEs);
  view.put("String_Node_Str",viewEs);
  if (recurse && !doc) {
    view.put("String_Node_Str",sibviews.peek());
  }
  view2view.put(Converters.getElementToIdConverter().apply(e),sibviews.pop());
  view2viewElements.put(e,sibviewsElements.pop());
  this.curContains.pop();
  view2elements.put(e,viewEs);
  addManualInstances(true);
  processUnusedInstances(e);
  List<PresentationElementInstance> pes=newpe.pop();
  if (pes.isEmpty()) {
    PresentationElementInstance hack=new PresentationElementInstance(null,null,null,e,null,null,null);
    hack.setManual(true);
    hack.setViewDocHack(true);
    pes.add(hack);
  }
  currentView.pop();
  currentManualInstances.pop();
  currentImageInstances.pop();
  currentSectionInstances.pop();
  currentParaInstances.pop();
  currentListInstances.pop();
  currentTableInstances.pop();
  currentInstanceList.pop();
  currentUnusedInstances.pop();
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public void endView(Element e){
  JSONArray viewEs=new JSONArray();
  viewEs.addAll(viewElements.pop());
  view2viewElements.put(e,sibviewsElements.pop());
  view2elements.put(e,viewEs);
  addManualInstances(true);
  processUnusedInstances(e);
  List<PresentationElementInstance> pes=newpe.pop();
  if (pes.isEmpty()) {
    PresentationElementInstance hack=new PresentationElementInstance(null,null,null,e,null,null,null);
    hack.setManual(true);
    hack.setViewDocHack(true);
    pes.add(hack);
  }
  currentView.pop();
  currentManualInstances.pop();
  currentImageInstances.pop();
  currentSectionInstances.pop();
  currentParaInstances.pop();
  currentListInstances.pop();
  currentTableInstances.pop();
  currentInstanceList.pop();
  currentUnusedInstances.pop();
}
Program: 88455
Project: 88455
Buggy source:
protected void endSection(DBSection section){
  this.curContains.pop();
  addManualInstances(true);
  processUnusedInstances(currentView.peek());
  newpe.pop();
  currentSection.pop();
  currentManualInstances.pop();
  currentImageInstances.pop();
  currentSectionInstances.pop();
  currentParaInstances.pop();
  currentListInstances.pop();
  currentTableInstances.pop();
  currentInstanceList.pop();
  currentUnusedInstances.pop();
}

Fixed version (ground truth):
protected void endSection(DBSection section){
  addManualInstances(true);
  processUnusedInstances(currentView.peek());
  newpe.pop();
  currentSection.pop();
  currentManualInstances.pop();
  currentImageInstances.pop();
  currentSectionInstances.pop();
  currentParaInstances.pop();
  currentListInstances.pop();
  currentTableInstances.pop();
  currentInstanceList.pop();
  currentUnusedInstances.pop();
}