nus-yam/ex-repair huggingface dataset:
Program: 81165
Project: 81165
Buggy source:
/** 
 * Handles the bulk of the processing, mostly delegating to other methods.
 * @param nodes   the ast nodes
 * @param source  the source unit for the nodes
 */
public void visit(ASTNode[] nodes,SourceUnit source){
  if (!(nodes[0] instanceof AnnotationNode) || !(nodes[1] instanceof AnnotatedNode)) {
    throw new RuntimeException("String_Node_Str");
  }
  AnnotationNode annotation=(AnnotationNode)nodes[0];
  AnnotatedNode parent=(AnnotatedNode)nodes[1];
  ClassNode declaringClass=parent.getDeclaringClass();
  if (parent instanceof FieldNode) {
    addListenerToProperty(source,annotation,declaringClass,(FieldNode)parent);
  }
 else   if (parent instanceof ClassNode) {
    addListenerToClass(source,annotation,(ClassNode)parent);
  }
}

Fixed version (ground truth):
/** 
 * Handles the bulk of the processing, mostly delegating to other methods.
 * @param nodes   the ast nodes
 * @param source  the source unit for the nodes
 */
public void visit(ASTNode[] nodes,SourceUnit source){
  checkNodesForAnnotationAndType(nodes[0],nodes[1]);
  AnnotationNode annotation=(AnnotationNode)nodes[0];
  AnnotatedNode parent=(AnnotatedNode)nodes[1];
  ClassNode declaringClass=parent.getDeclaringClass();
  if (parent instanceof FieldNode) {
    addListenerToProperty(source,annotation,declaringClass,(FieldNode)parent);
  }
 else   if (parent instanceof ClassNode) {
    addListenerToClass(source,annotation,(ClassNode)parent);
  }
}
Program: 81166
Project: 81166
Buggy source:
/** 
 * Handles the bulk of the processing, mostly delegating to other methods.
 * @param nodes  the ast nodes
 * @param source the source unit for the nodes
 */
public void visit(ASTNode[] nodes,SourceUnit source){
  if (!(nodes[0] instanceof AnnotationNode) || !(nodes[1] instanceof ClassNode)) {
    throw new RuntimeException("String_Node_Str");
  }
  ClassNode classNode=(ClassNode)nodes[1];
  if (!classNode.implementsInterface(THREADING_HANDLER_TYPE)) {
    apply(classNode);
  }
}

Fixed version (ground truth):
/** 
 * Handles the bulk of the processing, mostly delegating to other methods.
 * @param nodes  the ast nodes
 * @param source the source unit for the nodes
 */
public void visit(ASTNode[] nodes,SourceUnit source){
  checkNodesForAnnotationAndType(nodes[0],nodes[1]);
  ClassNode classNode=(ClassNode)nodes[1];
  if (!classNode.implementsInterface(THREADING_HANDLER_TYPE)) {
    apply(classNode);
  }
}
Program: 81168
Project: 81168
Buggy source:
public void removeItem(ListItem item){
  for (  MyListAdapter adapter : mAdapters.values()) {
    adapter.remove(item);
  }
  mAdapter.notifyDataSetChanged();
}

Fixed version (ground truth):
public void removeItem(ListItem item){
  for (  ListItemAdapter adapter : mAdapter.getSections()) {
    adapter.remove(item);
  }
  mAdapter.notifyDataSetChanged();
}
Program: 81169
Project: 81169
Buggy source:
public int getSectionItemCount(String section){
  MyListAdapter adapter=mAdapters.get(section);
  if (adapter == null)   return 0;
  return adapter.getCount();
}

Fixed version (ground truth):
public int getSectionItemCount(String section){
  ListItemAdapter adapter=mAdapter.getSection(section);
  if (adapter == null)   return 0;
  return adapter.getCount();
}
Program: 81170
Project: 81170
Buggy source:
protected void clear(){
  mAdapter.clear();
  mAdapters.clear();
}

Fixed version (ground truth):
public void clear(){
  mAdapter.clear();
}
Program: 81171
Project: 81171
Buggy source:
protected ListItem addItem(String sectionName,ListItem item,int index){
  MyListAdapter adapter=mAdapters.get(sectionName);
  if (adapter == null) {
    adapter=new MyListAdapter(getActivity());
    mAdapters.put(sectionName,adapter);
    mAdapter.addSection(sectionName,adapter);
    if (mListView != null) {
      mListView.setAdapter(null);
      mListView.setAdapter(mAdapter);
    }
  }
  if (index != -1)   adapter.insert(item,index);
 else   adapter.add(item);
  return item;
}

Fixed version (ground truth):
public ListItem addItem(String sectionName,ListItem item,int index){
  ListItemAdapter adapter=mAdapter.getSection(sectionName);
  if (adapter == null) {
    adapter=new ListItemAdapter(getActivity());
    mAdapter.addSection(sectionName,adapter);
    if (mListView != null) {
      mListView.setAdapter(null);
      mListView.setAdapter(mAdapter);
    }
  }
  if (index != -1)   adapter.insert(item,index);
 else   adapter.add(item);
  mAdapter.notifyDataSetChanged();
  return item;
}
Program: 81172
Project: 81172
Buggy source:
protected ListItem findItem(int item){
  String text=getString(item);
  for (  Adapter adapter : mAdapter.sections.values()) {
    MyListAdapter m=(MyListAdapter)adapter;
    for (int i=0; i < m.getCount(); i++) {
      ListItem li=m.getItem(i);
      if (text.equals(li.getTitle()))       return li;
    }
  }
  return null;
}

Fixed version (ground truth):
public ListItem findItem(int item){
  String text=getString(item);
  for (  ListItemAdapter adapter : mAdapter.getSections()) {
    for (int i=0; i < adapter.getCount(); i++) {
      ListItem li=adapter.getItem(i);
      if (text.equals(li.getTitle()))       return li;
    }
  }
  return null;
}
Program: 81173
Project: 81173
Buggy source:
protected void clearSection(String section){
  MyListAdapter adapter=mAdapters.get(section);
  if (adapter == null)   return;
  adapter.clear();
  mAdapter.notifyDataSetChanged();
}

Fixed version (ground truth):
public void clearSection(String section){
  ListItemAdapter adapter=mAdapter.getSection(section);
  if (adapter == null)   return;
  adapter.clear();
  mAdapter.notifyDataSetChanged();
}
Program: 81174
Project: 81174
Buggy source:
protected MyListAdapter ensureHeader(int sectionName){
  String sn=getString(sectionName);
  MyListAdapter adapter=mAdapters.get(sn);
  if (adapter == null) {
    adapter=new MyListAdapter(getActivity());
    mAdapters.put(sn,adapter);
    mAdapter.addSection(sn,adapter);
    mListView.setAdapter(null);
    mListView.setAdapter(mAdapter);
  }
  return adapter;
}

Fixed version (ground truth):
public ListItemAdapter ensureHeader(int index,String sectionName){
  ListItemAdapter adapter=mAdapter.getSection(sectionName);
  if (adapter == null) {
    adapter=new ListItemAdapter(getActivity());
    mAdapter.addSection(index,sectionName,adapter);
    mListView.setAdapter(null);
    mListView.setAdapter(mAdapter);
  }
  return adapter;
}
Program: 81175
Project: 81175
Buggy source:
@Override public int getItemViewType(int position){
  int type=1;
  for (  Object section : this.sections.keySet()) {
    Adapter adapter=sections.get(section);
    int size=adapter.getCount() + 1;
    if (position == 0)     return TYPE_SECTION_HEADER;
    if (position < size)     return type + adapter.getItemViewType(position - 1);
    position-=size;
    type+=adapter.getViewTypeCount();
  }
  return -1;
}

Fixed version (ground truth):
@Override public int getItemViewType(int position){
  int type=1;
  for (int i=0; i < headers.getCount(); i++) {
    String section=headers.getItem(i);
    Adapter adapter=sections.get(section);
    int size=adapter.getCount() + 1;
    if (position == 0)     return TYPE_SECTION_HEADER;
    if (position < size)     return type + adapter.getItemViewType(position - 1);
    position-=size;
    type+=adapter.getViewTypeCount();
  }
  return -1;
}
Program: 81176
Project: 81176
Buggy source:
public void addSection(String section,Adapter adapter){
  this.headers.add(section);
  this.sections.put(section,adapter);
}

Fixed version (ground truth):
public void addSection(int index,String section,T adapter){
  this.headers.insert(section,index);
  this.sections.put(section,adapter);
}
Program: 81177
Project: 81177
Buggy source:
@Override public Object getItem(int position){
  for (  Object section : this.sections.keySet()) {
    Adapter adapter=sections.get(section);
    int size=adapter.getCount() + 1;
    if (position == 0)     return section;
    if (position < size)     return adapter.getItem(position - 1);
    position-=size;
  }
  return null;
}

Fixed version (ground truth):
@Override public Object getItem(int position){
  for (int i=0; i < headers.getCount(); i++) {
    String section=headers.getItem(i);
    Adapter adapter=sections.get(section);
    int size=adapter.getCount() + 1;
    if (position == 0)     return section;
    if (position < size)     return adapter.getItem(position - 1);
    position-=size;
  }
  return null;
}
Program: 81178
Project: 81178
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  int sectionnum=0;
  for (  Object section : this.sections.keySet()) {
    Adapter adapter=sections.get(section);
    int size=adapter.getCount() + 1;
    if (position == 0)     return headers.getView(sectionnum,convertView,parent);
    if (position < size)     return adapter.getView(position - 1,convertView,parent);
    position-=size;
    sectionnum++;
  }
  return null;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  int sectionnum=0;
  for (int i=0; i < headers.getCount(); i++) {
    String section=headers.getItem(i);
    Adapter adapter=sections.get(section);
    int size=adapter.getCount() + 1;
    if (position == 0)     return headers.getView(sectionnum,convertView,parent);
    if (position < size)     return adapter.getView(position - 1,convertView,parent);
    position-=size;
    sectionnum++;
  }
  return null;
}
Program: 81182
Project: 81182
Buggy source:
private void nextLevel(){
  if (Resources.getInstance().currentlevel++ < Resources.getInstance().levelcount) {
    Resources.getInstance().currentlevel++;
    Resources.getInstance().time=0;
    initLevel(Resources.getInstance().currentlevel);
    changeLevel=false;
  }
 else {
    game.setScreen(new LevelSelectScreen(game,0));
    changeLevel=false;
  }
}

Fixed version (ground truth):
private void nextLevel(){
  if (Resources.getInstance().currentlevel < Resources.getInstance().levelcount) {
    Resources.getInstance().currentlevel++;
    Resources.getInstance().time=0;
    initLevel(Resources.getInstance().currentlevel);
    changeLevel=false;
  }
 else {
    game.setScreen(new LevelSelectScreen(game,0));
    changeLevel=false;
  }
}
Program: 81185
Project: 81185
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  final int[] widgetIds=intent.getIntArrayExtra(EXTRA_WIDGET_IDS);
  if (widgetIds != null) {
    new Thread(new Runnable(){
      @Override public void run(){
        WidgetUpdater.updateAllWidgets(BatteryMonitorService.this,level,widgetIds);
      }
    }
).start();
  }
  return START_STICKY;
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  processStartIntent(intent);
  return START_STICKY;
}
Program: 81186
Project: 81186
Buggy source:
public void update(int dockLevel){
  mNotification.setLatestEventInfo(mContext,title,dockLevel + "String_Node_Str",null);
  mNotificationManager.notify(NOTIFICATION_DOCK,mNotification);
}

Fixed version (ground truth):
public void update(int dockLevel){
  mNotification.setLatestEventInfo(mContext,title,"String_Node_Str" + dockLevel + "String_Node_Str",null);
  mNotificationManager.notify(NOTIFICATION_DOCK,mNotification);
}
Program: 81188
Project: 81188
Buggy source:
protected void initListeners(){
  cloud.addMouseListener(new MouseListener(){
    @Override public void mouseUp(    MouseEvent e){
      Word word=(Word)e.data;
      if (word == null)       return;
      boolean remove=selection.remove(word);
      if (!remove)       selection.add(word);
      cloud.setSelection(selection);
    }
    @Override public void mouseDown(    MouseEvent e){
    }
    @Override public void mouseDoubleClick(    MouseEvent e){
    }
  }
);
  cloud.addMouseWheelListener(new MouseWheelListener(){
    @Override public void mouseScrolled(    MouseEvent e){
      if (e.count > 0) {
        cloud.zoomIn();
      }
 else {
        cloud.zoomOut();
      }
    }
  }
);
  cloud.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      List<Object> data=new ArrayList<Object>();
      Set<Word> selected=(Set<Word>)e.data;
      for (      Word word : selected) {
        if (word.data != null) {
          data.add(word.data);
        }
      }
      StructuredSelection selection=new StructuredSelection(data);
      fireSelectionChanged(new SelectionChangedEvent(TagCloudViewer.this,selection));
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
}

Fixed version (ground truth):
protected void initListeners(){
  cloud.addMouseListener(new MouseListener(){
    @Override public void mouseUp(    MouseEvent e){
      Word word=(Word)e.data;
      if (word == null)       return;
      boolean remove=selection.remove(word);
      if (!remove)       selection.add(word);
      cloud.setSelection(selection);
    }
    @Override public void mouseDown(    MouseEvent e){
    }
    @Override public void mouseDoubleClick(    MouseEvent e){
    }
  }
);
  cloud.addMouseWheelListener(new MouseWheelListener(){
    @Override public void mouseScrolled(    MouseEvent e){
      if (e.count > 0) {
        cloud.zoomIn();
      }
 else {
        cloud.zoomOut();
      }
    }
  }
);
  cloud.addMouseTrackListener(new MouseTrackListener(){
    @Override public void mouseHover(    MouseEvent e){
    }
    @Override public void mouseExit(    MouseEvent e){
      cloud.setToolTipText(null);
    }
    @Override public void mouseEnter(    MouseEvent e){
      Word word=(Word)e.data;
      ICloudLabelProvider labelProvider=(ICloudLabelProvider)getLabelProvider();
      cloud.setToolTipText(labelProvider.getToolTip(word.data));
    }
  }
);
  cloud.addSelectionListener(new SelectionListener(){
    @Override public void widgetSelected(    SelectionEvent e){
      List<Object> data=new ArrayList<Object>();
      Set<Word> selected=(Set<Word>)e.data;
      for (      Word word : selected) {
        if (word.data != null) {
          data.add(word.data);
        }
      }
      StructuredSelection selection=new StructuredSelection(data);
      fireSelectionChanged(new SelectionChangedEvent(TagCloudViewer.this,selection));
    }
    @Override public void widgetDefaultSelected(    SelectionEvent e){
    }
  }
);
}
Program: 81189
Project: 81189
Buggy source:
@Test public void testMouseListener(){
  TagCloud cloud=new TagCloud(composite,SWT.NONE);
  MouseListener ml=new UniversalListener();
  cloud.addMouseListener(ml);
  cloud.removeMouseListener(ml);
}

Fixed version (ground truth):
@Test public void testMouseListener(){
  TagCloud cloud=new TagCloud(composite,SWT.NONE);
  UniversalListener ml=new UniversalListener();
  List<Word> words=new ArrayList<Word>();
  Word word=getWord();
  words.add(word);
  cloud.setWords(words,null);
  Event e=new Event();
  cloud.addMouseListener(ml);
  cloud.notifyListeners(SWT.MouseUp,e);
  cloud.notifyListeners(SWT.MouseDoubleClick,e);
  cloud.notifyListeners(SWT.MouseDown,e);
  Assert.assertEquals(1,ml.mouseUp);
  Assert.assertEquals(1,ml.mouseDC);
  Assert.assertEquals(1,ml.mouseDown);
  cloud.removeMouseListener(ml);
  cloud.notifyListeners(SWT.MouseUp,e);
  cloud.notifyListeners(SWT.MouseDoubleClick,e);
  cloud.notifyListeners(SWT.MouseDown,e);
  Assert.assertEquals(1,ml.mouseUp);
  Assert.assertEquals(1,ml.mouseDC);
  Assert.assertEquals(1,ml.mouseDown);
}
Program: 81190
Project: 81190
Buggy source:
@Test public void testMouseMoveListener(){
  TagCloud cloud=new TagCloud(composite,SWT.NONE);
  MouseMoveListener ml=new UniversalListener();
  cloud.addMouseMoveListener(ml);
  cloud.removeMouseMoveListener(ml);
}

Fixed version (ground truth):
@Test public void testMouseMoveListener(){
  TagCloud cloud=new TagCloud(composite,SWT.NONE);
  List<Word> words=new ArrayList<Word>();
  Word word=getWord();
  words.add(word);
  cloud.setWords(words,null);
  Event e=new Event();
  e.x=word.x;
  e.y=word.y;
  UniversalListener ml=new UniversalListener();
  cloud.addMouseMoveListener(ml);
  cloud.notifyListeners(SWT.MouseMove,e);
  Assert.assertEquals(1,ml.mouseMove);
  cloud.removeMouseMoveListener(ml);
  cloud.notifyListeners(SWT.MouseMove,e);
  Assert.assertEquals(1,ml.mouseMove);
}
Program: 81191
Project: 81191
Buggy source:
@Test public void testMouseWheelListener(){
  TagCloud cloud=new TagCloud(composite,SWT.NONE);
  MouseWheelListener ml=new UniversalListener();
  cloud.addMouseWheelListener(ml);
  cloud.removeMouseWheelListener(ml);
}

Fixed version (ground truth):
@Test public void testMouseWheelListener(){
  TagCloud cloud=new TagCloud(composite,SWT.NONE);
  UniversalListener ml=new UniversalListener();
  cloud.addMouseWheelListener(ml);
  cloud.notifyListeners(SWT.MouseWheel,new Event());
  Assert.assertEquals(1,ml.mouseScrolled);
  cloud.removeMouseWheelListener(ml);
  cloud.notifyListeners(SWT.MouseWheel,new Event());
  Assert.assertEquals(1,ml.mouseScrolled);
}
Program: 81192
Project: 81192
Buggy source:
@Override public void mouseMove(MouseEvent e){
  mouseMove++;
}

Fixed version (ground truth):
@Override public void mouseMove(MouseEvent e){
  mouseMove++;
  System.out.println("String_Node_Str");
}
Program: 81193
Project: 81193
Buggy source:
private void drawComponentOutline(Canvas canvas,View view){
  canvas.drawRect(view.getLeft(),view.getTop(),view.getRight(),view.getBottom(),outlinePaint);
}

Fixed version (ground truth):
private void drawComponentOutline(Canvas canvas,View view){
  canvas.drawRect(view.getLeft(),view.getTop() + 1,view.getRight() - 1,view.getBottom() - 1,outlinePaint);
}
Program: 81194
Project: 81194
Buggy source:
private void drawLayoutCell(Canvas canvas){
  canvas.drawRect(0,1,getWidth(),getHeight(),cellPaint);
}

Fixed version (ground truth):
private void drawLayoutCell(Canvas canvas){
  canvas.drawRect(0,1,getWidth() - 1,getHeight() - 1,cellPaint);
}
Program: 81195
Project: 81195
Buggy source:
private void drawLayoutOutline(Canvas canvas){
  canvas.drawRect(getPaddingLeft(),1 + getPaddingTop(),getWidth() - getPaddingLeft() - getPaddingRight(),getHeight() - getPaddingTop() - getPaddingBottom(),outlinePaint);
}

Fixed version (ground truth):
private void drawLayoutOutline(Canvas canvas){
  canvas.drawRect(getPaddingLeft(),1 + getPaddingTop(),getWidth() - getPaddingLeft() - getPaddingRight()- 1,getHeight() - getPaddingTop() - getPaddingBottom()- 1,outlinePaint);
}
Program: 81196
Project: 81196
Buggy source:
private void drawChildCell(Canvas canvas,int[] rect){
  canvas.drawRect(rect[0],rect[1],rect[2] + rect[0],rect[3] + rect[1],cellPaint);
}

Fixed version (ground truth):
private void drawChildCell(Canvas canvas,int[] rect){
  canvas.drawRect(rect[0],rect[1] + 1,rect[2] + rect[0] - 1,rect[3] + rect[1] - 1,cellPaint);
}
Program: 81197
Project: 81197
Buggy source:
private void drawComponentOutline(Canvas canvas,View view){
  canvas.drawRect(view.getLeft(),view.getTop() + 1,view.getRight() - 1,view.getBottom() - 1,outlinePaint);
}

Fixed version (ground truth):
private void drawComponentOutline(Canvas canvas,View view){
  canvas.drawRect(view.getLeft(),view.getTop(),view.getRight() - 1,view.getBottom() - 1,outlinePaint);
}
Program: 81198
Project: 81198
Buggy source:
private void drawLayoutCell(Canvas canvas){
  canvas.drawRect(0,1,getWidth() - 1,getHeight() - 1,cellPaint);
}

Fixed version (ground truth):
private void drawLayoutCell(Canvas canvas){
  canvas.drawRect(0,0,getWidth() - 1,getHeight() - 1,cellPaint);
}
Program: 81199
Project: 81199
Buggy source:
private void drawLayoutOutline(Canvas canvas){
  canvas.drawRect(getPaddingLeft(),1 + getPaddingTop(),getWidth() - getPaddingLeft() - getPaddingRight()- 1,getHeight() - getPaddingTop() - getPaddingBottom()- 1,outlinePaint);
}

Fixed version (ground truth):
private void drawLayoutOutline(Canvas canvas){
  canvas.drawRect(getPaddingLeft(),getPaddingTop(),getWidth() - getPaddingRight() - 1,getHeight() - getPaddingBottom() - 1,outlinePaint);
}
Program: 81200
Project: 81200
Buggy source:
private void drawChildCell(Canvas canvas,int[] rect){
  canvas.drawRect(rect[0],rect[1] + 1,rect[2] + rect[0] - 1,rect[3] + rect[1] - 1,cellPaint);
}

Fixed version (ground truth):
private void drawChildCell(Canvas canvas,int[] rect){
  canvas.drawRect(rect[0],rect[1],rect[2] + rect[0] - 1,rect[3] + rect[1] - 1,cellPaint);
}
Program: 81201
Project: 81201
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  migLayout=createLayout();
  setContentView(migLayout,new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.FILL_PARENT));
  toggleDebug();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  migLayout=createLayout();
  setContentView(migLayout,new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.FILL_PARENT));
  toggleDebug(true);
}
Program: 81202
Project: 81202
Buggy source:
private void toggleDebug(){
  final int current=LayoutUtil.getGlobalDebugMillis();
  final int millis=current <= 0 ? 1000 : 0;
  LayoutUtil.setGlobalDebugMillis(millis);
  migLayout.invalidate();
  migLayout.requestLayout();
}

Fixed version (ground truth):
private void toggleDebug(boolean debug){
  if (isDebug() != debug) {
    final int current=migLayout.getLayoutConstraints().getDebugMillis();
    final int millis=current <= 0 ? 1000 : 0;
    migLayout.getLayoutConstraints().setDebugMillis(millis);
    migLayout.invalidate();
    migLayout.requestLayout();
  }
}
Program: 81203
Project: 81203
Buggy source:
@Override public boolean onCreateOptionsMenu(Menu menu){
  final MenuItem item=menu.add("String_Node_Str");
  item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener(){
    public boolean onMenuItemClick(    MenuItem item){
      toggleDebug();
      return true;
    }
  }
);
  final MenuItem edit=menu.add("String_Node_Str");
  edit.setCheckable(true);
  edit.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener(){
    View.OnLongClickListener editListener=new View.OnLongClickListener(){
      public boolean onLongClick(      View v){
        ComponentResizer.openResizer(v);
        return true;
      }
    }
;
    public boolean onMenuItemClick(    MenuItem item){
      edit.setChecked(!edit.isChecked());
      final View.OnLongClickListener listenerToSet=edit.isChecked() ? editListener : null;
      for (      ViewWrapper w : migLayout.getParentWrapper().getComponents()) {
        w.getComponent().setOnLongClickListener(listenerToSet);
      }
      return true;
    }
  }
);
  return true;
}

Fixed version (ground truth):
@Override public boolean onCreateOptionsMenu(Menu menu){
  final MenuItem item=menu.add("String_Node_Str");
  item.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener(){
    public boolean onMenuItemClick(    MenuItem item){
      toggleDebug(!isDebug());
      return true;
    }
  }
);
  final MenuItem edit=menu.add("String_Node_Str");
  edit.setCheckable(true);
  edit.setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener(){
    View.OnLongClickListener editListener=new View.OnLongClickListener(){
      public boolean onLongClick(      View v){
        ComponentResizer.openResizer(v);
        return true;
      }
    }
;
    public boolean onMenuItemClick(    MenuItem item){
      edit.setChecked(!edit.isChecked());
      final View.OnLongClickListener listenerToSet=edit.isChecked() ? editListener : null;
      for (      ViewWrapper w : migLayout.getParentWrapper().getComponents()) {
        w.getComponent().setOnLongClickListener(listenerToSet);
      }
      return true;
    }
  }
);
  return true;
}
Program: 81204
Project: 81204
Buggy source:
@Override protected void onStart(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStart();
  boolean bindSuccessful=bindService(new Intent(Activity_MainDisplay.this,HandbagParseService.class),connParseService,Context.BIND_AUTO_CREATE);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str" + bindSuccessful);
  if (parseService != null) {
    registerWithParseServer();
  }
  if (commsService != null) {
    registerWithCommsService();
  }
  setContentView(R.layout.mainstage);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void onStart(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStart();
  if (wasRestart) {
    wasRestart=false;
    finish();
    return;
  }
  boolean bindSuccessful=bindService(new Intent(Activity_MainDisplay.this,HandbagParseService.class),connParseService,Context.BIND_AUTO_CREATE);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str" + bindSuccessful);
  if (parseService != null) {
    registerWithParseServer();
  }
  if (commsService != null) {
    registerWithCommsService();
  }
  setContentView(R.layout.mainstage);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}
Program: 81205
Project: 81205
Buggy source:
@Override protected void onStop(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStop();
  try {
    parseService.send(Message.obtain(null,HandbagParseService.MSG_UI_SHUTDOWN_REQUEST));
  }
 catch (  RemoteException e) {
  }
  try {
    commsService.send(Message.obtain(null,HandbagParseService.MSG_UI_SHUTDOWN_REQUEST));
  }
 catch (  RemoteException e) {
  }
  unbindService(connParseService);
  connParseService=null;
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void onStop(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStop();
  onDestroy();
}
Program: 81206
Project: 81206
Buggy source:
public void onServiceConnected(ComponentName className,IBinder service){
  commsService=new Messenger(service);
  commsServiceIsBound=true;
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  registerWithWiFiCommsService();
}

Fixed version (ground truth):
public void onServiceConnected(ComponentName className,IBinder service){
  commsService=new Messenger(service);
  commsServiceIsBound=true;
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}
Program: 81207
Project: 81207
Buggy source:
@Override protected void onStart(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStart();
  startService(new Intent(ActivitySetupNetwork.this,HandbagWiFiCommsService.class));
  boolean bindSuccessful=bindService(new Intent(ActivitySetupNetwork.this,HandbagWiFiCommsService.class),connCommsService,Context.BIND_AUTO_CREATE);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str" + bindSuccessful);
  if (commsService != null) {
    registerWithWiFiCommsService();
  }
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void onStart(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStart();
  startService(new Intent(ActivitySetupNetwork.this,HandbagWiFiCommsService.class));
  boolean bindSuccessful=bindService(new Intent(ActivitySetupNetwork.this,HandbagWiFiCommsService.class),connCommsService,Context.BIND_AUTO_CREATE);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str" + bindSuccessful);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}
Program: 81208
Project: 81208
Buggy source:
@Override protected void onStart(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStart();
  boolean bindSuccessful=bindService(new Intent(Activity_MainDisplay.this,HandbagParseService.class),connParseService,Context.BIND_AUTO_CREATE);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str" + bindSuccessful);
  if (parseService != null) {
    registerWithParseServer();
  }
  setContentView(R.layout.mainstage);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}

Fixed version (ground truth):
@Override protected void onStart(){
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
  super.onStart();
  boolean bindSuccessful=bindService(new Intent(Activity_MainDisplay.this,HandbagParseService.class),connParseService,Context.BIND_AUTO_CREATE);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str" + bindSuccessful);
  if (parseService != null) {
    registerWithParseServer();
  }
  if (commsService != null) {
    registerWithCommsService();
  }
  setContentView(R.layout.mainstage);
  Log.d(this.getClass().getSimpleName(),"String_Node_Str");
}
Program: 81210
Project: 81210
Buggy source:
public String[] getNextPacket(){
  boolean packetComplete=false;
  String token;
  currentFieldContent.setLength(0);
  fieldsInPacket.clear();
  while (true) {
    scanner.useDelimiter("String_Node_Str");
    if ((!scanner.hasNext()) || (packetComplete)) {
      break;
    }
    token=scanner.next();
switch (token.charAt(0)) {
case '\n':
      packetComplete=true;
case ';':
    fieldsInPacket.add(currentFieldContent.toString());
  currentFieldContent.setLength(0);
break;
case '[':
scanner.useDelimiter("String_Node_Str");
int stringLength=scanner.nextInt();
scanner.useDelimiter("String_Node_Str");
scanner.next();
for (int i=0; i < stringLength; i++) {
currentFieldContent.append(scanner.next());
}
break;
default :
currentFieldContent.append(token);
break;
}
}
return fieldsInPacket.toArray(new String[]{});
}

Fixed version (ground truth):
public String[] getNextPacket(){
  boolean packetComplete=false;
  String token;
  currentFieldContent.setLength(0);
  fieldsInPacket.clear();
  while (true) {
    scanner.useDelimiter("String_Node_Str");
    if ((packetComplete) || (!scanner.hasNext())) {
      break;
    }
    token=scanner.next();
switch (token.charAt(0)) {
case '\n':
      packetComplete=true;
case ';':
    fieldsInPacket.add(currentFieldContent.toString());
  currentFieldContent.setLength(0);
break;
case '[':
scanner.useDelimiter("String_Node_Str");
int stringLength=scanner.nextInt();
scanner.useDelimiter("String_Node_Str");
scanner.next();
for (int i=0; i < stringLength; i++) {
currentFieldContent.append(scanner.next());
}
break;
default :
currentFieldContent.append(token);
break;
}
}
return fieldsInPacket.toArray(new String[]{});
}
Program: 81211
Project: 81211
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.receive_layout);
  accountAddressTextView=(TextView)findViewById(R.id.account_address2);
  accountAddressTextView.setText(BitPay.account_pkey);
  receiveAmountText=(EditText)findViewById(R.id.receive_amount);
  receiveAmountText.addTextChangedListener(this);
  Double recAmount=Double.parseDouble("String_Node_Str" + receiveAmountText.getText());
  showQrBitmap(BitPay.account_pkey,recAmount,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.receive_layout);
  accountAddressTextView=(TextView)findViewById(R.id.account_address2);
  accountAddressTextView.setText(BitPay.account_pkey);
  accountAddressTextView.setOnClickListener(this);
  receiveAmountText=(EditText)findViewById(R.id.receive_amount);
  receiveAmountText.addTextChangedListener(this);
  Double recAmount=Double.parseDouble("String_Node_Str" + receiveAmountText.getText());
  showQrBitmap(BitPay.account_pkey,recAmount,"String_Node_Str","String_Node_Str");
}
Program: 81212
Project: 81212
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.send_layout);
  accountAddressTextView=(TextView)findViewById(R.id.account_address1);
  accountAddressTextView.setText(BitPay.account_pkey);
  balanceTextView=(TextView)findViewById(R.id.balance1);
  balanceTextView.setText(BitPay.account_balance + "String_Node_Str");
  receiveAccountTextView=(TextView)findViewById(R.id.receive_account);
  receiveAccountTextView.setText(BitPay.send_pkey);
  Button button1=(Button)findViewById(R.id.from_camera_button);
  button1.setOnClickListener(this);
  Button button2=(Button)findViewById(R.id.send_button);
  button2.setOnClickListener(this);
  amountText=(EditText)findViewById(R.id.input_amount);
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.send_layout);
  accountAddressTextView=(TextView)findViewById(R.id.account_address1);
  accountAddressTextView.setText(BitPay.account_pkey);
  accountAddressTextView.setOnClickListener(this);
  balanceTextView=(TextView)findViewById(R.id.balance1);
  balanceTextView.setText(BitPay.account_balance + "String_Node_Str");
  receiveAccountTextView=(TextView)findViewById(R.id.receive_account);
  receiveAccountTextView.setText(BitPay.send_pkey);
  Button button1=(Button)findViewById(R.id.from_camera_button);
  button1.setOnClickListener(this);
  Button button2=(Button)findViewById(R.id.send_button);
  button2.setOnClickListener(this);
  amountText=(EditText)findViewById(R.id.input_amount);
}
Program: 81214
Project: 81214
Buggy source:
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.setttings_layout);
  textView5=(TextView)findViewById(R.id.textView5);
  textView5.setText("String_Node_Str" + BitPay.account_url);
  try {
    textView2=(TextView)findViewById(R.id.textView2);
    textView2.setText("String_Node_Str" + this.getPackageManager().getPackageInfo(this.getPackageName(),0).versionName);
  }
 catch (  Exception e) {
  }
}

Fixed version (ground truth):
public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.setttings_layout);
  textView5=(TextView)findViewById(R.id.textView5);
  textView5.setText("String_Node_Str" + BitPay.account_url);
  textView5.setOnClickListener(this);
  try {
    textView2=(TextView)findViewById(R.id.textView2);
    textView2.setText("String_Node_Str" + this.getPackageManager().getPackageInfo(this.getPackageName(),0).versionName);
  }
 catch (  Exception e) {
  }
}
Program: 81215
Project: 81215
Buggy source:
@Override public void onWindowFocusChanged(boolean hasFocus){
  balanceTextView.setText(BitPayObj.getBitPayObj().getAccountBalance() + "String_Node_Str");
  receiveAccountTextView.setText(BitPayObj.getBitPayObj().getSendAcountBTCAddress());
}

Fixed version (ground truth):
@Override public void onWindowFocusChanged(boolean hasFocus){
}
Program: 81216
Project: 81216
Buggy source:
@Override protected void onResume(){
  super.onResume();
  Log.v(TAG,"String_Node_Str");
  balanceTextView.setText(BitPayObj.getBitPayObj().getAccountBalance() + "String_Node_Str");
  receiveAccountTextView.setText(BitPayObj.getBitPayObj().getSendAcountBTCAddress());
}

Fixed version (ground truth):
@Override protected void onResume(){
  super.onResume();
  Log.v(TAG,"String_Node_Str");
}
Program: 81217
Project: 81217
Buggy source:
@Override public void onWindowFocusChanged(boolean hasFocus){
}

Fixed version (ground truth):
@Override public void onWindowFocusChanged(boolean hasFocus){
  balanceTextView.setText(BitPayObj.getBitPayObj().getAccountBalance() + "String_Node_Str");
  receiveAccountTextView.setText(BitPayObj.getBitPayObj().getSendAcountBTCAddress());
}
Program: 81218
Project: 81218
Buggy source:
public void run(){
  sendBTCDialog();
  gettingWebPageDialog.setProgress(100);
  Log.v(TAG,"String_Node_Str");
  gettingWebPageDialog.dismiss();
  Log.v(TAG,"String_Node_Str");
  gettingWebPageDialog.dismiss();
}

Fixed version (ground truth):
public void run(){
  if (sendBTCDialog()) {
    gettingWebPageDialog.dismiss();
    Toast.makeText(SendActivity.this,"String_Node_Str",Toast.LENGTH_LONG).show();
  }
 else {
    gettingWebPageDialog.dismiss();
    Toast.makeText(SendActivity.this,"String_Node_Str",Toast.LENGTH_LONG).show();
  }
}
Program: 81219
Project: 81219
Buggy source:
public void onActivityResult(int requestCode,int resultCode,Intent intent){
  if (requestCode == 0) {
    if (resultCode == RESULT_OK) {
      String contents=intent.getStringExtra("String_Node_Str");
      String format=intent.getStringExtra("String_Node_Str");
      Uri bitcoinUri=Uri.parse(contents);
      Log.v(TAG,"String_Node_Str" + contents + "String_Node_Str"+ format+ "String_Node_Str"+ bitcoinUri.toString());
      Pattern pattern=Pattern.compile("String_Node_Str");
      Matcher matcher=pattern.matcher(contents);
      matcher.find();
      BitPayObj.getBitPayObj().setSendAcountBTCAddress((String)matcher.group(0));
      try {
        this.amountText.setText(contents.substring(contents.indexOf("String_Node_Str") + 8,contents.indexOf("String_Node_Str")));
      }
 catch (      Exception e) {
      }
      onResume();
    }
 else     if (resultCode == RESULT_CANCELED) {
    }
  }
}

Fixed version (ground truth):
public void onActivityResult(int requestCode,int resultCode,Intent intent){
  if (requestCode == 0) {
    if (resultCode == RESULT_OK) {
      String contents=intent.getStringExtra("String_Node_Str");
      String format=intent.getStringExtra("String_Node_Str");
      Uri bitcoinUri=Uri.parse(contents);
      Log.v(TAG,"String_Node_Str" + contents + "String_Node_Str"+ format+ "String_Node_Str"+ bitcoinUri.toString());
      Pattern pattern=Pattern.compile("String_Node_Str");
      Matcher matcher=pattern.matcher(contents);
      matcher.find();
      BitPayObj.getBitPayObj().setSendAcountBTCAddress((String)matcher.group(0));
      try {
        this.amountText.setText(contents.substring(contents.indexOf("String_Node_Str") + 8,contents.indexOf("String_Node_Str")));
      }
 catch (      Exception e) {
      }
      onResume();
    }
 else     if (resultCode == RESULT_CANCELED) {
    }
  }
  balanceTextView.setText(BitPayObj.getBitPayObj().getAccountBalance() + "String_Node_Str");
  receiveAccountTextView.setText(BitPayObj.getBitPayObj().getSendAcountBTCAddress());
}
Program: 81220
Project: 81220
Buggy source:
private void sendBTCDialog(){
  if (BitPayObj.getBitPayObj().sendBTC(String.valueOf("String_Node_Str" + (long)(Double.parseDouble(amountText.getText().toString()) * 100000000)))) {
    gettingWebPageDialog.setProgress(50);
  }
 else {
    gettingWebPageDialog.setProgress(50);
  }
  gettingWebPageDialog.setProgress(50);
  while (!BitPayObj.getBitPayObj().updateWalletInfo()) {
    gettingWebPageDialog.setProgress(75);
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      e.printStackTrace();
    }
  }
  gettingWebPageDialog.setProgress(75);
}

Fixed version (ground truth):
private boolean sendBTCDialog(){
  if (BitPayObj.getBitPayObj().sendBTC(String.valueOf("String_Node_Str" + (long)(Double.parseDouble(amountText.getText().toString()) * 100000000)))) {
    gettingWebPageDialog.setProgress(50);
    while (!BitPayObj.getBitPayObj().updateWalletInfo()) {
      gettingWebPageDialog.setProgress(75);
      try {
        Thread.sleep(1000);
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
    return true;
  }
 else {
    gettingWebPageDialog.setProgress(100);
    return false;
  }
}
Program: 81221
Project: 81221
Buggy source:
/** 
 * Get the strong checksum.
 * @return The strong checksum.
 * @since 1.1
 */
public byte[] getStrong(){
  return strong;
}

Fixed version (ground truth):
/** 
 * Get the strong checksum.
 * @return The strong checksum.
 * @since 1.1
 */
public byte[] getStrong(){
  return (byte[])strong.clone();
}
Program: 81222
Project: 81222
Buggy source:
/** 
 * Return the array of bytes that is the data block.
 * @return The block itself.
 * @since 1.1
 */
public byte[] getData(){
  return data;
}

Fixed version (ground truth):
/** 
 * Return the array of bytes that is the data block.
 * @return The block itself.
 * @since 1.1
 */
public byte[] getData(){
  return (byte[])data.clone();
}
Program: 81223
Project: 81223
Buggy source:
/** 
 * Generate a sum pair for a portion of a byte array.
 * @param buf The byte array to checksum.
 * @param off Where in <code>buf</code> to start.
 * @param len How many bytes to checksum.
 * @return A {@link ChecksumPair} for this byte array.
 */
protected ChecksumPair generateSum(byte[] buf,int off,int len){
  ChecksumPair p=new ChecksumPair();
  config.weakSum.check(buf,off,len);
  config.strongSum.update(buf,off,len);
  if (config.checksumSeed != null) {
    config.strongSum.update(config.checksumSeed,0,config.checksumSeed.length);
  }
  p.weak=config.weakSum.getValue();
  p.strong=new byte[config.strongSumLength];
  System.arraycopy(config.strongSum.digest(),0,p.strong,0,config.strongSumLength);
  p.offset=count;
  p.length=len;
  count+=len;
  return p;
}

Fixed version (ground truth):
/** 
 * Generate a sum pair for a portion of a byte array.
 * @param buf The byte array to checksum.
 * @param off Where in <code>buf</code> to start.
 * @param len How many bytes to checksum.
 * @return A {@link ChecksumPair} for this byte array.
 */
protected ChecksumPair generateSum(byte[] buf,int off,int len){
  ChecksumPair p=new ChecksumPair();
  config.weakSum.check(buf,off,len);
  config.strongSum.update(buf,off,len);
  if (config.checksumSeed != null) {
    config.strongSum.update(config.checksumSeed,0,config.checksumSeed.length);
  }
  p.weak=config.weakSum.getValue();
  p.strong=new byte[config.strongSumLength];
  System.arraycopy(config.strongSum.digest(),0,p.strong,0,config.strongSumLength);
  p.offset=count;
  p.length=len;
  count+=len;
  if (config.debug) {
    System.out.printf("String_Node_Str",p);
  }
  return p;
}
Program: 81224
Project: 81224
Buggy source:
/** 
 * Finish generating checksums, flushing any buffered data and resetting this instance.
 */
public void doFinal() throws ListenerException {
  ListenerException exception=null, current=null;
  if (ndx > 0) {
    ChecksumPair p=generateSum(buffer,0,ndx);
    for (    GeneratorListener listener : listeners) {
      try {
        listener.update(new GeneratorEvent(p));
      }
 catch (      ListenerException le) {
        if (exception != null) {
          current.setNext(le);
          current=le;
        }
 else {
          exception=le;
          current=le;
        }
      }
    }
    if (exception != null)     throw exception;
  }
  reset();
}

Fixed version (ground truth):
/** 
 * Finish generating checksums, flushing any buffered data and resetting this instance.
 */
public void doFinal() throws ListenerException {
  if (config.debug) {
    System.out.printf("String_Node_Str");
  }
  ListenerException exception=null, current=null;
  if (ndx > 0) {
    ChecksumPair p=generateSum(buffer,0,ndx);
    for (    GeneratorListener listener : listeners) {
      try {
        listener.update(new GeneratorEvent(p));
      }
 catch (      ListenerException le) {
        if (exception != null) {
          current.setNext(le);
          current=le;
        }
 else {
          exception=le;
          current=le;
        }
      }
    }
    if (exception != null)     throw exception;
  }
  reset();
}
Program: 81225
Project: 81225
Buggy source:
/** 
 * Search if a portion of the given byte array is in the map, returning its original offset if it is.
 * @param block   The block of bytes to search for.
 * @param off     The offset in the block to begin.
 * @param len     The number of bytes to read from the block.
 * @return The original offset of the given block if it was found inthe map. null if it was not found.
 */
protected Long hashSearch(byte[] block,int off,int len){
  Integer weakSum=new Integer(config.weakSum.getValue());
  if (hashtable.containsKey(weakSum.intValue())) {
    if (hashtable.containsKey(weakSum)) {
      config.strongSum.reset();
      config.strongSum.update(block,off,len);
      if (config.checksumSeed != null) {
        config.strongSum.update(config.checksumSeed);
      }
      byte[] digest=new byte[config.strongSumLength];
      System.arraycopy(config.strongSum.digest(),0,digest,0,digest.length);
      return (Long)hashtable.get(new ChecksumPair(weakSum.intValue(),digest));
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Search if a portion of the given byte array is in the map, returning its original offset if it is.
 * @param block   The block of bytes to search for.
 * @param off     The offset in the block to begin.
 * @param len     The number of bytes to read from the block.
 * @return The original offset of the given block if it was found inthe map. null if it was not found.
 */
protected Long hashSearch(byte[] block,int off,int len){
  Integer weakSum=new Integer(config.weakSum.getValue());
  if (hashtable.containsKey(weakSum.intValue())) {
    if (config.debug) {
      System.out.printf("String_Node_Str",weakSum);
    }
    if (hashtable.containsKey(weakSum)) {
      if (config.debug) {
        System.out.printf("String_Node_Str");
      }
      config.strongSum.reset();
      config.strongSum.update(block,off,len);
      if (config.checksumSeed != null) {
        config.strongSum.update(config.checksumSeed);
      }
      byte[] digest=new byte[config.strongSumLength];
      System.arraycopy(config.strongSum.digest(),0,digest,0,digest.length);
      ChecksumPair pair=new ChecksumPair(weakSum,digest);
      if (config.debug) {
        System.out.printf("String_Node_Str",pair);
      }
      Long offset=hashtable.get(pair);
      if (config.debug) {
        if (offset != null)         System.out.printf("String_Node_Str",offset);
 else         System.out.printf("String_Node_Str");
      }
      return offset;
    }
  }
  return null;
}
Program: 81226
Project: 81226
Buggy source:
/** 
 * Set the list of checksums that will be searched by this matcher. This method must be called at least once before calling update.
 * @param sums The checksums.
 */
public void setChecksums(List<ChecksumPair> sums){
  hashtable.clear();
  if (sums != null) {
    for (    ChecksumPair p : sums)     hashtable.put(p,p.getOffset());
  }
}

Fixed version (ground truth):
/** 
 * Set the list of checksums that will be searched by this matcher. This method must be called at least once before calling update.
 * @param sums The checksums.
 */
public void setChecksums(List<ChecksumPair> sums){
  hashtable.clear();
  if (sums != null) {
    for (    ChecksumPair p : sums)     hashtable.put(p,p.getOffset());
  }
  if (config.debug) {
    System.out.printf("String_Node_Str",hashtable);
  }
}
Program: 81228
Project: 81228
Buggy source:
/** 
 * Make the signatures from data coming in through the input stream.
 * @param in The input stream to generate signatures for.
 * @return A Collection of signatures.
 * @throws java.io.IOException If reading fails.
 */
public Collection makeSignatures(InputStream in) throws IOException, NoSuchAlgorithmException {
  Configuration c=new Configuration();
  c.strongSum=MessageDigest.getInstance("String_Node_Str");
  c.weakSum=new Checksum32();
  c.blockLength=blockLength;
  c.strongSumLength=c.strongSumLength;
  return new Generator(c).generateSums(in);
}

Fixed version (ground truth):
/** 
 * Make the signatures from data coming in through the input stream.
 * @param in The input stream to generate signatures for.
 * @return A Collection of signatures.
 * @throws java.io.IOException If reading fails.
 */
public Collection makeSignatures(InputStream in) throws IOException, NoSuchAlgorithmException {
  Configuration c=new Configuration();
  c.strongSum=MessageDigest.getInstance("String_Node_Str");
  c.weakSum=new Checksum32();
  c.blockLength=blockLength;
  c.strongSumLength=strongSumLength;
  return new Generator(c).generateSums(in);
}