nus-yam/ex-repair huggingface dataset:
Program: 12313
Project: 12313
Buggy source:
public void attach(ThreadedAgent agent){
  Arguments.checkNotNull(agent,"String_Node_Str");
  if (this.agent != null) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.agent=agent;
  this.agent.getAgent().getEventManager().addListener(AsynchronousInputReadyEvent.class,inputReadyListener=new SoarEventListener(){
    @Override public void onEvent(    SoarEvent event){
      setNewInputAvailable();
    }
  }
);
  this.agent.getAgent().getEventManager().addListener(AfterDecisionCycleEvent.class,afterDecisionCycleListener=new SoarEventListener(){
    @Override public void onEvent(    SoarEvent event){
      doWait();
    }
  }
);
  this.agent.getAgent().getProperties().setProvider(SoarProperties.WAITING,waiting);
  this.oldHandler=this.agent.getAgent().getRhsFunctions().registerHandler(this);
}

Fixed version (ground truth):
public void attach(ThreadedAgent agent){
  Arguments.checkNotNull(agent,"String_Node_Str");
  if (this.agent != null) {
    throw new IllegalStateException("String_Node_Str");
  }
  this.agent=agent;
  this.agent.getAgent().getEventManager().addListener(AsynchronousInputReadyEvent.class,inputReadyListener=new SoarEventListener(){
    @Override public void onEvent(    SoarEvent event){
      setNewInputAvailable();
    }
  }
);
  this.agent.getAgent().getEventManager().addListener(AfterDecisionCycleEvent.class,afterDecisionCycleListener=new SoarEventListener(){
    @Override public void onEvent(    SoarEvent event){
      doWait();
    }
  }
);
  this.agent.getAgent().getProperties().setProvider(SoarProperties.WAIT_INFO,waitInfoProp);
  this.oldHandler=this.agent.getAgent().getRhsFunctions().registerHandler(this);
}
Program: 12314
Project: 12314
Buggy source:
@Override public Symbol execute(RhsFunctionContext context,List<Symbol> arguments) throws RhsFunctionException {
  RhsFunctions.checkArgumentCount(this,arguments);
  RhsFunctions.checkAllArgumentsAreNumeric(getName(),arguments);
  waitTimeout=arguments.isEmpty() ? Long.MAX_VALUE : arguments.get(0).asInteger().getValue();
  return null;
}

Fixed version (ground truth):
@Override public Symbol execute(RhsFunctionContext context,List<Symbol> arguments) throws RhsFunctionException {
  RhsFunctions.checkArgumentCount(this,arguments);
  RhsFunctions.checkAllArgumentsAreNumeric(getName(),arguments);
  final long timeout=arguments.isEmpty() ? Long.MAX_VALUE : arguments.get(0).asInteger().getValue();
  if (!requestedWaitInfo.waiting || timeout < requestedWaitInfo.timeout) {
    requestedWaitInfo=new WaitInfo(timeout,context.getProductionBeingFired());
  }
  return null;
}
Program: 12316
Project: 12316
Buggy source:
public Agent(){
  new StandardFunctions(this);
  installDefaultTraceFormats();
  rete.setReteListener(soarReteListener);
}

Fixed version (ground truth):
public Agent(){
  decider.initialize();
  decisionCycle.initialize();
  rl.initialize();
  new StandardFunctions(this);
  installDefaultTraceFormats();
  rete.setReteListener(soarReteListener);
}
Program: 12317
Project: 12317
Buggy source:
/** 
 * consistency.cpp:41:remove_operator_if_necessary
 * @param s
 * @param w
 */
public void remove_operator_if_necessary(Slot s,WmeImpl w){
  if (s.getWmes() != null) {
    if (s.getWmes().value == w.value) {
      context.trace.print(Category.OPERAND2_REMOVALS,"String_Node_Str",w);
      context.decider.remove_wmes_for_context_slot(s);
      if (s.id.lower_goal != null)       context.decider.remove_existing_context_and_descendents(s.id.lower_goal);
    }
  }
}

Fixed version (ground truth):
/** 
 * consistency.cpp:41:remove_operator_if_necessary
 * @param s
 * @param w
 */
public void remove_operator_if_necessary(Slot s,WmeImpl w){
  if (s.getWmes() != null) {
    if (s.getWmes().value == w.value) {
      context.getTrace().print(Category.OPERAND2_REMOVALS,"String_Node_Str",w);
      context.decider.remove_wmes_for_context_slot(s);
      if (s.id.lower_goal != null)       context.decider.remove_existing_context_and_descendents(s.id.lower_goal);
    }
  }
}
Program: 12318
Project: 12318
Buggy source:
/** 
 * consistency.cpp:299:remove_current_decision
 * @param s
 */
private void remove_current_decision(Slot s){
  if (s.getWmes() == null)   context.trace.print(Category.OPERAND2_REMOVALS,"String_Node_Str",s.id,s.attr);
  if (s.id != null)   context.trace.print(Category.OPERAND2_REMOVALS,"String_Node_Str",s.id);
  context.decider.remove_wmes_for_context_slot(s);
  if (s.id.lower_goal != null)   context.decider.remove_existing_context_and_descendents(s.id.lower_goal);
  context.decider.do_buffered_wm_and_ownership_changes();
}

Fixed version (ground truth):
/** 
 * consistency.cpp:299:remove_current_decision
 * @param s
 */
private void remove_current_decision(Slot s){
  final Trace trace=context.getTrace();
  if (s.getWmes() == null)   trace.print(Category.OPERAND2_REMOVALS,"String_Node_Str",s.id,s.attr);
  if (s.id != null)   trace.print(Category.OPERAND2_REMOVALS,"String_Node_Str",s.id);
  context.decider.remove_wmes_for_context_slot(s);
  if (s.id.lower_goal != null)   context.decider.remove_existing_context_and_descendents(s.id.lower_goal);
  context.decider.do_buffered_wm_and_ownership_changes();
}
Program: 12319
Project: 12319
Buggy source:
/** 
 * Find the highest goal of activity among the current assertions and retractions <p>We have to start at the top of the goal stack and go down because *any goal in the goal stack could be active (and we want to highest one). However, we terminate as soon as a goal with assertions or retractions is found. Propose cares only about ms_i_assertions & retractions  consistency.cpp:420:highest_active_goal_propose
 * @param start_goal The goal to start at
 * @return highest active goal in goal stack.
 */
public IdentifierImpl highest_active_goal_propose(IdentifierImpl start_goal){
  for (IdentifierImpl goal=start_goal; goal != null; goal=goal.lower_goal) {
    if ((!goal.ms_i_assertions.isEmpty()) || (!goal.ms_retractions.isEmpty()))     return goal;
  }
  if (!context.soarReteListener.nil_goal_retractions.isEmpty())   return null;
  context.trace.flush();
  throw new IllegalStateException("String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Find the highest goal of activity among the current assertions and retractions <p>We have to start at the top of the goal stack and go down because *any goal in the goal stack could be active (and we want to highest one). However, we terminate as soon as a goal with assertions or retractions is found. Propose cares only about ms_i_assertions & retractions  consistency.cpp:420:highest_active_goal_propose
 * @param start_goal The goal to start at
 * @return highest active goal in goal stack.
 */
public IdentifierImpl highest_active_goal_propose(IdentifierImpl start_goal){
  for (IdentifierImpl goal=start_goal; goal != null; goal=goal.lower_goal) {
    if ((!goal.ms_i_assertions.isEmpty()) || (!goal.ms_retractions.isEmpty()))     return goal;
  }
  if (!context.soarReteListener.nil_goal_retractions.isEmpty())   return null;
  context.getTrace().flush();
  throw new IllegalStateException("String_Node_Str");
}
Program: 12320
Project: 12320
Buggy source:
@Override synchronized public void flush() throws IOException {
  outputWindow.append(buffer.toString());
  outputWindow.setCaretPosition(outputWindow.getText().length());
  buffer=new StringBuilder();
}

Fixed version (ground truth):
@Override synchronized public void flush() throws IOException {
  final String output=buffer.toString();
  buffer=new StringBuilder();
  if (output.length() > 0) {
    SwingUtilities.invokeLater(new Runnable(){
      public void run(){
        outputWindow.append(output);
        outputWindow.setCaretPosition(outputWindow.getText().length());
      }
    }
);
  }
}
Program: 12322
Project: 12322
Buggy source:
/** 
 * decision_manipulation.cpp:59:select_force
 * @param candidates
 * @param reinit
 * @return
 */
Preference select_force(Preference candidates,boolean reinit){
  Preference return_val=null;
  Preference cand=candidates;
  if (this.select_enabled) {
    while (cand != null && return_val == null) {
      IdentifierImpl valueAsId=cand.value.asIdentifier();
      if (valueAsId != null) {
        String temp=Character.toString(valueAsId.name_letter) + valueAsId.name_number;
        if (this.select_operator.equals(temp))         return_val=cand;
      }
      cand=cand.next;
    }
    if (reinit)     select_init();
  }
  return return_val;
}

Fixed version (ground truth):
/** 
 * decision_manipulation.cpp:59:select_force
 * @param candidates
 * @param reinit
 * @return
 */
Preference select_force(Preference candidates,boolean reinit){
  Preference return_val=null;
  Preference cand=candidates;
  if (this.select_enabled) {
    while (cand != null && return_val == null) {
      IdentifierImpl valueAsId=cand.value.asIdentifier();
      if (valueAsId != null) {
        String temp=String.format("String_Node_Str",valueAsId);
        if (this.select_operator.equals(temp))         return_val=cand;
      }
      cand=cand.next;
    }
    if (reinit)     select_init();
  }
  return return_val;
}
Program: 12323
Project: 12323
Buggy source:
/** 
 * chunk.cpp:181:variablize_symbol <p>Note: In jsoar, modified to return new variable rather than replace  byref argument
 * @param sym
 * @return
 */
private SymbolImpl variablize_symbol(SymbolImpl sym){
  IdentifierImpl id=sym.asIdentifier();
  if (id == null)   return sym;
  if (!this.variablize_this_chunk)   return sym;
  if (id.tc_number == this.variablization_tc) {
    return id.variablization;
  }
  id.tc_number=this.variablization_tc;
  Variable var=context.variableGenerator.generate_new_variable(Character.toString(id.name_letter));
  id.variablization=var;
  return var;
}

Fixed version (ground truth):
/** 
 * chunk.cpp:181:variablize_symbol <p>Note: In jsoar, modified to return new variable rather than replace  byref argument
 * @param sym
 * @return
 */
private SymbolImpl variablize_symbol(SymbolImpl sym){
  IdentifierImpl id=sym.asIdentifier();
  if (id == null)   return sym;
  if (!this.variablize_this_chunk)   return sym;
  if (id.tc_number == this.variablization_tc) {
    return id.variablization;
  }
  id.tc_number=this.variablization_tc;
  Variable var=context.variableGenerator.generate_new_variable(Character.toString(id.getNameLetter()));
  id.variablization=var;
  return var;
}
Program: 12324
Project: 12324
Buggy source:
/** 
 * symtab.cpp:280:make_new_identifier
 * @param name_letter
 * @param level
 * @return
 */
public IdentifierImpl make_new_identifier(char name_letter,int level){
  name_letter=Character.isLetter(name_letter) ? Character.toUpperCase(name_letter) : 'I';
  int name_number=id_counter[name_letter - 'A']++;
  IdentifierImpl id=new IdentifierImpl(get_next_hash_id(),name_letter,name_number);
  id.level=level;
  id.promotion_level=level;
  identifiers.put(new IdKey(id.name_letter,id.name_number),id);
  return id;
}

Fixed version (ground truth):
/** 
 * symtab.cpp:280:make_new_identifier
 * @param name_letter
 * @param level
 * @return
 */
public IdentifierImpl make_new_identifier(char name_letter,int level){
  name_letter=Character.isLetter(name_letter) ? Character.toUpperCase(name_letter) : 'I';
  int name_number=id_counter[name_letter - 'A']++;
  IdentifierImpl id=new IdentifierImpl(get_next_hash_id(),name_letter,name_number);
  id.level=level;
  id.promotion_level=level;
  identifiers.put(new IdKey(id.getNameLetter(),id.getNameNumber()),id);
  return id;
}
Program: 12325
Project: 12325
Buggy source:
@Test public void testCycleCountInput() throws Exception {
  final List<Integer> matches=new ArrayList<Integer>();
  agent.getRhsFunctions().registerHandler(new AbstractRhsFunctionHandler("String_Node_Str"){
    @Override public Symbol execute(    SymbolFactory syms,    List<Symbol> arguments) throws RhsFunctionException {
      matches.add(arguments.get(0).asInteger().getValue());
      return null;
    }
  }
);
  CycleCountInput input=new CycleCountInput(agent.getInputOutput(),agent.getEventManager());
  agent.decider.setWaitsnc(true);
  agent.loadProduction("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  final int n=50;
  agent.decisionCycle.run_for_n_decision_cycles(n);
  assertEquals(n - 1,matches.size());
  int expected=1;
  for (  Integer i : matches) {
    assertEquals(expected++,i);
  }
}

Fixed version (ground truth):
@Test public void testCycleCountInput() throws Exception {
  final List<Integer> matches=new ArrayList<Integer>();
  agent.getRhsFunctions().registerHandler(new AbstractRhsFunctionHandler("String_Node_Str"){
    @Override public Symbol execute(    SymbolFactory syms,    List<Symbol> arguments) throws RhsFunctionException {
      matches.add(arguments.get(0).asInteger().getValue());
      return null;
    }
  }
);
  CycleCountInput input=new CycleCountInput(agent.getInputOutput(),agent.getEventManager());
  agent.decider.setWaitsnc(true);
  agent.loadProduction("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str");
  final int n=50;
  agent.decisionCycle.run_for_n_decision_cycles(n);
  assertEquals(n - 1,matches.size());
  int expected=1;
  for (  Integer i : matches) {
    assertEquals(expected++,i.intValue());
  }
}
Program: 12326
Project: 12326
Buggy source:
@Test public void testMakeNewIdentifier(){
  IdentifierImpl s=syms.make_new_identifier('s',(short)1);
  assertNotNull(s);
  assertEquals('S',s.name_letter);
  assertEquals(1,s.name_number);
  assertEquals(1,s.level);
  assertFalse(s.hash_id == 0);
  assertSame(s,syms.findIdentifier(s.name_letter,s.name_number));
  s=syms.make_new_identifier('s',(short)4);
  assertNotNull(s);
  assertEquals('S',s.name_letter);
  assertEquals(2,s.name_number);
  assertEquals(4,s.level);
  assertFalse(s.hash_id == 0);
  assertSame(s,syms.findIdentifier(s.name_letter,s.name_number));
}

Fixed version (ground truth):
@Test public void testMakeNewIdentifier(){
  IdentifierImpl s=syms.make_new_identifier('s',(short)1);
  assertNotNull(s);
  assertEquals('S',s.getNameLetter());
  assertEquals(1,s.getNameNumber());
  assertEquals(1,s.level);
  assertFalse(s.hash_id == 0);
  assertSame(s,syms.findIdentifier(s.getNameLetter(),s.getNameNumber()));
  s=syms.make_new_identifier('s',(short)4);
  assertNotNull(s);
  assertEquals('S',s.getNameLetter());
  assertEquals(2,s.getNameNumber());
  assertEquals(4,s.level);
  assertFalse(s.hash_id == 0);
  assertSame(s,syms.findIdentifier(s.getNameLetter(),s.getNameNumber()));
}
Program: 12330
Project: 12330
Buggy source:
public void setIcon(Image image){
  this.lblIcon.setImage(image);
  layout(true);
}

Fixed version (ground truth):
public void setIcon(Image image){
  image=new Image(image.getDevice(),image.getImageData().scaledTo(32,32));
  this.lblIcon.setImage(image);
  layout(true);
}
Program: 12332
Project: 12332
Buggy source:
private static List<Module> parseDocument(Document dom,String serverId){
  int version;
  List<Module> modList=new ArrayList<Module>();
  Element parent=dom.getDocumentElement();
  Element docEle=null;
  if (parent.getNodeName().equals("String_Node_Str")) {
    if (Version.requestedFeatureLevel(parent.getAttribute("String_Node_Str"),"String_Node_Str")) {
      version=2;
    }
 else {
      version=1;
    }
    NodeList servers=parent.getElementsByTagName("String_Node_Str");
    for (int i=0; i < servers.getLength(); i++) {
      docEle=(Element)servers.item(i);
      if (docEle.getAttribute("String_Node_Str").equals(serverId)) {
        break;
      }
    }
  }
 else {
    docEle=parent;
    version=1;
  }
  System.out.println(serverId + "String_Node_Str" + version);
  NodeList nl;
switch (version) {
case 2:
    nl=docEle.getElementsByTagName("String_Node_Str");
  if (nl != null && nl.getLength() > 0) {
    for (int i=0; i < nl.getLength(); i++) {
      Element el=(Element)nl.item(i);
      modList.addAll(doImportV2(el,dom));
    }
  }
nl=docEle.getElementsByTagName("String_Node_Str");
if (nl != null && nl.getLength() > 0) {
for (int i=0; i < nl.getLength(); i++) {
  Element el=(Element)nl.item(i);
  Module m=getModuleV2(el);
  modList.add(m);
}
}
return modList;
case 1:
nl=docEle.getElementsByTagName("String_Node_Str");
if (nl != null && nl.getLength() > 0) {
for (int i=0; i < nl.getLength(); i++) {
Element el=(Element)nl.item(i);
Module m=getModuleV1(el);
modList.add(m);
}
}
return modList;
default :
return null;
}
}

Fixed version (ground truth):
private static List<Module> parseDocument(Document dom,String serverId){
  int version;
  List<Module> modList=new ArrayList<Module>();
  Element parent=dom.getDocumentElement();
  Element docEle=null;
  if (parent.getNodeName().equals("String_Node_Str")) {
    if (Version.requestedFeatureLevel(parent.getAttribute("String_Node_Str"),"String_Node_Str")) {
      version=2;
    }
 else {
      version=1;
    }
    NodeList servers=parent.getElementsByTagName("String_Node_Str");
    for (int i=0; i < servers.getLength(); i++) {
      docEle=(Element)servers.item(i);
      if (docEle.getAttribute("String_Node_Str").equals(serverId)) {
        break;
      }
    }
  }
 else {
    docEle=parent;
    version=1;
  }
  MCUpdater.apiLogger.log(Level.FINE,serverId + "String_Node_Str" + version);
  NodeList nl;
switch (version) {
case 2:
    nl=docEle.getElementsByTagName("String_Node_Str");
  if (nl != null && nl.getLength() > 0) {
    for (int i=0; i < nl.getLength(); i++) {
      Element el=(Element)nl.item(i);
      modList.addAll(doImportV2(el,dom));
    }
  }
nl=docEle.getElementsByTagName("String_Node_Str");
if (nl != null && nl.getLength() > 0) {
for (int i=0; i < nl.getLength(); i++) {
  Element el=(Element)nl.item(i);
  Module m=getModuleV2(el);
  modList.add(m);
}
}
return modList;
case 1:
nl=docEle.getElementsByTagName("String_Node_Str");
if (nl != null && nl.getLength() > 0) {
for (int i=0; i < nl.getLength(); i++) {
Element el=(Element)nl.item(i);
Module m=getModuleV1(el);
modList.add(m);
}
}
return modList;
default :
return null;
}
}
Program: 12333
Project: 12333
Buggy source:
public static Document readXmlFromUrl(String serverUrl) throws Exception {
  MCUpdater.apiLogger.fine("String_Node_Str" + serverUrl + "String_Node_Str");
  if (serverUrl.equals("String_Node_Str")) {
    return null;
  }
  final URL server;
  try {
    server=new URL(serverUrl);
  }
 catch (  MalformedURLException e) {
    MCUpdater.apiLogger.log(Level.WARNING,"String_Node_Str",e);
    return null;
  }
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  URLConnection serverConn=server.openConnection();
  serverConn.setRequestProperty("String_Node_Str","String_Node_Str" + Version.VERSION);
  serverConn.setConnectTimeout(MCUpdater.getInstance().getTimeout());
  serverConn.setReadTimeout(MCUpdater.getInstance().getTimeout());
  try {
    DocumentBuilder db=dbf.newDocumentBuilder();
    return db.parse(serverConn.getInputStream());
  }
 catch (  ParserConfigurationException pce) {
    MCUpdater.apiLogger.log(Level.SEVERE,"String_Node_Str",pce);
  }
catch (  SAXException se) {
    MCUpdater.apiLogger.log(Level.SEVERE,"String_Node_Str",se);
  }
catch (  IOException ioe) {
    MCUpdater.apiLogger.log(Level.SEVERE,"String_Node_Str",ioe);
  }
  return null;
}

Fixed version (ground truth):
public static Document readXmlFromUrl(String serverUrl) throws Exception {
  MCUpdater.apiLogger.fine("String_Node_Str" + serverUrl + "String_Node_Str");
  if (serverUrl.equals("String_Node_Str") || serverUrl.isEmpty()) {
    return null;
  }
  final URL server;
  try {
    server=new URL(serverUrl);
  }
 catch (  MalformedURLException e) {
    MCUpdater.apiLogger.log(Level.WARNING,"String_Node_Str",e);
    return null;
  }
  DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
  URLConnection serverConn=server.openConnection();
  serverConn.setRequestProperty("String_Node_Str","String_Node_Str" + Version.VERSION);
  serverConn.setConnectTimeout(MCUpdater.getInstance().getTimeout());
  serverConn.setReadTimeout(MCUpdater.getInstance().getTimeout());
  try {
    DocumentBuilder db=dbf.newDocumentBuilder();
    return db.parse(serverConn.getInputStream());
  }
 catch (  ParserConfigurationException pce) {
    MCUpdater.apiLogger.log(Level.SEVERE,"String_Node_Str",pce);
  }
catch (  SAXException se) {
    MCUpdater.apiLogger.log(Level.SEVERE,"String_Node_Str",se);
  }
catch (  IOException ioe) {
    MCUpdater.apiLogger.log(Level.SEVERE,"String_Node_Str",ioe);
  }
  return null;
}
Program: 12334
Project: 12334
Buggy source:
public void changeSelection(String serverId){
  if (!selected.isEmpty()) {
    for (    Control c : listBase.getChildren()) {
      if (c instanceof InstanceCell) {
        InstanceCell cell=(InstanceCell)c;
        if (cell.getServerId() == selected) {
          cell.setSelected(false);
        }
      }
    }
  }
  selected=serverId;
  for (  Control c : listBase.getChildren()) {
    if (c instanceof InstanceCell) {
      InstanceCell cell=(InstanceCell)c;
      if (cell.getServerId() == selected) {
        cell.setSelected(true);
      }
    }
  }
  for (  ServerList entry : this.instances) {
    if (entry.getServerId().equals(selected)) {
      MainShell.getInstance().changeSelectedInstance(entry);
    }
  }
}

Fixed version (ground truth):
public void changeSelection(String serverId){
  selected=serverId;
  for (  Control c : listBase.getChildren()) {
    if (c instanceof InstanceCell) {
      InstanceCell cell=(InstanceCell)c;
      if (cell.getServerId().equals(selected)) {
        cell.setSelected(true);
      }
 else {
        cell.setSelected(false);
      }
    }
  }
  for (  ServerList entry : this.instances) {
    if (entry.getServerId().equals(selected)) {
      MainShell.getInstance().changeSelectedInstance(entry);
    }
  }
}
Program: 12337
Project: 12337
Buggy source:
public MCULogin(Composite parent){
  super(parent,SWT.NONE);
  Settings settings=MainShell.getInstance().getSettingsManager().getSettings();
  translate=MainShell.getInstance().translate;
  this.setLayout(new GridLayout(2,false));
  Label profilePrompt=new Label(this,SWT.NONE);
  profilePrompt.setText(translate.profile);
  profileName=new Combo(this,SWT.READ_ONLY);
  refreshProfiles(settings);
}

Fixed version (ground truth):
public MCULogin(Composite parent){
  super(parent,SWT.NONE);
  Settings settings=SettingsManager.getInstance().getSettings();
  translate=MainShell.getInstance().translate;
  this.setLayout(new GridLayout(2,false));
  Label profilePrompt=new Label(this,SWT.NONE);
  profilePrompt.setText(translate.profile);
  profileName=new Combo(this,SWT.READ_ONLY);
  profileName.addModifyListener(new ModifyListener(){
    @Override public void modifyText(    ModifyEvent e){
      if (!((Combo)e.getSource()).getText().isEmpty()) {
        MainShell.getInstance().setSelectedInstance(SettingsManager.getInstance().getSettings().findProfile(((Combo)e.getSource()).getText()).getLastInstance());
      }
    }
  }
);
  refreshProfiles(settings);
}
Program: 12338
Project: 12338
Buggy source:
@Override public void widgetSelected(SelectionEvent arg0){
  Profile launchProfile=login.getSelectedProfile();
  if (!(launchProfile == null)) {
    try {
      MCULogic.doLaunch(selected,modules.getModules(),launchProfile);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}

Fixed version (ground truth):
@Override public void widgetSelected(SelectionEvent arg0){
  Profile launchProfile=login.getSelectedProfile();
  if (!(launchProfile == null)) {
    SettingsManager.getInstance().getSettings().setLastProfile(launchProfile.getName());
    SettingsManager.getInstance().getSettings().findProfile(launchProfile.getName()).setLastInstance(selected.getServerId());
    if (!SettingsManager.getInstance().isDirty()) {
      SettingsManager.getInstance().saveSettings();
    }
    try {
      MCULogic.doLaunch(selected,modules.getModules(),launchProfile);
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 12339
Project: 12339
Buggy source:
/** 
 * Launch the application.
 * @param args
 */
public static void main(String[] args){
  try {
    INSTANCE=new MainShell();
    MCUpdater.getInstance().setInstanceRoot(MCUpdater.getInstance().getArchiveFolder().resolve("String_Node_Str"));
    MCUpdater.getInstance().getInstanceRoot().toFile().mkdirs();
    MCUpdater.getInstance().setParent(INSTANCE);
    INSTANCE.open();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Launch the application.
 * @param args
 */
public static void main(String[] args){
  try {
    INSTANCE=new MainShell();
    SettingsManager.getInstance();
    MCUpdater.getInstance().setParent(INSTANCE);
    INSTANCE.open();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 12341
Project: 12341
Buggy source:
/** 
 * Open the window.
 */
public void open(){
  final Display display=Display.getDefault();
  try {
    translate=Languages.valueOf(Languages.getLocale()).getProxy();
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + Languages.getLocale() + "String_Node_Str");
    translate=Languages.en_US.getProxy();
  }
  createContents();
  shell.open();
  shell.layout();
  tracker=new MCUClientTracker(display,progress);
  final DownloadQueue assetsQueue=AssetManager.downloadAssets(MCUpdater.getInstance().getArchiveFolder().resolve("String_Node_Str").toFile(),tracker);
  progress.addProgressBar(assetsQueue.getName());
  executor=new ThreadPoolExecutor(0,8,30000,TimeUnit.MILLISECONDS,new LinkedBlockingQueue<Runnable>());
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
    if (!assetsQueue.isActive()) {
      assetsQueue.processQueue(executor);
    }
  }
}

Fixed version (ground truth):
/** 
 * Open the window.
 */
public void open(){
  final Display display=Display.getDefault();
  try {
    translate=Languages.valueOf(Languages.getLocale()).getProxy();
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str" + Languages.getLocale() + "String_Node_Str");
    translate=Languages.en_US.getProxy();
  }
  createContents();
  processSettings();
  shell.open();
  shell.layout();
  tracker=new MCUClientTracker(display,progress);
  final DownloadQueue assetsQueue=AssetManager.downloadAssets(MCUpdater.getInstance().getArchiveFolder().resolve("String_Node_Str").toFile(),tracker);
  progress.addProgressBar(assetsQueue.getName());
  executor=new ThreadPoolExecutor(0,8,30000,TimeUnit.MILLISECONDS,new LinkedBlockingQueue<Runnable>());
  while (!shell.isDisposed()) {
    if (!display.readAndDispatch()) {
      display.sleep();
    }
    if (!assetsQueue.isActive()) {
      assetsQueue.processQueue(executor);
    }
  }
}
Program: 12344
Project: 12344
Buggy source:
private void updateConfigSelectionDetails(){
  if (lstConfigFiles.getSelectedIndex() > -1) {
    ConfigFileWrapper selected=lstConfigFiles.getSelectedValue();
    lstConfigParentId.setSelectedIndex(modelParentId.find(selected.getParentId()));
    lstConfigParentId.repaint();
    txtConfigMD5.setText(selected.getConfigFile().getMD5());
    txtConfigUrl.setText(selected.getConfigFile().getUrl());
    txtConfigPath.setText(selected.getConfigFile().getPath());
    configDirty=false;
    configCurrentSelection=lstConfigFiles.getSelectedIndex();
  }
}

Fixed version (ground truth):
private void updateConfigSelectionDetails(){
  if (lstConfigFiles.getSelectedIndex() > -1) {
    ConfigFileWrapper selected=lstConfigFiles.getSelectedValue();
    lstConfigParentId.setSelectedIndex(modelParentId.find(selected.getParentId()));
    lstConfigParentId.repaint();
    txtConfigMD5.setText(selected.getConfigFile().getMD5());
    txtConfigUrl.setText(selected.getConfigFile().getUrl());
    txtConfigPath.setText(selected.getConfigFile().getPath());
    chkConfigNoOverwrite.setSelected(selected.getConfigFile().isNoOverwrite());
    configDirty=false;
    configCurrentSelection=lstConfigFiles.getSelectedIndex();
  }
}
Program: 12349
Project: 12349
Buggy source:
private String lookupHash(String hash){
  Map<String,String> map=new HashMap<String,String>();
  try {
    long start=System.currentTimeMillis();
    URL md5s=new URL("String_Node_Str");
    InputStreamReader input=new InputStreamReader(md5s.openStream());
    BufferedReader buffer=new BufferedReader(input);
    String currentLine=null;
    while (true) {
      currentLine=buffer.readLine();
      if (currentLine != null) {
        String entry[]=currentLine.split("String_Node_Str");
        map.put(entry[0],entry[1]);
        newestMC=entry[1];
      }
 else {
        break;
      }
    }
    buffer.close();
    input.close();
    _debug("String_Node_Str" + (System.currentTimeMillis() - start) + "String_Node_Str");
    _debug("String_Node_Str" + newestMC);
  }
 catch (  MalformedURLException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
  String out=map.get(hash);
  if (out == null) {
    out="String_Node_Str";
  }
  return out;
}

Fixed version (ground truth):
private String lookupHash(String hash){
  String out=versionMap.get(hash);
  if (out == null) {
    out="String_Node_Str";
  }
  return out;
}
Program: 12351
Project: 12351
Buggy source:
private String getTextValue(Element ele,String tagName){
  String textVal=null;
  NodeList nl=ele.getElementsByTagName(tagName);
  if (nl != null && nl.getLength() > 0) {
    Element el=(Element)nl.item(0);
    textVal=el.getFirstChild().getNodeValue();
  }
  return textVal;
}

Fixed version (ground truth):
private String getTextValue(Element ele,String tagName){
  String textVal=null;
  NodeList nl=ele.getElementsByTagName(tagName);
  if (nl != null && nl.getLength() > 0) {
    Element el=(Element)nl.item(0);
    if (el != null) {
      Node node=el.getFirstChild();
      if (node != null)       textVal=node.getNodeValue();
    }
  }
  return textVal;
}
Program: 12352
Project: 12352
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  Identified other=(Identified)obj;
  if (annotations == null) {
    if (other.annotations != null)     return false;
  }
 else   if (!annotations.containsAll(other.annotations))   return false;
  if (identity == null) {
    if (other.identity != null)     return false;
  }
 else   if (!identity.equals(other.identity))   return false;
  if (persistentIdentity == null) {
    if (other.persistentIdentity != null)     return false;
  }
 else   if (!persistentIdentity.equals(other.persistentIdentity))   return false;
  if (version == null) {
    if (other.version != null)     return false;
  }
 else   if (!version.equals(other.version))   return false;
  if (description == null) {
    if (other.description != null)     return false;
  }
 else   if (!description.equals(other.description))   return false;
  if (displayId == null) {
    if (other.displayId != null)     return false;
  }
 else   if (!displayId.equals(other.displayId))   return false;
  if (name == null) {
    if (other.name != null)     return false;
  }
 else   if (!name.equals(other.name))   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (obj == null)   return false;
  if (getClass() != obj.getClass())   return false;
  Identified other=(Identified)obj;
  if (annotations == null) {
    if (other.annotations != null)     return false;
  }
 else   if (!annotations.containsAll(other.annotations))   return false;
 else   if (!other.annotations.containsAll(annotations))   return false;
  if (identity == null) {
    if (other.identity != null)     return false;
  }
 else   if (!identity.equals(other.identity))   return false;
  if (persistentIdentity == null) {
    if (other.persistentIdentity != null)     return false;
  }
 else   if (!persistentIdentity.equals(other.persistentIdentity))   return false;
  if (version == null) {
    if (other.version != null)     return false;
  }
 else   if (!version.equals(other.version))   return false;
  if (description == null) {
    if (other.description != null)     return false;
  }
 else   if (!description.equals(other.description))   return false;
  if (displayId == null) {
    if (other.displayId != null)     return false;
  }
 else   if (!displayId.equals(other.displayId))   return false;
  if (name == null) {
    if (other.name != null)     return false;
  }
 else   if (!name.equals(other.name))   return false;
  return true;
}
Program: 12354
Project: 12354
Buggy source:
/** 
 * Returns the component definition matching the given identity URI from this SBOL document's list of component definitions.
 * @param componentDefinitionURI the given identity URI of the component definition to be retrieved
 * @return the matching component definition if present, or {@code null}otherwise.
 */
public ComponentDefinition getComponentDefinition(URI componentDefinitionURI){
  ComponentDefinition componentDefinition=componentDefinitions.get(componentDefinitionURI);
  if (componentDefinition == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(componentDefinitionURI);
        if (document != null) {
          componentDefinition=document.getComponentDefinition(componentDefinitionURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        componentDefinition=null;
      }
    }
  }
  return componentDefinition;
}

Fixed version (ground truth):
/** 
 * Returns the component definition matching the given identity URI from this SBOL document's list of component definitions.
 * @param componentDefinitionURI the given identity URI of the component definition to be retrieved
 * @return the matching component definition if present, or {@code null}otherwise.
 */
public ComponentDefinition getComponentDefinition(URI componentDefinitionURI){
  ComponentDefinition componentDefinition=componentDefinitions.get(componentDefinitionURI);
  if (componentDefinition == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(componentDefinitionURI);
        if (document != null) {
          componentDefinition=document.getComponentDefinition(componentDefinitionURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return componentDefinition;
}
Program: 12355
Project: 12355
Buggy source:
/** 
 * Returns the plan matching the given display identity URI from this SBOL document's list of plans.
 * @param planURI the identity URI of the top-level to be retrieved
 * @return the matching plan if present, or {@code null} otherwise.
 */
public Plan getPlan(URI planURI){
  Plan plan=plans.get(planURI);
  if (plan == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(planURI);
        if (document != null) {
          plan=document.getPlan(planURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        plan=null;
      }
    }
  }
  return plan;
}

Fixed version (ground truth):
/** 
 * Returns the plan matching the given display identity URI from this SBOL document's list of plans.
 * @param planURI the identity URI of the top-level to be retrieved
 * @return the matching plan if present, or {@code null} otherwise.
 */
public Plan getPlan(URI planURI){
  Plan plan=plans.get(planURI);
  if (plan == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(planURI);
        if (document != null) {
          plan=document.getPlan(planURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return plan;
}
Program: 12356
Project: 12356
Buggy source:
/** 
 * Returns the implementation matching the given identity URI from this SBOL document's list of implementations.
 * @param implementationURI the given identity URI of the implementation to be retrieved
 * @return the matching implementation if present, or {@code null}otherwise.
 */
public Implementation getImplementation(URI implementationURI){
  Implementation implementation=implementations.get(implementationURI);
  if (implementation == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(implementationURI);
        if (document != null) {
          implementation=document.getImplementation(implementationURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        implementation=null;
      }
    }
  }
  return implementation;
}

Fixed version (ground truth):
/** 
 * Returns the implementation matching the given identity URI from this SBOL document's list of implementations.
 * @param implementationURI the given identity URI of the implementation to be retrieved
 * @return the matching implementation if present, or {@code null}otherwise.
 */
public Implementation getImplementation(URI implementationURI){
  Implementation implementation=implementations.get(implementationURI);
  if (implementation == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(implementationURI);
        if (document != null) {
          implementation=document.getImplementation(implementationURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return implementation;
}
Program: 12357
Project: 12357
Buggy source:
/** 
 * Returns the module definition matching the given identity URI from this SBOL document object's list of module definitions.
 * @param moduleDefinitionURI the give identity URI of the module definition to be retrieved
 * @return the matching module definition if present, or {@code null} otherwise
 */
public ModuleDefinition getModuleDefinition(URI moduleDefinitionURI){
  ModuleDefinition moduleDefinition=moduleDefinitions.get(moduleDefinitionURI);
  if (moduleDefinition == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(moduleDefinitionURI);
        if (document != null) {
          moduleDefinition=document.getModuleDefinition(moduleDefinitionURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        moduleDefinition=null;
      }
    }
  }
  return moduleDefinition;
}

Fixed version (ground truth):
/** 
 * Returns the module definition matching the given identity URI from this SBOL document object's list of module definitions.
 * @param moduleDefinitionURI the give identity URI of the module definition to be retrieved
 * @return the matching module definition if present, or {@code null} otherwise
 */
public ModuleDefinition getModuleDefinition(URI moduleDefinitionURI){
  ModuleDefinition moduleDefinition=moduleDefinitions.get(moduleDefinitionURI);
  if (moduleDefinition == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(moduleDefinitionURI);
        if (document != null) {
          moduleDefinition=document.getModuleDefinition(moduleDefinitionURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return moduleDefinition;
}
Program: 12358
Project: 12358
Buggy source:
/** 
 * Returns the sequence matching the given   {@code modelURI} from this SBOLdocument's list of sequences.
 * @param sequenceURI takes the given SequenceURI to retrieve the sequence from this SBOL document
 * @return the matching sequence if present, or {@code null} otherwise.
 */
public Sequence getSequence(URI sequenceURI){
  Sequence sequence=sequences.get(sequenceURI);
  if (sequence == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(sequenceURI);
        if (document != null) {
          sequence=document.getSequence(sequenceURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        sequence=null;
      }
    }
  }
  return sequence;
}

Fixed version (ground truth):
/** 
 * Returns the sequence matching the given   {@code modelURI} from this SBOLdocument's list of sequences.
 * @param sequenceURI takes the given SequenceURI to retrieve the sequence from this SBOL document
 * @return the matching sequence if present, or {@code null} otherwise.
 */
public Sequence getSequence(URI sequenceURI){
  Sequence sequence=sequences.get(sequenceURI);
  if (sequence == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(sequenceURI);
        if (document != null) {
          sequence=document.getSequence(sequenceURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return sequence;
}
Program: 12359
Project: 12359
Buggy source:
/** 
 * Returns the top-level matching the given identity URI from this SBOL document's lists of top-levels.
 * @param topLevelURI the identity URI of the top-level to be retrieved
 * @return the matching top-level if present, or {@code null} otherwise.
 */
public TopLevel getTopLevel(URI topLevelURI){
  TopLevel topLevel=getTopLevelLocalOnly(topLevelURI);
  if (topLevel == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(topLevelURI);
        if (document != null) {
          topLevel=document.getTopLevel(topLevelURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        topLevel=null;
      }
    }
  }
  return topLevel;
}

Fixed version (ground truth):
/** 
 * Returns the top-level matching the given identity URI from this SBOL document's lists of top-levels.
 * @param topLevelURI the identity URI of the top-level to be retrieved
 * @return the matching top-level if present, or {@code null} otherwise.
 */
public TopLevel getTopLevel(URI topLevelURI){
  TopLevel topLevel=getTopLevelLocalOnly(topLevelURI);
  if (topLevel == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(topLevelURI);
        if (document != null) {
          topLevel=document.getTopLevel(topLevelURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return topLevel;
}
Program: 12360
Project: 12360
Buggy source:
/** 
 * Returns the model matching the given identity URI from this SBOL document's list of models.
 * @param modelURI the identity URI of the model to be retrieved
 * @return the matching model if present, or {@code null} otherwise
 */
public Model getModel(URI modelURI){
  Model model=models.get(modelURI);
  if (model == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(modelURI);
        if (document != null) {
          model=document.getModel(modelURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        model=null;
      }
    }
  }
  return model;
}

Fixed version (ground truth):
/** 
 * Returns the model matching the given identity URI from this SBOL document's list of models.
 * @param modelURI the identity URI of the model to be retrieved
 * @return the matching model if present, or {@code null} otherwise
 */
public Model getModel(URI modelURI){
  Model model=models.get(modelURI);
  if (model == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(modelURI);
        if (document != null) {
          model=document.getModel(modelURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return model;
}
Program: 12361
Project: 12361
Buggy source:
/** 
 * Returns the generic top-level matching the given display identity URI from this SBOL document's list of generic top-levels.
 * @param genericTopLevelURI the identity URI of the top-level to be retrieved
 * @return the matching generic top-level if present, or {@code null} otherwise.
 */
public GenericTopLevel getGenericTopLevel(URI genericTopLevelURI){
  GenericTopLevel genericTopLevel=genericTopLevels.get(genericTopLevelURI);
  if (genericTopLevel == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(genericTopLevelURI);
        if (document != null) {
          genericTopLevel=document.getGenericTopLevel(genericTopLevelURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        genericTopLevel=null;
      }
    }
  }
  return genericTopLevel;
}

Fixed version (ground truth):
/** 
 * Returns the generic top-level matching the given display identity URI from this SBOL document's list of generic top-levels.
 * @param genericTopLevelURI the identity URI of the top-level to be retrieved
 * @return the matching generic top-level if present, or {@code null} otherwise.
 */
public GenericTopLevel getGenericTopLevel(URI genericTopLevelURI){
  GenericTopLevel genericTopLevel=genericTopLevels.get(genericTopLevelURI);
  if (genericTopLevel == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(genericTopLevelURI);
        if (document != null) {
          genericTopLevel=document.getGenericTopLevel(genericTopLevelURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return genericTopLevel;
}
Program: 12362
Project: 12362
Buggy source:
/** 
 * Returns the combinatorial derivation matching the given identity URI from this SBOL document's list of combinatorial derivations.
 * @param combinatorialDerivationURI the given identity URI of the combinatorial derivation to be retrieved
 * @return the matching combinatorial derivation if present, or {@code null}otherwise.
 */
public CombinatorialDerivation getCombinatorialDerivation(URI combinatorialDerivationURI){
  CombinatorialDerivation combinatorialDerivation=combinatorialDerivations.get(combinatorialDerivationURI);
  if (combinatorialDerivation == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(combinatorialDerivationURI);
        if (document != null) {
          combinatorialDerivation=document.getCombinatorialDerivation(combinatorialDerivationURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
        combinatorialDerivation=null;
      }
    }
  }
  return combinatorialDerivation;
}

Fixed version (ground truth):
/** 
 * Returns the combinatorial derivation matching the given identity URI from this SBOL document's list of combinatorial derivations.
 * @param combinatorialDerivationURI the given identity URI of the combinatorial derivation to be retrieved
 * @return the matching combinatorial derivation if present, or {@code null}otherwise.
 */
public CombinatorialDerivation getCombinatorialDerivation(URI combinatorialDerivationURI){
  CombinatorialDerivation combinatorialDerivation=combinatorialDerivations.get(combinatorialDerivationURI);
  if (combinatorialDerivation == null) {
    for (    SynBioHubFrontend frontend : getRegistries()) {
      try {
        SBOLDocument document=frontend.getSBOL(combinatorialDerivationURI);
        if (document != null) {
          combinatorialDerivation=document.getCombinatorialDerivation(combinatorialDerivationURI);
          createCopy(document);
        }
      }
 catch (      SynBioHubException|SBOLValidationException e) {
      }
    }
  }
  return combinatorialDerivation;
}