Program: 166775
Project: 166775
Buggy source:
public static void temporalInduction(final Sentence s1,final Sentence s2,final Memory memory){
  if ((s1.truth == null) || (s2.truth == null))   return;
  Term t1=s1.cloneContent();
  Term t2=s2.cloneContent();
  Term t11=null;
  Term t22=null;
  if ((t1 instanceof Inheritance) && (t2 instanceof Inheritance)) {
    Statement ss1=(Statement)t1;
    Statement ss2=(Statement)t2;
    Variable var1=new Variable("String_Node_Str");
    Variable var2=var1;
    if (ss1.getSubject().equals(ss2.getSubject())) {
      t11=Statement.make(ss1,var1,ss1.getPredicate(),memory);
      t22=Statement.make(ss2,var2,ss2.getPredicate(),memory);
    }
 else     if (ss1.getPredicate().equals(ss2.getPredicate())) {
      t11=Statement.make(ss1,ss1.getSubject(),var1,memory);
      t22=Statement.make(ss2,ss2.getSubject(),var2,memory);
    }
  }
  if (Statement.invalidStatement(t1,t2)) {
    return;
  }
  long time1=s1.getOccurenceTime();
  long time2=s2.getOccurenceTime();
  long timeDiff=time2 - time1;
  Interval interval;
  if (Math.abs(timeDiff) > Parameters.DURATION) {
    interval=new Interval(Math.abs(timeDiff));
    if (timeDiff > 0) {
      t1=Conjunction.make(t1,interval,ORDER_FORWARD,memory);
    }
 else {
      t2=Conjunction.make(t2,interval,ORDER_FORWARD,memory);
    }
  }
  int order;
  if (timeDiff > Parameters.DURATION) {
    order=TemporalRules.ORDER_FORWARD;
  }
 else   if (timeDiff < -Parameters.DURATION) {
    order=TemporalRules.ORDER_BACKWARD;
  }
 else {
    order=TemporalRules.ORDER_CONCURRENT;
  }
  TruthValue givenTruth1=s1.truth;
  TruthValue givenTruth2=s2.truth;
  TruthValue truth1=TruthFunctions.abduction(givenTruth1,givenTruth2);
  TruthValue truth2=TruthFunctions.abduction(givenTruth2,givenTruth1);
  TruthValue truth3=TruthFunctions.comparison(givenTruth1,givenTruth2);
  BudgetValue budget1=BudgetFunctions.forward(truth1,memory);
  BudgetValue budget2=BudgetFunctions.forward(truth2,memory);
  BudgetValue budget3=BudgetFunctions.forward(truth3,memory);
  Statement statement1=Implication.make(t1,t2,order,memory);
  Statement statement2=Implication.make(t2,t1,reverseOrder(order),memory);
  Statement statement3=Equivalence.make(t1,t2,order,memory);
  if (t11 != null && t22 != null) {
    Statement statement11=Implication.make(t11,t22,order,memory);
    Statement statement22=Implication.make(t22,t11,reverseOrder(order),memory);
    Statement statement33=Equivalence.make(t11,t22,order,memory);
    memory.doublePremiseTask(statement11,truth1,budget1);
    memory.doublePremiseTask(statement22,truth2,budget2);
    memory.doublePremiseTask(statement33,truth3,budget3);
  }
  memory.doublePremiseTask(statement1,truth1,budget1);
  memory.doublePremiseTask(statement2,truth2,budget2);
  memory.doublePremiseTask(statement3,truth3,budget3);
}

Fixed version (ground truth):
public static void temporalInduction(final Sentence s1,final Sentence s2,final Memory memory){
  if ((s1.truth == null) || (s2.truth == null))   return;
  Term t1=s1.cloneContent();
  Term t2=s2.cloneContent();
  Term t11=null;
  Term t22=null;
  if ((t1 instanceof Inheritance) && (t2 instanceof Inheritance)) {
    Statement ss1=(Statement)t1;
    Statement ss2=(Statement)t2;
    Variable var1=new Variable("String_Node_Str");
    Variable var2=var1;
    if (ss1.getSubject().equals(ss2.getSubject())) {
      t11=Statement.make(ss1,var1,ss1.getPredicate(),memory);
      t22=Statement.make(ss2,var2,ss2.getPredicate(),memory);
    }
 else     if (ss1.getPredicate().equals(ss2.getPredicate())) {
      t11=Statement.make(ss1,ss1.getSubject(),var1,memory);
      t22=Statement.make(ss2,ss2.getSubject(),var2,memory);
    }
    if (ss2 instanceof Operation ^ ss1 instanceof Operation) {
      if (ss2 instanceof Operation) {
        boolean anyone=false;
        Term comp=ss1.getSubject();
        for (        Term t : ((Operation)ss2).getArguments()) {
          if (t.equals(comp)) {
            anyone=true;
          }
        }
        Term[] ars=((Operation)ss2).clone().getArguments().clone();
        for (int i=0; i < ars.length; i++) {
          if (ars[i].equals(comp)) {
            ars[i]=var1;
          }
        }
        t11=Statement.make(ss1,var1,ss1.getPredicate(),memory);
        Product S=(Product)Product.make(ars,memory);
        Operation op=(Operation)Operation.make(S,ss2.getPredicate(),memory);
        t22=op;
      }
    }
  }
  if (Statement.invalidStatement(t1,t2)) {
    return;
  }
  long time1=s1.getOccurenceTime();
  long time2=s2.getOccurenceTime();
  long timeDiff=time2 - time1;
  Interval interval;
  if (Math.abs(timeDiff) > Parameters.DURATION) {
    interval=new Interval(Math.abs(timeDiff));
    if (timeDiff > 0) {
      t1=Conjunction.make(t1,interval,ORDER_FORWARD,memory);
    }
 else {
      t2=Conjunction.make(t2,interval,ORDER_FORWARD,memory);
    }
  }
  int order;
  if (timeDiff > Parameters.DURATION) {
    order=TemporalRules.ORDER_FORWARD;
  }
 else   if (timeDiff < -Parameters.DURATION) {
    order=TemporalRules.ORDER_BACKWARD;
  }
 else {
    order=TemporalRules.ORDER_CONCURRENT;
  }
  TruthValue givenTruth1=s1.truth;
  TruthValue givenTruth2=s2.truth;
  TruthValue truth1=TruthFunctions.abduction(givenTruth1,givenTruth2);
  TruthValue truth2=TruthFunctions.abduction(givenTruth2,givenTruth1);
  TruthValue truth3=TruthFunctions.comparison(givenTruth1,givenTruth2);
  BudgetValue budget1=BudgetFunctions.forward(truth1,memory);
  BudgetValue budget2=BudgetFunctions.forward(truth2,memory);
  BudgetValue budget3=BudgetFunctions.forward(truth3,memory);
  Statement statement1=Implication.make(t1,t2,order,memory);
  Statement statement2=Implication.make(t2,t1,reverseOrder(order),memory);
  Statement statement3=Equivalence.make(t1,t2,order,memory);
  if (t11 != null && t22 != null) {
    Statement statement11=Implication.make(t11,t22,order,memory);
    Statement statement22=Implication.make(t22,t11,reverseOrder(order),memory);
    Statement statement33=Equivalence.make(t11,t22,order,memory);
    memory.doublePremiseTask(statement11,truth1,budget1);
    memory.doublePremiseTask(statement22,truth2,budget2);
    memory.doublePremiseTask(statement33,truth3,budget3);
  }
  memory.doublePremiseTask(statement1,truth1,budget1);
  memory.doublePremiseTask(statement2,truth2,budget2);
  memory.doublePremiseTask(statement3,truth3,budget3);
}