nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EditorElement extends AbstractElement { private static final String DIRTY_MARK = "*" ; private static final String separator = "<seq2seq4repair_space>-<seq2seq4repair_space>" ; private IEditorReference editorReference ; EditorElement ( IEditorReference editorReference , EditorProvider editorProvider ) { } public void execute ( ) { } public String getId ( ) { } public ImageDescriptor getImageDescriptor ( ) { } public String getLabel ( ) { boolean dirty = editorReference . isDirty ( ) ; <START_BUG> return ( ( ( dirty ? EditorElement . DIRTY_MARK : "" ) + ( editorReference . getName ( ) ) ) + ( EditorElement . separator ) ) + ( editorReference . getTitleToolTip ( ) ) ; <END_BUG> } public String getSortLabel ( ) { } public int hashCode ( ) { } public boolean equals ( Object obj ) { } }

Fix:
return ( ( ( dirty ? EditorElement . DIRTY_MARK : "" ) + ( editorReference . getTitle ( ) ) ) + ( EditorElement . separator ) ) + ( editorReference . getTitleToolTip ( ) ) ;
Buggy code:
public class ScriptBase extends AbstractTask implements DeferredTask { private ScriptFactory factory ; private String scriptName ; private Map attributes = new HashMap ( ) ; private String text = "" ; private List nestedElementNames = new ArrayList ( ) ; private List nestedElements = new ArrayList ( ) ; public void setAttribute ( String name , String attributeValue ) { } public void addElement ( String nestedElementName , Object value ) { } public void execute ( ) throws ExecutionException { String language = factory . getScriptLanguage ( scriptName ) ; String script = factory . getScript ( scriptName ) ; try { BSFManager manager = new BSFManager ( ) ; manager . declareBean ( "self" , this , getClass ( ) ) ; <START_BUG> manager . declareBean ( "context" , getContext ( ) , AntContext . class ) ; <END_BUG> BSFEngine engine = manager . loadScriptingEngine ( language ) ; engine . exec ( scriptName , 0 , 0 , script ) ; for ( Iterator i = attributes . keySet ( ) . iterator ( ) ; i . hasNext ( ) ; ) { String attributeName = ( ( String ) ( i . next ( ) ) ) ; String value = ( ( String ) ( attributes . get ( attributeName ) ) ) ; StringBuffer setter = new StringBuffer ( attributeName ) ; setter . setCharAt ( 0 , Character . toUpperCase ( setter . charAt ( 0 ) ) ) ; engine . call ( null , ( "set" + setter ) , new Object [ ] { value } ) ; } Iterator i = nestedElementNames . iterator ( ) ; Iterator j = nestedElements . iterator ( ) ; while ( i . hasNext ( ) ) { String nestedName = ( ( String ) ( i . next ( ) ) ) ; Object nestedElement = j . next ( ) ; StringBuffer adder = new StringBuffer ( nestedName ) ; adder . setCharAt ( 0 , Character . toUpperCase ( adder . charAt ( 0 ) ) ) ; engine . call ( null , ( "add" + adder ) , new Object [ ] { nestedElement } ) ; } engine . call ( null , "execute" , new Object [ ] { } ) ; } catch ( BSFException e ) { Throwable t = e ; Throwable te = e . getTargetException ( ) ; if ( te != null ) { if ( te instanceof ExecutionException ) { throw ( ( ExecutionException ) ( te ) ) ; } else { t = te ; } } throw new ExecutionException ( t ) ; } } public void addText ( String text ) { } protected void setFactory ( ScriptFactory factory ) { } protected void setScriptName ( String scriptName ) { } }

Fix:
manager . declareBean ( "context" , getAntContext ( ) , AntContext . class ) ;
Buggy code:
public class HelloConsumerApplication implements IDistributionConstants , IApplication , ServiceTrackerCustomizer { public static final String CONSUMER_NAME = "org.eclipse.ecf.examples.remoteservices.hello.consumer" ; private BundleContext bundleContext ; private ServiceTracker containerFactoryServiceTracker ; private String containerType = "ecf.r_osgi.peer" ; private final Object appLock = new Object ( ) ; private boolean done = false ; private ServiceTracker helloServiceTracker ; private ServiceRegistration discoveryListenerRegistration ; private ServiceRegistration distributionListenerRegistration ; public Object start ( IApplicationContext appContext ) throws Exception { bundleContext = Activator . getContext ( ) ; processArgs ( appContext ) ; getContainerFactory ( ) . createContainer ( containerType ) ; helloServiceTracker = new ServiceTracker ( bundleContext , createRemoteFilter ( ) , this ) ; <START_BUG> helloServiceTracker . open ( ) ; <END_BUG> waitForDone ( ) ; return IApplication . EXIT_OK ; } private Filter createRemoteFilter ( ) throws InvalidSyntaxException { } public void stop ( ) { } private IContainerFactory getContainerFactory ( ) { } private void processArgs ( IApplicationContext appContext ) { } private void waitForDone ( ) { } public Object addingService ( ServiceReference reference ) { } public void modifiedService ( ServiceReference reference , Object service ) { } public void removedService ( ServiceReference reference , Object service ) { } }

Fix:
helloServiceTracker . open ( true ) ;
Buggy code:
public class Scan { public static Room [ ] scanInRooms ( ) { int numAttrib = 6 ; int numRooms = 25 ; Room [ ] rooms = new Room [ 25 ] ; String [ ] rawData = new String [ numRooms ] ; String [ ] parsedData = new String [ numRooms ] ; String [ ] [ ] arrayRooms = new String [ numRooms ] [ numAttrib ] ; String delims = "[-]" ; Scanner roomScan ; try { <START_BUG> roomScan = new Scanner ( new File ( "C:\\Users\\Sapphire\\Documents\\DesignPatternsFinal\\Final\\src\\Rooms.txt" ) ) ; <END_BUG> int i = 0 ; while ( roomScan . hasNextLine ( ) ) { rawData [ i ] = roomScan . nextLine ( ) ; parsedData = rawData [ i ] . split ( delims ) ; for ( int z = 0 ; z < numAttrib ; z ++ ) arrayRooms [ i ] [ z ] = parsedData [ z ] ; i ++ ; } } catch ( FileNotFoundException e ) { System . out . println ( "No<seq2seq4repair_space>map<seq2seq4repair_space>file!" ) ; System . exit ( ( - 1 ) ) ; } for ( int x = 0 ; x < numRooms ; x ++ ) { Room room = new Room ( ) ; room . setID ( arrayRooms [ x ] [ 0 ] ) ; room . setName ( arrayRooms [ x ] [ 1 ] ) ; room . setDescription ( arrayRooms [ x ] [ 2 ] ) ; room . setExits ( arrayRooms [ x ] [ 3 ] ) ; room . setKey ( arrayRooms [ x ] [ 4 ] ) ; room . setLocked ( arrayRooms [ x ] [ 5 ] ) ; rooms [ x ] = room ; } return rooms ; } }

Fix:
roomScan = new Scanner ( new File ( "Rooms.txt" ) ) ;
Buggy code:
class SourceEditor extends AntEditor { private JEditorPane _text = null ; public SourceEditor ( AppContext context ) { } private class Handler implements BusMember { private final SourceEditor . Filter _filter = new SourceEditor . Filter ( ) ; public BusFilter getBusFilter ( ) { } public boolean eventPosted ( EventObject event ) { <START_BUG> ProjectProxy project = getAppContext ( ) . getProject ( ) ; <END_BUG> _text . setDocument ( ( project == null ? new PlainDocument ( ) : project . getDocument ( ) ) ) ; return true ; } } private static class Filter implements BusFilter { public boolean accept ( EventObject event ) { } } }

Fix:
ProjectProxy project = getContext ( ) . getProject ( ) ;
Buggy code:
public abstract class AbstractAjaxTimerBehavior extends AbstractDefaultAjaxBehavior { private final Duration updateInterval ; private boolean attachedBodyOnLoadModifier = false ; public AbstractAjaxTimerBehavior ( final Duration updateInterval ) { } protected void onBind ( ) { } protected void onRenderHeadContribution ( final Response response ) { } protected final String getJsTimeoutCall ( final Duration updateInterval ) { <START_BUG> return ( ( ( "setTimeout(function()<seq2seq4repair_space>{<seq2seq4repair_space>" + ( getCallbackScript ( ) ) ) + "<seq2seq4repair_space>},<seq2seq4repair_space>" ) + ( updateInterval . getMilliseconds ( ) ) ) + ");" ; <END_BUG> } protected final void respond ( final AjaxRequestTarget target ) { } protected abstract void onTimer ( final AjaxRequestTarget target ) { } }

Fix:
return ( ( ( "setTimeout(function()<seq2seq4repair_space>{<seq2seq4repair_space>" + ( getCallbackScript ( false ) ) ) + "<seq2seq4repair_space>},<seq2seq4repair_space>" ) + ( updateInterval . getMilliseconds ( ) ) ) + ");" ;
Buggy code:
public class ForStatement extends Statement { public static final ChildListPropertyDescriptor INITIALIZERS_PROPERTY = new ChildListPropertyDescriptor ( ForStatement . class , "initializers" , Expression . class , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ForStatement . class , "expression" , Expression . class , ASTNode . OPTIONAL , ASTNode . CYCLE_RISK ) ; public static final ChildListPropertyDescriptor UPDATERS_PROPERTY = new ChildListPropertyDescriptor ( ForStatement . class , "updaters" , Expression . class , ASTNode . CYCLE_RISK ) ; public static final ChildPropertyDescriptor BODY_PROPERTY = new ChildPropertyDescriptor ( ForStatement . class , "body" , Statement . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private ASTNode . NodeList initializers = new ASTNode . NodeList ( ForStatement . INITIALIZERS_PROPERTY ) ; private Expression optionalConditionExpression = null ; private ASTNode . NodeList updaters = new ASTNode . NodeList ( ForStatement . UPDATERS_PROPERTY ) ; private Statement body = null ; ForStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final List internalGetChildListProperty ( ChildListPropertyDescriptor property ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List initializers ( ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } public List updaters ( ) { } public Statement getBody ( ) { if ( ( this . body ) == null ) { <START_BUG> synchronized ( this . ast ) { <END_BUG> if ( ( this . body ) == null ) { preLazyInit ( ) ; this . body = new Block ( this . ast ) ; postLazyInit ( this . body , ForStatement . BODY_PROPERTY ) ; } } } return this . body ; } public void setBody ( Statement statement ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
synchronized ( this ) {
Buggy code:
public class SuperColumnTest { @ Test public void testMissingSubcolumn ( ) { byte [ ] val = "sample<seq2seq4repair_space>value" . getBytes ( ) ; SuperColumn sc = new SuperColumn ( "sc1" ) ; <START_BUG> sc . addColumn ( "col1" , new Column ( "col1" , val , 1L ) ) ; <END_BUG> assertNotNull ( sc . getSubColumn ( "col1" ) ) ; assertNull ( sc . getSubColumn ( "col2" ) ) ; } }

Fix:
sc . addColumn ( new Column ( "col1" , val , 1L ) ) ;
Buggy code:
public class KeyPartitioner extends Partitioner < StringArrayWritable , StringArrayWritable > { @ Override public int getPartition ( StringArrayWritable key , StringArrayWritable value , int numPartitions ) { if ( numPartitions == 0 ) return 0 ; <START_BUG> return ( key . get ( ) [ 0 ] . toString ( ) . hashCode ( ) ) % numPartitions ; <END_BUG> } }

Fix:
return Math . abs ( ( ( key . get ( ) [ 0 ] . toString ( ) . hashCode ( ) ) % numPartitions ) ) ;
Buggy code:
public class SwtPerformanceTestCase extends TestCase { public static boolean verbose = false ; public static final boolean isGTK = SWT . getPlatform ( ) . equals ( "gtk" ) ; public static final boolean isWindows = SWT . getPlatform ( ) . startsWith ( "win32" ) ; public static String [ ] imageFormats = new String [ ] { "bmp" , "jpg" , "gif" , "png" } ; public static String [ ] imageFilenames = new String [ ] { "folder" , "folderOpen" , "target" } ; public static String [ ] transparentImageFilenames = new String [ ] { "transparent.png" } ; public SwtPerformanceTestCase ( String name ) { } protected PerformanceMeter createMeter ( String id ) { Performance performance = Performance . getDefault ( ) ; String scenarioId = "org.eclipse.swt.test." + id ; PerformanceMeter meter = performance . createPerformanceMeter ( scenarioId ) ; <START_BUG> performance . tagAsSummary ( meter , id , CPU_TIME ) ; <END_BUG> return meter ; } protected void disposeMeter ( PerformanceMeter meter ) { } protected String getPath ( String fileName ) { } protected boolean isJ2ME ( ) { } }

Fix:
performance . tagAsSummary ( meter , id , ELAPSED_PROCESS ) ;
Buggy code:
public class FinderQueryImpl implements FinderQuery < ClassMapping , SelectExecutor , Result > { private final ClassMapping _mapping ; private final SelectImpl _select ; private final Column [ ] _pkCols ; private final Joinable [ ] _joins ; private final int [ ] _pkIndices ; private final SQLBuffer _buffer ; private final String _sql ; static FinderQueryImpl newFinder ( ClassMapping mapping , SelectExecutor select ) { } private FinderQueryImpl ( ClassMapping mapping , SelectImpl select , SQLBuffer buffer ) { } public ClassMapping getIdentifier ( ) { } public SelectExecutor getDelegate ( ) { } public String getQueryString ( ) { } public Column [ ] getPKColumns ( ) { } private Object [ ] getPKValues ( OpenJPAStateManager sm , JDBCStore store ) { Object [ ] pks = null ; Object oid = sm . getObjectId ( ) ; if ( ( _mapping . getIdentityType ( ) ) == ( ClassMapping . ID_APPLICATION ) ) pks = ApplicationIds . toPKValues ( oid , _mapping ) ; Object [ ] val = new Object [ _pkCols . length ] ; int count = 0 ; for ( int i = 0 ; i < ( _pkCols . length ) ; i ++ , count ++ ) { if ( pks == null ) <START_BUG> val [ 0 ] = ( oid == null ) ? null : Numbers . valueOf ( ( ( org . apache . openjpa . util . Id ) ( oid ) ) . getId ( ) ) ; <END_BUG> else { val [ i ] = _joins [ i ] . getJoinValue ( pks [ _pkIndices [ i ] ] , _pkCols [ i ] , store ) ; } } return val ; } public Result execute ( OpenJPAStateManager sm , StoreManager store , FetchConfiguration fetch ) { } private static SelectImpl extractImplementation ( SelectExecutor selector ) { } public String toString ( ) { } }

Fix:
val [ 0 ] = ( oid == null ) ? null : ( ( org . apache . openjpa . util . Id ) ( oid ) ) . getId ( ) ;
Buggy code:
public class SourceFileScanner implements ResourceFactory { protected Task task ; private FileUtils fileUtils ; private File destDir ; public SourceFileScanner ( Task task ) { } public String [ ] restrict ( String [ ] files , File srcDir , File destDir , FileNameMapper mapper ) { this . destDir = destDir ; Vector v = new Vector ( ) ; for ( int i = 0 ; i < ( files . length ) ; i ++ ) { File src = fileUtils . resolveFile ( srcDir , files [ i ] ) ; v . addElement ( new Resource ( files [ i ] , src . exists ( ) , src . lastModified ( ) , src . isDirectory ( ) ) ) ; } Resource [ ] sourceresources = new Resource [ v . size ( ) ] ; v . copyInto ( sourceresources ) ; <START_BUG> Resource [ ] outofdate = SourceSelector . selectOutOfDateSources ( task , sourceresources , mapper , this ) ; <END_BUG> String [ ] result = new String [ outofdate . length ] ; for ( int counter = 0 ; counter < ( outofdate . length ) ; counter ++ ) { result [ counter ] = outofdate [ counter ] . getName ( ) ; } return result ; } public File [ ] restrictAsFiles ( String [ ] files , File srcDir , File destDir , FileNameMapper mapper ) { } public Resource getResource ( String name ) { } }

Fix:
Resource [ ] outofdate = ResourceUtils . selectOutOfDateSources ( task , sourceresources , mapper , this ) ;
Buggy code:
public class WeldBeanManagerServiceProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final DeploymentUnit topLevelDeployment = ( ( deploymentUnit . getParent ( ) ) == null ) ? deploymentUnit : deploymentUnit . getParent ( ) ; final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; final EEModuleDescription moduleDescription = deploymentUnit . getAttachment ( EE_MODULE_DESCRIPTION ) ; <START_BUG> if ( ! ( WeldDeploymentMarker . isWeldDeployment ( topLevelDeployment ) ) ) { <END_BUG> return ; } if ( ( ! ( deploymentUnit . getName ( ) . endsWith ( ".war" ) ) ) && ( ! ( deploymentUnit . getName ( ) . endsWith ( ".jar" ) ) ) ) { return ; } if ( moduleDescription == null ) { return ; } BeanDeploymentArchiveImpl rootBda = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT_BEAN_DEPLOYMENT_ARCHIVE ) ; if ( rootBda == null ) { rootBda = topLevelDeployment . getAttachment ( DEPLOYMENT_ROOT_BEAN_DEPLOYMENT_ARCHIVE ) ; } if ( rootBda == null ) { throw new RuntimeException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>BeanManager<seq2seq4repair_space>for<seq2seq4repair_space>deployment<seq2seq4repair_space>" + ( deploymentUnit . getName ( ) ) ) ) ; } final ServiceName weldServiceName = topLevelDeployment . getServiceName ( ) . append ( SERVICE_NAME ) ; final ServiceName beanManagerServiceName = deploymentUnit . getServiceName ( ) . append ( NAME ) ; BeanManagerService beanManagerService = new BeanManagerService ( rootBda . getId ( ) ) ; serviceTarget . addService ( beanManagerServiceName , beanManagerService ) . addDependency ( weldServiceName , WeldContainer . class , beanManagerService . getWeldContainer ( ) ) . install ( ) ; final ServiceName moduleContextServiceName = ContextNames . contextServiceNameOfModule ( moduleDescription . getAppName ( ) , moduleDescription . getModuleName ( ) ) ; bindBeanManager ( serviceTarget , beanManagerServiceName , moduleContextServiceName ) ; for ( AbstractComponentDescription component : moduleDescription . getComponentDescriptions ( ) ) { if ( ( component . getNamingMode ( ) ) == ( ComponentNamingMode . CREATE ) ) { final ServiceName compContextServiceName = ContextNames . contextServiceNameOfComponent ( moduleDescription . getAppName ( ) , moduleDescription . getModuleName ( ) , component . getComponentName ( ) ) ; bindBeanManager ( serviceTarget , beanManagerServiceName , compContextServiceName ) ; } } deploymentUnit . addToAttachmentList ( SETUP_ACTIONS , new WeldContextSetup ( ) ) ; } private void bindBeanManager ( ServiceTarget serviceTarget , ServiceName beanManagerServiceName , ServiceName contextServiceName ) { } @ Override public void undeploy ( DeploymentUnit deploymentUnit ) { } }

Fix:
if ( ! ( WeldDeploymentMarker . isPartOfWeldDeployment ( topLevelDeployment ) ) ) {
Buggy code:
public class RequestReaderTest { @ Test public void testConstructor ( ) { } @ Test ( expected = MessageSyntaxException . class ) public void testBadCommand ( ) { } @ Test ( expected = MessageSyntaxException . class ) public void testBadCommand2 ( ) { } @ Test ( expected = MessageSyntaxException . class ) public void testBadCommand3 ( ) { } @ Test ( expected = MessageSyntaxException . class ) public void testBadCommand4 ( ) { } @ Test public void testReadLogin ( ) { } @ Test public void testReadStaffLogin ( ) { } @ Test public void testReadVirtualLogin ( ) { } @ Test public void testReadNewVirtualLogin ( ) { } @ Test public void testReadLogout ( ) { } @ Test public void testReadVirtualLogout ( ) { RequestReader r = reader ( ) ; <START_BUG> Request req = r . read ( source ( "12:steve|]acc1|?here|" ) ) ; <END_BUG> assertEquals ( VIRTUAL_LOGOUT , req . getType ( ) ) ; LogoutRequest logout = ( ( LogoutRequest ) ( req ) ) ; assertEquals ( "steve" , logout . getUserName ( ) ) ; assertEquals ( "acc1" , logout . getAccount ( ) ) ; assertEquals ( "here" , logout . getFacility ( ) ) ; } @ Test public void testReadAccount ( ) { } @ Test public void testReadVirtualAccount ( ) { } @ Test public void testReadNewVirtualAccount ( ) { } @ Test public void testReadNotes ( ) { } @ Test public void testFacility ( ) { } @ Test public void testProject ( ) { } @ Test public void testTimer ( ) { } @ Test public void testFullScreen ( ) { } @ Test public void testFacilityType ( ) { } @ Test public void testFacilityCount ( ) { } @ Test public void testFacilityList ( ) { } @ Test public void testSystemPassword ( ) { } @ Test public void testNetDrive ( ) { } private RequestReader reader ( ) { } private InputStream source ( String text ) { } }

Fix:
Request req = r . read ( source ( "12:steve|secret|]acc1|?here|" ) ) ;
Buggy code:
public class ScarabRequestTool implements Recyclable , ScarabRequestScope { private RunData data ; private ScarabUser user = null ; private Issue issue = null ; private Attribute attribute = null ; private Attachment attachment = null ; private Depend depend = null ; private Query query = null ; private ModuleEntity module = null ; private AttributeOption attributeOption = null ; public void init ( Object data ) { } public void refresh ( ) { } public ScarabRequestTool ( ) { } public void setAttribute ( Attribute attribute ) { } public void setDepend ( Depend depend ) { } public void setQuery ( Query query ) { } private IntakeTool getIntakeTool ( ) { } public void setAttributeOption ( AttributeOption option ) { } public AttributeOption getAttributeOption ( ) throws Exception { } public void setUser ( ScarabUser user ) { } public ScarabUser getUser ( ) { } public ScarabUser getUser ( String id ) throws Exception { } public Attribute getAttribute ( ) throws Exception { } public Query getQuery ( ) throws Exception { } public Depend getDepend ( ) throws Exception { } public Attachment getAttachment ( ) throws Exception { } public void setModule ( ModuleEntity module ) { } public ModuleEntity getModule ( ) throws Exception { } public RModuleAttribute getRModuleAttribute ( ) throws Exception { } public ModuleEntity getModule ( String key ) throws Exception { } public void setIssue ( Issue issue ) { } public Issue getIssue ( ) throws Exception { } <START_BUG> public Issue getSearch ( ) throws Exception { <END_BUG> IssueSearch search = new IssueSearch ( ) ; search . setModuleCast ( ( ( ScarabUser ) ( getUser ( ) ) ) . getCurrentModule ( ) ) ; return search ; } public Issue getIssue ( String key ) { } private boolean disposed ; public void recycle ( ) { } public void dispose ( ) { } public boolean isDisposed ( ) { } }

Fix:
public IssueSearch getSearch ( ) throws Exception {
Buggy code:
public class GuideActivity extends Activity { private static final int NUM_GUIDE = 3 ; private ViewPager vp_guide ; private ImageView iv_dot1 ; private ImageView iv_dot2 ; private ImageView iv_dot3 ; private ImageView iv_start ; private List < ImageView > guideItems ; private SimpleOnPageChangeListener simpleOnPageChangeListener = new ViewPager . SimpleOnPageChangeListener ( ) { @ Override public void onPageSelected ( int position ) { } } ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void findView ( ) { } public void iv_start_onClick ( View view ) { } private void createItems ( ) { guideItems = new ArrayList < ImageView > ( GuideActivity . NUM_GUIDE ) ; int [ ] guides = new int [ ] { drawable . guide_1_bg , drawable . guide_2_bg , drawable . guide_3_bg } ; ImageView guideItem ; for ( int i = 0 ; i < ( GuideActivity . NUM_GUIDE ) ; i ++ ) { guideItem = new ImageView ( this ) ; guideItem . setImageResource ( guides [ i ] ) ; <START_BUG> guideItem . setScaleType ( CENTER ) ; <END_BUG> guideItems . add ( guideItem ) ; } } }

Fix:
guideItem . setScaleType ( FIT_XY ) ;
Buggy code:
public class Test_4a { private static final String TEST_PATH_3 = "collections//testCollections//third" ; private static InvertedIndex invertedIndex ; @ BeforeClass public static void setupBeforeClass ( ) throws FileNotFoundException { } @ Test public void testFirstTermMissing ( ) { } @ Test public void testSecondTermMissing ( ) { ArrayList < Integer > arrayList = Test_4a . invertedIndex . performANDNOTMerge ( "tiberius" , "marcus" ) ; Collections . sort ( arrayList ) ; Integer [ ] array = arrayList . toArray ( new Integer [ arrayList . size ( ) ] ) ; <START_BUG> assertArrayEquals ( new Integer [ ] { 1 } , array ) ; <END_BUG> } @ Test public void testSameTerm ( ) { } @ Test public void testNoSameDocuments ( ) { } @ Test public void testSomeSameDocumentsWithResults ( ) { } @ Test public void testSomeSameDocumentsWithoutResults ( ) { } }

Fix:
assertArrayEquals ( new Integer [ ] { 0 } , array ) ;
Buggy code:
public class Reference { private String refid ; public Reference ( ) { } public Reference ( String id ) { } public void setRefId ( String id ) { } public String getRefId ( ) { } public Object getReferencedObject ( Project project ) throws BuildException { if ( ( refid ) == null ) { throw new BuildException ( "No<seq2seq4repair_space>reference<seq2seq4repair_space>specified" ) ; } Object o = project . getReferences ( ) . get ( refid ) ; if ( o == null ) { <START_BUG> throw new BuildException ( ( ( "Refernce<seq2seq4repair_space>" + ( refid ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ) ; <END_BUG> } return o ; } }

Fix:
throw new BuildException ( ( ( "Reference<seq2seq4repair_space>" + ( refid ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found." ) ) ;
Buggy code:
public class WebResponseWithCryptedUrl extends WebResponse { private static Log log = LogFactory . getLog ( WebResponseWithCryptedUrl . class ) ; public WebResponseWithCryptedUrl ( final HttpServletResponse httpServletResponse ) { } public String encodeURL ( String url ) { <START_BUG> ICrypt urlCrypt = Application . get ( ) . newCrypt ( ) ; <END_BUG> if ( urlCrypt != null ) { final int pos = url . indexOf ( '?' ) ; if ( pos > 0 ) { String urlPrefix = url . substring ( 0 , pos ) ; String queryString = url . substring ( ( pos + 1 ) ) ; if ( ! ( queryString . startsWith ( "x=" ) ) ) { queryString = shortenUrl ( queryString ) ; final String encryptedQueryString = urlCrypt . encrypt ( queryString ) ; final String encryptedUrl = ( urlPrefix + "?x=" ) + ( escapeUrl ( encryptedQueryString ) ) ; return encryptedUrl ; } } } return url ; } private String escapeUrl ( String queryString ) { } private String shortenUrl ( String queryString ) { } }

Fix:
ICrypt urlCrypt = Application . get ( ) . getSecuritySettings ( ) . getCryptFactory ( ) . newCrypt ( ) ;
Buggy code:
public class BindTargets extends Task { private String extensionPoint ; private List targets = new ArrayList ( ) ; private String onMissingExtensionPoint ; public void setExtensionPoint ( String extensionPoint ) { } public void setOnMissingExtensionPoint ( String onMissingExtensionPoint ) { } public void setTargets ( String target ) { } public void execute ( ) throws BuildException { if ( ( extensionPoint ) == null ) { throw new BuildException ( "extensionPoint<seq2seq4repair_space>required" , getLocation ( ) ) ; } if ( ( ( getOwningTarget ( ) ) == null ) || ( ! ( "" . equals ( getOwningTarget ( ) . getName ( ) ) ) ) ) { throw new BuildException ( "bindtargets<seq2seq4repair_space>only<seq2seq4repair_space>allowed<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>top-level<seq2seq4repair_space>task" ) ; } if ( ( onMissingExtensionPoint ) == null ) { onMissingExtensionPoint = ProjectHelper . MISSING_EP_FAIL ; } if ( ( ( ! ( onMissingExtensionPoint . equals ( MISSING_EP_FAIL ) ) ) && ( ! ( onMissingExtensionPoint . equals ( MISSING_EP_IGNORE ) ) ) ) && ( ! ( onMissingExtensionPoint . equals ( MISSING_EP_WARN ) ) ) ) { throw new BuildException ( ( ( ( ( ( ( ( "onMissingExtensionPoint" + "<seq2seq4repair_space>attribute<seq2seq4repair_space>can<seq2seq4repair_space>only<seq2seq4repair_space>be<seq2seq4repair_space>'" ) + ( ProjectHelper . MISSING_EP_FAIL ) ) + "',<seq2seq4repair_space>'" ) + ( ProjectHelper . MISSING_EP_WARN ) ) + "'<seq2seq4repair_space>or<seq2seq4repair_space>'" ) + ( ProjectHelper . MISSING_EP_IGNORE ) ) + "'" ) , getLocation ( ) ) ; } ProjectHelper helper = ( ( ProjectHelper ) ( getProject ( ) . getReference ( PROJECTHELPER_REFERENCE ) ) ) ; Iterator itTarget = targets . iterator ( ) ; while ( itTarget . hasNext ( ) ) { <START_BUG> helper . getExtensionStack ( ) . add ( new String [ ] { ( ( String ) ( itTarget . next ( ) ) ) , extensionPoint , onMissingExtensionPoint } ) ; <END_BUG> } } }

Fix:
helper . getExtensionStack ( ) . add ( new String [ ] { extensionPoint , ( ( String ) ( itTarget . next ( ) ) ) , onMissingExtensionPoint } ) ;
Buggy code:
@ RunWith ( SpringJUnit4ClassRunner . class ) @ WebAppConfiguration @ ContextConfiguration ( locations = { "file:src//main//webapp//WEB-INF//config//spring*.xml" } ) public class IndexControllerIntegrationTest { @ Autowired private WebApplicationContext wac ; private MockMvc mockMvc ; @ Before public void setup ( ) { } @ Test public void testSecurityError ( ) throws Exception { } @ Test public void testPath ( ) throws Exception { <START_BUG> this . mockMvc . perform ( get ( "//ecogame//" ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( forwardedUrl ( "//ecogame//game//start" ) ) ; <END_BUG> } @ Test public void testNotFound ( ) throws Exception { } @ Test public void testLogin ( ) throws Exception { } }

Fix:
this . mockMvc . perform ( get ( "//ecogame//" ) ) . andExpect ( status ( ) . isOk ( ) ) . andExpect ( forwardedUrl ( "//ecogame//login" ) ) ;
Buggy code:
@ FixMethodOrder ( MethodSorters . NAME_ASCENDING ) public class BasicTest { private BasicTest . AccountPojo account ; private void initializePojo ( ) { } @ Test public void basicTest001 ( ) { } @ Test public void basicTest002 ( ) { } @ Test public void basicTest003 ( ) { } @ Test public void basicTest004 ( ) { this . initializePojo ( ) ; <START_BUG> final String fields = "emails(uid,email),*" ; <END_BUG> final Partialize partialize = new Partialize ( ) ; final ContainerNode result = partialize . buildPartialObject ( fields , BasicTest . AccountPojo . class , this . account ) ; Assert . assertNotNull ( result ) ; Assert . assertEquals ( "John" , result . get ( "firstName" ) . asText ( ) ) ; Assert . assertEquals ( "Smith" , result . get ( "lastName" ) . asText ( ) ) ; Assert . assertTrue ( result . get ( "emails" ) . has ( 0 ) ) ; Assert . assertTrue ( result . get ( "emails" ) . has ( 1 ) ) ; Assert . assertFalse ( result . get ( "emails" ) . has ( 2 ) ) ; Assert . assertTrue ( result . get ( "emails" ) . get ( 0 ) . has ( "email" ) ) ; Assert . assertTrue ( result . get ( "emails" ) . get ( 0 ) . has ( "uid" ) ) ; Assert . assertFalse ( result . get ( "emails" ) . get ( 0 ) . has ( "id" ) ) ; Assert . assertEquals ( this . account . getEmails ( ) . get ( 0 ) . getUid ( ) . toString ( ) , result . get ( "emails" ) . get ( 0 ) . get ( "uid" ) . asText ( ) ) ; } @ com . zero_x_baadf00d . partialize . annotation . Partialize ( allowedFields = { "uid" , "email" , "isDefault" } , defaultFields = "uid" ) public static class EmailPojo { private int id ; private UUID uid ; private String email ; private boolean isDefault ; public int getId ( ) { } public void setId ( int id ) { } public UUID getUid ( ) { } public void setUid ( UUID uid ) { } public String getEmail ( ) { } public void setEmail ( String email ) { } public boolean isDefault ( ) { } public void setDefault ( boolean aDefault ) { } } @ com . zero_x_baadf00d . partialize . annotation . Partialize ( allowedFields = { "uid" , "firstName" , "lastName" , "emails" } , defaultFields = { "uid" , "firstName" , "lastName" } ) public static class AccountPojo { private int id ; private UUID uid ; private String firstName ; private String lastName ; private List < BasicTest . EmailPojo > emails ; public int getId ( ) { } public void setId ( int id ) { } public UUID getUid ( ) { } public void setUid ( UUID uid ) { } public String getFirstName ( ) { } public void setFirstName ( String firstName ) { } public String getLastName ( ) { } public void setLastName ( String lastName ) { } public List < BasicTest . EmailPojo > getEmails ( ) { } public void setEmails ( List < BasicTest . EmailPojo > emails ) { } } }

Fix:
final String fields = "*,emails(uid,email)" ;
Buggy code:
public class Elvis extends SpelNodeImpl { public Elvis ( int pos , SpelNodeImpl ... args ) { } @ Override public TypedValue getValueInternal ( ExpressionState state ) throws EvaluationException { TypedValue value = children [ 0 ] . getValueInternal ( state ) ; <START_BUG> if ( ( value . getValue ( ) ) != null ) { <END_BUG> return value ; } else { return children [ 1 ] . getValueInternal ( state ) ; } } @ Override public String toStringAST ( ) { } }

Fix:
if ( ( ( value . getValue ( ) ) != null ) && ( ! ( ( ( value . getValue ( ) ) instanceof String ) && ( ( ( ( String ) ( value . getValue ( ) ) ) . length ( ) ) == 0 ) ) ) ) {
Buggy code:
public class SettingsActivity extends PreferenceActivity { private SharedPreferences preferences ; private static String PREFERENCES_KEY_APP_VERSION = "PREFERENCES_KEY_APP_VERSION" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . HONEYCOMB ) ) { ActionBar actionBar = getActionBar ( ) ; actionBar . setDisplayHomeAsUpEnabled ( true ) ; actionBar . setDisplayUseLogoEnabled ( false ) ; actionBar . setDisplayShowHomeEnabled ( false ) ; } addPreferencesFromResource ( settings ) ; preferences = PreferenceManager . getDefaultSharedPreferences ( this ) ; try { String appVersion = getPackageManager ( ) . getPackageInfo ( getPackageName ( ) , 0 ) . versionName ; SharedPreferences . Editor editor = preferences . edit ( ) ; editor . putString ( SettingsActivity . PREFERENCES_KEY_APP_VERSION , appVersion ) ; <START_BUG> editor . commit ( ) ; <END_BUG> } catch ( PackageManager e ) { Log . e ( TAG , e . getLocalizedMessage ( ) ) ; } } @ Override protected void onPostCreate ( Bundle savedInstanceState ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
editor . apply ( ) ;
Buggy code:
public class CompilerHint extends Element { public static enum HintType { PAGEBREAK , FLOATBREAK ; } public EnumSet < CompilerHint . HintType > types ; public CompilerHint ( CompilerHint . HintType type ) { } public CompilerHint ( EnumSet < CompilerHint . HintType > types ) { } @ Override public void layout ( ITracer trace , PageWriter writer ) throws IOException , LayoutException { Iterator < CompilerHint . HintType > hints = types . iterator ( ) ; while ( hints . hasNext ( ) ) { CompilerHint . HintType whatHint = hints . next ( ) ; switch ( whatHint ) { case FLOATBREAK : PageCursor cursor = writer . cursor ( ) ; Page current = writer . current ( ) ; Element lowest = null ; int dfx = 0 ; <START_BUG> for ( Element elem : current . elements ) { <END_BUG> int dux = ( elem . bounds ( ) . y ) + ( elem . bounds ( ) . height ) ; if ( dux > dfx ) { dfx = dux ; lowest = elem ; } } if ( ! ( lowest . bounds ( ) . floating ( ) ) ) return ; if ( ( lowest . bounds ( ) . x ) == 0 ) cursor . left ( ( ( lowest . bounds ( ) . x ) + ( lowest . bounds ( ) . width ) ) ) ; cursor . top ( dfx ) ; break ; case PAGEBREAK : writer . next ( ) ; break ; default : throw new LayoutException ( ( "Unknown<seq2seq4repair_space>compiler<seq2seq4repair_space>hint:<seq2seq4repair_space>" + ( whatHint == null ? "<null>" : whatHint . getClass ( ) . getName ( ) ) ) ) ; } } } @ Override public boolean canUpdate ( ) { } @ Override public void update ( ) { } @ Override public void render ( BookGUI gui , int mx , int my , float frame ) { } @ Override public void clicked ( BookGUI gui , int mx , int my ) { } @ Override public void typed ( BookGUI gui , char val , int code ) { } }

Fix:
for ( Element elem : current . elements ( ) ) {
Buggy code:
public class MultiSourceTypeFactory implements TypeFactory { private static final Resources REZ = ResourceManager . getPackageResources ( MultiSourceTypeFactory . class ) ; private final MultiSourceTypeFactory m_parent ; private final HashMap m_factorys = new HashMap ( ) ; private final Class m_type ; public MultiSourceTypeFactory ( final Class type ) { } public MultiSourceTypeFactory ( final MultiSourceTypeFactory parent ) { } public void register ( final String name , final TypeFactory factory ) { } public Object create ( final String name ) throws TypeException { TypeFactory factory = getTypeFactory ( name ) ; if ( ( null == factory ) && ( null != ( m_parent ) ) ) { factory = m_parent . getTypeFactory ( name ) ; } if ( null == factory ) { final String message = MultiSourceTypeFactory . REZ . getString ( "no-factory.error" , name ) ; throw new TypeException ( message ) ; } else { final Object object = factory . create ( name ) ; if ( ! ( m_type . isInstance ( object ) ) ) { <START_BUG> final String message = MultiSourceTypeFactory . REZ . getString ( "no-factory.error" , name , m_type . getName ( ) ) ; <END_BUG> throw new TypeException ( message ) ; } return object ; } } protected final Class getType ( ) { } protected final TypeFactory getTypeFactory ( final String name ) { } }

Fix:
final String message = MultiSourceTypeFactory . REZ . getString ( "mismatched-type.error" , name , object . getClass ( ) . getName ( ) ) ;
Buggy code:
public abstract class Scrollable extends Control { int scrolledHandle ; ScrollBar horizontalBar ; ScrollBar verticalBar ; Scrollable ( ) { } public Scrollable ( Composite parent , int style ) { } int clientHandle ( ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } ScrollBar createScrollBar ( int style ) { } void createWidget ( int index ) { } void deregister ( ) { } public int getBorderWidth ( ) { } public Rectangle getClientArea ( ) { } public ScrollBar getHorizontalBar ( ) { } public ScrollBar getVerticalBar ( ) { } int hScrollBarWidth ( ) { } void setOrientation ( ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { if ( ( scrolledHandle ) == 0 ) return false ; int [ ] hsp = new int [ 1 ] ; int [ ] vsp = new int [ 1 ] ; OS . gtk_scrolled_window_get_policy ( scrolledHandle , hsp , vsp ) ; int policy = ( visible ) ? OS . GTK_POLICY_ALWAYS : OS . GTK_POLICY_NEVER ; <START_BUG> if ( ( ( style ) & ( SWT . HORIZONTAL ) ) != 0 ) { <END_BUG> if ( ( hsp [ 0 ] ) == policy ) return false ; hsp [ 0 ] = policy ; } else { if ( ( vsp [ 0 ] ) == policy ) return false ; vsp [ 0 ] = policy ; } OS . gtk_scrolled_window_set_policy ( scrolledHandle , hsp [ 0 ] , vsp [ 0 ] ) ; OS . gtk_container_resize_children ( scrolledHandle ) ; bar . sendEvent ( ( visible ? SWT . Show : SWT . Hide ) ) ; sendEvent ( Resize ) ; return true ; } void register ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } void resizeHandle ( int width , int height ) { } void showWidget ( ) { } int topHandle ( ) { } int vScrollBarWidth ( ) { } }

Fix:
if ( ( ( bar . style ) & ( SWT . HORIZONTAL ) ) != 0 ) {
Buggy code:
public class GtasksListFragment extends SubtasksListFragment { protected static final int MENU_CLEAR_COMPLETED_ID = ( MENU_ADDON_INTENT_ID ) + 1 ; public static final String TOKEN_STORE_ID = "storeId" ; protected static final int MENU_REFRESH_ID = ( MENU_SUPPORT_ID ) + 1 ; @ Autowired private StoreObjectDao storeObjectDao ; @ Autowired private GtasksTaskListUpdater gtasksTaskListUpdater ; @ Autowired private GtasksMetadataService gtasksMetadataService ; @ Autowired private GtasksPreferenceService gtasksPreferenceService ; @ Autowired private SyncV2Service syncService ; private StoreObject list ; private static final Property < ? > [ ] LIST_PROPERTIES = new Property < ? > [ ] { StoreObject . ID , StoreObject . TYPE , GtasksList . REMOTE_ID , GtasksList . ORDER , GtasksList . NAME , GtasksList . LAST_SYNC } ; @ Override protected OrderedListFragmentHelper < ? > createFragmentHelper ( ) { } @ Override protected boolean allowResorting ( ) { } @ Override public void onActivityCreated ( Bundle icicle ) { } @ Override protected void initiateAutomaticSync ( ) { } @ Override protected void onTaskDelete ( Task task ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean handleOptionsMenuItemSelected ( int id , Intent intent ) { } private void clearCompletedTasks ( ) { } @ Override protected void addSyncRefreshMenuItem ( Menu menu , int themeFlags ) { if ( gtasksPreferenceService . isLoggedIn ( ) ) { <START_BUG> addMenuItem ( menu , actfm_TVA_menu_refresh , ThemeService . getDrawable ( icn_menu_refresh , themeFlags ) , GtasksListFragment . MENU_REFRESH_ID , false ) ; <END_BUG> } else { super . addSyncRefreshMenuItem ( menu , themeFlags ) ; } } }

Fix:
addMenuItem ( menu , actfm_TVA_menu_refresh , ThemeService . getDrawable ( icn_menu_refresh , themeFlags ) , GtasksListFragment . MENU_REFRESH_ID , true ) ;
Buggy code:
public class VarLongWritable implements Cloneable , WritableComparable < VarLongWritable > { private long value ; public VarLongWritable ( ) { } public VarLongWritable ( long value ) { } public long get ( ) { } public void set ( long value ) { } @ Override public boolean equals ( Object other ) { <START_BUG> return ( ( other != null ) && ( VarLongWritable . class . equals ( other . getClass ( ) ) ) ) && ( ( ( ( VarLongWritable ) ( other ) ) . value ) == ( value ) ) ; <END_BUG> } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } @ Override public VarLongWritable clone ( ) { } @ Override public int compareTo ( VarLongWritable other ) { } @ Override public void write ( DataOutput out ) throws IOException { } @ Override public void readFields ( DataInput in ) throws IOException { } }

Fix:
return ( ( other != null ) && ( getClass ( ) . equals ( other . getClass ( ) ) ) ) && ( ( ( ( VarLongWritable ) ( other ) ) . value ) == ( value ) ) ;
Buggy code:
public class SchemaNode { public Tagpath tagpath ; public String namespace ; public String yang_node_type ; public String type ; public String yang_java_type ; public int primitive_type ; public int min_occurs ; public int max_occurs ; public String [ ] children ; public String [ ] yang_children ; public long flags ; public String desc ; public RevisionInfo [ ] revInfo ; @ Override public String toString ( ) { } public static SchemaNode get ( Element e ) { <START_BUG> return SchemaTree . lookup ( e . namespace , e . tagpath ( ) ) ; <END_BUG> } }

Fix:
return SchemaTree . lookup ( e . getRootElement ( ) . namespace , e . tagpath ( ) ) ;
Buggy code:
public class POP3Server { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.folder.headercache" ) ; private static final long DAY_IN_MS = ( ( 24 * 60 ) * 60 ) * 1000 ; private AccountItem accountItem ; private File file ; private boolean alreadyLoaded ; private POP3Store store ; protected POP3HeaderCache headerCache ; private Lock lock ; private boolean cacheChanged ; public POP3Server ( AccountItem accountItem ) { } public void save ( ) throws Exception { } public File getConfigFile ( ) { } public AccountItem getAccountItem ( ) { } public MessageFolder getFolder ( ) { } public void logout ( ) throws Exception { } public void forceLogout ( ) throws Exception { } public List synchronize ( ) throws Exception { } public void deleteMessage ( Object uid ) throws IOException , CommandCancelledException , POP3Exception { try { store . deleteMessage ( uid ) ; headerCache . remove ( uid ) ; setCacheChanged ( true ) ; } catch ( POP3Exception e ) { <START_BUG> if ( e . getResponse ( ) . isERR ( ) ) { <END_BUG> headerCache . remove ( uid ) ; setCacheChanged ( true ) ; } else throw e ; } } public void deleteMessagesOlderThan ( Date date ) throws IOException , CommandCancelledException , POP3Exception { } public void cleanUpServer ( ) throws IOException , CommandCancelledException , POP3Exception { } public int getMessageCount ( ) throws Exception { } public ColumbaMessage getMessage ( Object uid ) throws Exception { } public int getMessageSize ( Object uid ) throws Exception { } public String getFolderName ( ) { } public POP3Store getStore ( ) { } public StatusObservable getObservable ( ) { } public boolean tryToGetLock ( Object locker ) { } public void releaseLock ( Object locker ) { } public boolean isCacheChanged ( ) { } private void setCacheChanged ( boolean hasChanged ) { } public void updateConfig ( ) { } }

Fix:
if ( ( ( e . getResponse ( ) ) != null ) && ( e . getResponse ( ) . isERR ( ) ) ) {
Buggy code:
public class OBISMsgFactory { private static final Logger logger = LoggerFactory . getLogger ( OBISMsgFactory . class ) ; private final HashMap < OBISIdentifier , List < OBISMsgType > > obisLookupTable ; public OBISMsgFactory ( List < DSMRMeter > dsmrMeters ) { } public OBISMessage getMessage ( String obisIdString , LinkedList < String > cosemStringValues ) { OBISIdentifier obisId = null ; OBISIdentifier reducedObisId = null ; try { obisId = new OBISIdentifier ( obisIdString ) ; reducedObisId = obisId . getReducedOBISIdentifier ( ) ; } catch ( ParseException pe ) { <START_BUG> OBISMsgFactory . logger . error ( ( "Received<seq2seq4repair_space>invalid<seq2seq4repair_space>OBIS<seq2seq4repair_space>identifer:" + obisIdString ) ) ; <END_BUG> return null ; } OBISMsgFactory . logger . debug ( ( ( ( ( ( "Received<seq2seq4repair_space>obisIdString<seq2seq4repair_space>" + obisIdString ) + ",<seq2seq4repair_space>obisId:" ) + obisId ) + ",<seq2seq4repair_space>values:" ) + cosemStringValues ) ) ; if ( obisLookupTable . containsKey ( reducedObisId ) ) { List < OBISMsgType > compatibleMsgTypes = obisLookupTable . get ( reducedObisId ) ; OBISMessage msg = null ; OBISMsgFactory . logger . debug ( ( ( "Found<seq2seq4repair_space>" + ( compatibleMsgTypes . size ( ) ) ) + "<seq2seq4repair_space>compatible<seq2seq4repair_space>message<seq2seq4repair_space>type(s)" ) ) ; for ( OBISMsgType msgType : compatibleMsgTypes ) { msg = new OBISMessage ( msgType ) ; try { OBISMsgFactory . logger . debug ( ( "Parse<seq2seq4repair_space>values<seq2seq4repair_space>for<seq2seq4repair_space>OBIS<seq2seq4repair_space>Message<seq2seq4repair_space>type:" + msgType ) ) ; msg . parseCosemValues ( cosemStringValues ) ; return msg ; } catch ( ParseException pe ) { OBISMsgFactory . logger . debug ( ( ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>OBIS<seq2seq4repair_space>identifer<seq2seq4repair_space>" + obisId ) + ",<seq2seq4repair_space>values:" ) + cosemStringValues ) + "<seq2seq4repair_space>for<seq2seq4repair_space>type" ) + msgType ) , pe ) ; } } OBISMsgFactory . logger . error ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>OBIS<seq2seq4repair_space>identifier<seq2seq4repair_space>" + obisId ) + ",<seq2seq4repair_space>values:" ) + cosemStringValues ) ) ; } else { OBISMsgFactory . logger . warn ( ( "Received<seq2seq4repair_space>OBIS<seq2seq4repair_space>unknown<seq2seq4repair_space>message:" + obisId ) ) ; } return null ; } private void fillLookupTable ( Map < DSMRMeterType , Integer > mapping ) { } }

Fix:
OBISMsgFactory . logger . error ( ( "Received<seq2seq4repair_space>invalid<seq2seq4repair_space>OBIS<seq2seq4repair_space>identifier:" + obisIdString ) ) ;