nus-yam/ex-repair huggingface dataset:
Program: 36288
Project: 36288
Buggy source:
public void actionPerformed(ActionEvent e){
  String cycledCommand="String_Node_Str";
  if (key.equals("String_Node_Str")) {
    cycledCommand=commandManager.getPreviousCommand(getLastLine());
  }
 else   if (key.equals("String_Node_Str")) {
    cycledCommand=commandManager.getNextCommand(getLastLine());
  }
  JTextArea component=(JTextArea)e.getSource();
  component.select(component.getText().lastIndexOf(prompt) + prompt.length(),component.getText().length());
  component.replaceSelection(cycledCommand);
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  String cycledCommand="String_Node_Str";
  JTextArea component=(JTextArea)e.getSource();
  String prevCommand=getLastLine();
  if (key.equals("String_Node_Str")) {
    cycledCommand=commandManager.getPreviousCommand(prevCommand);
  }
 else   if (key.equals("String_Node_Str")) {
    cycledCommand=commandManager.getNextCommand(prevCommand);
  }
  component.select(component.getText().lastIndexOf(prompt) + prompt.length(),component.getText().length());
  component.replaceSelection(cycledCommand);
}
Program: 36289
Project: 36289
Buggy source:
protected REPLEditor(Base base,String path,EditorState state,Mode mode){
  super(base,path,state,mode);
  replMode=(REPLMode)mode;
  try {
    untitledFolderLocation=Base.createTempFolder("String_Node_Str","String_Node_Str",null);
    (new File(untitledFolderLocation,sketch.getFolder().getName())).mkdirs();
    File subdir=new File(untitledFolderLocation,sketch.getFolder().getName());
    final File tempFile=new File(subdir,subdir.getName() + "String_Node_Str");
    tempFile.createNewFile();
    replTempSketch=new Sketch(tempFile.getAbsolutePath(),this);
    for (    final SketchCode sc : REPLEditor.this.getSketch().getCode()) {
      setCode(sc);
    }
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
protected REPLEditor(Base base,String path,EditorState state,Mode mode){
  super(base,path,state,mode);
  replMode=(REPLMode)mode;
  try {
    untitledFolderLocation=Base.createTempFolder("String_Node_Str","String_Node_Str",null);
    (new File(untitledFolderLocation,sketch.getFolder().getName())).mkdirs();
    File subdir=new File(untitledFolderLocation,sketch.getFolder().getName());
    final File tempFile=new File(subdir,subdir.getName() + "String_Node_Str");
    tempFile.createNewFile();
    replTempSketch=new Sketch(tempFile.getAbsolutePath(),this);
    this.sketch.reload();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 36290
Project: 36290
Buggy source:
public GetLang(){
  super("String_Node_Str");
}

Fixed version (ground truth):
public GetLang(){
  super("String_Node_Str",true);
}
Program: 36291
Project: 36291
Buggy source:
public GetSession(){
  super("String_Node_Str");
}

Fixed version (ground truth):
public GetSession(){
  super("String_Node_Str",true);
}
Program: 36292
Project: 36292
Buggy source:
public static void log(Plugin plugin,final ProxiedPlayer player,final int type,final String content){
  plugin.getProxy().getScheduler().runAsync(plugin,new Runnable(){
    @Override public void run(){
      try {
        PreparedStatement st=getDatabase().prepareStatement("String_Node_Str" + getConfig().getString("String_Node_Str") + "String_Node_Str");
        st.setLong(1,System.currentTimeMillis() / 1000);
        st.setInt(2,type);
        st.setString(3,getUUID(player));
        st.setString(4,player.getName());
        st.setString(5,content);
        st.executeUpdate();
        st.close();
      }
 catch (      SQLException e) {
        e.printStackTrace();
      }
    }
  }
);
}

Fixed version (ground truth):
public static void log(Plugin plugin,final ProxiedPlayer player,final int type,final String content){
  plugin.getProxy().getScheduler().runAsync(plugin,new Runnable(){
    @Override public void run(){
      try {
        PreparedStatement st=getDatabase().prepareStatement("String_Node_Str" + getConfig().getString("String_Node_Str") + "String_Node_Str");
        st.setLong(1,System.currentTimeMillis() / 1000);
        st.setInt(2,type);
        st.setString(3,getUUID(player));
        st.setString(4,player.getName());
        st.setString(5,content.length() > 100 ? content.substring(0,99) : content);
        st.executeUpdate();
        st.close();
      }
 catch (      SQLException e) {
        e.printStackTrace();
      }
    }
  }
);
}
Program: 36293
Project: 36293
Buggy source:
@Override public void run(){
  try {
    PreparedStatement st=getDatabase().prepareStatement("String_Node_Str" + getConfig().getString("String_Node_Str") + "String_Node_Str");
    st.setLong(1,System.currentTimeMillis() / 1000);
    st.setInt(2,type);
    st.setString(3,getUUID(player));
    st.setString(4,player.getName());
    st.setString(5,content);
    st.executeUpdate();
    st.close();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    PreparedStatement st=getDatabase().prepareStatement("String_Node_Str" + getConfig().getString("String_Node_Str") + "String_Node_Str");
    st.setLong(1,System.currentTimeMillis() / 1000);
    st.setInt(2,type);
    st.setString(3,getUUID(player));
    st.setString(4,player.getName());
    st.setString(5,content.length() > 100 ? content.substring(0,99) : content);
    st.executeUpdate();
    st.close();
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}
Program: 36294
Project: 36294
Buggy source:
@EventHandler public void onServerKick(ServerKickEvent event){
  BungeeWeb.log(plugin,event.getPlayer(),5,event.getPlayer().getServer().getInfo().getName() + "String_Node_Str" + BaseComponent.toPlainText(event.getKickReasonComponent()));
}

Fixed version (ground truth):
@EventHandler public void onServerKick(ServerKickEvent event){
  if (event.getPlayer() != null && event.getPlayer().getServer() != null) {
    BungeeWeb.log(plugin,event.getPlayer(),5,event.getPlayer().getServer().getInfo().getName() + "String_Node_Str" + BaseComponent.toPlainText(event.getKickReasonComponent()));
  }
}
Program: 36297
Project: 36297
Buggy source:
public PurgeScheduler(String table,int days){
  this.table=BungeeWeb.getConfig().getString("String_Node_Str") + table;
  time=days * 86400;
  try {
    min=BungeeWeb.getDatabase().createStatement().executeQuery("String_Node_Str" + table + "String_Node_Str").getInt(1);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public PurgeScheduler(String table,int days){
  this.table=BungeeWeb.getConfig().getString("String_Node_Str") + table;
  time=days * 86400;
  try {
    ResultSet rs=BungeeWeb.getDatabase().createStatement().executeQuery("String_Node_Str" + this.table + "String_Node_Str");
    if (rs.next())     min=rs.getInt(1);
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}
Program: 36298
Project: 36298
Buggy source:
@Override public void run(){
  try {
    ResultSet maxquery=BungeeWeb.getDatabase().createStatement().executeQuery("String_Node_Str" + table + "String_Node_Str"+ min+ "String_Node_Str");
    while (maxquery.next()) {
      int max=maxquery.getInt("String_Node_Str");
      BungeeWeb.getDatabase().createStatement().executeUpdate("String_Node_Str" + table + "String_Node_Str"+ min+ "String_Node_Str"+ max+ "String_Node_Str"+ ((System.currentTimeMillis() / 1000) - time));
      min=max;
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    ResultSet maxquery=BungeeWeb.getDatabase().createStatement().executeQuery("String_Node_Str" + table + "String_Node_Str"+ min+ "String_Node_Str");
    if (maxquery.next()) {
      int max=maxquery.getInt("String_Node_Str");
      BungeeWeb.getDatabase().createStatement().executeUpdate("String_Node_Str" + table + "String_Node_Str"+ min+ "String_Node_Str"+ max+ "String_Node_Str"+ ((System.currentTimeMillis() / 1000) - time));
      min=max;
    }
  }
 catch (  SQLException e) {
    e.printStackTrace();
  }
}
Program: 36299
Project: 36299
Buggy source:
public synchronized Connection getConnection(){
  for (  Connection c : connections) {
    try {
      if (c.isValid(2) && !c.isClosed()) {
        return c;
      }
 else {
        connections.remove(c);
      }
    }
 catch (    SQLException e) {
      e.printStackTrace();
      connections.remove(c);
    }
  }
  Connection c=runConnection();
  if (c != null)   connections.add(c);
  return c;
}

Fixed version (ground truth):
public synchronized Connection getConnection(){
  for (int i=0; i < connections.size(); i++) {
    Connection c=connections.get(i);
    try {
      if (c.isValid(2) && !c.isClosed()) {
        return c;
      }
 else {
        connections.remove(c);
      }
    }
 catch (    SQLException e) {
      e.printStackTrace();
      connections.remove(c);
    }
  }
  Connection c=runConnection();
  if (c != null)   connections.add(c);
  return c;
}
Program: 36300
Project: 36300
Buggy source:
public void turnOnScreen(Context context){
}

Fixed version (ground truth):
public void turnOnScreen(Context context){
  Log.i(TAG,"String_Node_Str");
  PowerManager pm=(PowerManager)context.getSystemService(Context.POWER_SERVICE);
  PowerManager.WakeLock wl=pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.FULL_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP,"String_Node_Str");
  wl.acquire(5000);
}
Program: 36302
Project: 36302
Buggy source:
@Override public void unregisterDataSetObserver(final DataSetObserver observer){
  unregisterDataSetObserver(observer);
}

Fixed version (ground truth):
@Override public void unregisterDataSetObserver(final DataSetObserver observer){
  linkedAdapter.unregisterDataSetObserver(observer);
}
Program: 36303
Project: 36303
Buggy source:
private static void makeTimetableTrips(ExtendedFeature exft,List<ProtoRoute> protoRoutes,Route route,Map<ProtoRouteStop,Stop> prsStops,boolean reverse,boolean usePeriods){
  for (  ServiceWindow window : config.getServiceWindows()) {
    Double headway=getHeadway(exft,window.propName,usePeriods);
    if (headway == null) {
      continue;
    }
    for (int t=window.startSecs(); t < window.endSecs(); t+=headway) {
      Trip trip=makeNewTrip(route,reverse);
      queue.trips.add(trip);
      int segStart=t;
      int firstStopTimeSeq=0;
      List<StopTime> stopTimes=new ArrayList<StopTime>();
      for (int i=0; i < protoRoutes.size(); i++) {
        int index=i;
        if (reverse)         index=protoRoutes.size() - 1 - i;
        ProtoRoute protoRoute=protoRoutes.get(index);
        List<StopTime> segStopTimes=createStopTimes(protoRoute.ret,prsStops,reverse,protoRoute.speed,trip,segStart,firstStopTimeSeq);
        stopTimes.addAll(segStopTimes);
        segStart+=protoRoute.getDuration();
        firstStopTimeSeq+=segStopTimes.size();
      }
      queue.stoptimes.addAll(stopTimes);
    }
  }
}

Fixed version (ground truth):
private static void makeTimetableTrips(ExtendedFeature exft,List<ProtoRoute> protoRoutes,Route route,Map<ProtoRouteStop,Stop> prsStops,boolean reverse,boolean usePeriods){
  for (  ServiceWindow window : config.getServiceWindows()) {
    Double headway=getHeadway(exft,window.propName,usePeriods);
    if (headway == null) {
      continue;
    }
    for (int t=window.startSecs(); t < window.endSecs(); t+=headway) {
      Trip trip=makeNewTrip(route,reverse);
      queue.trips.add(trip);
      int segStart=t;
      int firstStopTimeSeq=0;
      List<StopTime> stopTimes=new ArrayList<StopTime>();
      for (int i=0; i < protoRoutes.size(); i++) {
        int index=i;
        if (reverse)         index=protoRoutes.size() - 1 - i;
        ProtoRoute protoRoute=protoRoutes.get(index);
        List<StopTime> segStopTimes=createStopTimes(protoRoute.ret,prsStops,reverse,protoRoute.speed,trip,segStart,firstStopTimeSeq,protoRoute.length);
        stopTimes.addAll(segStopTimes);
        segStart+=protoRoute.getDuration();
        firstStopTimeSeq+=segStopTimes.size();
      }
      queue.stoptimes.addAll(stopTimes);
    }
  }
}
Program: 36304
Project: 36304
Buggy source:
private static void makeFrequencyTrip(ExtendedFeature exft,List<ProtoRoute> protoRoutes,Route route,Map<ProtoRouteStop,Stop> prsStops,boolean reverse,boolean usePeriods){
  Trip trip=makeNewTrip(route,reverse);
  queue.trips.add(trip);
  for (  ServiceWindow window : config.getServiceWindows()) {
    Double headway=getHeadway(exft,window.propName,usePeriods);
    if (headway == null) {
      continue;
    }
    headway/=config.waitFactor();
    Frequency freq=makeFreq(headway,window.startSecs(),window.endSecs(),trip);
    queue.frequencies.add(freq);
  }
  int segStart=0;
  int firstStopTimeSeq=0;
  List<StopTime> newStopTimes=new ArrayList<StopTime>();
  for (  ProtoRoute protoRoute : protoRoutes) {
    List<StopTime> segStopTimes=createStopTimes(protoRoute.ret,prsStops,reverse,protoRoute.speed,trip,segStart,firstStopTimeSeq);
    newStopTimes.addAll(segStopTimes);
    segStart+=protoRoute.getDuration();
    firstStopTimeSeq+=segStopTimes.size();
  }
  queue.stoptimes.addAll(newStopTimes);
}

Fixed version (ground truth):
private static void makeFrequencyTrip(ExtendedFeature exft,List<ProtoRoute> protoRoutes,Route route,Map<ProtoRouteStop,Stop> prsStops,boolean reverse,boolean usePeriods){
  Trip trip=makeNewTrip(route,reverse);
  queue.trips.add(trip);
  for (  ServiceWindow window : config.getServiceWindows()) {
    Double headway=getHeadway(exft,window.propName,usePeriods);
    if (headway == null) {
      continue;
    }
    headway/=config.waitFactor();
    Frequency freq=makeFreq(headway,window.startSecs(),window.endSecs(),trip);
    queue.frequencies.add(freq);
  }
  int segStart=0;
  int firstStopTimeSeq=0;
  List<StopTime> newStopTimes=new ArrayList<StopTime>();
  for (  ProtoRoute protoRoute : protoRoutes) {
    List<StopTime> segStopTimes=createStopTimes(protoRoute.ret,prsStops,reverse,protoRoute.speed,trip,segStart,firstStopTimeSeq,protoRoute.length);
    newStopTimes.addAll(segStopTimes);
    segStart+=protoRoute.getDuration();
    firstStopTimeSeq+=segStopTimes.size();
  }
  queue.stoptimes.addAll(newStopTimes);
}
Program: 36305
Project: 36305
Buggy source:
private static List<StopTime> createStopTimes(List<ProtoRouteStop> prss,Map<ProtoRouteStop,Stop> prsStops,boolean reverse,double speed,Trip trip,int tripStart,int firstStopTimeSequence){
  List<StopTime> newStopTimes=new ArrayList<StopTime>();
  double firstStopDist=0;
  for (int i=0; i < prss.size(); i++) {
    int ix=i;
    if (reverse) {
      ix=prss.size() - 1 - i;
    }
    ProtoRouteStop prs=prss.get(ix);
    if (i == 0) {
      firstStopDist=prs.dist;
    }
    Stop stop=prsStops.get(prs);
    StopTime stoptime=new StopTime();
    stoptime.setStop(stop);
    stoptime.setTrip(trip);
    stoptime.setStopSequence(i + firstStopTimeSequence);
    double dist=Math.abs(prs.dist - firstStopDist);
    int time=(int)(dist / speed) + tripStart;
    stoptime.setArrivalTime(time);
    stoptime.setDepartureTime(time);
    newStopTimes.add(stoptime);
  }
  return newStopTimes;
}

Fixed version (ground truth):
private static List<StopTime> createStopTimes(List<ProtoRouteStop> prss,Map<ProtoRouteStop,Stop> prsStops,boolean reverse,double speed,Trip trip,int tripStart,int firstStopTimeSequence,double segLen){
  List<StopTime> newStopTimes=new ArrayList<StopTime>();
  for (int i=0; i < prss.size(); i++) {
    int ix=i;
    if (reverse) {
      ix=prss.size() - 1 - i;
    }
    ProtoRouteStop prs=prss.get(ix);
    Stop stop=prsStops.get(prs);
    StopTime stoptime=new StopTime();
    stoptime.setStop(stop);
    stoptime.setTrip(trip);
    stoptime.setStopSequence(i + firstStopTimeSequence);
    double dist;
    if (reverse) {
      dist=segLen - prs.dist;
    }
 else {
      dist=prs.dist;
    }
    int time=(int)(dist / speed) + tripStart;
    stoptime.setArrivalTime(time);
    stoptime.setDepartureTime(time);
    newStopTimes.add(stoptime);
  }
  return newStopTimes;
}
Program: 36306
Project: 36306
Buggy source:
@Override public IChunkProvider createChunkGenerator(){
  return new GCVenusChunkProvider(this.worldObj,this.worldObj.getSeed(),this.worldObj.getWorldInfo().isMapFeaturesEnabled());
}

Fixed version (ground truth):
@Override public IChunkProvider createChunkGenerator(){
  return new GCMercuryChunkProvider(this.worldObj,this.worldObj.getSeed(),this.worldObj.getWorldInfo().isMapFeaturesEnabled());
}
Program: 36307
Project: 36307
Buggy source:
@EventHandler public void preInit(FMLPreInitializationEvent event){
  new ConfigManager(new File(event.getModConfigurationDirectory(),"String_Node_Str"));
  MinecraftForge.EVENT_BUS.register(new GCVenusEvents());
  GCVenusItems.initItems();
  GCVenus.proxy.preInit(event);
}

Fixed version (ground truth):
@EventHandler public void preInit(FMLPreInitializationEvent event){
  MinecraftForge.EVENT_BUS.register(new GCVenusEvents());
  GCVenusItems.initItems();
  GCVenus.proxy.preInit(event);
}
Program: 36308
Project: 36308
Buggy source:
public void installUI(JComponent c){
  super.installUI(c);
  c.addAncestorListener(ancestorListener);
}

Fixed version (ground truth):
public void installUI(JComponent c){
  super.installUI(c);
  DockView v=(DockView)c;
  Container parent=c.getParent();
  if (parent instanceof TabbedDockableContainer) {
    installTabbedDockableBorder(v);
  }
 else   if (parent instanceof SplitContainer) {
    installSingleDockableBorder(v);
  }
 else {
    installMaximizedDockableBorder(v);
  }
  c.addAncestorListener(ancestorListener);
}
Program: 36309
Project: 36309
Buggy source:
/** 
 * Installs a border when the DockView target is a SingleDockableContainer  (not nested in a tabbed container ) <p> default is a shadowed border.
 */
protected void installSingleDockableBorder(DockView v){
  Border b=UIManager.getBorder("String_Node_Str");
  v.setBorder(b);
}

Fixed version (ground truth):
/** 
 * Installs a border when the DockView target is a SingleDockableContainer (not nested in a tabbed container ) <p> default is a shadowed border.
 */
protected void installSingleDockableBorder(DockView v){
  Border b=UIManager.getBorder("String_Node_Str");
  v.setBorder(b);
}
Program: 36310
Project: 36310
Buggy source:
@Override @AfterWrite public void afterWrite(List items){
  currentItemCount.addAndGet(items.size());
  int percentageComplete=currentItemCount.intValue() * 100 / totalItemCount;
  sentUpdateIfNeeded(percentageComplete);
}

Fixed version (ground truth):
@AfterWrite public void afterWrite(List items){
  currentItemCount.addAndGet(items.size());
  int percentageComplete=currentItemCount.intValue() * 100 / totalItemCount;
  sentUpdateIfNeeded(percentageComplete);
}
Program: 36311
Project: 36311
Buggy source:
@Override @AfterWrite public void afterWrite(List items){
  int itemsDone=items.size();
  JobProgressEvent jobProgressEvent=new JobProgressEvent(jobStartParams,stepName,itemsDone);
  clusterConfig.jobProgressEventsTopic().publish(jobProgressEvent);
}

Fixed version (ground truth):
@AfterWrite public void afterWrite(List items){
  int itemsDone=items.size();
  JobProgressEvent jobProgressEvent=new JobProgressEvent(jobStartParams,stepName,itemsDone);
  clusterConfig.jobProgressEventsTopic().publish(jobProgressEvent);
}
Program: 36312
Project: 36312
Buggy source:
protected void startJobs(long year,long month){
  try {
    JobParameters jobParameters=new JobParametersBuilder().addLong("String_Node_Str",month).addLong("String_Node_Str",year).toJobParameters();
    System.out.println("String_Node_Str");
    jobLauncher.run(employeeJob,jobParameters);
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    LOG.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
protected void startJobs(long year,long month){
  try {
    JobParameters jobParameters=new JobParametersBuilder().addLong("String_Node_Str",month).addLong("String_Node_Str",year).toJobParameters();
    LOG.info("String_Node_Str");
    jobLauncher.run(employeeJob,jobParameters);
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 36313
Project: 36313
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody public void runJob(@PathVariable("String_Node_Str") Long year,@PathVariable("String_Node_Str") Long month){
  LOG.debug("String_Node_Str");
  Stopwatch stopwatch=Stopwatch.createStarted();
  jobService.runTaxCalculatorJob(new JobStartParams(year,month));
  stopwatch.stop();
  System.out.println("String_Node_Str");
  System.out.println("String_Node_Str" + stopwatch.elapsed(TimeUnit.SECONDS));
  System.out.println("String_Node_Str");
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody public void runJob(@PathVariable("String_Node_Str") Long year,@PathVariable("String_Node_Str") Long month){
  if (lock.tryLock()) {
    try {
      LOG.debug("String_Node_Str");
      Stopwatch stopwatch=Stopwatch.createStarted();
      jobService.runTaxCalculatorJob(new JobStartParams(year,month));
      stopwatch.stop();
      LOG.info("String_Node_Str");
      LOG.info("String_Node_Str" + stopwatch.elapsed(TimeUnit.SECONDS));
      LOG.info("String_Node_Str");
    }
  finally {
      lock.unlock();
    }
  }
 else {
    LOG.info("String_Node_Str");
  }
}
Program: 36314
Project: 36314
Buggy source:
public byte[] generatePdfAsByteArray(Resource resource,Map<String,Object> contextMap) throws IOException, XDocReportException {
  final IXDocReport report=XDocReportRegistry.getRegistry().loadReport(resource.getInputStream(),TemplateEngineKind.Freemarker);
  final IContext context=report.createContext();
  context.putMap(contextMap);
  final ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
  final Options options=Options.getTo(PDF).via(XWPF);
  report.convert(context,options,byteArrayOutputStream);
  return byteArrayOutputStream.toByteArray();
}

Fixed version (ground truth):
public synchronized byte[] generatePdfAsByteArray(Resource resource,Map<String,Object> contextMap) throws IOException, XDocReportException {
  final IXDocReport report=xDocReportRegistry.loadReport(resource.getInputStream(),TemplateEngineKind.Freemarker);
  final IContext context=report.createContext();
  context.putMap(contextMap);
  final ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();
  final Options options=Options.getTo(PDF).via(XWPF);
  report.convert(context,options,byteArrayOutputStream);
  return byteArrayOutputStream.toByteArray();
}
Program: 36315
Project: 36315
Buggy source:
@Test @Ignore public void pdfGeneratorServiceIsThreadSafe() throws InterruptedException, ExecutionException {
  PDFGeneratorService pdfGeneratorService=new PDFGeneratorService();
  Set<Future<byte[]>> results=doPdfGenerationInMultipleThreads(5,pdfGeneratorService);
  getTheResultsWhichThrowsAnExceptionInMultipleThreads(results);
  assertThat("String_Node_Str").isNotEmpty();
}

Fixed version (ground truth):
@Test public void pdfGeneratorServiceIsThreadSafe() throws InterruptedException, ExecutionException {
  Set<Future<byte[]>> results=doPdfGenerationInMultipleThreads(10,pdfGeneratorService);
  getTheResultsWhichThrowsAnExceptionInMultipleThreads(results);
  assertThat("String_Node_Str").isNotEmpty();
}
Program: 36316
Project: 36316
Buggy source:
@Test public void given_aWordTemplate_whenConvertingToPdf_thenTheSamePdfIsGenerated() throws IOException, XDocReportException {
  PDFGeneratorService pdfGeneratorService=new PDFGeneratorService();
  Map<String,Object> context=new HashMap<>();
  context.put("String_Node_Str","String_Node_Str");
  byte[] actual=pdfGeneratorService.generatePdfAsByteArray(new ClassPathResource("String_Node_Str"),context);
  assertThat(PDDocument.load(new ByteArrayInputStream(actual))).containsText("String_Node_Str");
}

Fixed version (ground truth):
@Test public void given_aWordTemplate_whenConvertingToPdf_thenTheSamePdfIsGenerated() throws IOException, XDocReportException {
  Map<String,Object> context=new HashMap<>();
  context.put("String_Node_Str","String_Node_Str");
  byte[] actual=pdfGeneratorService.generatePdfAsByteArray(new ClassPathResource("String_Node_Str"),context);
  assertThat(PDDocument.load(new ByteArrayInputStream(actual))).containsText("String_Node_Str");
}
Program: 36317
Project: 36317
Buggy source:
@Before public void setUp() throws Exception {
  PDFGeneratorService pdfGeneratorService=new PDFGeneratorService();
  monthlyTaxReportService.setPdfGeneratorService(pdfGeneratorService);
  when(sumOfTaxes.getFailedSum(TEST_YEAR,TEST_MONTH)).thenReturn(FAILED_AMOUNT);
  when(sumOfTaxes.getSuccessSum(TEST_YEAR,TEST_MONTH)).thenReturn(SUCCESS_AMOUNT);
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  PDFGeneratorService pdfGeneratorService=new PDFGeneratorService();
  pdfGeneratorService.initialize();
  monthlyTaxReportService.setPdfGeneratorService(pdfGeneratorService);
  when(sumOfTaxes.getFailedSum(TEST_YEAR,TEST_MONTH)).thenReturn(FAILED_AMOUNT);
  when(sumOfTaxes.getSuccessSum(TEST_YEAR,TEST_MONTH)).thenReturn(SUCCESS_AMOUNT);
}
Program: 36318
Project: 36318
Buggy source:
@Override public RepeatStatus execute(StepContribution stepContribution,ChunkContext chunkContext) throws IOException, XDocReportException {
  monthlyTaxReportService.generateReport(year,month,jobExecutionId);
  return FINISHED;
}

Fixed version (ground truth):
@Override public RepeatStatus execute(StepContribution stepContribution,ChunkContext chunkContext) throws IOException, XDocReportException {
  long jobExecutionId=chunkContext.getStepContext().getStepExecution().getJobExecutionId();
  monthlyTaxReportService.generateReport(year,month,jobExecutionId);
  return FINISHED;
}
Program: 36319
Project: 36319
Buggy source:
@Before public void setUp(){
  mockServer=MockRestServiceServer.createServer(restTemplate);
  SmtpServerStub.start();
  Map<String,JobParameter> jobParamsMap=new HashMap<>();
  jobParamsMap.put("String_Node_Str",new JobParameter(MONTH,false));
  jobParamsMap.put("String_Node_Str",new JobParameter(YEAR,false));
  jobParamsMap.put("String_Node_Str",new JobParameter(JOB_EXECUTION_ID,false));
  jobParams=new JobParameters(jobParamsMap);
  setInternalState(emailSender,"String_Node_Str",0);
}

Fixed version (ground truth):
@Before public void setUp(){
  mockServer=MockRestServiceServer.createServer(restTemplate);
  SmtpServerStub.start();
  Map<String,JobParameter> jobParamsMap=new HashMap<>();
  jobParamsMap.put("String_Node_Str",new JobParameter(MONTH,false));
  jobParamsMap.put("String_Node_Str",new JobParameter(YEAR,false));
  jobParams=new JobParameters(jobParamsMap);
  setInternalState(emailSender,"String_Node_Str",0);
}
Program: 36320
Project: 36320
Buggy source:
@Test public void testExecuteCallsService() throws Exception {
  Whitebox.setInternalState(jobResultsTasklet,"String_Node_Str",2);
  Whitebox.setInternalState(jobResultsTasklet,"String_Node_Str",2015);
  Whitebox.setInternalState(jobResultsTasklet,"String_Node_Str",12345l);
  jobResultsTasklet.execute(stepContributionMock,chunkContextMock);
  verify(monthlyTaxReportServiceMock).generateReport(2015,2,12345l);
}

Fixed version (ground truth):
@Test public void testExecuteCallsService() throws Exception {
  Whitebox.setInternalState(jobResultsTasklet,"String_Node_Str",2);
  Whitebox.setInternalState(jobResultsTasklet,"String_Node_Str",2015);
  jobResultsTasklet.execute(stepContributionMock,chunkContextMock);
  verify(monthlyTaxReportServiceMock).generateReport(2015,2,JOB_EXECUTION_ID);
}
Program: 36321
Project: 36321
Buggy source:
private String getWebserviceResult(Employee employee){
  ResponseEntity<TaxServiceResponse> stringResponseEntity=restTemplate.postForEntity(getUri(),createWebserviceInput(employee),TaxServiceResponse.class);
  return stringResponseEntity.getBody().status;
}

Fixed version (ground truth):
private String getWebserviceResult(Employee employee){
  ResponseEntity<TaxServiceResponse> stringResponseEntity=restTemplate.postForEntity(getUri(),createWebserviceInput(employee),TaxServiceResponse.class);
  return stringResponseEntity.getBody().getStatus();
}
Program: 36322
Project: 36322
Buggy source:
@Test public void givenBlacklistEmployee_whenSubmitTaxForm_thenResponseFails() throws JsonProcessingException {
  when(specialEmployeesServiceMock.isEmployeeBlacklisted(employeeId)).thenReturn(true);
  ResponseEntity<TaxServiceResponse> response=taxController.submitTaxForm(taxTo);
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
  assertThat(response.getBody().status).isEqualTo(TaxController.RESPONSE_BODY_FAIL);
}

Fixed version (ground truth):
@Test public void givenBlacklistEmployee_whenSubmitTaxForm_thenResponseFails() throws JsonProcessingException {
  when(specialEmployeesServiceMock.isEmployeeBlacklisted(employeeId)).thenReturn(true);
  ResponseEntity<TaxServiceResponse> response=taxController.submitTaxForm(taxTo);
  assertThat(response.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR);
  assertThat(response.getBody().getStatus()).isEqualTo(TaxController.RESPONSE_BODY_FAIL);
}
Program: 36323
Project: 36323
Buggy source:
@Override public boolean equals(Object o){
  if (this == o)   return true;
  if (!(o instanceof TaxServiceResponse))   return false;
  TaxServiceResponse that=(TaxServiceResponse)o;
  if (status != null ? !status.equals(that.status) : that.status != null)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object o){
  if (this == o) {
    return true;
  }
  if (!(o instanceof TaxServiceResponse)) {
    return false;
  }
  TaxServiceResponse that=(TaxServiceResponse)o;
  if (status != null ? !status.equals(that.status) : that.status != null) {
    return false;
  }
  return true;
}
Program: 36324
Project: 36324
Buggy source:
public Email mapFromEmailTO(EmailTO emailTO) throws EmailException, AddressException, IOException {
  HtmlEmail email=new HtmlEmail();
  email.setFrom(emailTO.getFrom());
  email.setTo(convertToInternetAddress(emailTO.getTos()));
  email.setSubject(emailTO.getSubject());
  email.setMsg(emailTO.getBody());
  email.setHtmlMsg(emailTO.getBody());
  attachEmailAttachmentTOs(email,emailTO.getAttachments());
  return email;
}

Fixed version (ground truth):
public Email mapFromEmailTO(EmailTO emailTO) throws EmailException, AddressException, IOException {
  HtmlEmail email=new HtmlEmail();
  email.setFrom(emailTO.getFrom());
  email.setTo(convertToInternetAddress(emailTO.getTos()));
  email.setSubject(emailTO.getSubject());
  email.setHtmlMsg(emailTO.getBody());
  attachEmailAttachmentTOs(email,emailTO.getAttachments());
  return email;
}
Program: 36325
Project: 36325
Buggy source:
public String getEmailBodyForEmployee(Employee employee){
  String ENDL=System.getProperty("String_Node_Str");
  StringBuilder sb=new StringBuilder().append("String_Node_Str").append(ENDL).append("String_Node_Str" + getLongMonthName(employee.getCalculationDate()) + "String_Node_Str"+ employee.getCalculationDate().getYear()+ "String_Node_Str").append(ENDL).append("String_Node_Str").append(ENDL).append("String_Node_Str");
  return sb.toString();
}

Fixed version (ground truth):
public String getEmailBodyForEmployee(Employee employee){
  String ENDL="String_Node_Str";
  StringBuilder sb=new StringBuilder().append("String_Node_Str").append(ENDL).append("String_Node_Str" + getLongMonthName(employee.getCalculationDate()) + "String_Node_Str"+ employee.getCalculationDate().getYear()+ "String_Node_Str").append(ENDL).append("String_Node_Str").append(ENDL).append("String_Node_Str");
  return sb.toString();
}
Program: 36326
Project: 36326
Buggy source:
public void send(EmailTO emailTO){
  try {
    if (isNotBlank(smtpServer)) {
      Email email=new EmailMapper().mapFromEmailTO(emailTO);
      email.setSSLOnConnect(smtpUseSsl);
      email.setSmtpPort(smtpPort);
      email.setHostName(smtpServer);
      if (isNoneBlank(smtpUserName,smtpPassword)) {
        email.setAuthenticator(new DefaultAuthenticator(smtpUserName,smtpPassword));
      }
      email.send();
    }
  }
 catch (  IllegalArgumentException e) {
    logger.error("String_Node_Str",e);
    throw e;
  }
catch (  EmailException|AddressException|IOException e) {
    logger.error("String_Node_Str",e);
    throw new IllegalStateException(e);
  }
}

Fixed version (ground truth):
public void send(EmailTO emailTO){
  try {
    if (isNotBlank(smtpServer)) {
      Email email=new EmailMapper().mapFromEmailTO(emailTO);
      email.setSSLOnConnect(smtpUseSsl);
      email.setSmtpPort(smtpPort);
      email.setHostName(smtpServer);
      if (isNoneBlank(smtpUserName,smtpPassword)) {
        email.setAuthenticator(new DefaultAuthenticator(smtpUserName,smtpPassword));
      }
      email.send();
    }
  }
 catch (  IllegalArgumentException e) {
    LOG.error("String_Node_Str",e);
    throw e;
  }
catch (  EmailException|AddressException|IOException e) {
    LOG.error("String_Node_Str",e);
    throw new IllegalStateException(e);
  }
}
Program: 36327
Project: 36327
Buggy source:
@Override public Employee process(Employee item){
  System.out.println("String_Node_Str" + item);
  taxCalculatorService.calculateTax(item);
  return item;
}

Fixed version (ground truth):
@Override public Employee process(Employee item){
  LOG.info("String_Node_Str" + item);
  taxCalculatorService.calculateTax(item);
  return item;
}
Program: 36328
Project: 36328
Buggy source:
@Override public Employee process(Employee employee) throws Exception {
  System.out.println("String_Node_Str" + employee);
  return createRetryTemplate().execute(retryContext -> taxPaymentWebService.doWebserviceCallToTaxService(employee));
}

Fixed version (ground truth):
@Override public Employee process(Employee employee) throws Exception {
  LOG.info("String_Node_Str" + employee);
  return createRetryTemplate().execute(retryContext -> taxPaymentWebService.doWebserviceCallToTaxService(employee));
}
Program: 36329
Project: 36329
Buggy source:
protected void startJobs(){
  try {
    JobParameters jobParameters=getNewJobParameters();
    System.out.println("String_Node_Str");
    jobLauncher.run(employeeJob,jobParameters);
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
protected void startJobs(){
  try {
    JobParameters jobParameters=getNewJobParameters();
    System.out.println("String_Node_Str");
    jobLauncher.run(employeeJob,jobParameters);
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    LOG.error("String_Node_Str",e);
  }
}
Program: 36330
Project: 36330
Buggy source:
@RequestMapping(method=RequestMethod.POST) @ResponseBody public void runJob(){
  System.out.println("String_Node_Str");
  jobService.runTaxCalculatorJob();
}

Fixed version (ground truth):
@RequestMapping(method=RequestMethod.POST) @ResponseBody public void runJob(){
  LOG.debug("String_Node_Str");
  jobService.runTaxCalculatorJob();
}
Program: 36331
Project: 36331
Buggy source:
@Override public void runTaxCalculatorJob(){
  try {
    JobParameters jobParameters=new JobParameters();
    JobExecution run=jobLauncher.run(employeeJob,jobParameters);
    List<Throwable> allFailureExceptions=run.getAllFailureExceptions();
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    e.printStackTrace();
  }
 finally {
  }
}

Fixed version (ground truth):
@Override public void runTaxCalculatorJob(){
  try {
    JobParameters jobParameters=new JobParameters();
    jobLauncher.run(employeeJob,jobParameters);
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    e.printStackTrace();
  }
 finally {
  }
}
Program: 36332
Project: 36332
Buggy source:
@Override public void runTaxCalculatorJob(){
  try {
    JobParameters jobParameters=new JobParameters();
    JobExecution run=jobLauncher.run(employeeJob,jobParameters);
    List<Throwable> allFailureExceptions=run.getAllFailureExceptions();
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    e.printStackTrace();
  }
 finally {
  }
}

Fixed version (ground truth):
@Override public void runTaxCalculatorJob(){
  try {
    JobParameters jobParameters=new JobParameters();
    jobLauncher.run(employeeJob,jobParameters);
  }
 catch (  JobExecutionAlreadyRunningException|JobRestartException|JobInstanceAlreadyCompleteException|JobParametersInvalidException e) {
    e.printStackTrace();
  }
 finally {
  }
}
Program: 36333
Project: 36333
Buggy source:
public void setAttendance(int attendance,CourseViewHolder courseViewHolder){
  ObjectAnimator animation=ObjectAnimator.ofInt(courseViewHolder.numberProgressBar,"String_Node_Str",attendance);
  animation.setDuration(1500);
  animation.setInterpolator(new DecelerateInterpolator());
  animation.start();
  if (attendance >= 80) {
    courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,R.color.text_secondary));
    courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,R.color.text_secondary));
  }
 else   if (attendance < 75) {
    courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,android.R.color.holo_red_light));
    courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,android.R.color.holo_red_light));
  }
 else {
    courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,R.color.midAttend));
    courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,R.color.midAttend));
  }
}

Fixed version (ground truth):
public void setAttendance(CourseViewHolder courseViewHolder,int attendance){
  ObjectAnimator animation=ObjectAnimator.ofInt(courseViewHolder.numberProgressBar,"String_Node_Str",attendance);
  animation.setDuration(1500);
  animation.setInterpolator(new DecelerateInterpolator());
  animation.start();
  if (attendance >= 80) {
    courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,R.color.text_secondary));
    courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,R.color.text_secondary));
  }
 else   if (attendance < 75) {
    courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,android.R.color.holo_red_light));
    courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,android.R.color.holo_red_light));
  }
 else {
    courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,R.color.midAttend));
    courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,R.color.midAttend));
  }
}
Program: 36334
Project: 36334
Buggy source:
@Override public void onBindViewHolder(CourseViewHolder courseViewHolder,int position){
  courseViewHolder.courseCode.setText(courses.get(position).getCourseCode());
  courseViewHolder.courseName.setText(courses.get(position).getCourseTitle());
  courseViewHolder.faculty.setText(courses.get(position).getFaculty());
  int attendance=courses.get(position).getAttendance().getAttendancePercentage();
  courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,R.color.text_secondary));
  courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,R.color.text_secondary));
  courseViewHolder.numberProgressBar.setMax(100);
  courseViewHolder.numberProgressBar.setProgress(0);
  setAttendance(attendance,courseViewHolder);
}

Fixed version (ground truth):
@Override public void onBindViewHolder(CourseViewHolder courseViewHolder,int position){
  courseViewHolder.courseCode.setText(courses.get(position).getCourseCode());
  courseViewHolder.courseName.setText(courses.get(position).getCourseTitle());
  courseViewHolder.faculty.setText(courses.get(position).getFaculty());
  int attendance;
  if (courses.get(position) != null) {
    attendance=courses.get(position).getAttendance().getAttendancePercentage();
    setAttendance(courseViewHolder,attendance);
  }
  courseViewHolder.numberProgressBar.setProgressTextColor(ContextCompat.getColor(this.context,R.color.text_secondary));
  courseViewHolder.numberProgressBar.setReachedBarColor(ContextCompat.getColor(this.context,R.color.text_secondary));
  courseViewHolder.numberProgressBar.setMax(100);
  courseViewHolder.numberProgressBar.setProgress(0);
}
Program: 36335
Project: 36335
Buggy source:
/** 
 * Animates the view by scaling it from MATCH_PARENT to WRAP_CONTENT.
 * @param view - View to be collapsed
 */
private void collapseView(final View view){
  Rect rect=new Rect();
  view.getGlobalVisibleRect(rect);
  final int initialHeight=rect.bottom - rect.top;
  view.measure(View.MeasureSpec.UNSPECIFIED,View.MeasureSpec.UNSPECIFIED);
  final int targetHeight=view.getMeasuredHeight();
  Animation animation=new Animation(){
    @Override protected void applyTransformation(    float interpolatedTime,    Transformation t){
      if (interpolatedTime == 1) {
        view.getLayoutParams().height=targetHeight;
      }
 else {
        view.getLayoutParams().height=targetHeight + (int)((initialHeight - targetHeight) * (1 - interpolatedTime));
        view.requestLayout();
      }
    }
    @Override public boolean willChangeBounds(){
      return true;
    }
  }
;
  animation.setDuration((int)((initialHeight - targetHeight) / view.getContext().getResources().getDisplayMetrics().density));
  view.startAnimation(animation);
}

Fixed version (ground truth):
/** 
 * Animates the view by scaling it from MATCH_PARENT to WRAP_CONTENT.
 * @param view - View to be collapsed
 */
private void collapseView(final View view){
  Rect rect=new Rect();
  view.getGlobalVisibleRect(rect);
  final int initialHeight=rect.bottom - rect.top;
  view.measure(View.MeasureSpec.UNSPECIFIED,View.MeasureSpec.UNSPECIFIED);
  final int targetHeight=view.getMeasuredHeight();
  Animation animation=new Animation(){
    @Override protected void applyTransformation(    float interpolatedTime,    Transformation t){
      if (interpolatedTime == 1) {
        view.getLayoutParams().height=targetHeight;
      }
 else {
        view.getLayoutParams().height=targetHeight + (int)((initialHeight - targetHeight) * (1 - interpolatedTime));
        view.requestLayout();
      }
    }
    @Override public boolean willChangeBounds(){
      return true;
    }
  }
;
  int difference=initialHeight - targetHeight;
  if (difference < 0) {
    difference=0;
  }
  animation.setDuration((int)(difference / view.getContext().getResources().getDisplayMetrics().density));
  view.startAnimation(animation);
}
Program: 36339
Project: 36339
Buggy source:
@Override protected List<Pair<Course,Timing>> doInBackground(Void... params){
  List<Pair<Course,Timing>> finalArray=new ArrayList<>();
  for (  Course course : courses) {
    Timing lastTiming=new Timing();
    if (course.getTimings() != null) {
      for (      Timing timing : course.getTimings()) {
        if (timing.getDay() == dayOfWeek && !(timing.equals(lastTiming))) {
          finalArray.add(new Pair<>(course,timing));
          lastTiming=timing;
        }
      }
    }
  }
  Collections.sort(finalArray,new Comparator<Pair<Course,Timing>>(){
    @Override public int compare(    Pair<Course,Timing> lhs,    Pair<Course,Timing> rhs){
      String lhsStartTime="String_Node_Str";
      String rhsStartTime="String_Node_Str";
      for (      Timing timing : lhs.first.getTimings()) {
        if (timing.getDay() == dayOfWeek) {
          lhsStartTime=timing.getStartTime();
        }
      }
      for (      Timing timing : rhs.first.getTimings()) {
        if (timing.getDay() == dayOfWeek) {
          rhsStartTime=timing.getStartTime();
        }
      }
      try {
        return DateTimeCalender.compareTimes(lhsStartTime,rhsStartTime);
      }
 catch (      ParseException ex) {
        ex.printStackTrace();
        return 0;
      }
    }
  }
);
  return finalArray;
}

Fixed version (ground truth):
@Override protected List<Pair<Course,Timing>> doInBackground(Void... params){
  List<Pair<Course,Timing>> finalArray=new ArrayList<>();
  if (courses == null || courses.size() == 0) {
    courses=((MainApplication)getActivity().getApplication()).getDataHolderInstanceInitialized().getCourses();
  }
 else {
    for (    Course course : courses) {
      Timing lastTiming=new Timing();
      if (course.getTimings() != null) {
        for (        Timing timing : course.getTimings()) {
          if (timing.getDay() == dayOfWeek && !(timing.equals(lastTiming))) {
            finalArray.add(new Pair<>(course,timing));
            lastTiming=timing;
          }
        }
      }
    }
    Collections.sort(finalArray,new Comparator<Pair<Course,Timing>>(){
      @Override public int compare(      Pair<Course,Timing> lhs,      Pair<Course,Timing> rhs){
        String lhsStartTime="String_Node_Str";
        String rhsStartTime="String_Node_Str";
        for (        Timing timing : lhs.first.getTimings()) {
          if (timing.getDay() == dayOfWeek) {
            lhsStartTime=timing.getStartTime();
          }
        }
        for (        Timing timing : rhs.first.getTimings()) {
          if (timing.getDay() == dayOfWeek) {
            rhsStartTime=timing.getStartTime();
          }
        }
        try {
          return DateTimeCalender.compareTimes(lhsStartTime,rhsStartTime);
        }
 catch (        ParseException ex) {
          ex.printStackTrace();
          return 0;
        }
      }
    }
);
  }
  return finalArray;
}